/* AMBE CoreSupply — hệ thống thị giác "Aero navy & gold"
   Kính mờ (aero) nổi trên nền trời ngọc trai; nút bấm 3D có gờ sáng; vàng chỉ dùng cho hành động ký/đóng dấu. */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/nunito-vietnamese-400-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/nunito-vietnamese-600-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/nunito-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/nunito-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-vietnamese-700-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/nunito-vietnamese-800-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Dancing Script'; font-display: swap; src: url(/fonts/DancingScript_700Bold.ttf) format('truetype'); }
@font-face { font-family: 'Great Vibes'; font-display: swap; src: url(/fonts/GreatVibes_400Regular.ttf) format('truetype'); }

:root {
  --navy: #152A4A; --navy-2: #22406E; --navy-3: #0E1D35; --ink: #14213A; --ink-2: #4A5874; --ink-3: #7D8AA3;
  --gold: #C19A55; --gold-hi: #E7CB8E; --gold-lo: #9C7735;
  --sky: #DDE6F3; --pearl: #F4F7FC; --line: rgba(21, 42, 74, .12); --line-2: rgba(21, 42, 74, .07);
  --ok: #18825A; --ok-bg: #DCF3E9; --bad: #B83227; --bad-bg: #FBE3E0; --warn: #B76E00; --warn-bg: #FDF0D9; --info-bg: #E2EBFA;
  --glass: rgba(255, 255, 255, .64); --glass-strong: rgba(255, 255, 255, .84);
  --r-xl: 18px; --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 12px 30px -14px rgba(14, 29, 53, .38), 0 2px 6px -2px rgba(14, 29, 53, .12);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .85) inset, 0 4px 12px -6px rgba(14, 29, 53, .3);
  --nav-w: 248px; --top-h: 58px;
  font-size: 13px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 13px; line-height: 1.45; color: var(--ink);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  background:
    radial-gradient(900px 560px at 4% 0%, rgba(42, 78, 134, .40), transparent 62%),
    radial-gradient(820px 520px at 100% 100%, rgba(193, 154, 85, .42), transparent 60%),
    radial-gradient(640px 380px at 62% 8%, rgba(255, 255, 255, .95), transparent 70%),
    radial-gradient(520px 420px at 30% 92%, rgba(120, 160, 214, .28), transparent 70%),
    linear-gradient(160deg, #E4EBF6 0%, #D4DFEF 46%, #EAEDF3 100%);
  background-attachment: fixed;
}
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--navy); letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
h4 { font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
p { margin: 0 0 8px; }
small { font-size: 11px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; background: var(--line-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--ink-3); } .small { font-size: 11.5px; } .center { text-align: center; } .block { display: block; }
.neg { color: var(--bad); } .pos { color: var(--ok); } .lead { font-size: 14px; }
.spacer { flex: 1; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -4px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ── kính aero ── */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .58));
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .75); box-shadow: var(--shadow);
}
.panel { border-radius: var(--r-xl); padding: 16px 18px; margin-bottom: 14px; }

