/* Double D Ads — design tokens + core components (starter kit).
   Extracted from src/app/globals.css of the Double D Ads app (v4.10.x).
   Copy as-is. Theme switch = class "dark" on <html> (light is the :root baseline).
   Fonts: Roboto (UI, weights 400/500/700) + JetBrains Mono (figures only).
   Load them and expose as --font-ui / --font-mono (next/font or Google Fonts). */

/* ── Light theme (baseline) ─────────────────────────────────── */
:root {
  --accent-rgb:     255, 214, 10;           /* brand yellow #FFD60A — same in both themes */
  --accent:         rgb(var(--accent-rgb));
  --accent-text:    #3f3a2b;                /* yellow used AS TEXT on light surfaces */
  --accent-soft:    #f6f2da;
  --accent-fill:    var(--accent);          /* solid fills: vivid yellow + near-black text */
  --accent-on-fill: #0a0a0a;
  --accent-dim:     rgba(var(--accent-rgb), 0.14);
  --accent-glow:    rgba(var(--accent-rgb), 0.24);
  --accent-glow-lg: rgba(var(--accent-rgb), 0.10);
  --on-accent-muted:#1f1900;
  --stat-value:     var(--text);            /* big numbers: neutral in light, yellow in dark */
  --input-bg:       var(--bg);
  --on-hue:         #ffffff;
  --hover-wash:     rgba(60, 50, 20, 0.05);
  --row-line:       rgba(60, 50, 20, 0.07);

  /* Warm-tinted neutrals (hue-matched to the yellow), never cool grey */
  --bg:        #f6f5f1;
  --surface:   #ffffff;
  --surface-2: #f0efea;
  --surface-3: #e5e3dc;
  --border:    rgba(60, 50, 20, 0.12);
  --border-hi: rgba(var(--accent-rgb), 0.35);
  --text:       #232015;
  --text-muted: #5b584d;
  --text-dim:   #656053;

  /* Status hues: deepened in light so they pass 6:1 as text */
  --red-rgb:    199, 10, 10;   --red:    rgb(var(--red-rgb));    --red-glow:   rgba(var(--red-rgb), 0.16);
  --green-rgb:  20, 112, 54;   --green:  rgb(var(--green-rgb));  --green-glow: rgba(var(--green-rgb), 0.14);
  --amber-rgb:  125, 91, 2;    --amber:  rgb(var(--amber-rgb));
  --blue-rgb:   6, 94, 203;    --blue:   rgb(var(--blue-rgb));
  --purple-rgb: 103, 55, 246;  --purple: rgb(var(--purple-rgb));
  --pink-rgb:   189, 15, 106;  --pink:   rgb(var(--pink-rgb));
  /* Solid active fills for hues that are too dark for black text: pastel tile + deep hue text */
  --purple-soft: #e1daf6; --purple-fill: var(--purple-soft); --purple-on-fill: var(--purple);
  --blue-soft:   #dae7f6; --blue-fill:   var(--blue-soft);   --blue-on-fill:   var(--blue);

  /* Type scale: one ladder, never invent in-between sizes */
  --fs-2xs: 0.62rem; --fs-xs: 0.68rem; --fs-sm: 0.75rem; --fs-base: 0.8rem;
  --fs-md: 0.95rem;  --fs-lg: 1.1rem;  --fs-xl: 1.35rem; --fs-2xl: 2rem;

  --statusbar-h: 26px;
  --sidebar-w: 200px;
}

