:root {
  color-scheme: light;
  --canvas: #f6f6f1;
  --paper: #fffefa;
  --white: #fff;
  --ink: #182f2e;
  --body: #344947;
  --muted: #526866;
  --line: #d9e0d9;
  --soft: #eff3ee;
  --teal: #105950;
  --deep: #073e3d;
  --gold: #e6bd70;
  --bronze: #896227;
  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans Khmer", "Khmer OS System", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 10px;
}
* {box-sizing:border-box}
body {margin:0; background:var(--canvas); color:var(--body); font:400 1rem/1.55 var(--sans); -webkit-font-smoothing:antialiased}
button, input, select, textarea {font:inherit; color:inherit}
button {cursor:pointer}
button:disabled, [aria-disabled="true"] {cursor:not-allowed; opacity:.50}
a {color:var(--teal); text-underline-offset:.18em}
svg {display:block; flex:none}
button svg, a svg, .iconbox svg, .env svg, .pill svg, .badge svg {width:18px; height:18px}
:focus-visible {outline:3px solid #ac792f; outline-offset:3px}
button, a, select, input {touch-action:manipulation}
button {border:1px solid var(--line); border-radius:6px; background:var(--paper); padding:.48rem .8rem}
button:not(:disabled):hover {border-color:#87a9a2}
.shell {width:min(100% - 5rem, 1250px); margin-inline:auto}
.topbar {background:var(--paper); border-top:3px solid var(--deep); border-bottom:1px solid var(--line)}
.header-inner, .brand, .header-tools, .brand-text, .nav, .navbtn, .btn, .hero-actions, .metric-top, .panel-head, .filters, .badge, .step-row, .statusline, .action-row, .statsline, .docrow, .auditrow, .modal-head, .modal-foot, .footer {display:flex}
.header-inner {min-height:76px; align-items:center; justify-content:space-between; gap:1.4rem; padding-block:.55rem}
.brand {align-items:center; gap:.80rem; text-decoration:none; min-width:0; color:var(--ink)}
.brand-icon {display:grid; place-items:center; color:var(--teal); flex:0 0 auto}
.brand-icon svg {width:43px; height:43px}
.brand-text {flex-direction:column; gap:.1rem; min-width:0}
.brand-text strong {font-weight:760; font-size:clamp(1.15rem, 1.6vw, 1.48rem); line-height:1.2; letter-spacing:.015em}
.brand-text small {font:600 .75rem/1.4 var(--sans); color:var(--muted); letter-spacing:.095em}
.header-tools {align-items:center; gap:1rem; flex-shrink:0}
.env, .pill {display:inline-flex; align-items:center; gap:.45rem; border:1px solid #d4dfd4; border-radius:99px; color:#395c50; background:#f2f6ec; padding:.24rem .72rem; font-size:.81rem; line-height:1.5; font-weight:600}
.lang-select {display:inline-flex; align-items:center; position:relative; gap:.38rem}
select {appearance:none; background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 16 16' fill='none' stroke='%23455c56' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right .7rem center; padding-right:2rem!important}
#lang {border:1px solid var(--line); min-height:36px; border-radius:6px; font-size:.875rem; font-weight:650; padding:.27rem .70rem; cursor:pointer; color:var(--ink)}
.navwrap {background:var(--paper); border-bottom:1px solid var(--line)}
.nav {min-height:49px; align-items:stretch; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; scrollbar-color:#b3c6be transparent; gap:.5rem}
.navbtn {position:relative; align-items:center; justify-content:center; gap:.50rem; flex:0 0 auto; min-height:49px; padding:.62rem 1.10rem; border:none; border-radius:0; color:var(--muted); background:transparent; font-size:.91rem; font-weight:570; line-height:1.55}
.navbtn:first-child {margin-left:-.05rem}
.navbtn svg {width:17px; height:17px; color:#65807a}
.navbtn.active, .navbtn[aria-current="page"] {color:var(--teal); font-weight:720}
.navbtn.active svg {color:var(--teal)}
.navbtn.active:after, .navbtn[aria-current="page"]:after {content:""; position:absolute; inset:auto .7rem 0; height:3px; background:var(--teal); border-radius:3px 3px 0 0}
.navbtn:hover {background:#f0f5ee; color:var(--teal)}
main.shell {padding-block:1.65rem 2rem}
.hero {isolation:isolate; overflow:hidden; position:relative; display:grid; grid-template-columns:1.06fr 1fr; align-items:center; min-height:235px; padding:0; background:#094c48; color:#fffdf5; border-radius:12px; border:1px solid #114e48}
.hero-copy {position:relative; z-index:2; padding:1.55rem .75rem 1.65rem 2rem}
.kicker, .eyebrow, .numcode, .map-caption, .hero-meta {font-family:var(--mono), var(--sans); font-size:.76rem; letter-spacing:.11em; font-weight:650; line-height:1.55}
.kicker {display:inline-flex; align-items:center; gap:.55rem; color:#f1ce91}
.kicker::before {content:""; width:21px; height:2px; background:#e1b56f; border-radius:2px}
.kicker:has(.dot)::before {display:none}
.kicker .dot {width:7px; height:7px; border-radius:50%; background:var(--gold)}
h1, h2, h3, h4, p {margin:0}
h1, h2, h3, h4 {color:var(--ink); text-wrap:pretty; font-weight:700}
.hero h1 {color:#fffef7; font-size:clamp(2rem, 3.10vw, 2.84rem); line-height:1.21; letter-spacing:.005em; margin:.40rem 0 .42rem; font-weight:760}
.hero p {color:#dce9e0; max-width:38rem; font-size:.99rem; line-height:1.7}
.hero-actions {align-items:center; flex-wrap:wrap; gap:.65rem; margin-top:1.08rem}
.btn {display:inline-flex; align-items:center; justify-content:center; min-height:40px; gap:.5rem; border:1px solid transparent; border-radius:6px; font-size:.90rem; line-height:1.55; font-weight:670; padding:.52rem .90rem; text-decoration:none; transition:background .15s ease, border-color .15s ease}
.btn.gold {background:#edc985; color:#332d1f; border-color:#edc985}
.btn.gold:hover {background:#f6d89c; border-color:#f6d89c}
.btn.ghost {color:#f2f8f1; background:#fff1; border-color:#91afa5}
.btn.ghost:hover {background:#ffffff24; border-color:#c2d4ca}
.btn.primary {background:var(--teal); color:white; border-color:var(--teal)}
.btn.primary:hover {background:var(--deep); border-color:var(--deep)}
.btn.secondary {background:var(--paper); color:var(--teal); border-color:#aabfb6}
.btn.secondary:hover {background:#f1f5ee; border-color:#779c8f}
.btn.danger {background:#fff5ef; color:#963f34; border-color:#e2b6a9}
.btn.danger:hover {background:#ffe7dd; border-color:#bd7d6b}
.hero-map {position:absolute; inset:0 0 0 auto; z-index:0; width:55%; height:100%; pointer-events:none}
.hero-map img, .hero-map>svg {width:100%; height:100%; display:block; object-fit:cover; object-position:50% 55%}
.hero-map:before {z-index:1; content:""; position:absolute; inset:0; background:linear-gradient(90deg,#094c48 0%,#094c4820 13%,transparent 35%)}
.map-caption, .hero-meta {color:#e4d0a8; letter-spacing:.09em}
.map-caption {position:absolute; right:1.2rem; bottom:.65rem; z-index:1}
.metrics {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; margin:1.06rem 0 1.35rem}
.metric, .panel, .card {background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); min-width:0}
.metric {position:relative; padding:1.03rem 1.2rem 1.14rem}
.metric-top {align-items:center; gap:.56rem; justify-content:space-between; color:var(--muted); margin-bottom:.45rem}
.iconbox {width:37px; height:37px; display:inline-grid; place-items:center; background:#e4efe9; border:1px solid #d6e5db; border-radius:7px; color:var(--teal); flex:none}
.metric:nth-child(2) .iconbox {background:#e9edec; color:#3d615e; border-color:#dbe2df}
.metric:nth-child(3) .iconbox {background:#f6f0df; color:#896227; border-color:#ede2c9}
.metric:nth-child(4) .iconbox {background:#eeeee9; color:#5c6c62; border-color:#dfe3d8}
.numcode {color:#738780; letter-spacing:.065em; font-variant-numeric:tabular-nums}
.metric small {display:block; font-size:.875rem; font-weight:600; color:var(--muted)}
.metric strong {display:block; color:var(--ink); font-family:var(--sans); font-variant-numeric:tabular-nums; font-weight:680; font-size:clamp(1.55rem,2.34vw,2.10rem); letter-spacing:-.04em; line-height:1.26; margin:.16rem 0 .2rem}
.metric p {font-size:.82rem; line-height:1.52; color:var(--muted)}
.workspace-grid {display:grid; grid-template-columns:minmax(0,2.1fr) minmax(270px,1fr); gap:1rem; align-items:start}
.panel {overflow:hidden}
.panel-head {align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.65rem 1rem; padding:1.30rem 1.35rem 1rem}
.eyebrow {color:var(--bronze); font-size:.76rem; text-transform:uppercase; letter-spacing:.095em}
h2 {font-size:clamp(1.20rem,1.55vw,1.48rem); line-height:1.38}
.panel-head h2, .page-head h1 {margin-top:.17rem}
.panel-head p:not(.eyebrow), .page-head p:not(.eyebrow) {color:var(--muted); margin-top:.32rem; font-size:.9rem}
.linkbtn, .idbtn {border:0; border-radius:3px; background:transparent; color:var(--teal); min-height:28px; padding:.12rem .04rem; line-height:1.5; font-weight:650; font-size:.875rem; text-underline-offset:.22em}
.linkbtn {display:inline-flex; align-items:center; gap:.28rem}
.linkbtn:hover, .idbtn:hover {text-decoration:underline}
.filters {align-items:center; flex-wrap:wrap; gap:.40rem; padding:0 1.35rem .9rem}
.filters button,.chip {border:1px solid var(--line); border-radius:99px; color:var(--muted); background:#fffefa; font-size:.84rem; line-height:1.40; padding:.35rem .76rem; min-height:31px}
.filters .active,.filters [aria-pressed="true"],.chip.active {color:#f8fffa; background:var(--teal); border-color:var(--teal)}
.table-scroll {max-width:100%; overflow:auto; scrollbar-width:thin; scrollbar-color:#abc4b9 transparent}
table {border-collapse:collapse; width:100%; color:var(--body); text-align:start; font-size:.885rem; font-variant-numeric:tabular-nums}
th {background:#f1f4ed; color:#536962; font-size:.81rem; font-weight:640; text-align:start; vertical-align:middle; white-space:nowrap}
th, td {padding:.82rem .66rem; border-bottom:1px solid var(--line)}
th:first-child, td:first-child {padding-left:1.35rem}
th:last-child, td:last-child {padding-right:1.35rem}
tr:last-child td {border-bottom:0}
tbody tr:hover {background:#f6f8f3}
td {vertical-align:middle}
td small {display:block; color:var(--muted); font-size:.77rem; line-height:1.55}
.idbtn {font-family:var(--mono), var(--sans); font-size:.85rem; white-space:nowrap}
.badge {display:inline-flex; align-items:center; justify-content:center; gap:.36rem; border-radius:5px; padding:.20rem .50rem; background:#ecf0eb; color:#4a6156; font-size:.81rem; font-weight:620; line-height:1.45; white-space:nowrap}
.badge.green {background:#e2f1e5; color:#2e664a}
.badge.amber {background:#f8edce; color:#825911}
.badge.blue {background:#e4eef2; color:#3a6172}
.badge.red {background:#f8e7df; color:#8f4936}
.badge.neutral {background:#eceee9; color:#536059}
.lane {padding:0 1.35rem .60rem}
.step-row {position:relative; gap:.77rem; align-items:center; padding:.8rem 0; border-top:1px solid var(--line); min-width:0}
.stepnum {display:grid; place-items:center; flex:none; width:30px; height:30px; border-radius:50%; border:1px solid #c9d9cf; background:#edf3eb; color:var(--teal); font:650 .78rem/1 var(--mono),var(--sans)}
.step-text {min-width:0; flex:1}
.step-text strong,.step-text b {display:block; color:var(--ink); font-size:.93rem; line-height:1.55; font-weight:650}
.step-text p,.step-text small {display:block; margin-top:.1rem; font-size:.82rem; line-height:1.55; color:var(--muted)}
.count {color:var(--teal); font-weight:650; background:#edf3eb; padding:.12rem .46rem; border-radius:5px; font-size:.81rem; white-space:nowrap; font-variant-numeric:tabular-nums}
.footer {padding:1.15rem 0; border-top:1px solid var(--line); color:var(--muted); align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.35rem 1rem; font-size:.81rem}
.footer:not(.shell) {width:min(100% - 5rem,1250px); margin-inline:auto}
.page-head {margin:.05rem 0 1.25rem}
.page-head h1 {font-size:clamp(1.8rem,3vw,2.35rem); line-height:1.3}
.two-col {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start}
.stack,.rule-list {display:grid; gap:.85rem; min-width:0}
.card {padding:1.2rem 1.35rem}
.card h2,.card h3 {margin-bottom:.55rem}
h3 {font-size:1.04rem}
.card>p,.rule p,.callout p {line-height:1.7}
.card p,.rule p {font-size:.95rem}
.card p+p, .card p+ul, .card p+ol {margin-top:.55rem}
.form-grid,.kv-grid {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem 1rem}
.field {display:flex; flex-direction:column; gap:.3rem; min-width:0}
.field label,label.field {color:var(--ink); font-size:.9rem; font-weight:620}
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .form-grid input:not([type=checkbox]):not([type=radio]), .form-grid select, .form-grid textarea {width:100%; min-width:0; min-height:42px; padding:.52rem .7rem; background-color:#fff; border:1px solid #b6c9bb; border-radius:6px; font-weight:450; color:var(--ink); font-size:.94rem}
input[type=checkbox], input[type=radio] {accent-color:var(--teal); width:17px; height:17px; flex-shrink:0}
textarea {resize:vertical}
.wide {grid-column:1/-1}
.rule {border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:.9rem 1rem}
.rule strong {color:var(--ink)}
.callout,.notice {border:1px solid #d1dfd4; border-left:3px solid #6b9d87; border-radius:6px; background:#eff5ee; padding:.77rem .95rem; color:#36594b; font-size:.9rem}
.action-row,.statsline,.statusline {align-items:center; flex-wrap:wrap; gap:.55rem .75rem}
.action-row {margin-top:.95rem}
.statsline {margin:.5rem 0; font-variant-numeric:tabular-nums}
.kv {padding:.62rem .80rem; border-radius:5px; background:#f1f4ee; border:1px solid #e5ebe3; min-width:0; overflow-wrap:anywhere}
.kv small,.kv span,.kv label {display:block; color:var(--muted); font-size:.83rem}
.kv strong,.kv b {display:block; color:var(--ink); font-size:1.04rem; font-variant-numeric:tabular-nums}
.statusline {padding-block:.42rem}
.docrow,.auditrow {align-items:center; gap:.62rem .8rem; justify-content:space-between; border-bottom:1px solid var(--line); padding:.65rem 0; min-width:0; font-size:.88rem; overflow-wrap:anywhere}
.docrow:last-child,.auditrow:last-child {border-bottom:0}
.docrow small,.auditrow small {color:var(--muted)}
.empty {padding:1.15rem 1.35rem; text-align:center; color:var(--muted)}
.modal,dialog {width:min(680px,calc(100vw - 2rem)); max-height:min(88dvh,920px); padding:0; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--body); box-shadow:0 20px 88px #0a342d3b}
.modal::backdrop,dialog::backdrop {background:#092a27a8}
.modal-head,.modal-foot {justify-content:space-between; gap:.75rem; align-items:center; padding:1rem 1.35rem; border-bottom:1px solid var(--line)}
.modal-foot {justify-content:flex-end; flex-wrap:wrap; border-top:1px solid var(--line); border-bottom:0}
.modal-body {padding:1.15rem 1.35rem}
.close {border:1px solid var(--line); background:#f2f5ee; color:var(--teal); border-radius:6px; width:33px; height:33px; padding:0; display:grid; place-items:center; flex:none; font-size:1.32rem; line-height:1}
.toast {position:fixed; right:1.35rem; bottom:1.25rem; z-index:20; padding:.73rem 1rem; border-radius:7px; max-width:min(92vw,420px); background:var(--deep); color:white; box-shadow:0 3px 14px #132b2426; font-size:.9rem}
.toast:empty,.toast[hidden],[hidden] {display:none!important}
:lang(km) {letter-spacing:normal}
html:lang(km) body {line-height:1.78}
html:lang(km) .hero h1, html:lang(km) .brand-text strong, html:lang(km) h2, html:lang(km) h3 {line-height:1.55}
html:lang(km) .env,html:lang(km) .btn,html:lang(km) .badge {line-height:1.8}
@media (min-width:1450px) {main.shell {padding-top:1.9rem}}
@media (max-width:1050px) {
  .shell,.footer:not(.shell) {width:calc(100% - 3rem)}
  .nav {gap:.16rem}
  .navbtn {padding-inline:.85rem}
  .workspace-grid {grid-template-columns:minmax(0,1.8fr) minmax(248px,1fr)}
  .hero-copy {padding-left:1.55rem}
  .panel-head {padding-inline:1.05rem}
  .filters,.lane {padding-inline:1.05rem}
  th:first-child,td:first-child {padding-left:1.05rem}
  th:last-child,td:last-child {padding-right:1.05rem}
  .metric {padding:1rem}
}
@media (max-width:800px) {
  .shell,.footer:not(.shell) {width:calc(100% - 2rem)}
  .header-inner {min-height:70px}
  .header-tools {gap:.52rem}
  main.shell {padding-top:1rem}
  .workspace-grid {grid-template-columns:1fr}
  .metrics {gap:.65rem}
  .metric {padding:.8rem}
  .hero {grid-template-columns:1.25fr 1fr}
  .hero-map {width:48%}
  .hero-copy {padding:1.25rem .30rem 1.35rem 1.4rem}
  .hero-actions {gap:.5rem}
}
@media (max-width:600px) {
  .shell,.footer:not(.shell) {width:calc(100% - 1.5rem)}
  .header-inner {min-height:64px; gap:.35rem}
  .brand {gap:.42rem}
  .brand-icon svg {width:34px; height:34px}
  .brand-text strong {font-size:1.03rem}
  .brand-text small {font-size:.75rem; letter-spacing:.015em}
  .header-tools .env {display:none}
  #lang {max-width:94px; min-height:35px; padding-left:.45rem}
  .navwrap .shell {width:100%; padding-inline:.60rem}
  .nav {min-height:44px; gap:0}
  .navbtn {min-height:44px; font-size:.875rem; padding:.5rem .7rem}
  .navbtn svg {width:16px; height:16px}
  .hero {grid-template-columns:1fr; min-height:0; border-radius:9px; align-content:end}
  .hero-map {width:100%; height:117px; inset:0 0 auto; opacity:.92}
  .hero-map img,.hero-map>svg {object-fit:cover; object-position:50% 50%}
  .hero-map:before {background:linear-gradient(0deg,#094c48,transparent 46%)}
  .map-caption {display:none}
  .hero-copy {padding:100px 1.05rem 1.15rem}
  .hero h1 {font-size:1.92rem}
  .hero p {font-size:.93rem; line-height:1.65}
  .hero-actions {margin-top:.8rem}
  .kicker {font-size:.75rem}
  .metrics {grid-template-columns:repeat(2,minmax(0,1fr)); margin:.75rem 0 1rem}
  .metric {padding:.75rem .82rem}
  .metric strong {font-size:1.52rem}
  .iconbox {width:30px; height:30px}
  .metric p,.numcode {font-size:.75rem}
  .two-col,.form-grid {grid-template-columns:1fr}
  .card {padding:.95rem}
  .panel-head {padding:1rem .95rem .7rem}
  .filters,.lane {padding-inline:.95rem}
  .table-scroll table {font-size:.85rem}
  th,td {padding:.7rem .50rem}
  .step-row {padding:.70rem 0}
  .btn {min-height:40px}
  .modal,.modal-head,.modal-foot,.modal-body {overscroll-behavior:contain}
  .modal-head,.modal-foot,.modal-body {padding-inline:.95rem}
}
@media (max-width:360px) {
  .brand-text small {max-width:12rem}
  .btn {padding-inline:.62rem}
  .kv-grid {grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce) {*,*::before,*::after {animation-duration:.01ms!important; transition-duration:.01ms!important;scroll-behavior:auto!important}}

.language-control{display:inline-flex;align-items:center;gap:.42rem;color:var(--teal)}
.language-control svg,.close svg{width:18px;height:18px}
.searchbar{padding:0 1.35rem 1rem}
.searchbar label{font-weight:600;font-size:.9rem}
.searchbar input{max-width:100%;width:19rem;margin-left:.5rem;padding:.45rem .65rem;border:1px solid var(--line);border-radius:5px;background:white}
.admin-tabs{padding-left:0}
#form-error:not(:empty){padding:.6rem;margin:.6rem 0;background:#fff0e7;color:#813d25}
.modal details summary,.card details summary{cursor:pointer;color:var(--teal);font-weight:600}
.modal details[open] summary{margin-bottom:.7rem}
@media(max-width:600px){.brand-icon img{width:33px;height:33px}.language-control svg{display:none}.searchbar label{display:block}.searchbar input{display:block;margin:.3rem 0 0;width:100%}}