/* ── nút 3D ── */
.btn {
  --b1: #FFFFFF; --b2: #E7ECF4; --bc: rgba(21, 42, 74, .18); --bt: var(--navy); --bs: rgba(21, 42, 74, .22);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  font: 700 13px/1 'Nunito', sans-serif; color: var(--bt); cursor: pointer; white-space: nowrap; text-decoration: none !important;
  background: linear-gradient(180deg, var(--b1), var(--b2)); border: 1px solid var(--bc); border-radius: var(--r-md);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 -1px 0 rgba(0, 0, 0, .05) inset, 0 2px 0 var(--bs), 0 4px 10px -4px var(--bs);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 0 0 var(--bs), 0 1px 3px -1px var(--bs); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { --b1: #2D5089; --b2: #152A4A; --bc: #0E1D35; --bt: #fff; --bs: #0A1528; box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 2px 0 var(--bs), 0 6px 14px -6px rgba(14, 29, 53, .7); }
.btn-gold { --b1: #EED39A; --b2: #C19A55; --bc: #9C7735; --bt: #2B1D05; --bs: #85622A; box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 2px 0 var(--bs), 0 8px 18px -8px rgba(156, 119, 53, .9); }
.btn-ghost { --b1: rgba(255, 255, 255, .85); --b2: rgba(240, 244, 250, .85); }
.btn-danger { --b1: #D9534A; --b2: #A82A20; --bc: #85211A; --bt: #fff; --bs: #6E1A14; }
.btn-danger-ghost { --b1: #fff; --b2: #FBEDEB; --bc: rgba(184, 50, 39, .35); --bt: var(--bad); --bs: rgba(184, 50, 39, .25); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--r-sm); }
.btn-xs { height: 22px; padding: 0 7px; font-size: 11px; border-radius: 6px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .6); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--navy); cursor: pointer; position: relative; }
.icon-btn:hover { background: rgba(21, 42, 74, .07); }

/* ── nút "?" hướng dẫn ── */
.help-q {
  display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; cursor: pointer; vertical-align: 2px;
  font: 800 11px/1 'Nunito', sans-serif; color: var(--gold-lo); border: 1px solid rgba(193, 154, 85, .55);
  background: radial-gradient(circle at 35% 30%, #fff, #F6ECD8); box-shadow: 0 1px 2px rgba(156, 119, 53, .3);
}
.help-q.sm { width: 16px; height: 16px; font-size: 10px; margin-left: 4px; }
.help-q:hover { color: #fff; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold)); }

/* ── trường nhập ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld.wide, .chk.wide { grid-column: 1 / -1; }
.fld > span { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.req { color: var(--bad); font-style: normal; }
input, select, textarea {
  font: 600 13px 'Nunito', sans-serif; color: var(--ink); width: 100%; min-height: 34px; padding: 7px 10px;
  background: rgba(255, 255, 255, .92); border: 1px solid rgba(21, 42, 74, .16); border-radius: 9px;
  box-shadow: 0 2px 3px -2px rgba(14, 29, 53, .18) inset; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 64px; }
select[multiple] { padding: 4px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(193, 154, 85, .22); }
input[type=checkbox], input[type=radio] { width: 16px; min-height: 0; height: 16px; accent-color: var(--navy); box-shadow: none; padding: 0; }
input[type=range] { padding: 0; min-height: 0; box-shadow: none; accent-color: var(--gold); }
.chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form input { max-width: 260px; }
.hint { background: var(--info-bg); color: var(--navy); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 12px; margin-bottom: 10px; }
input.mini { width: 96px; min-height: 28px; padding: 3px 7px; text-align: right; }

/* ── nhãn trạng thái ── */
.pill { display: inline-flex; align-items: center; height: 21px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; background: #EEF2F8; color: var(--ink-2); border: 1px solid rgba(21, 42, 74, .08); }
.st-APPROVED, .st-MATCHED, .st-POSTED, .st-RECEIVED, .st-ISSUED, .st-PAID, .st-COMPLETED_POSTED, .st-AWARDED, .st-ORDERED { background: var(--ok-bg); color: var(--ok); }
.st-PENDING_APPROVAL, .st-IN_PROGRESS, .st-PENDING, .st-FROZEN_IN_COUNT, .st-IN_TRANSIT, .st-OPEN, .st-SENT, .st-RFQ { background: var(--info-bg); color: var(--navy-2); }
.st-RETURNED, .st-RECOUNT_REQUIRED, .st-EXCEPTION, .st-PRICE_VARIANCE, .st-QTY_VARIANCE, .st-BOTH_VARIANCE, .st-PARTIALLY_RECEIVED, .st-PARTIALLY_ISSUED, .st-IN_SOURCING, .st-APPROVED_FOR_PAYMENT { background: var(--warn-bg); color: var(--warn); }
.st-REJECTED, .st-CANCELLED { background: var(--bad-bg); color: var(--bad); }
.st-DRAFT, .st-WAITING, .st-SKIPPED, .st-CLOSED { background: #EEF1F5; color: var(--ink-3); }
.tx-in { background: var(--ok-bg); color: var(--ok); } .tx-out { background: #F1EBDD; color: var(--gold-lo); }
.tag { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: #EEF2F8; color: var(--ink-2); vertical-align: 1px; }
.tag-gold { background: #F6ECD8; color: var(--gold-lo); } .tag-red { background: var(--bad-bg); color: var(--bad); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: linear-gradient(180deg, #E35D52, #B83227); color: #fff; font: 800 10px/17px 'Nunito', sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px #fff; }

/* ── thông báo nhanh ── */
#toasts { position: fixed; z-index: 400; right: 16px; top: 70px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; font-weight: 600; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid #fff; box-shadow: var(--shadow); animation: tin .25s ease-out; }
.toast.is-link { cursor: pointer; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s; }
.toast-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--navy-2); }
.toast-success .toast-dot { background: var(--ok); } .toast-error .toast-dot { background: var(--bad); } .toast-warn .toast-dot { background: var(--warn); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* ── trạng thái rỗng / đang tải ── */
.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty-ic { font-size: 34px; margin-bottom: 6px; }
.skeleton { display: grid; gap: 8px; padding: 10px; }
.skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(21, 42, 74, .06), rgba(21, 42, 74, .12), rgba(21, 42, 74, .06)); background-size: 200% 100%; animation: sh 1.2s infinite; }
.skeleton i:nth-child(2) { width: 80%; } .skeleton i:nth-child(3) { width: 60%; }
@keyframes sh { to { background-position: -200% 0; } }
.boot-splash { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-splash img { animation: pulse 1.2s ease-in-out infinite; filter: drop-shadow(0 10px 18px rgba(14, 29, 53, .25)); }
@keyframes pulse { 50% { transform: scale(.94); opacity: .8; } }
body.is-offline::before { content: '⚡ Offline'; position: fixed; z-index: 500; left: 50%; top: 6px; transform: translateX(-50%); background: var(--warn); color: #fff; font-weight: 800; font-size: 11px; padding: 3px 12px; border-radius: 999px; }

/* ── Khung: thanh bên navy aero, thanh trên kính, điều hướng đáy trên điện thoại ── */
body.shell { padding-left: var(--nav-w); transition: padding .2s; }
body.shell.nav-collapsed { --nav-w: 74px; }
.sidenav {
  position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: var(--nav-w); display: flex; flex-direction: column; color: #D6DEEB; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .06), transparent 1px) right / 1px 100% no-repeat,
    radial-gradient(420px 260px at 0 0, rgba(70, 110, 170, .45), transparent 70%),
    radial-gradient(360px 300px at 100% 100%, rgba(193, 154, 85, .18), transparent 70%),
    linear-gradient(180deg, #1B355D 0%, #152A4A 45%, #0E1D35 100%);
  box-shadow: 1px 0 0 rgba(255, 255, 255, .08) inset, 8px 0 30px -12px rgba(14, 29, 53, .6);
  transition: width .2s;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; color: #fff; text-decoration: none !important; }
.brand img { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); flex: none; }
.brand b { display: block; font-size: 18px; font-weight: 800; letter-spacing: .06em; color: #fff; }
.brand small { display: block; color: var(--gold-hi); font-weight: 700; letter-spacing: .18em; font-size: 9.5px; margin-top: -2px; }
.sidenav nav { flex: 1; overflow-y: auto; padding: 4px 10px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.nav-group { margin: 14px 10px 4px; font-size: 10.5px; font-weight: 800; color: rgba(214, 222, 235, .5); }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; margin: 1px 0; border-radius: 10px; color: #D6DEEB; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.active { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 6px 14px -8px rgba(0, 0, 0, .6); }
.nav-link.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 0 10px rgba(231, 203, 142, .7); }
.nav-link .ic { width: 19px; height: 19px; opacity: .9; }
.nav-link.active .ic { color: var(--gold-hi); }
.nav-link .badge { position: static; margin-left: auto; box-shadow: none; }
.nav-collapse { margin: 8px auto 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #D6DEEB; cursor: pointer; display: grid; place-items: center; }
.nav-collapsed .nav-collapse .ic { transform: rotate(180deg); }
.nav-collapsed .brand span, .nav-collapsed .nav-link span, .nav-collapsed .nav-group { display: none; }
.nav-collapsed .nav-link { justify-content: center; }
.nav-collapsed .nav-link .badge { position: absolute; top: 2px; right: 6px; }

.main { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 18px; margin: 0; border-radius: 0; border-width: 0 0 1px; }
.crumb { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.crumb h1 { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); cursor: pointer; font: 800 11px 'Nunito', sans-serif; }
.lang-switch span { padding: 4px 9px; border-radius: 999px; color: var(--ink-3); }
.lang-switch span.on { background: linear-gradient(180deg, #2D5089, #152A4A); color: #fff; box-shadow: 0 2px 6px -2px rgba(14, 29, 53, .6); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .75); cursor: pointer; font-family: inherit; max-width: 230px; }
.uc-text { text-align: left; line-height: 1.15; min-width: 0; }
.uc-text b { display: block; font-size: 12px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-text small { color: var(--ink-3); white-space: nowrap; }
.avatar { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; color: #fff; font-weight: 800; font-size: 12px; background: linear-gradient(140deg, var(--gold-hi), var(--gold-lo)); box-shadow: 0 0 0 2px #fff, 0 3px 8px -3px rgba(14, 29, 53, .5); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }
#view { padding: 18px 22px 90px; max-width: 1500px; width: 100%; margin: 0 auto; outline: none; }
.page-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.bottomnav, .nav-scrim, .only-mobile { display: none; }

/* ── Đăng nhập ── */
body.login-page { display: grid; min-height: 100vh; }
.login-stage { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); border-radius: 24px; padding: 28px 28px 22px; text-align: center; }
.login-logo { width: 190px; height: auto; display: block; margin: 0 auto 4px; filter: drop-shadow(0 12px 18px rgba(14, 29, 53, .18)); }
.login-tag { color: var(--ink-2); font-weight: 700; margin-bottom: 18px; }
.login-card form { display: grid; gap: 12px; text-align: left; }
.login-lang { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.login-lang button { border: 0; background: none; font: 700 12px 'Nunito'; color: var(--ink-3); cursor: pointer; padding: 4px 10px; border-radius: 999px; }
.login-lang button.on { background: rgba(21, 42, 74, .08); color: var(--navy); }

/* ── Hộp thoại ── */
.overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(14, 29, 53, .38); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .15s; }
.overlay.out { opacity: 0; transition: .15s; }
.overlay-soft { background: rgba(14, 29, 53, .18); place-items: stretch end; padding: 0; }
@keyframes fade { from { opacity: 0; } }
body.modal-open { overflow: hidden; }
.modal { width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 249, 253, .93)); animation: pop .18s ease-out; outline: none; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-xs { max-width: 340px; } .modal-sm { max-width: 440px; } .modal-md { max-width: 620px; } .modal-lg { max-width: 920px; } .modal-xl { max-width: 1120px; }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { flex: 1; margin: 0; font-size: 15px; }
.modal-b { padding: 16px 20px; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.menu-list { display: grid; gap: 4px; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; border: 0; background: none; font: 700 13px 'Nunito'; color: var(--navy); cursor: pointer; text-decoration: none !important; text-align: left; width: 100%; }
.menu-list a:hover, .menu-list button:hover { background: rgba(21, 42, 74, .06); }
.menu-list em { margin-left: auto; font-style: normal; font-weight: 800; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.menu-list em.ok { background: var(--ok-bg); color: var(--ok); } .menu-list em.warn { background: var(--warn-bg); color: var(--warn); }
.setup-list { display: grid; gap: 8px; } .setup-list div { padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-weight: 700; } .setup-list .ok { background: var(--ok-bg); color: var(--ok); }

/* ── Ngăn hướng dẫn "?" ── */
.help-drawer { width: min(440px, 100vw); height: 100vh; overflow-y: auto; border-radius: 22px 0 0 22px; padding: 0 22px 30px; animation: slidein .22s ease-out; background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(248, 244, 236, .95)); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.help-drawer header { position: sticky; top: 0; display: flex; align-items: center; gap: 10px; padding: 18px 0 12px; background: inherit; z-index: 1; }
.help-drawer h3 { flex: 1; margin: 0; font-size: 16px; }
.help-badge { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #2B1D05; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold)); box-shadow: 0 3px 8px -2px rgba(156, 119, 53, .7); }
.help-grip { display: none; }
.help-summary { font-size: 14px; color: var(--navy); font-weight: 600; }
.help-steps ol { padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.help-steps li { counter-increment: s; position: relative; padding: 10px 12px 10px 42px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line-2); border-radius: 12px; }
.help-steps li::before { content: counter(s); position: absolute; left: 10px; top: 9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; background: var(--navy); }
.help-steps img { max-width: 100%; border-radius: 10px; margin-top: 6px; }
.help-tip { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #FBF3E3; border: 1px solid rgba(193, 154, 85, .35); }
.help-tip b { color: var(--gold-lo); }

/* ── Bàn phím PIN 3D ── */
.modal-pin .modal-b { padding-top: 6px; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 10px 0 16px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy); transition: .12s; }
.pin-dots i.on { background: var(--navy); transform: scale(1.1); box-shadow: 0 0 0 4px rgba(193, 154, 85, .25); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-key {
  height: 54px; border-radius: 16px; font: 800 20px 'Nunito'; color: var(--navy); cursor: pointer; border: 1px solid rgba(21, 42, 74, .14);
  background: linear-gradient(180deg, #fff, #E6ECF5); box-shadow: 0 1px 0 #fff inset, 0 3px 0 rgba(21, 42, 74, .2), 0 6px 12px -6px rgba(21, 42, 74, .4);
}
.pin-key:active { transform: translateY(3px); box-shadow: 0 1px 0 #fff inset, 0 0 0 rgba(21, 42, 74, .2); }
.pin-hidden { position: absolute; opacity: 0; pointer-events: none; height: 1px; width: 1px; }

/* ── Tổng quan ── */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 22px; padding: 22px 26px; margin-bottom: 14px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(193, 154, 85, .22), transparent 65%); pointer-events: none; }
.hero-greet { color: var(--gold-lo); font-weight: 800; margin: 0; }
.hero h2 { font-size: 24px; }
.seal-count { position: relative; z-index: 1; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; text-align: center; text-decoration: none !important; color: var(--navy);
  background: radial-gradient(circle at 35% 28%, #fff, #E9EEF6 60%, #D6DEEA); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 1px 0 #fff inset, 0 -6px 14px rgba(21, 42, 74, .08) inset, 0 14px 28px -12px rgba(14, 29, 53, .45); }
.seal-count b { font-size: 38px; font-weight: 800; line-height: 1; display: block; }
.seal-count span { font-size: 11px; font-weight: 700; color: var(--ink-2); padding: 0 12px; }
.seal-count.has { color: #2B1D05; background: radial-gradient(circle at 35% 28%, #FFF4DA, var(--gold-hi) 45%, var(--gold) 100%); box-shadow: 0 1px 0 #fff inset, 0 -8px 16px rgba(120, 85, 20, .25) inset, 0 16px 30px -12px rgba(156, 119, 53, .75); }
.seal-count.has span { color: #4A3410; }
.seal-count em { position: absolute; bottom: 14px; font-style: normal; font-size: 10px; font-weight: 800; background: var(--bad); color: #fff; padding: 1px 7px; border-radius: 999px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpis.slim { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; text-decoration: none !important; color: var(--navy); transition: transform .12s; }
.kpi:hover { transform: translateY(-2px); }
.kpi span { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.kpi b { font-size: 22px; font-weight: 800; }
.kpi.warn b { color: var(--warn); } .kpi.neg b { color: var(--bad); } .kpi.pos b { color: var(--ok); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.dash-grid .panel { margin: 0; }
.hbars { display: flex; align-items: stretch; gap: 10px; height: 190px; padding-top: 6px; }
.hb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.hb i { display: block; width: min(46px, 70%); border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #3B65A8, var(--navy)); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 14px -8px rgba(14, 29, 53, .7); }
.hb.now i { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 14px -8px rgba(156, 119, 53, .8); }
.hb b { font-size: 11px; color: var(--navy); white-space: nowrap; } .hb span { font-size: 11px; color: var(--ink-3); font-weight: 700; }
.budget-list { display: grid; gap: 10px; }
.bl-h { display: flex; justify-content: space-between; font-weight: 700; }
.meter { height: 8px; border-radius: 999px; background: rgba(21, 42, 74, .09); overflow: hidden; display: flex; box-shadow: 0 1px 2px rgba(14, 29, 53, .15) inset; }
.meter i { display: block; height: 100%; background: linear-gradient(180deg, #3B65A8, var(--navy)); border-radius: 999px; }
.meter i.this { background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 4px, var(--gold-hi) 4px, var(--gold-hi) 8px); border-radius: 0 999px 999px 0; }
.meter.sm { height: 6px; width: 90px; display: inline-flex; vertical-align: middle; margin-right: 6px; }
.bl.warn .meter i { background: linear-gradient(180deg, #E4A23C, var(--warn)); } .bl.over .meter i { background: linear-gradient(180deg, #E35D52, var(--bad)); }
.rank { margin: 0; padding-left: 18px; display: grid; gap: 6px; } .rank li { display: flex; justify-content: space-between; gap: 8px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 14px; text-decoration: none !important; color: var(--navy); font-weight: 700; text-align: center;
  background: linear-gradient(180deg, #fff, #EEF2F8); border: 1px solid rgba(21, 42, 74, .1); box-shadow: 0 1px 0 #fff inset, 0 3px 0 rgba(21, 42, 74, .12), 0 8px 16px -10px rgba(21, 42, 74, .5); transition: transform .1s; }
.quick:active { transform: translateY(2px); }
.quick .ic { width: 24px; height: 24px; color: var(--gold-lo); }
.quick .emoji { font-size: 26px; }

/* ── Bảng dữ liệu ── */
.tbl-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tbl-tools h3 { margin: 0; }
.search { position: relative; display: inline-flex; align-items: center; min-width: 220px; flex: 0 1 300px; }
.search .ic { position: absolute; left: 10px; color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 34px; border-radius: 999px; }
.tbl-tools select.flt { width: auto; max-width: 220px; border-radius: 999px; }
.flt-date { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 11.5px; color: var(--ink-2); }
.flt-date input { width: 150px; }
.export-group { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tbl-wrap { border-radius: 16px; overflow: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11.5px; font-weight: 800; color: var(--ink-2); padding: 10px 12px; white-space: nowrap;
  background: linear-gradient(180deg, rgba(244, 247, 252, .97), rgba(232, 238, 246, .97)); border-bottom: 1px solid var(--line); }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--navy); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:nth-child(even) td { background: rgba(244, 247, 252, .55); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: rgba(193, 154, 85, .1); }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }
.tbl tfoot td { background: rgba(232, 238, 246, .7); border-top: 1px solid var(--line); }
.tbl .grand-row td { background: rgba(21, 42, 74, .06); font-size: 14px; }
.w-check { width: 36px; } .w-x { width: 44px; }
.row-warn td { background: rgba(253, 240, 217, .6) !important; } .row-flag td { background: rgba(251, 227, 224, .55) !important; } .row-recount td:first-child { box-shadow: 3px 0 0 var(--warn) inset; }
.cards { display: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; font-weight: 700; color: var(--ink-2); }
.sel-bar { position: sticky; top: calc(var(--top-h) + 6px); z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 8px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: var(--shadow); flex-wrap: wrap; }
.thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; vertical-align: middle; border: 1px solid var(--line); }
.path { font-size: 11.5px; color: var(--ink-2); }
.clip { display: inline-block; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(21, 42, 74, .07); margin-bottom: 14px; flex-wrap: wrap; }
.seg a, .seg button { padding: 7px 14px; border-radius: 9px; border: 0; background: none; font: 700 12.5px 'Nunito'; color: var(--ink-2); cursor: pointer; text-decoration: none !important; display: inline-flex; gap: 6px; align-items: center; }
.seg .on { background: linear-gradient(180deg, #fff, #F1F4F9); color: var(--navy); box-shadow: 0 1px 0 #fff inset, 0 3px 8px -4px rgba(14, 29, 53, .4); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85); font: 700 12px 'Nunito'; color: var(--navy); cursor: pointer; text-decoration: none !important; }

/* ── Chứng từ ── */
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.doc-kind { margin: 0; font-size: 11.5px; font-weight: 800; color: var(--gold-lo); }
.doc-head h2 { font-size: 22px; }
.doc-st { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-st .pill { height: 26px; font-size: 12px; padding: 0 12px; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.doc-side .panel { margin-bottom: 14px; }
.stack { display: grid; gap: 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; margin: 0; }
.kv dt { font-size: 11px; font-weight: 700; color: var(--ink-3); } .kv dd { margin: 0; font-weight: 700; color: var(--navy); word-break: break-word; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 20; display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 16px; margin-top: 10px; flex-wrap: wrap; }
.cutoff { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--info-bg); color: var(--navy); font-weight: 700; }
.cutoff.late { background: var(--warn-bg); color: var(--warn); }

/* ── Bảng ký duyệt — điểm nhấn vàng ── */
.approve-dock { border-radius: 20px; padding: 16px 18px; margin-bottom: 14px; border: 1px solid rgba(193, 154, 85, .55); background: linear-gradient(180deg, rgba(255, 250, 238, .92), rgba(255, 255, 255, .7)); }
.ad-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ad-head > div { flex: 1; } .ad-head b { display: block; font-size: 15px; color: var(--navy); } .ad-head small { color: var(--ink-2); }
.ad-seal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #2B1D05; background: radial-gradient(circle at 35% 28%, #FFF4DA, var(--gold-hi) 40%, var(--gold)); box-shadow: 0 -4px 8px rgba(120, 85, 20, .25) inset, 0 8px 16px -8px rgba(156, 119, 53, .9); }
.ad-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.budget { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line-2); margin-bottom: 12px; }
.budget-h, .budget-l { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.budget .meter { margin: 6px 0; height: 10px; }
.budget.warn { border-color: rgba(183, 110, 0, .4); } .budget.over { border-color: rgba(184, 50, 39, .5); background: #FFF6F5; }

/* ── Lịch sử duyệt ── */
.tl { margin-bottom: 12px; } .tl-old { opacity: .62; }
.tl header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; } .tl header small { color: var(--ink-3); margin-left: auto; }
.tl ol { list-style: none; margin: 0; padding: 0; position: relative; }
.tl ol::before { content: ''; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-step { position: relative; display: flex; gap: 10px; padding: 0 0 12px; }
.tl-dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 11px; background: #fff; border: 2px solid var(--line); color: var(--ink-3); }
.tl-dot .ic { width: 14px; height: 14px; stroke-width: 3; }
.tl-step.tls-APPROVED .tl-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-step.tls-PENDING .tl-dot { background: var(--gold); border-color: var(--gold-lo); color: #fff; box-shadow: 0 0 0 4px rgba(193, 154, 85, .25); }
.tl-step.tls-REJECTED .tl-dot, .tl-step.tls-RETURNED .tl-dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.tl-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl-act { margin-top: 6px; padding: 7px 10px; background: rgba(255, 255, 255, .8); border-radius: 10px; border: 1px solid var(--line-2); }
.tl-act > span { font-weight: 700; } .tl-act small { display: block; color: var(--ink-3); }
.tl-sig { display: block; max-height: 42px; max-width: 180px; margin-top: 4px; }
.tl q, .tl-act q { display: block; font-style: italic; color: var(--ink-2); margin-top: 3px; }

/* ── Đính kèm ── */
.att-list { display: flex; gap: 8px; flex-wrap: wrap; }
.att { width: 84px; display: flex; flex-direction: column; gap: 4px; text-decoration: none !important; color: var(--ink-2); cursor: pointer; border: 0; background: none; padding: 0; font: inherit; }
.att img, .att-doc, .att-add .ic { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.att-doc { display: grid; place-items: center; font-weight: 800; color: var(--bad); }
.att small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-add .ic { padding: 20px; border-style: dashed; color: var(--gold-lo); }

/* ── Bộ soạn dòng hàng & chọn hàng ── */
.le-pick { margin-bottom: 10px; }
.item-picker { position: relative; display: flex; gap: 8px; }
.item-picker .search { flex: 1; max-width: none; }
.ip-results { position: absolute; z-index: 30; top: 40px; left: 0; right: 0; max-height: 320px; overflow: auto; border-radius: 14px; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); border: 1px solid #fff; padding: 6px; }
.ip-results button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; border: 0; background: none; font: inherit; cursor: pointer; color: var(--navy); }
.ip-results button:hover { background: rgba(193, 154, 85, .14); }
.ip-results small { display: block; color: var(--ink-3); }
.pad { padding: 10px; }
.le-tbl input.le-in, .le-tbl select.le-in { min-height: 30px; padding: 4px 8px; }
.le-tbl td.num input.le-in { width: 110px; text-align: right; }

/* ── Nhận hàng ── */
.receive-find { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.receive-find #openPOs { flex-basis: 100%; }
.rcv-lines { display: grid; gap: 10px; }
.rcv { padding: 12px 14px; }
.rcv header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 8px; }
.rcv header b { font-size: 14px; } .rcv header small { color: var(--ink-2); flex: 1; }
.rcv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.rej-photo { display: flex; align-items: flex-end; gap: 6px; } .rej-photo img { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; }
.warn-line { margin: 6px 0 0; color: var(--bad); font-weight: 800; }
.card3d { border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(247, 249, 252, .9)); border: 1px solid rgba(21, 42, 74, .09); box-shadow: 0 1px 0 #fff inset, 0 2px 0 rgba(21, 42, 74, .06), 0 10px 20px -14px rgba(14, 29, 53, .45); }

/* ── Bảng so sánh giá ── */
.bidtab td.best { background: linear-gradient(180deg, #FFF6DF, #FBEBC6) !important; box-shadow: 0 0 0 1px rgba(193, 154, 85, .6) inset; }
.bidtab td.best input { border-color: var(--gold); font-weight: 800; }

/* ── Phê duyệt (thẻ, vuốt) ── */
.ap-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ap-card { position: relative; overflow: hidden; }
.ap-card.overdue { border-color: rgba(184, 50, 39, .45); }
.ap-inner { position: relative; z-index: 1; padding: 14px 16px; background: linear-gradient(180deg, #fff, #F6F8FC); border-radius: inherit; transition: transform .2s; }
.ap-card header { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; } .ap-card header b { font-size: 15px; color: var(--navy); }
.doc-tag { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--navy); color: #fff; }
.ap-subj { color: var(--ink-2); min-height: 18px; }
.ap-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; } .ap-meta b { font-size: 15px; color: var(--navy); }
.ap-step { margin: 8px 0; padding: 7px 10px; border-radius: 10px; background: #FBF3E3; color: var(--gold-lo); font-weight: 700; font-size: 12px; }
.ap-actions { display: flex; justify-content: flex-end; gap: 8px; }
.swipe-bg { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-weight: 800; color: #fff; background: linear-gradient(90deg, var(--ok), var(--bad)); }
.sw-ok .swipe-bg .no, .sw-no .swipe-bg .ok { opacity: .3; }

/* ── Kiểm kê ── */
.stepper { display: flex; list-style: none; padding: 0; margin: 0 0 14px; gap: 6px; overflow-x: auto; }
.stepper li { flex: 1; min-width: 110px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .55); font-weight: 700; font-size: 12px; color: var(--ink-3); border: 1px solid var(--line-2); }
.stepper span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #E8EDF5; font-size: 11px; flex: none; }
.stepper .done { color: var(--ok); } .stepper .done span { background: var(--ok); color: #fff; }
.stepper .now { color: var(--navy); background: #fff; box-shadow: var(--shadow-sm); } .stepper .now span { background: var(--gold); color: #fff; }
.count-top { position: sticky; top: calc(var(--top-h) + 4px); z-index: 10; }
.count-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.count-card { padding: 12px 14px; }
.count-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.count-card header small { display: block; color: var(--ink-3); }
.count-card.done { border-color: rgba(24, 130, 90, .35); } .count-card.done .count-total { color: var(--ok); }
.count-card.recount { box-shadow: 0 0 0 2px rgba(183, 110, 0, .35) inset; }
.count-total { font-size: 18px; font-weight: 800; color: var(--ink-3); white-space: nowrap; }
.count-inputs { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; flex-wrap: wrap; }
.count-inputs label { flex: 1; min-width: 80px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.count-inputs input { font-size: 16px; text-align: center; }
.count-more { display: flex; gap: 6px; margin-top: 6px; }
details summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.sync-state { font-weight: 800; color: var(--ok); } .sync-state.pending { color: var(--warn); }
.var-tbl select, .var-tbl input { min-height: 28px; padding: 3px 6px; font-size: 12px; min-width: 120px; }

/* ── Quy trình duyệt kéo thả ── */
.wf-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wf-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; }
.wf-step.dragging { opacity: .45; } .wf-step.drop-on { box-shadow: 0 -3px 0 var(--gold) inset, var(--shadow-sm); }
.grip { cursor: grab; color: var(--ink-3); padding-top: 8px; touch-action: none; }
.wf-no { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(180deg, #2D5089, var(--navy)); box-shadow: 0 3px 8px -3px rgba(14, 29, 53, .7); margin-top: 2px; }
.wf-body { flex: 1; display: grid; gap: 8px; min-width: 0; }
.wf-body > input { font-weight: 800; }
.wf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; align-items: end; }
.wf-row label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.wf-row label.chk { flex-direction: row; align-items: center; padding-bottom: 8px; }
.sim-steps li { margin-bottom: 4px; } .sim-steps li.skip { opacity: .45; text-decoration: line-through; }

/* ── Phân quyền ── */
.split { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.group-list { display: grid; gap: 4px; }
.group-list a { display: block; padding: 9px 12px; border-radius: 12px; text-decoration: none !important; color: var(--navy); }
.group-list a small { display: block; color: var(--ink-3); }
.group-list a.on { background: linear-gradient(180deg, #fff, #F1F4F9); box-shadow: var(--shadow-sm); }
.perm-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.perm-matrix section { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line-2); }
.perm-matrix h4 { margin: 0 0 6px; }
.chk.perm { display: flex; padding: 4px 0; align-items: flex-start; } .chk.perm input { margin-top: 2px; }
.perm-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.tri { display: inline-flex; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.tri button { border: 0; background: #fff; padding: 4px 8px; font: 700 11px 'Nunito'; cursor: pointer; color: var(--ink-3); }
.tri button.on { background: #E8EDF5; color: var(--navy); } .tri button.on.allow { background: var(--ok-bg); color: var(--ok); } .tri button.on.deny { background: var(--bad-bg); color: var(--bad); }

/* ── Hồ sơ, chữ ký ── */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.sig-show { display: grid; justify-items: center; gap: 12px; padding: 10px; }
.sig-paper { position: relative; width: min(420px, 100%); padding: 14px 18px 12px; border-radius: 12px; text-align: center; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 22px -16px rgba(14, 29, 53, .6); }
.sig-paper img { display: block; max-width: 100%; max-height: 90px; margin: 0 auto 6px; }
.sig-paper b { display: block; border-top: 1px solid var(--line); padding-top: 6px; color: var(--navy); } .sig-paper small { color: var(--ink-3); }
.sig-paper.big img { max-height: 120px; }
.pin-status { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); margin-bottom: 14px; font-size: 14px; }
.phone-notif { margin: 16px 0 4px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(193,154,85,.12), rgba(21,42,74,.05)); border: 1px solid rgba(193,154,85,.35); }
.phone-notif h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 14px; }
.phone-notif h3 svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pin-status.ok { background: var(--ok-bg); color: var(--ok); }
.sigdesigner { display: grid; gap: 12px; }
.sig-pad { position: relative; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(14, 29, 53, .08) inset; }
.sig-pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 900 / 320; cursor: crosshair; position: relative; z-index: 1; }
.sig-line { position: absolute; left: 6%; right: 6%; bottom: 26%; border-bottom: 1.5px dashed rgba(21, 42, 74, .25); }
.sig-x { position: absolute; left: 3%; bottom: 25%; color: rgba(21, 42, 74, .35); font-weight: 800; }
.sig-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--ink-2); font-size: 12px; }
.ink { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; background: var(--ink); cursor: pointer; box-shadow: 0 0 0 1px var(--line), 0 2px 4px rgba(0, 0, 0, .2); }
.ink.on { box-shadow: 0 0 0 2px var(--gold), 0 2px 4px rgba(0, 0, 0, .2); }
.range { display: inline-flex; align-items: center; gap: 6px; } .range input { width: 110px; }
.sig-styles { display: grid; gap: 8px; margin-top: 10px; }
.sig-style { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; color: var(--navy); }
.sig-style.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(193, 154, 85, .2); }
.sig-dancing span { font: 700 30px 'Dancing Script', cursive; } .sig-vibes span { font: 400 36px 'Great Vibes', cursive; } .sig-nunito span { font: italic 600 26px 'Nunito'; }
.sig-uprev img { max-width: 100%; max-height: 120px; margin-top: 10px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.sig-preview { display: grid; justify-items: center; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); } .sig-preview > span { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }

/* ── Ảnh trong biểu mẫu ── */
.img-field { display: flex; align-items: center; gap: 8px; } .img-field img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* ── Máy quét ── */
.scan-view { position: relative; border-radius: 16px; overflow: hidden; background: #0E1D35; min-height: 220px; }
.scan-view video { width: 100% !important; display: block; }
.scan-frame { position: absolute; inset: 22% 10%; border: 2px solid rgba(231, 203, 142, .9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(14, 29, 53, .35); pointer-events: none; }
.scan-err { color: #fff; padding: 40px 20px; text-align: center; }
.scan-manual { display: flex; gap: 8px; margin-top: 10px; }

/* ── Thông báo ── */
.notif-list { display: grid; gap: 4px; }
.notif { display: grid; padding: 10px 12px; border-radius: 12px; text-decoration: none !important; color: var(--ink); }
.notif:hover { background: rgba(21, 42, 74, .05); }
.notif.unread { background: #FBF3E3; } .notif b { color: var(--navy); } .notif small { color: var(--ink-3); }

/* ── Sổ tay ── */
.manual { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.manual-nav { position: sticky; top: calc(var(--top-h) + 14px); max-height: calc(100vh - var(--top-h) - 40px); overflow: auto; display: grid; gap: 8px; }
.manual-nav .search { max-width: none; flex: 1; }
.manual-nav details { border-radius: 12px; } .manual-nav summary { font-size: 13px; color: var(--navy); padding: 6px 4px; }
.manual-nav nav a { display: block; padding: 6px 10px 6px 26px; border-radius: 9px; color: var(--ink-2); font-weight: 600; }
.manual-nav nav a.on { background: rgba(193, 154, 85, .16); color: var(--navy); font-weight: 800; } .manual-nav nav a.draft { opacity: .55; }
.search-res { display: grid; gap: 4px; } .search-res a { display: block; padding: 8px 10px; border-radius: 10px; background: #fff; } .search-res small { display: block; color: var(--ink-3); }
.manual-art { min-height: 60vh; } .manual-art footer { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.manual-home { text-align: center; padding: 20px 0; } .manual-home .quick-grid { margin-top: 20px; text-align: left; }
.prose { font-size: 14px; line-height: 1.65; max-width: 76ch; }
.prose h3 { margin: 18px 0 6px; font-size: 15px; }
.prose img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); margin: 8px 0; }
.prose ol, .prose ul { padding-left: 22px; } .prose li { margin-bottom: 4px; }
.rte { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.rte-bar { display: flex; gap: 2px; padding: 6px; background: #F3F6FA; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rte-bar button { min-width: 30px; height: 28px; border: 0; border-radius: 7px; background: none; cursor: pointer; font: 700 13px 'Nunito'; color: var(--navy); }
.rte-bar button:hover { background: #fff; }
.rte-area { min-height: 180px; max-height: 50vh; overflow: auto; padding: 12px 14px; outline: none; }

/* ── Quy trình thu mua: thanh tiến trình ── */
.proc-flow { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.proc-flow li { flex: 1 1 0; min-width: 104px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(21,42,74,.05); color: var(--ink-2); font-size: 12px; line-height: 1.25; position: relative; }
.proc-flow li b { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 1px 3px rgba(21,42,74,.18); font-size: 11px; color: var(--navy); }
.proc-flow li.done { background: rgba(193,154,85,.12); color: var(--navy); }
.proc-flow li.done b { background: var(--gold); color: #fff; }
.proc-flow li.now { background: linear-gradient(135deg, var(--navy), #24406b); color: #fff; box-shadow: 0 6px 16px rgba(21,42,74,.25); }
.proc-flow li.now b { background: var(--gold); color: #fff; }
/* chọn dòng PR cho RFQ */
.pick-lines { max-height: 46vh; overflow: auto; border: 1px solid rgba(21,42,74,.1); border-radius: 14px; padding: 6px 10px; margin: 10px 0; background: rgba(255,255,255,.6); }
.pick-pr { padding: 6px 0; border-bottom: 1px dashed rgba(21,42,74,.12); }
.pick-pr:last-child { border-bottom: 0; }
.chk { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 13px; }
.chk.sub { padding-left: 26px; }
.chk input { width: 16px; height: 16px; accent-color: var(--gold); }
/* bảng so sánh */
.bidtab th.vhead { min-width: 150px; vertical-align: top; }
.bidtab th.vhead.chosen { background: linear-gradient(180deg, #FFF6DF, #FBEBC6); }
.bidtab .vtools { display: block; margin-top: 4px; font-weight: 400; }
.bidtab td.won { box-shadow: 0 0 0 2px var(--gold) inset; }
.bidtab td small.block { font-size: 11px; }
button.link { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; }
button.link.neg { color: var(--danger, #b42318); }
input.numin { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .proc-flow li { min-width: 92px; font-size: 11px; } .proc-flow li span { display: none; } .proc-flow li.now span { display: inline; } }
.bidtab table { min-width: 100%; }
.bidtab th:first-child, .bidtab td:first-child { min-width: 180px; }
.bidtab { overflow-x: auto; }
.deleg-banner { background: linear-gradient(135deg, rgba(193,154,85,.16), rgba(255,255,255,.7)); border: 1px solid rgba(193,154,85,.4); }
.deleg-banner p { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; font-size: 13px; }
.deleg-banner svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--gold-lo); margin-top: 1px; }
.sim-who { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.edit-lines tr.changed td { background: rgba(193,154,85,.10); }
.edit-lines tr.need [data-k=reason] { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(184,50,39,.15); }
.edit-lines [data-k=reason] { width: 100%; min-width: 160px; }
.edit-lines [data-k=reason]:disabled { opacity: .45; }
em.req { color: var(--bad); font-style: normal; }

/* 1.0.4 — PR: gợi ý tạo mặt hàng, liên hệ Cost Controller, bảng áp giá */
.note-bar { display: flex; align-items: flex-start; gap: 8px; padding: 9px 14px; margin-bottom: 12px; border-radius: var(--r-md); background: var(--warn-bg); color: var(--ink); border: 1px solid rgba(183, 110, 0, .18); }
.note-bar svg { flex: none; margin-top: 2px; color: var(--warn); }
.note-bar .link { font-weight: 700; }
.contact-list { display: grid; gap: 8px; margin-top: 10px; }
.contact { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--pearl); border: 1px solid var(--line-2); }
.contact svg { color: var(--gold-lo); flex: none; margin-top: 2px; }
.contact a { font-size: .92em; }
.pricing-panel select { min-width: 160px; max-width: 240px; }
.pricing-panel .mini { width: 120px; }

/* ── Máy tính bảng ── */
@media (max-width: 1200px) {
  .doc-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ── Điện thoại: thanh trên gọn, điều hướng đáy, bảng → thẻ, hướng dẫn dạng bottom sheet ── */
@media (max-width: 900px) {
  :root { --top-h: 54px; }
  body.shell, body.shell.nav-collapsed { padding-left: 0; --nav-w: 270px; }
  .sidenav { transform: translateX(-102%); transition: transform .22s ease-out; width: 270px; }
  .nav-open .sidenav { transform: none; }
  .nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(14, 29, 53, .4); }
  .nav-collapse { display: none; }
  .nav-collapsed .brand span, .nav-collapsed .nav-link span, .nav-collapsed .nav-group { display: initial; }
  .only-mobile { display: inline-grid; }
  p.only-mobile, .hint.only-mobile { display: block; }
  .topbar { padding: 0 8px; padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); }
  .crumb h1 { font-size: 15px; }
  .uc-text, .lang-switch span:not(.on) { display: none; }
  .user-chip { padding: 2px; }
  #view { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); }
  .bottomnav {
    display: flex; position: fixed; z-index: 70; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 62px; border-radius: 22px;
    align-items: center; justify-content: space-around; padding: 0 4px;
  }
  .bottomnav a, .bottomnav > button:not(.fab) { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border: 0; background: none; font: 700 10px 'Nunito'; color: var(--ink-2); text-decoration: none !important; min-width: 56px; }
  .bottomnav a.active { color: var(--navy); } .bottomnav a.active .ic { color: var(--gold-lo); }
  .bottomnav .ic { width: 22px; height: 22px; }
  .bottomnav .badge { top: 0; right: 8px; }
  .fab {
    width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); display: grid; place-items: center; color: #2B1D05; cursor: pointer;
    background: radial-gradient(circle at 35% 28%, #FFF4DA, var(--gold-hi) 42%, var(--gold)); box-shadow: 0 -6px 12px rgba(120, 85, 20, .25) inset, 0 12px 22px -8px rgba(156, 119, 53, .9);
  }
  .fab .ic { width: 26px; height: 26px; stroke-width: 2.4; }
  .fab:active { transform: translateY(2px); }

  .hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .hero-inbox { align-self: stretch; display: flex; justify-content: center; }
  .seal-count { width: 116px; height: 116px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpis.slim { grid-template-columns: repeat(3, 1fr); } .kpis.slim .kpi b { font-size: 15px; }
  .kpi { padding: 12px; } .kpi b { font-size: 18px; }
  .panel { padding: 14px; border-radius: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .tbl-tools .search { flex: 1 1 100%; min-width: 0; }
  .tbl-tools select.flt { flex: 1 1 45%; max-width: none; }
  /* Bảng → thẻ */
  .tbl-wrap.glass > .tbl { display: none; }
  .tbl-wrap.glass { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
  .cards { display: grid; gap: 10px; }
  .cards .card3d { padding: 12px 14px; }
  .cards header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
  .cards header b { font-size: 14px; color: var(--navy); }
  .crow { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 2px 0; }
  .crow span:first-child { color: var(--ink-3); }
  .cards input[type=checkbox] { display: none; }
  /* bảng chi tiết chứng từ: xếp dòng */
  .panel .tbl-wrap .tbl.compact thead { display: none; }
  .var-tbl td.w-check { display: none !important; }
  .panel .tbl-wrap .tbl.compact, .panel .tbl-wrap .tbl.compact tbody, .panel .tbl-wrap .tbl.compact tr, .panel .tbl-wrap .tbl.compact td { display: block; width: 100%; }
  .panel .tbl-wrap .tbl.compact tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .panel .tbl-wrap .tbl.compact td { border: 0; padding: 2px 0; text-align: left; display: flex; justify-content: space-between; gap: 10px; }
  .panel .tbl-wrap .tbl.compact td[data-label]::before { content: attr(data-label); color: var(--ink-3); font-size: 11.5px; font-weight: 700; }
  .panel .tbl-wrap .tbl.compact td:first-child::before { display: none; }
  .panel .tbl-wrap .tbl.compact tfoot { display: block; }
  .le-tbl thead { display: none; } .le-tbl, .le-tbl tbody, .le-tbl tr, .le-tbl td { display: block; width: 100%; }
  .le-tbl tr { padding: 10px; border-bottom: 1px solid var(--line); position: relative; }
  .le-tbl td { border: 0 !important; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .le-tbl td[data-label]::before { content: attr(data-label); font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
  .le-tbl td:first-child::before { display: none; }
  .le-tbl .w-x { position: absolute; top: 6px; right: 6px; width: auto; }
  .le-tbl td.num input.le-in { width: 140px; font-size: 16px; }
  .le-tbl tfoot, .le-tbl tfoot tr, .le-tbl tfoot td { display: block; }
  .doc-head h2 { font-size: 19px; }
  .sticky-actions { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .ap-cards, .count-list { grid-template-columns: 1fr; }
  .split, .manual { grid-template-columns: 1fr; }
  .manual-nav { position: static; max-height: none; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; margin-top: auto; }
  .overlay { padding: 0; place-items: end stretch; }
  .modal-xs, .modal-sm, .modal-md, .modal-lg, .modal-xl { max-width: none; }
  .modal-f { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .help-drawer { width: 100%; height: auto; max-height: 86vh; border-radius: 22px 22px 0 0; animation: sheetup .25s ease-out; margin-top: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .overlay-soft { place-items: end stretch; }
  .help-grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(21, 42, 74, .2); margin: 10px auto 0; }
  @keyframes sheetup { from { transform: translateY(40px); opacity: 0; } }
  #toasts { top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; left: 12px; max-width: none; }
  input, select, textarea { font-size: 16px; } /* tránh iOS tự phóng to */
  .stepper li { min-width: 92px; font-size: 11px; }
}
@media print {
  .sidenav, .topbar, .bottomnav, .sticky-actions, .page-actions, #toasts { display: none !important; }
  body.shell { padding: 0; background: #fff; } .glass { box-shadow: none; background: #fff; }
}