/* ── Dark theme (the default a fresh visitor gets) ───────────── */
:root.dark {
  --accent-text:    var(--accent);
  --accent-dim:     rgba(var(--accent-rgb), 0.18);
  --accent-glow:    rgba(var(--accent-rgb), 0.30);
  --accent-glow-lg: rgba(var(--accent-rgb), 0.14);
  --on-accent-muted:#4a3d00;
  --stat-value:     var(--accent);
  --input-bg:       var(--surface-2);
  --on-hue:         #0a0a0a;
  --hover-wash:     rgba(255, 255, 255, 0.04);
  --row-line:       rgba(255, 255, 255, 0.04);

  --bg:        #080809;
  --surface:   #0e0e10;
  --surface-2: #151518;
  --surface-3: #1c1c20;
  --border:    rgba(255, 255, 255, 0.08);
  --text:       #e4e4e7;
  --text-muted: #9999a3;
  --text-dim:   #878792;

  --red-rgb:    248, 113, 113;  --red-glow:   rgba(var(--red-rgb), 0.25);
  --green-rgb:  74, 222, 128;   --green-glow: rgba(var(--green-rgb), 0.20);
  --amber-rgb:  251, 191, 36;
  --blue-rgb:   96, 165, 250;
  --purple-rgb: 167, 139, 250;
  --pink-rgb:   244, 114, 182;
  --red: rgb(var(--red-rgb)); --green: rgb(var(--green-rgb)); --amber: rgb(var(--amber-rgb));
  --blue: rgb(var(--blue-rgb)); --purple: rgb(var(--purple-rgb)); --pink: rgb(var(--pink-rgb));
  --purple-fill: var(--purple); --purple-on-fill: #0a0a0a;
  --blue-fill:   var(--blue);   --blue-on-fill:   #0a0a0a;
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  color: var(--text);
  font-family: var(--font-ui), "Roboto", ui-sans-serif, system-ui, sans-serif;
  font-size: 13.5px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

/* Figures (numbers, dates, ids, money) are monospaced + tabular */
.tnum, .data-table td.right {
  font-family: var(--font-mono), "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* ── Typography ─────────────────────────────────────────────── */
.page-title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.section-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.muted { color: var(--text-muted); }

/* ── Buttons (5px radius, 0.04em tracking, 600 weight) ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.4rem 1rem; font: inherit; font-size: var(--fs-base); font-weight: 600; letter-spacing: 0.04em;
  border-radius: 5px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: all 0.18s ease;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.btn-primary { color: var(--accent-on-fill); border-color: var(--accent-fill); background: var(--accent-fill);
  box-shadow: 0 0 10px var(--accent-glow-lg), 0 1px 2px rgba(0,0,0,.10); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 0 16px var(--accent-glow), 0 2px 6px rgba(0,0,0,.14); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { color: var(--text-muted); border-color: var(--border); background: var(--surface-2); }
.btn-secondary:hover { color: var(--text); border-color: var(--border-hi); background: var(--surface-3); }
.btn-danger { color: var(--red); border-color: rgba(var(--red-rgb), .4); background: transparent; }
.btn-danger:hover { background: rgba(var(--red-rgb), .08); border-color: var(--red); box-shadow: 0 0 10px var(--red-glow); }
.btn-ghost { color: var(--text-muted); background: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-sm { padding: 0.25rem 0.65rem; font-size: var(--fs-sm); }

/* ── Inputs ─────────────────────────────────────────────────── */
.input-field {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border); border-radius: 5px;
  padding: 0.45rem 0.75rem; font: inherit; font-size: var(--fs-base); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none;
}
.input-field::placeholder { color: var(--text-dim); }
.input-field:focus { border-color: var(--accent); }
.form-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }

/* ── Cards, stat cards (8px radius, 1px border, flat — no heavy shadows) ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; }
.card-accent { border-color: var(--border-hi); box-shadow: 0 0 20px rgba(var(--accent-rgb), .05); }
.stat-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.stat-card-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.stat-card-value { font-family: var(--font-mono), "JetBrains Mono", monospace; font-size: var(--fs-xl); font-weight: 700;
  color: var(--stat-value); line-height: 1; letter-spacing: -0.03em; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; background: var(--surface); }
.data-table { width: 100%; font-size: var(--fs-base); border-collapse: collapse; }
.data-table thead tr { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.data-table th { padding: .55rem 1rem; text-align: left; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.data-table td { padding: .55rem 1rem; border-bottom: 1px solid var(--row-line); }
.data-table tbody tr:hover { background: var(--hover-wash); }
.data-table th.right, .data-table td.right { text-align: right; }
.data-table .table-total-row td { border-top: 2px solid var(--border-hi); font-weight: 700; background: var(--surface-2); }

/* ── Badges (3px radius, tinted: hue text + 25% border + 7% fill) ── */
.badge { display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 3px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; border: 1px solid transparent; }
.badge-active { color: var(--green); border-color: rgba(var(--green-rgb), .25); background: rgba(var(--green-rgb), .07); }
.badge-paused { color: var(--amber); border-color: rgba(var(--amber-rgb), .25); background: rgba(var(--amber-rgb), .07); }
.badge-ended  { color: var(--red);   border-color: rgba(var(--red-rgb), .25);   background: rgba(var(--red-rgb), .07); }
.badge-draft  { color: var(--text-muted); border-color: var(--border); background: var(--surface-2); }
.badge-info   { color: var(--blue);  border-color: rgba(var(--blue-rgb), .25);  background: rgba(var(--blue-rgb), .07); }

