:root {
  /* Bộ màu Linhé: Chàm phấn đậm #5560B8 · Chàm phấn #CBD3F7 · Bạc hà #B7E5DA · Trắng lam #F9FAFE · Mực đêm #191E2E */
  --ink: #191E2E; --indigo: #5560B8; --indigo-soft: #CBD3F7; --mint: #B7E5DA; --paper: #F9FAFE;
  --bg: var(--paper); --surface: #fff; --line: #E3E6F2; --line2: #EEF0F8; --text: var(--ink); --muted: #5E6478; --faint: #6B7190;
  --accent: var(--indigo); --accent-2: #464FA0; --accent-soft: #EEF0FC;
  --danger: #c8372d; --danger-soft: #fdecea; --warn: #9a5b00;
  --c1: var(--indigo); --c2: #3E9E88;
  --tint: #F6F7FD; --tint-2: #F1F3FA;
  --radius: 10px; --shadow: 0 1px 2px rgba(25, 30, 46, .05), 0 1px 3px rgba(25, 30, 46, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
h1, h2, h3, h4 { margin: 0; }
h3 { font-size: 15px; font-weight: 650; }
a { color: var(--accent); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.muted, .sub { color: var(--muted); }
.sub { font-size: 12.5px; }
.hint { color: var(--faint); font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
.up { color: #1d7a43; } .down { color: var(--danger); }
.spacer { flex: 1; }

/* ---------- Bố cục ---------- */
.app { display: grid; grid-template-columns: 224px 1fr; height: 100vh; }
.side { background: var(--ink); color: #C9CDE0; display: flex; flex-direction: column; padding: 14px 10px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none; }
.brand-text b { display: block; color: #fff; font-size: 15px; }
.brand-text small { display: block; color: #8D93AD; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #C9CDE0; text-decoration: none; font-weight: 500; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(203, 211, 247, .14); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mint); }
.nav .badge-n { margin-left: auto; background: var(--mint); color: var(--ink); font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.nav .badge-n:empty { display: none; }
.nav .badge-n.warn { background: #f3b34c; }
.side-foot { margin-top: auto; font-size: 11.5px; color: #8D93AD; padding: 8px; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar h1 { font-size: 18px; font-weight: 650; }
.view { flex: 1; overflow: auto; padding: 20px 24px 40px; }
.view-pos { padding: 0; overflow: hidden; }

/* ---------- Thành phần ---------- */
.btn { height: 34px; padding: 0 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--tint-2); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn:focus-visible, .tab:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-ghost { color: var(--danger); border-color: #f1c4bf; }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 48px; font-size: 15.5px; font-weight: 650; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn kbd { font: 600 11px var(--font); background: rgba(255, 255, 255, .22); padding: 1px 6px; border-radius: 4px; }
.icon-btn { border: 0; background: none; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; font-size: 14px; }
.icon-btn:hover { background: var(--tint-2); color: var(--text); }
.link { border: 0; background: none; cursor: pointer; font: inherit; color: var(--accent); padding: 0; }
.link.danger { color: var(--danger); }

.input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: inherit; min-width: 0; }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.input.sm { height: 30px; width: 116px; }
.input.xs { height: 30px; width: 70px; }
.input.grow { flex: 1; }
.search { width: 290px; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
select.input { padding-right: 6px; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 12px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; font-weight: 500; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.count { margin-left: 6px; background: var(--line2); color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.tab.active .count { background: var(--accent-soft); color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card > h3 { margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: inherit; text-decoration: none; display: block; }
a.kpi:hover { border-color: var(--indigo-soft); }
.kpi-l { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-v { font-size: 24px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-s { color: var(--muted); font-size: 12.5px; }

.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--tint); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tbody tr:last-child > td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover > td { background: var(--tint); }
.tbl tr.sel > td { background: var(--accent-soft); }
.tbl.compact td { padding: 7px 10px; }
.tbl.compact th { padding: 7px 10px; position: static; }
.tbl.inner { background: #fff; border: 1px solid var(--line2); border-radius: 8px; }
.tbl.inner th { position: static; background: #fff; }
.tbl tr.vrow > td { background: var(--tint); padding: 4px 12px 12px; }
.w-chk { width: 36px; }
.prod { display: flex; align-items: center; gap: 10px; }
.chev { display: inline-block; transition: transform .15s; color: var(--faint); font-size: 18px; line-height: 1; }
.chev.open { transform: rotate(90deg); }
.more { background: var(--line2); border-radius: 999px; padding: 0 6px; font-size: 12px; color: var(--muted); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty.sm { padding: 14px; }
.foot-row { padding: 10px 12px; text-align: center; border-top: 1px solid var(--line2); }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.t-blue { background: #e8f0fe; color: #1f5fd1; } .t-indigo { background: #E9ECFB; color: #4A54A8; } .t-amber { background: #fff3dc; color: #9a5b00; }
.t-violet { background: #f3e8fd; color: #7a35b8; } .t-green { background: #e3f5ea; color: #1d7a43; } .t-orange { background: #fdeee3; color: #b4541f; }
.t-gray { background: var(--line2); color: #5E6478; } .t-teal { background: #DDF3EC; color: #1F6E5C; } .t-red { background: #fdecea; color: #c8372d; }
.stock { display: inline-block; min-width: 34px; text-align: center; padding: 1px 8px; border-radius: 6px; font-weight: 600; }
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; font-weight: 650; flex: none; object-fit: cover; }

.bulk { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--accent-soft); border: 1px solid var(--indigo-soft); border-radius: 8px; margin-bottom: 10px; }

/* Biểu đồ */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line2); }
.chart .axis { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(85, 96, 184, .07); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { height: 6px; background: var(--line2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.hbar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.seg-inline { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg-inline button { border: 0; background: none; padding: 0 12px; height: 32px; font: inherit; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg-inline button + button { border-left: 1px solid var(--line); }
.seg-inline button.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }

/* ---------- Hộp thoại ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(25, 30, 46, .5); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 50; animation: fade .15s; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 580px; box-shadow: 0 20px 50px rgba(0, 0, 0, .22); display: flex; flex-direction: column; max-height: 90vh; animation: pop .15s; }
.modal.sm { max-width: 420px; } .modal.lg { max-width: 880px; } .modal.xl { max-width: 1120px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 18px; overflow: auto; }
.modal-body p { margin: 0 0 6px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--tint); border-radius: 0 0 12px 12px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; }
.align-end { align-items: end; }
.form-split { display: grid; grid-template-columns: 1.45fr 1fr; gap: 24px; }
.sec { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 6px 0 10px; font-weight: 650; }
.attr-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.attr-row .input:first-child { width: 170px; }
.w-sku { width: 150px !important; } .w-bc { width: 130px !important; }
label.inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

.summary { background: var(--tint); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.summary > div { display: flex; justify-content: space-between; padding: 3px 0; }
.summary .big { font-size: 15px; border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; }
.summary .accent b { color: var(--accent); font-size: 17px; }

.picker { position: relative; }
.picker > svg { position: absolute; left: 11px; top: 10px; color: var(--faint); }
.picker > .input { width: 100%; padding-left: 34px; }
.picker-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(25, 30, 46, .14); max-height: 340px; overflow: auto; z-index: 5; }
.pick-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; }
.pick-item.active, .pick-item:hover { background: var(--accent-soft); }
.pick-item small { display: block; color: var(--muted); font-size: 12px; }
.pick-item .r { margin-left: auto; text-align: right; white-space: nowrap; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-block { background: var(--tint); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; }
.info-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.info-block p { margin: 0 0 3px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; }
.detail-bottom { display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-top: 14px; align-items: start; }
.timeline { border-left: 2px solid var(--line2); padding-left: 14px; margin-left: 6px; }
.tl { position: relative; padding-bottom: 12px; }
.tl .dot { position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; padding: 0; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-kpis > div { background: var(--tint); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; }
.mini-kpis span { display: block; color: var(--muted); font-size: 12px; }
.mini-kpis b { font-size: 17px; }
.success { text-align: center; padding: 8px 0; }
.success .tick { width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 28px; display: grid; place-items: center; margin: 0 auto 10px; }
.success .big { font-size: 26px; font-weight: 750; }
.vlist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vbtn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.vbtn:hover { border-color: var(--accent); background: var(--accent-soft); }
.vbtn span:first-child { font-weight: 600; }
.vbtn.out { opacity: .5; }

/* ---------- Bán tại quầy ---------- */
.pos { display: grid; grid-template-columns: 1fr 410px; height: 100%; }
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 16px 18px 0; }
.pos-search { position: relative; }
.pos-search svg { position: absolute; left: 13px; top: 13px; color: var(--faint); }
.pos-search .input { width: 100%; height: 46px; padding-left: 40px; font-size: 15px; }
.chips { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 13px; cursor: pointer; font: inherit; font-weight: 500; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; overflow: auto; padding-bottom: 16px; align-content: start; flex: 1; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s; }
.pcard:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(85, 96, 184, .14); }
.pcard.out { opacity: .5; }
.pc-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; min-height: 2.6em; }
.pc-price { color: var(--accent); font-weight: 650; font-size: 13px; }
.pc-stock { font-size: 12px; color: var(--muted); }
.pos-right { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.cart-lines { flex: 1; overflow: auto; padding: 4px 10px; }
.cline { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line2); }
.cline b { font-size: 13.5px; }
.qty { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 30px; }
.qty button { width: 28px; border: 0; background: var(--tint-2); cursor: pointer; font-size: 16px; color: var(--text); }
.qty button:hover { background: var(--line); }
.qty input { width: 40px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { display: none; }
.cl-total { min-width: 82px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.cart-foot { border-top: 1px solid var(--line); padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--tint); }
.line { display: flex; justify-content: space-between; align-items: center; font-variant-numeric: tabular-nums; }
.line.big { font-size: 19px; font-weight: 750; }
.line.big b { color: var(--accent); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 8px; cursor: pointer; font: inherit; font-weight: 500; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.quick button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 9px; cursor: pointer; font: inherit; font-size: 12.5px; }
.quick button:hover { border-color: var(--accent); }

/* ---------- Cài đặt ---------- */
.settings { display: grid; gap: 14px; max-width: 820px; }
.settings .card h3 { margin-bottom: 4px; }
.settings .card > .sub { margin: 0 0 14px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Thông báo ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 380px; animation: pop .2s; transition: .3s; }
.toast.err { background: var(--danger); }
.toast.warn { background: #8a5a00; }
.toast.out { opacity: 0; transform: translateY(6px); }

@media (max-width: 1100px) {
  .app { grid-template-columns: 64px 1fr; }
  .side .label, .brand-text, .side-foot { display: none; }
  .nav .badge-n { position: absolute; top: 2px; right: 2px; font-size: 10px; padding: 0 5px; line-height: 15px; }
  .grid-2, .form-split, .detail-bottom { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr 350px; }
  .search { width: 220px; }
}

/* Ô chọn ảnh sản phẩm */
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-drop { width: 84px; height: 84px; flex: none; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--bg); display: grid; place-items: center; overflow: hidden; cursor: pointer; transition: border-color .15s, background .15s; }
.img-drop:hover, .img-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.img-drop img { width: 84px; height: 84px; object-fit: cover; display: block; }
.img-ph { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.img-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.img-acts .hint { flex-basis: 100%; }

/* Đăng nhập */
.auth-wrap { position: fixed; inset: 0; z-index: 200; background: radial-gradient(circle at 85% 10%, rgba(183, 229, 218, .18), transparent 40%), linear-gradient(160deg, var(--ink), #252B45 55%, #343C73); display: grid; place-items: center; padding: 20px; overflow: auto; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 14px; padding: 28px 26px 22px; box-shadow: 0 20px 50px rgba(10, 12, 24, .35); }
.auth-card .logo { margin-bottom: 14px; }
.auth-card h2 { font-size: 20px; margin: 0 0 4px; }
.auth-card > .sub { margin: 0 0 18px; }
.auth-card .field { margin-bottom: 12px; }
.btn.block { width: 100%; justify-content: center; height: 40px; }
.auth-msg { min-height: 18px; font-size: 13px; margin: 2px 0 10px; }
.auth-msg.err { color: var(--danger); } .auth-msg.ok { color: var(--accent); }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }
/* Tài khoản & trạng thái lưu ở thanh bên */
.side-foot .who b { display: block; color: #fff; font-size: 13px; }
.side-foot .who span { color: #8D93AD; }
.side-foot a { color: var(--indigo-soft); font-size: 12px; }
.sync { font-size: 11.5px; margin: 6px 0 4px; }
.sync::before { content: "●"; margin-right: 5px; }
.sync.saved { color: var(--mint); } .sync.saving { color: #F3D58A; } .sync.error { color: #ff8f84; }
.card.highlight { border: 1.5px solid var(--accent); background: var(--accent-soft); }

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
.color-grid .attr-row { margin: 4px 0; }

/* Bảo mật: ẩn thông tin nhạy cảm với nhân viên */
.role-staff .own, .role-staff a[data-route="reports"],
.role-staff [data-act="csv"], .role-staff [data-act="export"], .role-staff [data-act="backup"] { display: none !important; }
.auth-card.wide { max-width: 420px; }
.mfa-steps { padding-left: 18px; margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; }
.mfa-qr { display: grid; place-items: center; margin: 6px 0 8px; }
.mfa-qr img { width: 180px; height: 180px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.input.otp { font-size: 20px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.sec-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.sec-row > div { flex: 1; }
tr.warn-row td { background: #fff8e6; }

/* Logo Linhé (hình tròn nâu – vàng) */
img.logo { display: block; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #3a2a20; box-shadow: 0 0 0 1px rgba(203, 211, 247, .18); }
img.logo.auth-logo { width: 76px; height: 76px; margin: 0 auto 14px; box-shadow: 0 6px 18px rgba(25, 30, 46, .25); }
.auth-card h2, .auth-card > .sub { text-align: center; }
