/* Design system WMS v2 (ui-ux-pro-max: "logistics SaaS operations dashboard", bento + data-dense)
   Màu: xanh tin cậy + cam điểm nhấn. Chữ: Inter / JetBrains Mono (mã) / Calistoga (thương hiệu). */
:root {
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --accent: #ea580c;
  --accent-50: #fff7ed;
  --success: #16a34a;
  --success-50: #f0fdf4;
  --warning: #d97706;
  --warning-50: #fffbeb;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --violet: #7c3aed;
  --violet-50: #f5f3ff;
  --teal: #0d9488;
  --teal-50: #f0fdfa;

  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --ink: #0b1220;
  --ink-2: #131c2f;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --brand: "Calistoga", Georgia, serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow: 0 1px 3px rgb(15 23 42 / 0.06), 0 6px 16px -6px rgb(15 23 42 / 0.1);
  --shadow-lg: 0 12px 32px -12px rgb(15 23 42 / 0.25);
  --ease: 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.55 var(--font); color: var(--text); background: var(--bg); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.code, code { font-family: var(--mono); font-size: 0.92em; white-space: nowrap; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid rgb(37 99 235 / 0.45); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; font: 600 14px var(--font);
  border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer; white-space: nowrap;
  transition: background-color var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgb(37 99 235 / 0.3); }
.btn-primary:hover { background: var(--primary-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #c2410c; }
.btn-secondary { background: var(--card); color: var(--text-2); border-color: var(--line-2); }
.btn-secondary:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-danger { background: var(--card); color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger-50); }
.btn-ghost { background: transparent; color: inherit; border-color: rgb(255 255 255 / 0.18); }
.btn-ghost:hover { background: rgb(255 255 255 / 0.08); }
.btn-block { width: 100%; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* ---------- Form ---------- */
.stack > * + * { margin-top: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.help { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.input {
  width: 100%; min-height: 40px; padding: 8px 12px; font: 14px var(--font); color: var(--text);
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.input:hover { border-color: #94a3b8; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15); }
.input.code { font-family: var(--mono); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-left: 38px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.grid-form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Thông báo + nhãn ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); font-weight: 500; border: 1px solid; }
.alert-error { background: var(--danger-50); color: #991b1b; border-color: #fecaca; }
.alert-success { background: var(--success-50); color: #166534; border-color: #bbf7d0; }
.alert-info { background: var(--primary-50); color: #1e40af; border-color: var(--primary-100); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 12px; font-weight: 600; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: var(--success-50); color: #15803d; }
.tag-warn { background: var(--warning-50); color: #b45309; }
.tag-off { background: #f1f5f9; color: var(--muted); }
.tag-blue { background: var(--primary-50); color: #1d4ed8; }
.tag-violet { background: var(--violet-50); color: var(--violet); }
.tag-orange { background: var(--accent-50); color: #c2410c; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- Khung app ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 20px; padding: 20px 14px;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #cbd5e1;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 22px var(--brand); color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%); box-shadow: 0 6px 16px -4px rgb(37 99 235 / 0.6);
}
.brand-mark .icon { color: #fff; width: 20px; height: 20px; }
.brand b { color: #fb923c; font-weight: 400; }
.nav-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.nav-title { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #64748b; }
.nav-link {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px;
  color: #cbd5e1; border-radius: var(--r-sm); text-decoration: none; font-weight: 500;
  transition: background-color var(--ease), color var(--ease);
}
.nav-link:hover { background: rgb(255 255 255 / 0.06); color: #fff; text-decoration: none; }
.nav-link[aria-current="page"] { background: rgb(37 99 235 / 0.22); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.nav-link span:not(.soon) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link:has(.soon) { color: #94a3b8; }
.nav-link .soon { flex: none; white-space: nowrap; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: rgb(255 255 255 / 0.08); color: #94a3b8; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); background: rgb(255 255 255 / 0.05); }
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; font-weight: 700;
}
.me-name { display: grid; min-width: 0; line-height: 1.3; }
.me-name strong { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name span { font-size: 12px; color: #94a3b8; }
.me form { margin-left: auto; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm);
  background: transparent; border: 0; color: #94a3b8; cursor: pointer;
}
.icon-btn:hover { background: rgb(255 255 255 / 0.08); color: #fff; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 28px; background: rgb(244 246 251 / 0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.crumbs { color: var(--muted); font-size: 13px; }
.crumbs b { color: var(--text); font-weight: 600; }
.topbar .search { margin-left: auto; width: min(340px, 40vw); }
.topbar .search .input { min-height: 36px; background: var(--card); }
.content { padding: 24px 28px 48px; max-width: 1400px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin-top: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .field { min-width: 180px; }
.toolbar .grow { flex: 1; min-width: 220px; }

/* ---------- Dashboard bento ---------- */
.hero {
  position: relative; overflow: hidden; padding: 28px; border-radius: var(--r-lg); color: #fff;
  background: radial-gradient(1200px 300px at 100% 0%, rgb(249 115 22 / 0.35), transparent 60%),
    linear-gradient(120deg, #1e3a8a 0%, var(--primary) 55%, #3b82f6 100%);
  box-shadow: var(--shadow-lg);
}
.hero h1 { font-size: 26px; }
.hero p { color: #dbeafe; margin-top: 6px; max-width: 620px; }
.hero .actions { margin-top: 18px; }
.hero .btn-secondary { background: rgb(255 255 255 / 0.12); color: #fff; border-color: rgb(255 255 255 / 0.3); }
.hero .btn-secondary:hover { background: rgb(255 255 255 / 0.2); }
.hero-art { position: absolute; right: 24px; bottom: -18px; width: 220px; opacity: 0.18; }
.hero-art .icon { width: 220px; height: 220px; stroke-width: 1; }

.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-top: 20px; }
.kpi { display: flex; gap: 14px; align-items: flex-start; padding: 18px; text-decoration: none; color: inherit; transition: transform var(--ease), box-shadow var(--ease); }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.kpi-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; }
.kpi-icon .icon { width: 22px; height: 22px; }
.kpi-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--muted); font-size: 13px; margin-top: 2px; }
.kpi-sub { font-size: 12px; margin-top: 6px; }
.c-blue { background: var(--primary-50); color: var(--primary); }
.c-orange { background: var(--accent-50); color: var(--accent); }
.c-green { background: var(--success-50); color: var(--success); }
.c-violet { background: var(--violet-50); color: var(--violet); }
.c-teal { background: var(--teal-50); color: var(--teal); }
.c-amber { background: var(--warning-50); color: var(--warning); }

.bento { display: grid; gap: 16px; grid-template-columns: 2fr 1fr; margin-top: 16px; }
.quick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); padding: 16px 20px 20px; }
.quick a {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); font-weight: 600; text-decoration: none; transition: border-color var(--ease), background var(--ease);
}
.quick a:hover { border-color: var(--primary); background: var(--primary-50); }
.quick .kpi-icon { width: 36px; height: 36px; border-radius: 10px; }
.quick .kpi-icon .icon { width: 18px; height: 18px; }
.feed { list-style: none; margin: 0; padding: 4px 0; }
.feed li { display: flex; gap: 12px; padding: 10px 20px; align-items: flex-start; }
.feed li + li { border-top: 1px solid #f1f5f9; }
.feed .dot { margin-top: 7px; color: var(--primary); flex: none; }
.feed time { display: block; font-size: 12px; color: var(--muted); }
.roadmap { display: grid; gap: 10px; padding: 16px 20px 20px; }
.roadmap div { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.roadmap .tag { margin-left: auto; }

/* ---------- Bảng ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 16px; text-align: left; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
th { position: sticky; top: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); background: #f8fafc; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: #f8fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td:last-child { white-space: nowrap; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.row-link { font-weight: 600; color: var(--text); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: #94a3b8; margin-bottom: 8px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 16px; color: var(--muted); font-size: 13px; }
details summary { cursor: pointer; color: var(--primary); }
pre.json { margin: 6px 0 0; font: 12px var(--mono); white-space: pre-wrap; color: var(--text-2); }
.tabs { display: flex; gap: 4px; padding: 4px; background: #eef2f7; border-radius: 10px; width: fit-content; }
.tabs a { padding: 6px 14px; border-radius: 8px; color: var(--text-2); font-weight: 600; text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }

.split { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.wh-card .zones { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 16px; }
.wh-card .zone-add { display: flex; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.wh-card .zone-add .input { min-height: 34px; }
.cols-list { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 0; padding: 0; list-style: none; }
.cols-list li { padding: 8px 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.dropzone { display: grid; place-items: center; gap: 8px; padding: 28px; border: 2px dashed var(--line-2); border-radius: var(--r); background: #fafcff; text-align: center; }
.dropzone .icon { width: 32px; height: 32px; color: var(--primary); }

@media (max-width: 1100px) { .bento, .split { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; }
  .nav-group { display: flex; flex-wrap: wrap; }
  .nav-title { display: none; }
  .me { margin: 0 0 0 auto; padding: 4px; background: none; }
  .me-name { display: none; }
  .topbar { padding: 0 16px; }
  .topbar .search { display: none; }
  .content { padding: 16px; }
}

/* ---------- Đăng nhập ---------- */
body.auth { min-height: 100vh; }
.auth-split { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px; color: #fff;
  background: radial-gradient(800px 400px at 0% 100%, rgb(249 115 22 / 0.35), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgb(96 165 250 / 0.35), transparent 60%),
    linear-gradient(145deg, #0b1220 0%, #1e3a8a 60%, #2563eb 100%);
}
.auth-brand h2 { font: 40px/1.15 var(--brand); max-width: 460px; margin-top: 48px; }
.auth-brand h2 em { font-style: normal; color: #fdba74; }
.auth-brand ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 440px; }
.auth-brand li { display: flex; gap: 12px; align-items: flex-start; color: #dbeafe; }
.auth-brand li .kpi-icon { width: 36px; height: 36px; border-radius: 10px; background: rgb(255 255 255 / 0.12); color: #fff; }
.auth-brand li .kpi-icon .icon { width: 18px; height: 18px; }
.auth-brand li strong { color: #fff; display: block; }
.glass {
  margin-top: 32px; padding: 16px; max-width: 420px; border-radius: var(--r); border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.08); backdrop-filter: blur(10px);
}
.glass .row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: #dbeafe; }
.glass .row b { color: #fff; font-family: var(--mono); }
.auth-form { display: grid; place-items: center; padding: 32px 24px; background: var(--card); }
.auth-form > div { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 28px; margin-top: 8px; }
.auth-form .lead { color: var(--muted); margin: 6px 0 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-simple { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-simple .card { width: 100%; max-width: 420px; padding: 32px; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { padding: 24px; }
  .auth-brand h2 { font-size: 26px; margin-top: 16px; }
  .auth-brand ul, .glass { display: none; }
}

/* ---------- Máy scan (Zebra TC21/TC22: màn 5", găng tay, kho sáng) ---------- */
body.scan { font-size: 18px; background: #eef2f7; }
.scan-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: linear-gradient(120deg, var(--ink), #1e3a8a); color: #fff;
}
.scan-bar .brand { font-size: 20px; }
.scan-bar .brand-mark { width: 30px; height: 30px; }
.scan-bar .who { margin-left: auto; font-size: 15px; text-align: right; line-height: 1.2; }
.scan-bar .who small { display: block; color: #93c5fd; font-size: 12px; }
.scan-main { padding: 16px; max-width: 560px; margin: 0 auto; }
body.scan h1 { font-size: 24px; }
body.scan .input { min-height: 56px; font-size: 22px; border-width: 2px; border-radius: 12px; }
body.scan .btn { min-height: 56px; font-size: 18px; border-radius: 12px; }
body.scan .btn-ghost { min-height: 44px; font-size: 15px; }
.scan-step { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.scan-code { font: 600 22px var(--mono); }
.scan-tiles { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.scan-tile {
  position: relative; display: grid; gap: 10px; align-content: start; min-height: 120px; padding: 16px;
  border-radius: 16px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; box-shadow: var(--shadow);
}
.scan-tile:hover { text-decoration: none; filter: brightness(1.05); }
.scan-tile .icon { width: 34px; height: 34px; }
.scan-tile small { font-weight: 500; font-size: 13px; opacity: 0.85; }
.scan-tile.t-blue { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.scan-tile.t-orange { background: linear-gradient(135deg, #c2410c, #f97316); }
.scan-tile.t-green { background: linear-gradient(135deg, #15803d, #22c55e); }
.scan-tile.t-violet { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.scan-tile.t-teal { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.scan-tile.t-slate { background: linear-gradient(135deg, #334155, #64748b); }
.scan-tile.off { opacity: 0.55; pointer-events: none; }
.scan-tile .soon { position: absolute; top: 12px; right: 12px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgb(255 255 255 / 0.25); }
.result { padding: 18px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); }
.result.ok { border-color: #86efac; }
.result.none { border-color: #fecaca; }
.result h2 { font-size: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 10px; font-size: 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

/* ---------- In thẻ nhân viên (CR80: 85.6 × 54 mm) ---------- */
.card-sheet { display: grid; grid-template-columns: repeat(auto-fill, 85.6mm); gap: 6mm; }
.badge-card {
  width: 85.6mm; height: 54mm; padding: 3mm 4mm; background: #fff; border: 0.3mm solid #94a3b8; border-radius: 3mm;
  display: grid; grid-template-columns: 1fr 20mm; grid-template-rows: auto auto 1fr auto; column-gap: 3mm; break-inside: avoid;
}
.badge-card .org { font: 600 9pt var(--mono); color: var(--primary); }
.badge-card .name { font-size: 12pt; font-weight: 700; line-height: 1.2; }
.badge-card .role { font-size: 8pt; color: var(--muted); }
.badge-card .qr { grid-column: 2; grid-row: 1 / 4; align-self: start; }
.badge-card .qr svg { width: 20mm; height: 20mm; }
.badge-card .bar { grid-column: 1 / 3; align-self: end; }
.badge-card .bar svg { width: 100%; height: 11mm; }
.badge-card .code { grid-column: 1 / 3; text-align: center; font: 600 10pt var(--mono); }

@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; }
  .no-print, .sidebar, .topbar { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
}

/* Dòng sửa đơn vị mã hàng */
.uom-row { display: grid; grid-template-columns: 90px 80px minmax(150px, 1.6fr) repeat(4, minmax(60px, 1fr)) auto; gap: 8px; align-items: center; }
.uom-new { padding: 12px 16px; border-top: 1px solid var(--line); background: #fafcff; }
.uom-head { padding: 8px 16px; font-size: 12px; font-weight: 600; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--line); }
.uom-list > form { padding: 8px 16px; border-bottom: 1px solid #f1f5f9; }
@media (max-width: 860px) { .uom-row { grid-template-columns: 1fr 1fr; } }

/* Các bước hướng dẫn */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.step { display: flex; gap: 12px; padding: 18px; }
.step + .step { border-left: 1px solid var(--line); }
.step-n { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; }
.step p { margin-top: 4px; font-size: 13px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .step + .step { border-left: 0; border-top: 1px solid var(--line); } }
.nav-group summary { list-style: none; cursor: pointer; }
.nav-group summary::-webkit-details-marker { display: none; }