/* ── Shell: fixed 200px sidebar + content + 26px status bar ──── */
.shell { display: flex; min-height: 100vh; }
.shell-main { display: flex; flex: 1; flex-direction: column; min-width: 0; padding-bottom: var(--statusbar-h); }
.shell-content { flex: 1; padding: 2.5rem 1.5rem; }
.page { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; border-right: 1px solid var(--border); background: var(--surface);
  padding: 1rem .75rem; display: flex; flex-direction: column; }
.nav-link { display: flex; align-items: center; gap: .5rem; padding: .45rem .65rem; border-radius: 4px; font-size: 13px;
  font-weight: 500; color: var(--text-muted); text-decoration: none; border: 1px solid transparent; transition: all .15s; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--accent-on-fill); border-color: var(--accent-fill); background: var(--accent-fill); font-weight: 600; }
.nav-sub { display: flex; flex-direction: column; gap: .1rem; margin: .05rem 0 .3rem 1.05rem; padding-left: .5rem; border-left: 1px solid var(--border); }
.nav-child { padding: .32rem .6rem; font-size: 12.5px; }
.statusbar { position: fixed; left: var(--sidebar-w); right: 0; bottom: 0; height: var(--statusbar-h); display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; padding: 0 .9rem; background: var(--surface); border-top: 1px solid var(--border);
  font-size: var(--fs-2xs); letter-spacing: .02em; color: var(--text-dim); }

/* ── Chart tooltip (shared by every chart) ──────────────────── */
.chart-tip { background: var(--bg); border: 1px solid var(--border-hi); border-radius: 4px; padding: .35rem .55rem;
  font-size: var(--fs-xs); line-height: 1.35; box-shadow: 0 0 12px rgba(0,0,0,.5); }
