/* Mùa Ruộng — bản demo & trang truy xuất */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sb { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 22px 18px; display: flex; flex-direction: column; gap: 18px; background: var(--paper-2) var(--grain); }
.sb-logo { text-decoration: none; padding: 4px 8px; }
.sb-coop { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); }
.sb-coop img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.sb-coop div { display: grid; line-height: 1.3; }
.sb-coop b { font-weight: 600; font-size: 15px; }
.sb-coop span { font-size: 13px; color: var(--ink-3); }
.sb-search { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-3); cursor: pointer; font-size: 15px; }
.sb-search span { flex: 1; text-align: left; }
.sb-search:hover { background: var(--card); }
.sb nav { display: grid; gap: 4px; }
.sb-g { font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 14px 12px 6px; }
.sb ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sb nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s; position: relative; }
.sb nav a:hover { background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--ink); }
.sb nav a.on { background: var(--card); color: var(--ink); font-weight: 600; }
.sb nav a.on::before { content: ""; position: absolute; left: -18px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ma); }
.sb nav a.on .ic { color: var(--ma); }
.sb-foot { margin-top: auto; display: grid; gap: 12px; padding-top: 12px; }
.sb-back { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); text-decoration: none; padding: 8px; }
.sb-back:hover { color: var(--ink); }
.sb-back .ic { width: 18px; height: 18px; }
.ac { min-width: 0; display: flex; flex-direction: column; }
.tb { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 14px clamp(20px, 3vw, 44px); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tb-logo { display: none; text-decoration: none; }
.tb-search { display: none; }
.tb-r { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.tb-demo { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--lua-ink); padding: 8px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lua) 45%, transparent); }
.tb-me { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #E6D3AE; color: #2F2616; font-weight: 600; font-size: 14px; }
.main { padding: 8px clamp(20px, 3vw, 44px) 80px; outline: none; max-width: 1440px; width: 100%; }
.main.anim .blk { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.tabbar { display: none; }

/* khối chung */
.card { background: var(--card); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); min-width: 0; }
.ch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ch h2 { font: 500 22px/1.2 var(--serif); letter-spacing: -.01em; }
.k { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 12px 0 10px; }
.big b { font: 400 clamp(48px, 5vw, 68px)/1 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big span { font-size: 17px; color: var(--ink-2); }
.mid { font: 400 40px/1.05 var(--serif); letter-spacing: -.02em; margin: -4px 0 18px; font-variant-numeric: tabular-nums; }
.vh { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 24px 0 28px; flex-wrap: wrap; }
.vh-t { font: 400 clamp(30px, 3.2vw, 42px)/1.08 var(--serif); letter-spacing: -.02em; }
.vh-s { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.strip { position: relative; height: 220px; border-radius: 20px; overflow: hidden; margin: 8px 0 28px; color: #F7F1E3; isolation: isolate; }
.strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.strip::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(22, 18, 9, .74), rgba(22, 18, 9, .1) 70%); }
.strip-in { position: absolute; left: 32px; bottom: 28px; right: 32px; }
.strip-in p { margin-top: 8px; font-size: 16px; color: rgba(247, 241, 227, .9); }
.strip-tag { position: absolute; right: 24px; top: 22px; background: #EADBBE var(--grain); color: #2F2616; font: 600 13px/1 var(--sans); padding: 10px 14px; border-radius: 4px; transform: rotate(2deg); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 8px 0 12px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.back:hover { color: var(--ink); }
.back .ic { width: 18px; height: 18px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.seg button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s, box-shadow .2s, transform .18s var(--ease); color: var(--ink-2); }
.seg button:hover { background: var(--card); }
.seg button:active { transform: scale(.97); }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.tools .seg { margin-bottom: 16px; }
.tools-r { display: flex; gap: 10px; margin-bottom: 16px; }
.srch { position: relative; display: block; width: 280px; }
.srch .ic { position: absolute; left: 14px; top: 14px; color: var(--ink-3); }
.srch input { padding-left: 44px !important; background: var(--card) !important; }
.sel select { background: var(--card); min-width: 190px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 32px 16px; }
.empty img { width: 160px; height: 110px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; filter: saturate(.85); }
.empty h3 { font: 500 20px/1.3 var(--serif); }
.empty p { color: var(--ink-3); max-width: 36ch; font-size: 15px; }
.empty .btn { margin-top: 12px; }

/* skeleton */
.sk { display: grid; gap: 24px; padding-top: 8px; }
.sk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.sk-b { height: 160px; border-radius: 18px; background: linear-gradient(100deg, var(--paper-2) 30%, color-mix(in srgb, var(--card) 80%, var(--paper-2)) 50%, var(--paper-2) 70%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* tổng quan */
.ov { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.ov .focal { grid-column: span 8; }
.ov .mapcard { grid-column: span 4; }
.ov > .card:nth-child(3), .ov > .card:nth-child(4) { grid-column: span 6; }
.ov .dues, .ov .low { grid-column: span 6; }
.focal .btn { margin-top: 24px; }
.sbar { display: flex; gap: 3px; margin-top: 26px; height: 74px; }
.sbar span { position: relative; background: var(--c); border-radius: 6px; min-width: 6px; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px 10px; overflow: hidden; color: #1F2417; }
.sbar span.nhanh, .sbar span.dong, .sbar span.sa { color: #F7F3E8; }
.sbar span.gat { background: repeating-linear-gradient(135deg, #CDB990 0 5px, #B79F72 5px 6.5px); }
.sbar em { font-style: normal; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sbar b { font-size: 13px; font-weight: 500; opacity: .85; white-space: nowrap; }
.sbar span.nar em, .sbar span.nar b { visibility: hidden; }
.mapcard { display: flex; flex-direction: column; gap: 14px; padding: 16px; text-decoration: none; transition: transform .3s var(--ease); }
.mapcard:hover { transform: translateY(-3px); }
.mapcard .map { border-radius: 12px; flex: 1; width: 100%; height: 100%; min-height: 240px; }
.mapcard span { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 0 6px 4px; }
.rlist, .tasks, .mini-h, .lowl, .hhl, .uses, .slips, .morel { list-style: none; margin: 0; padding: 0; }
.ri { display: flex; align-items: center; gap: 16px; padding: 10px; margin: 0 -10px; border-radius: 14px; text-decoration: none; transition: background .2s; min-height: 76px; }
.ri:hover { background: var(--paper); }
.ri img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.ri span { display: grid; min-width: 0; flex: 1; }
.ri b { font-weight: 600; font-size: 15px; }
.ri small { font-size: 14px; color: var(--ink-3); }
.ri em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.ri em.now { color: var(--lua-ink); }
.tasks li { display: flex; align-items: center; gap: 14px; padding: 12px 0; min-height: 64px; }
.tasks li + li { border-top: 1px solid var(--line); }
.tasks li > span:not(.tk) { flex: 1; display: grid; min-width: 0; }
.tasks b { font-weight: 600; font-size: 15px; }
.tasks small { font-size: 14px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tasks em { font-style: normal; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tasks em.late { color: var(--late); }
.tk { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--spring); }
.tk:hover:not([disabled]) { color: var(--ma); box-shadow: inset 0 0 0 1.5px var(--ma); }
.tk:active { transform: scale(.9); }
.tk.sickle { color: var(--lua-ink); background: color-mix(in srgb, var(--lua) 18%, var(--card)); box-shadow: none; }
.tasks li.done .tk { background: var(--ma); color: var(--on-ma); box-shadow: none; cursor: default; }
.tasks li.done b { text-decoration: line-through; text-decoration-color: var(--ink-3); color: var(--ink-3); }
.mini-h li a { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; min-height: 56px; }
.mini-h span:not(.av) { flex: 1; font-size: 15px; }
.mini-h b { font-weight: 600; font-variant-numeric: tabular-nums; }
.dues > .lnk { display: inline-block; margin-top: 14px; }
.lowl li { display: flex; gap: 14px; align-items: center; padding: 8px 0; }
.lowl span { display: grid; }
.lowl b { font-weight: 600; font-size: 15px; }
.lowl small { font-size: 14px; color: var(--ink-3); }
.pk { flex: none; border-radius: 12px; }

/* bản đồ */
.map .map-bg { fill: #9C8A64; }
[data-theme="dark"] .map .map-bg { fill: #3E3726; }
.map .canal-bank { fill: none; stroke: #6F8A55; stroke-width: 46; stroke-linecap: round; opacity: .55; }
.map .canal { fill: none; stroke: #7FA3A1; stroke-width: 18; stroke-linecap: round; }
[data-theme="dark"] .map .canal { stroke: #4F6E6C; }
.map-trees circle { fill: #3E5A2A; opacity: .9; }
.map .lot { cursor: pointer; outline: none; }
.map .lot-f { stroke: #EADBBE; stroke-width: 2; transition: filter .2s, stroke .2s, stroke-width .2s; }
.map .lot:hover .lot-f { filter: brightness(1.08); }
.map .lot.sel .lot-f, .map .lot:focus-visible .lot-f { stroke: #1F2417; stroke-width: 4; }
[data-theme="dark"] .map .lot.sel .lot-f, [data-theme="dark"] .map .lot:focus-visible .lot-f { stroke: #F2ECDF; }
.map .lot.dim { opacity: .32; }
.map .lot-r { pointer-events: none; }
.map .lot-id { font: 600 24px var(--sans); fill: #1F2417; text-anchor: middle; pointer-events: none; }
.map .lot-ha { font: 500 17px var(--sans); fill: #1F2417; opacity: .8; text-anchor: middle; pointer-events: none; }
.map .lt { fill: #F7F3E8; }
.map.mini .lot-id { font-size: 30px; }
.map .canal-t { font: italic 500 16px var(--serif); fill: #F2ECDF; }
.map .compass path { fill: #F2ECDF; }
.map .compass text { font: 600 13px var(--sans); fill: #F2ECDF; }
.mapwrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.mapbox { background: var(--card); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.mapbox .map { border-radius: 12px; width: 100%; height: auto; }
.map-side { display: grid; gap: 20px; }
.tl, .map-info, .legend { background: var(--card); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.tl .k { display: block; }
.tl-d { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.tl-d b { font: 400 28px/1 var(--serif); font-variant-numeric: tabular-nums; }
.tl-d span { color: var(--ink-3); font-size: 14px; }
.tl-sc { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-3); }
.tl-sc .lnk { font-size: 14px; min-height: 44px; }
.legend { list-style: none; margin: 0; display: grid; gap: 4px; }
.legend li { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 15px; }
.legend i { width: 18px; height: 18px; border-radius: 5px; background: var(--c); }
.legend li.gat i { background: repeating-linear-gradient(135deg, #CDB990 0 4px, #A88E62 4px 5.5px); }
.legend span { flex: 1; }
.legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.peek { display: grid; gap: 16px; }
.peek img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; }
.peek > div { display: grid; gap: 10px; justify-items: start; }
.peek-t { font: 500 20px/1.25 var(--serif); }

/* chi tiết lô */
.lhero { position: relative; height: clamp(260px, 36vh, 380px); border-radius: 22px; overflow: hidden; color: #F7F1E3; isolation: isolate; }
.lhero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.lhero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 18, 9, 0) 30%, rgba(22, 18, 9, .78)); }
.lhero-in { position: absolute; left: 32px; right: 32px; bottom: 28px; }
.lhero-k { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #F0D28C; }
.lhero h1 { font: 400 clamp(34px, 4vw, 52px)/1.05 var(--serif); letter-spacing: -.02em; margin: 8px 0 14px; }
.lhero-m { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.lhero .chip { background: rgba(251, 248, 241, .92); color: #1F2417; }
.f3btn { position: absolute; right: 24px; top: 22px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 28px 0; }
.facts > div { display: grid; gap: 6px; }
.facts span { font-size: 14px; color: var(--ink-3); }
.facts b { font: 400 28px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.facts.sm b { font-size: 22px; }
.prog { margin: 0 0 32px; padding-top: 30px; }
.prog-bar { position: relative; display: flex; gap: 3px; height: 40px; }
.prog-bar > span { background: color-mix(in srgb, var(--c) 30%, var(--paper-2)); border-radius: 6px; display: flex; align-items: center; padding: 0 10px; overflow: hidden; }
.prog-bar > span.past { background: var(--c); }
.prog-bar em { font-style: normal; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.prog-bar > span.past em { color: #1F2417; }
.prog-now { position: absolute; top: -30px; bottom: -6px; width: 2px; background: var(--late); }
.prog-now b { position: absolute; top: 0; left: 8px; font-size: 13px; font-weight: 600; color: var(--late); white-space: nowrap; }
.lcols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.lside { display: grid; gap: 24px; }
.lside .map { border-radius: 12px; }
.logs { list-style: none; margin: 0; padding: 0; }
.lg { position: relative; display: grid; grid-template-columns: 72px 44px minmax(0, 1fr) auto 44px; gap: 16px; align-items: start; padding: 20px 0; background-image: repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, var(--ma) 7%, transparent) 31px 32px); background-position: 0 12px; }
.lg + .lg { border-top: 1px solid var(--line); }
.lg-d { display: grid; line-height: 1.2; padding-top: 2px; }
.lg-d b { font: 500 20px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.lg-d span { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.lg-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ma-soft); color: var(--ma-2); }
[data-theme="dark"] .lg-ic { color: var(--ma); }
.lg-b { display: grid; gap: 6px; min-width: 0; font-size: 15px; }
.lg-t { font-weight: 600; }
.lg-it { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lg-it li { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--paper-2); }
.lg-by { font-size: 13px; color: var(--ink-3); }
.lg-ph { width: 96px; height: 72px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; transition: transform .3s var(--ease); }
.lg-ph:hover { transform: scale(1.04); }
.lg-ph img { width: 100%; height: 100%; object-fit: cover; }
.lg-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .2s, background .2s; }
.lg:hover .lg-x, .lg-x:focus-visible { opacity: 1; }
.lg-x:hover { background: color-mix(in srgb, var(--late) 12%, transparent); color: var(--late); }
.hhl li a { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; min-height: 60px; }
.hhl li + li a { border-top: 1px solid var(--line); }
.hhl span:not(.av) { flex: 1; display: grid; min-width: 0; }
.hhl b { font-weight: 600; font-size: 15px; }
.hhl small { font-size: 13px; color: var(--ink-3); }
.hhl em { font-style: normal; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.f3m .f3.inmodal { aspect-ratio: 16 / 9; border-radius: 0 0 20px 20px; margin-top: 16px; }
.lbx { margin: 0; position: relative; }
.lbx img { width: 100%; max-height: 80vh; object-fit: cover; border-radius: 20px; }
.lbx .ib { position: absolute; right: 12px; top: 12px; background: rgba(251, 248, 241, .92); color: #1F2417; }

/* lịch */
.gantt { --gl: 200px; padding: 20px 24px 24px; }
.gt-scroll { overflow-x: auto; }
.gt { position: relative; min-width: 760px; }
.gt-h { display: grid; grid-template-columns: var(--gl) 1fr; height: 36px; }
.gt-m { position: relative; }
.gt-m span { position: absolute; top: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); padding-left: 8px; border-left: 1px solid var(--line); height: 30px; }
.gt-r { display: grid; grid-template-columns: var(--gl) 1fr; align-items: center; min-height: 56px; text-decoration: none; border-radius: 10px; transition: background .2s; }
.gt-r:hover { background: var(--paper); }
.gt-l { display: grid; padding-left: 10px; line-height: 1.25; }
.gt-l b { font-weight: 600; font-size: 15px; }
.gt-l small { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-t { position: relative; height: 22px; }
.gt-t i { position: absolute; top: 0; bottom: 0; background: var(--c); }
.gt-t i:first-child { border-radius: 6px 0 0 6px; }
.gt-hv { position: absolute; top: -5px; width: 32px; height: 32px; margin-left: -4px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--lua-ink); box-shadow: 0 0 0 2px var(--lua); }
.gt-hv .ic { width: 18px; height: 18px; }
.gt-ex { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--lua-ink); }
.gt-today { position: absolute; top: 30px; bottom: 0; width: 2px; background: var(--late); pointer-events: none; }
.gt-today span { position: absolute; top: -26px; left: -30px; width: 62px; text-align: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--late); border-radius: 6px; padding: 3px 0; }
.gantt { margin-bottom: 24px; }
.agenda { display: grid; gap: 8px; }
.ag { display: grid; grid-template-columns: 90px 1fr; gap: 16px; }
.ag + .ag { border-top: 1px solid var(--line); padding-top: 8px; }
.ag-d { font: 500 20px/1 var(--serif); padding-top: 22px; }

/* kho */
.kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.kpi { background: var(--card); border-radius: 18px; padding: 24px 28px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.kpi span { font-size: 14px; color: var(--ink-3); }
.kpi b { font: 400 34px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.kpi b small { font: 500 15px var(--sans); color: var(--ink-3); }
.kpi.main b { font-size: 46px; }
.slist { list-style: none; margin: -8px 0; padding: 0; }
.slist li + li { border-top: 1px solid var(--line); }
.srow { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1.6fr) 1fr 160px 110px; gap: 20px; align-items: center; padding: 14px 12px; margin: 0 -12px; width: calc(100% + 24px); border: 0; background: transparent; border-radius: 14px; text-align: left; cursor: pointer; transition: background .2s; }
.srow:hover { background: var(--paper); }
.sn { display: grid; min-width: 0; }
.sn b { font-weight: 600; font-size: 16px; }
.sn small, .su { font-size: 14px; color: var(--ink-3); }
.su { display: grid; }
.su b { color: var(--ink); font-weight: 500; font-size: 15px; }
.sq { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 8px; text-align: right; justify-items: end; }
.sq b { font: 400 28px/1 var(--serif); font-variant-numeric: tabular-nums; }
.sq small { font-size: 13px; color: var(--ink-3); justify-self: start; }
.meter { grid-column: 1 / -1; position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--paper-2); margin-top: 10px; overflow: visible; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ma); }
.meter.low > i { background: var(--lua); }
.meter.out > i { background: var(--late); }
.meter em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); }
.srow .pill { justify-self: end; }
.sup-hero { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.sup-hero .big { margin: 0 0 6px; }
.sup-hero p { font-size: 14px; }
.drw-b { padding: 8px 28px 40px; }
.soft-in { background: var(--paper); box-shadow: none; padding: 24px; margin-bottom: 8px; }
.soft-in h3, .sub { font: 500 18px/1.3 var(--serif); margin: 0 0 16px; }
.sub { margin-top: 28px; }
.uses li a { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; min-height: 52px; font-size: 15px; }
.uses li + li a { border-top: 1px solid var(--line); }
.uses span { flex: 1; color: var(--ink-3); }
.uses em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }

/* thu hoạch */
.hv-top { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; margin-bottom: 24px; }
.hbars { position: relative; display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: 36px 1fr 56px; gap: 12px; align-items: center; text-decoration: none; min-height: 40px; border-radius: 8px; }
.hb-l { font-weight: 600; font-size: 15px; }
.hb-t { height: 26px; border-radius: 6px; background: var(--paper); overflow: hidden; }
.hb-t i { display: block; height: 100%; background: var(--lua); border-radius: 6px; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.hb:hover .hb-t i { background: var(--lua-ink); }
.hb b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; font-size: 15px; }
.hb-avg { position: absolute; top: -8px; bottom: -8px; width: 0; border-left: 2px dashed var(--ink-2); pointer-events: none; }
.hb-avg em { position: absolute; bottom: -24px; left: -30px; width: 60px; text-align: center; font-style: normal; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cards3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.lc { background: var(--paper); border-radius: 16px; overflow: hidden; }
.lc-img { display: block; height: 150px; overflow: hidden; }
.lc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.lc:hover .lc-img img { transform: scale(1.05); }
.lc-b { padding: 18px 20px 20px; display: grid; gap: 10px; justify-items: start; font-size: 15px; }
.lc-b .btn { margin-top: 6px; }

/* thu mua */
.buy-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; margin-bottom: 28px; }
.photo-c { margin: 0; padding: 0; overflow: hidden; position: relative; min-height: 200px; }
.photo-c img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-c figcaption { position: absolute; left: 20px; bottom: 18px; background: rgba(251, 248, 241, .94); color: #1F2417; padding: 10px 14px; border-radius: 10px; font-size: 13px; display: grid; }
.photo-c figcaption b { font: 600 16px var(--mono); }
.tbl { padding: 12px 20px 20px; }
.tr { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) 80px 1fr 1fr; gap: 16px; align-items: center; min-height: 68px; padding: 8px 12px; margin: 0 -12px; border-radius: 12px; text-decoration: none; transition: background .2s; }
.tr:not(.th):hover { background: var(--paper); }
.tr.th { min-height: 44px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.tr.th .th1 { grid-column: span 2; }
.tr + .tr:not(.th) { border-top: 1px solid var(--line); }
.tn { display: grid; min-width: 0; }
.tn b { font-weight: 600; font-size: 16px; }
.tn small { font-size: 14px; color: var(--ink-3); }
.tlot { font: 500 15px var(--mono); color: var(--ink-2); }
.r { text-align: right; justify-self: end; }
.num.strong { font-weight: 600; font-size: 16px; }
.more { margin: 16px auto 0; display: flex; }
.hh-h { display: flex; gap: 14px; align-items: center; }
.hh-h .av { width: 56px; height: 56px; font-size: 18px; }
.hh-h p { font-size: 14px; margin-top: 4px; }
.hh-lot { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--paper); text-decoration: none; margin: 16px 0 24px; }
.hh-lot img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.hh-lot span { flex: 1; display: grid; }
.hh-lot b { font-weight: 600; }
.hh-lot small { color: var(--ink-3); font-size: 14px; }
.ledger { margin: 0 0 20px; display: grid; }
.ledger div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.ledger dt { display: grid; }
.ledger dt small { font-size: 13px; color: var(--ink-3); }
.ledger dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; }
.ledger .tot { border-bottom: 0; padding-top: 18px; }
.ledger .tot dt { font-weight: 600; }
.ledger .tot dd { font: 400 30px/1 var(--serif); }
.okline { display: flex; gap: 10px; align-items: center; color: var(--ma-2); font-weight: 600; padding: 14px 16px; border-radius: 12px; background: var(--ma-soft); }
[data-theme="dark"] .okline { color: var(--ma); }
.slips li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; font-size: 14px; min-height: 52px; }
.slips li + li { border-top: 1px solid var(--line); }
.slips span:nth-child(2) { color: var(--ink-3); }
.slips b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* lô hàng */
.ships { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; perspective: 1400px; }
.ship { --rx: 0deg; --ry: 0deg; --sx: 50%; position: relative; display: grid; grid-template-columns: 132px 1fr; background: var(--card); border-radius: 18px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); }
.ship.tilting { transition: transform .1s linear; }
.ship::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); background-size: 250% 100%; background-position: calc(100% - var(--sx)) 0; opacity: 0; transition: opacity .3s; pointer-events: none; }
.ship.tilting::after { opacity: 1; }
.ship img { width: 100%; height: 100%; min-height: 176px; object-fit: cover; }
.ship-b { padding: 20px 22px; display: grid; gap: 6px; align-content: start; }
.ship-b .mono { font-size: 14px; color: var(--ma); }
[data-theme="dark"] .ship-b .mono { color: var(--ma); }
.ship-t { font: 500 20px/1.25 var(--serif); }
.ship-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ship-f .muted { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ship-f .ic { width: 16px; height: 16px; }
.shd { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; margin-bottom: 32px; align-items: center; }
.shd-img { position: relative; margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 5 / 4; }
.shd-img img { width: 100%; height: 100%; object-fit: cover; }
.bag-label { position: absolute; left: 31.5%; top: 34%; width: 21%; height: 38%; background: #F1E6CC; border-radius: 2px; color: #2F2616; display: grid; align-content: center; justify-items: center; text-align: center; padding: 4% 3%; transform: perspective(600px) rotateY(-4deg) skewY(-1deg); mix-blend-mode: multiply; box-shadow: inset 0 0 0 2px rgba(47, 38, 22, .55), inset 0 0 0 5px #F1E6CC, inset 0 0 0 6px rgba(47, 38, 22, .4); }
.bag-label b { font: 600 clamp(11px, 1.5vw, 20px)/1 var(--serif); letter-spacing: .04em; }
.bag-label span { font: italic 500 clamp(9px, 1vw, 14px)/1.4 var(--serif); margin-top: 4px; }
.bag-label i { width: 60%; height: 1px; background: rgba(47, 38, 22, .45); margin: 6% 0; }
.bag-label em { font: 500 clamp(7px, .7vw, 10px)/1.3 var(--mono); font-style: normal; }
.shd-t { display: grid; gap: 8px; }
.shd-t .mono { color: var(--ma); font-size: 15px; }
.shd-t .facts { margin: 16px 0 8px; grid-template-columns: repeat(3, 1fr); }
.steps { list-style: none; margin: 8px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; padding-top: 14px; border-top: 3px solid var(--paper-2); }
.steps li.on { border-color: var(--ma); }
.steps i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); flex: none; }
.steps li.on i { background: var(--ma); color: var(--on-ma); }
.steps i .ic { width: 16px; height: 16px; }
.steps span { display: grid; line-height: 1.3; }
.steps b { font-size: 14px; font-weight: 600; }
.steps small { font-size: 13px; color: var(--ink-3); }
.row-btn { display: flex; gap: 12px; flex-wrap: wrap; }
.tem { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 20px 22px; background: #EFE3C8 var(--grain); color: #2F2616; border-radius: 6px; box-shadow: inset 0 0 0 1.5px rgba(47, 38, 22, .5), inset 0 0 0 5px #EFE3C8, inset 0 0 0 6px rgba(47, 38, 22, .3); margin-bottom: 16px; max-width: 520px; }
.tem-brand { font: 600 26px/1 var(--serif); letter-spacing: .06em; }
.tem-p { font: italic 500 16px/1.4 var(--serif); margin: 4px 0 12px; }
.tem dl { margin: 0; display: grid; gap: 3px; font-size: 13px; }
.tem dl div { display: flex; gap: 8px; }
.tem dt { color: #6b5b3c; min-width: 72px; }
.tem dd { margin: 0; font-weight: 600; }
.tem-c { margin-top: 10px; font-size: 13px; }
.tem-q { display: grid; justify-items: center; gap: 6px; align-content: center; }
.tem-q span { font-size: 12px; color: #6b5b3c; max-width: 110px; text-align: center; line-height: 1.3; }
.qr { border-radius: 4px; }
.vbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 170px; align-items: end; }
.vbars span { display: grid; grid-template-rows: 1fr auto auto; height: 100%; justify-items: center; align-items: end; gap: 4px; }
.vbars i { width: 100%; max-width: 34px; background: var(--ma); border-radius: 6px 6px 2px 2px; min-height: 3px; transform-origin: bottom; animation: growY .8s var(--ease) both; }
@keyframes growY { from { transform: scaleY(0); } }
.vbars em { font-style: normal; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vbars small { font-size: 12px; color: var(--ink-3); }
#print-tem { display: none; }
.morel { display: grid; gap: 8px; margin-bottom: 24px; }
.morel a { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 20px; background: var(--card); border-radius: 14px; text-decoration: none; font-weight: 500; box-shadow: var(--shadow); }
.morel a span { flex: 1; }

/* ---------- trang truy xuất ---------- */
.tx-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tx-top a { text-decoration: none; }
.tx { max-width: 760px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px) 40px; outline: none; }
.tx-hero { position: relative; border-radius: 22px; overflow: hidden; color: #F7F1E3; aspect-ratio: 4 / 3.4; margin-top: 8px; isolation: isolate; }
.tx-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; z-index: -2; }
.tx-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 18, 9, .1) 30%, rgba(22, 18, 9, .82)); }
.tx-hero-in { position: absolute; left: 28px; right: 28px; bottom: 26px; }
.tx-ok { display: inline-flex; align-items: center; gap: 8px; background: rgba(251, 248, 241, .94); color: #2F531B; font-size: 14px; font-weight: 600; padding: 8px 14px 8px 10px; border-radius: 999px; }
.tx-ok .ic { width: 18px; height: 18px; }
.tx-code { margin: 14px 0 6px; color: #F0D28C; font-size: 15px; }
.tx-h { font: 400 clamp(30px, 5.4vw, 46px)/1.08 var(--serif); letter-spacing: -.02em; }
.tx-h em { color: #F0D28C; }
.tx-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 20px 0 8px; background: var(--line); border-radius: 16px; overflow: hidden; }
.tx-facts div { background: var(--card); padding: 18px 16px; display: grid; gap: 4px; }
.tx-facts span { font-size: 13px; color: var(--ink-3); }
.tx-facts b { font: 400 24px/1.1 var(--serif); }
.tx-sec { padding: 36px 0 8px; }
.tx-sec h2 { font: 400 28px/1.15 var(--serif); letter-spacing: -.015em; margin-bottom: 18px; }
.tx-map { background: var(--card); border-radius: 16px; padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.tx-map .map { border-radius: 10px; }
.tx-fam { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tx-fam li { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--card); border-radius: 14px; }
.tx-fam span:not(.av) { display: grid; min-width: 0; }
.tx-fam b { font-weight: 600; font-size: 15px; }
.tx-fam small { font-size: 13px; color: var(--ink-3); }
.tx-sum { font-size: 17px; color: var(--ink-2); margin-bottom: 22px; }
.tx-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tx-tl::before { content: ""; position: absolute; left: 77px; top: 10px; bottom: 10px; width: 2px; background: var(--paper-2); }
.tx-tl li { display: grid; grid-template-columns: 56px 44px 1fr; gap: 14px; padding: 12px 0; position: relative; }
.tx-d { font: 500 17px/1 var(--serif); padding-top: 13px; font-variant-numeric: tabular-nums; }
.tx-tl i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ma-soft); color: var(--ma-2); position: relative; }
[data-theme="dark"] .tx-tl i { color: var(--ma); }
.tx-tl li:nth-last-child(-n+2) i { background: color-mix(in srgb, var(--lua) 30%, var(--card)); color: var(--lua-ink); }
.tx-tl div { padding-top: 10px; display: grid; gap: 4px; font-size: 15px; }
.tx-tl div p { color: var(--ink-2); }
.tx-tl img { width: 100%; max-width: 320px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-top: 8px; }
.tx-buy p { font-size: 16px; margin-bottom: 18px; }
.tx-foot { max-width: 760px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 24px) 48px; display: grid; gap: 16px; justify-items: start; border-top: 1px solid var(--line); }
.tx-foot > p:first-child { color: var(--ink-2); }
.tx-ask { display: grid; gap: 28px; padding-top: 12px; }
.tx-ask-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 22px; }
.tx-ask .disp { font-size: clamp(32px, 6vw, 48px); margin-bottom: 20px; }
.tx-f { display: flex; gap: 10px; margin-bottom: 14px; }
.tx-f input { font: 500 18px var(--mono) !important; text-transform: uppercase; }
.tx-err { background: color-mix(in srgb, var(--late) 12%, var(--card)); color: var(--late); padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 15px; }
.tx-ask .muted a { color: var(--ma); font-size: 14px; }

/* ---------- đáp ứng ---------- */
@media (max-width: 1200px) {
  .ov .focal { grid-column: span 12; }
  .ov .mapcard { grid-column: span 12; }
  .mapcard .map { max-height: 360px; }
  .lcols { grid-template-columns: 1fr; }
  .mapwrap { grid-template-columns: 1fr; }
  .map-side { grid-template-columns: 1fr 1fr; }
  .map-info { grid-column: 1 / -1; }
  .peek { grid-template-columns: 220px 1fr; }
  .srow { grid-template-columns: 64px minmax(0, 1.6fr) 140px 100px; }
  .su { display: none; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sb { display: none; }
  .tb { padding: 10px 16px; gap: 10px; }
  .tb-logo { display: block; }
  .tb-logo .logo b { font-size: 19px; }
  .tb-demo { display: none; }
  .tb-r .btn span { display: none; }
  .tb-r .btn { width: 44px; padding: 0; }
  .tb-search { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); margin-left: auto; cursor: pointer; }
  .tb-search span, .tb-search kbd { display: none; }
  .tb-r { margin-left: 0; }
  .main { padding: 4px 16px 112px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--card) 96%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 var(--line); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; min-height: 56px; align-content: center; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--ink-3); border-radius: 12px; }
  .tabbar a.on { color: var(--ma); font-weight: 600; }
  .tabbar a.on .ic { stroke-width: 2; }
  .tabbar .ic { width: 22px; height: 22px; }
  .ov > .card { grid-column: span 12 !important; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi.main { grid-column: 1 / -1; }
  .hv-top, .buy-top, .shd { grid-template-columns: 1fr; }
  .photo-c { min-height: 160px; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .card { padding: 22px 18px; border-radius: 16px; }
  .strip { height: 180px; border-radius: 16px; margin-bottom: 20px; }
  .strip-in { left: 20px; right: 20px; bottom: 20px; }
  .strip-in p { font-size: 14px; }
  .strip-tag { right: 14px; top: 14px; }
  .big b { font-size: 48px; }
  .sbar { height: 64px; }
  .sbar em { font-size: 12px; }
  .sbar span:not(.wide) em, .sbar span b { display: none; }
  .map-side { grid-template-columns: 1fr; }
  .peek { grid-template-columns: 1fr; }
  .mapbox { padding: 8px; border-radius: 16px; }
  .lhero { border-radius: 16px; height: 300px; }
  .lhero-in { left: 20px; right: 20px; bottom: 20px; }
  .f3btn { right: 14px; top: 14px; min-height: 40px; padding: 0 14px; font-size: 14px; }
  .facts b { font-size: 24px; }
  .prog-bar em { display: none; }
  .lg { grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 12px; }
  .lg-ic { display: none; }
  .lg-ph { grid-column: 2; width: 100%; height: 140px; }
  .lg-x { opacity: 1; grid-column: 3; grid-row: 1; }
  .srow { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; }
  .srow .pk { width: 56px; height: 56px; }
  .srow .pill { display: none; }
  .sq b { font-size: 24px; }
  .tools, .tools-r { width: 100%; }
  .tools-r { flex-direction: column; }
  .srch { width: 100%; }
  .sel select { width: 100%; }
  .seg { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .seg button { flex: none; }
  .tr { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
  .tr .tlot, .tr > .r:nth-of-type(4), .tr.th span:nth-child(2), .tr.th span:nth-child(3) { display: none; }
  .tr.th { grid-template-columns: 1fr auto; }
  .tr.th .th1 { grid-column: auto; }
  .tr > span.r.num:not(.strong) { display: none; }
  .ships { grid-template-columns: 1fr; }
  .ship { grid-template-columns: 112px 1fr; }
  .shd-t .facts { grid-template-columns: 1fr 1fr; }
  .tem { grid-template-columns: 1fr; }
  .tem-q { justify-items: start; grid-template-columns: auto 1fr; align-items: center; }
  .ag { grid-template-columns: 1fr; gap: 0; }
  .ag-d { padding-top: 12px; font-size: 17px; }
  .gantt { --gl: 120px; padding: 16px 12px; }
  .gt { min-width: 640px; }
  .tx-facts { grid-template-columns: 1fr 1fr; }
  .tx-fam { grid-template-columns: 1fr; }
  .tx-hero { aspect-ratio: 3 / 4; }
  .tx-hero-in { left: 20px; right: 20px; bottom: 20px; }
  .tx-f { flex-direction: column; }
}

@media print {
  body * { visibility: hidden; }
  #print-tem, #print-tem * { visibility: visible; }
  #print-tem { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6mm; position: absolute; left: 0; top: 0; width: 100%; }
  #print-tem .tem { break-inside: avoid; }
}