.chart-tip-day { color: var(--text-muted); font-size: var(--fs-2xs); }
.chart-tip-val { color: var(--accent-text); font-weight: 600; }
/* App-specific layer. Chỉ dùng token trong tokens.css: không hardcode màu, không thêm cỡ chữ mới. */
:root { --font-ui: "Roboto"; --font-mono: "JetBrains Mono"; }
.mono { font-family: var(--font-mono), "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }
a { color: var(--accent-text); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2 { margin: 0; }
.dim { color: var(--text-dim); } .right { text-align: right; }

/* Logo lockup: hai file SVG đổi theo theme */
.lockup { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; }
.lockup img { height: 24px; width: auto; display: block; }
.lockup .logo-light { display: none; } :root:not(.dark) .lockup .logo-dark { display: none; } :root:not(.dark) .lockup .logo-light { display: block; }
.lockup .div { width: 1px; height: 16px; background: var(--border-hi); }
.lockup .suffix { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .12em; color: var(--text-muted); }
.login-lockup { justify-content: center; padding: 0 0 1.5rem; } .login-lockup img { height: 38px; }

/* Sidebar */
.sidebar { position: sticky; top: 0; height: 100vh; }
.nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; overflow-y: auto; }
.nav .section-label { padding: .9rem .65rem .35rem; font-size: var(--fs-2xs); }
.side-foot { border-top: 1px solid var(--border); padding-top: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.who { font-size: var(--fs-sm); color: var(--text-muted); padding: 0 .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-actions { display: flex; gap: .4rem; } .side-actions form { flex: 1; display: flex; } .side-actions .btn { flex: 1; }
.topbar { display: none; }

/* Status bar + heartbeat */
.hb { width: 84px; height: 3px; background: var(--surface-3); border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: .6rem; }
.hb i { display: block; height: 100%; width: 40%; background: var(--accent); animation: hb 2.4s ease-in-out infinite; }
@keyframes hb { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .hb i { animation: none; width: 100%; } .btn-primary:active { transform: none; } }

/* Forms / filter bars: mọi control cao 2.4rem */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.filters .input-field, .filters .btn, .field .input-field { height: 2.4rem; }
textarea.input-field { height: auto; font-family: var(--font-mono), monospace; font-size: var(--fs-sm); line-height: 1.5; }
select.input-field { padding-right: 1.6rem; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.checkline { display: flex; align-items: center; gap: .4rem; height: 2.4rem; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
input[type=checkbox] { accent-color: var(--accent); width: 1rem; height: 1rem; }
.form-narrow { max-width: 32rem; } .page-narrow { max-width: 48rem; }
.inline { display: inline; } .stack { display: flex; flex-direction: column; gap: .75rem; }

/* Alerts */
.alert { padding: .6rem .9rem; border-radius: 5px; border: 1px solid; border-left-width: 3px; font-size: var(--fs-base); }
.alert-ok { color: var(--green); border-color: rgba(var(--green-rgb), .3); background: rgba(var(--green-rgb), .07); }
.alert-err { color: var(--red); border-color: rgba(var(--red-rgb), .3); background: rgba(var(--red-rgb), .07); }
.alert-warn { color: var(--amber); border-color: rgba(var(--amber-rgb), .3); background: rgba(var(--amber-rgb), .07); }

/* Toast: vàng đặc, chữ tối, trượt từ phải */
.toast { position: fixed; top: 1rem; right: 1rem; z-index: 50; max-width: 24rem; padding: .8rem 1rem; border-radius: 8px;
  background: var(--accent-fill); color: var(--accent-on-fill); font-weight: 700; font-size: var(--fs-base);
  box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 0 1px var(--accent); animation: toast .42s cubic-bezier(.22,1.2,.36,1); }
.toast.err { background: var(--surface); color: var(--red); box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 0 1px var(--red); }
@keyframes toast { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* Delta, badges, chips */
.up { color: var(--red); } .down { color: var(--green); }
.badge-warn { color: var(--amber); border-color: rgba(var(--amber-rgb), .25); background: rgba(var(--amber-rgb), .07); }
.badge-err { color: var(--red); border-color: rgba(var(--red-rgb), .25); background: rgba(var(--red-rgb), .07); }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { display: inline-flex; gap: .4rem; align-items: center; padding: .15rem .55rem; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border-hi); font-size: var(--fs-sm); }
.chip a { color: var(--text-muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.spend { color: var(--accent-text); }
.data-table td.cfg { white-space: normal; }
pre.code { margin: 0; padding: .5rem .65rem; background: var(--input-bg); border: 1px solid var(--border); border-radius: 5px; font: var(--fs-sm) var(--font-mono), monospace; overflow: auto; max-width: 28rem; }
code { font-family: var(--font-mono), monospace; font-size: var(--fs-sm); background: var(--surface-2); padding: .05rem .35rem; border-radius: 3px; }
.chart-box { height: 240px; position: relative; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-wrap .card { width: 100%; max-width: 22rem; }

@media (max-width: 768px) {
  .shell { flex-direction: column; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); }
  .sidebar { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; height: auto; transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: none; }
  .statusbar { left: 0; } .shell-content { padding: 1.5rem 1rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); } .data-table { min-width: 720px; }
}

/* Wizard kết nối */
.steps { display: flex; gap: .5rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); font-weight: 600; letter-spacing: .04em; color: var(--text-dim); }
.steps li + li::before { content: ""; width: 1.5rem; height: 1px; background: var(--border); }
.steps .n { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 4px; border: 1px solid var(--border); font: var(--fs-xs) var(--font-mono), monospace; }
.steps li.on { color: var(--text); } .steps li.on .n { background: var(--accent-fill); color: var(--accent-on-fill); border-color: var(--accent-fill); }
.steps li.done .n { color: var(--green); border-color: rgba(var(--green-rgb), .4); }
.tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; min-height: 8.5rem; }
a.tile:hover { border-color: var(--border-hi); background: var(--surface-2); text-decoration: none; }
.tile.off { opacity: .45; }
.tile .mono-mark { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border);
  font: 700 var(--fs-sm) var(--font-mono), monospace; color: var(--accent-text); }
.tile b { font-size: var(--fs-md); } .tile p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.tile .foot { margin-top: auto; }
.sched { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.callout { border-left: 3px solid var(--accent); background: var(--surface-2); padding: .6rem .9rem; border-radius: 0 5px 5px 0; font-size: var(--fs-sm); color: var(--text-muted); }
.copy { display: flex; gap: .5rem; align-items: center; } .copy code { flex: 1; padding: .45rem .7rem; overflow-x: auto; white-space: nowrap; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--text-dim); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Trình tạo quy tắc */
.how { display: grid; gap: .5rem; }
.demo { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-family: var(--font-mono), monospace; font-size: var(--fs-base); }
.demo .tok { padding: .25rem .55rem; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.demo .arrow { color: var(--text-dim); }
.demo .lab { font: 600 var(--fs-2xs) var(--font-ui), sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); display: block; margin-top: .15rem; }
.choice { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.choice label { display: flex; flex-direction: column; gap: .2rem; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); }
.choice label:hover { border-color: var(--border-hi); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.choice label:has(input:focus-visible) { outline: 1px solid var(--accent); outline-offset: 2px; }
.choice b { font-size: var(--fs-base); } .choice span { color: var(--text-muted); font-size: var(--fs-sm); }
.parts { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; }
.part { display: flex; flex-direction: column; gap: .35rem; min-width: 7.5rem; }
.part .tok { padding: .4rem .6rem; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); font: var(--fs-base) var(--font-mono), monospace; text-align: center; min-height: 2.1rem; }
.part .idx { font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); text-align: center; }
.part.on .tok { border-color: var(--accent); }
.rowline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: var(--fs-base); }
.rowline .input-field { width: auto; }
.pv-cell { font-family: var(--font-mono), monospace; } .pv-cell.empty { color: var(--text-dim); }
.hint { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
details.adv summary { cursor: pointer; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; }
.reorder { display: inline-flex; flex-direction: column; } .reorder .btn { padding: 0 .4rem; line-height: 1.1; font-size: var(--fs-xs); }
.rule-chips { display: flex; flex-wrap: wrap; gap: .3rem; } .rule-chips .chip { font-size: var(--fs-xs); }

/* Sidebar v2: icon, nhóm có chevron, không có status bar */
.shell-main { padding-bottom: 0; }
.brand { display: flex; flex-direction: column; gap: .15rem; padding: .25rem .5rem 1.1rem; }
.brand .lockup { padding: 0; } .brand .ver { font: var(--fs-2xs) var(--font-mono), monospace; color: var(--text-dim); letter-spacing: .04em; }
.topbar .brand { padding: 0; flex-direction: row; align-items: center; gap: .6rem; }
.ico { flex-shrink: 0; }
.nav { gap: .2rem; }
.nav-parent .chev { margin-left: auto; display: inline-flex; color: var(--text-dim); transition: transform .15s; }
.nav-parent.open .chev { transform: rotate(90deg); }
.nav-parent.open { color: var(--text); }
.nav-child { font-size: 12.5px; }
.side-foot { gap: .65rem; padding-top: .9rem; }
.who { display: flex; flex-direction: column; gap: .05rem; padding: 0 .25rem; text-decoration: none !important; }
.who b { color: var(--text); font-size: var(--fs-base); } .who span { color: var(--text-dim); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; }
.who .role { font: 600 var(--fs-2xs) var(--font-ui), sans-serif; letter-spacing: .1em; color: var(--text-muted); margin-top: .15rem; }
.seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.seg button { display: grid; place-items: center; width: 2rem; height: 1.6rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-on-fill); }
.logout { justify-content: flex-start; padding-left: .25rem; gap: .5rem; }
[hidden] { display: none !important; }

/* Nút và mục điều hướng không gạch chân khi hover */
a.btn, a.btn:hover, a.btn:focus-visible, .nav-link, .nav-link:hover, a.tile, a.tile:hover, .who:hover, .chip a:hover { text-decoration: none; }
