/* Agent C Export — ngôn ngữ thiết kế của Xưởng video: nền đen có lưới mờ, thẻ kính, nút bo tròn, nhấn xanh đại dương */
:root {
  color-scheme: dark;
  --bg: #0B0D12;
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .075);
  --solid: #141821;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f1efe8;
  --muted: #a3a8b0;
  --muted-2: #767c86;
  --lime: #1F66FF;          /* xanh thương hiệu Agent C (tên biến giữ để tương thích) */
  --lime-2: #3D7BFF;
  --grad: linear-gradient(135deg, #0A3BFF 0%, #1F74FF 55%, #4DB8FF 100%);
  --lime-ink: #ffffff;
  --foam: #4DB8FF;
  --ok: #7ee0a6;
  --warn: #f2c063;
  --danger: #ff8f7a;
  --r: 18px;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --head: "Montserrat", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); color: var(--text); font-size: 14.5px; line-height: 1.5; min-height: 100vh; background: var(--bg);
  background-image: radial-gradient(1100px 560px at 78% -8%, rgba(31, 102, 255, .16), transparent 62%),
    radial-gradient(820px 520px at -6% 104%, rgba(10, 59, 255, .12), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px; background-attachment: fixed;
}
a { color: var(--foam); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
h1 { font-size: 28px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0 0 .8em; }
[hidden] { display: none !important; }
small, .muted { color: var(--muted); }
.small { font-size: 13px; }
.sub { color: var(--muted); margin: 0 0 18px; max-width: 75ch; }
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--foam); outline-offset: 2px; border-radius: 8px; }
.num, .stat .v, td.n { font-variant-numeric: tabular-nums; }

/* ---------- khung: thanh bên + nội dung ---------- */
.app { display: flex; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; width: 228px; flex: none; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .025); backdrop-filter: blur(18px); }
.rail a, .rail button { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 999px; color: var(--muted);
  border: 1px solid transparent; background: none; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; width: 100%; text-align: left; }
.rail a:hover, .rail button:hover { background: var(--glass-2); color: var(--text); text-decoration: none; }
.rail a.on { background: var(--grad); color: var(--lime-ink); box-shadow: 0 6px 22px rgba(31, 102, 255, .3); }
.rail .lbl { flex: 1; }
.rail .cnt { background: var(--warn); color: #221703; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.rail .brandrow { height: auto; padding: 4px 6px 18px; color: var(--text); gap: 10px; }
.rail .brandrow:hover { background: none; }
.rail .brandrow b { display: block; font-size: 15px; font-family: var(--head); } .rail .brandrow small { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.rail .logo { width: 40px; height: 40px; border-radius: 13px; background: var(--solid); border: 1px solid var(--line); display: grid; place-items: center; padding: 6px; flex: none; }
.rail .logo img { width: 100%; }
.rail .spacer { flex: 1; }
.rail form { margin: 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 26px; flex-wrap: wrap; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); background: var(--glass); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px; }
.crumb b { color: var(--text); font-weight: 600; }
.topbar .grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  color: var(--text); font-size: 13px; font-weight: 600; }
.pill:hover { text-decoration: none; background: var(--glass-2); }
.pill.warn { border-color: rgba(242, 192, 99, .5); color: #fbe3b0; }
.mode { background: var(--warn); color: #1d1402; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 4px 10px; letter-spacing: .03em; }
.brand-m { display: none; width: 36px; height: 36px; border-radius: 12px; background: var(--solid); border: 1px solid var(--line); padding: 5px; }
.brand-m img { width: 100%; }
.content { padding: 6px 26px 48px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.tabbar { display: none; }

/* ---------- thẻ, lưới ---------- */
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px; backdrop-filter: blur(14px); margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid > .card { margin-bottom: 0; }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: block; color: var(--text); }
.stat .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat .s { font-size: 12px; color: var(--muted); }
a.stat:hover { text-decoration: none; border-color: rgba(31, 102, 255, .55); }

/* ---------- nút, ô nhập ---------- */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--glass-2); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  white-space: nowrap; transition: transform .15s, background .15s, box-shadow .15s; text-decoration: none; }
.btn:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.lime { background: var(--grad); border-color: transparent; color: var(--lime-ink); }
.btn.lime:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 6px 22px rgba(31, 102, 255, .3); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 143, 122, .4); background: rgba(255, 143, 122, .07); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.big { height: 48px; padding: 0 24px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
label small { font-weight: 400; }
.field { margin-bottom: 14px; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--text);
  font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: rgba(31, 102, 255, .65); box-shadow: 0 0 0 4px rgba(31, 102, 255, .14); }
textarea { min-height: 110px; resize: vertical; }
select option { background: var(--solid); }
input[type=file] { width: 100%; color: var(--muted); font-size: 13px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 14px; background: rgba(0, 0, 0, .2); }
input[type=range] { width: 100%; accent-color: var(--lime); }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--text); margin: 0 14px 8px 0; font-weight: 500; }
.chk input { width: auto; }

/* ---------- thông báo, nhãn, bảng ---------- */
.alert { padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-2); margin-bottom: 14px; }
.alert.err { border-color: rgba(255, 143, 122, .45); background: rgba(255, 143, 122, .08); color: #ffd8cf; }
.alert.ok { border-color: rgba(126, 224, 166, .45); background: rgba(126, 224, 166, .08); color: #d3f6e2; }
.alert.warn { border-color: rgba(242, 192, 99, .45); background: rgba(242, 192, 99, .08); color: #fbe7bd; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { color: var(--ok); border-color: rgba(126, 224, 166, .35); }
.badge.blue { color: var(--foam); border-color: rgba(31, 102, 255, .45); }
.badge.amber { color: var(--warn); border-color: rgba(242, 192, 99, .35); }
.badge.red { color: var(--danger); border-color: rgba(255, 143, 122, .35); }
.badge.muted, .badge.gray { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: rgba(255, 255, 255, .02); }
.table-wrap { overflow-x: auto; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; }
.kv b { color: var(--muted); font-weight: 500; }
.pre { white-space: pre-wrap; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.draft { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.draft textarea { min-height: 230px; }
.draft label { margin-top: 12px; }
.act { font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.act time { color: var(--muted-2); font-size: 12px; margin-right: 8px; font-family: var(--mono); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 16px; }
.pager { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.pager a.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
details summary { cursor: pointer; color: var(--muted); }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.seg a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 700; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--lime); color: var(--lime-ink); }
.seg small { color: var(--ok); font-weight: 800; } .seg a.on small { color: var(--lime-ink); }

/* ---------- văn phòng ---------- */
.pulse { display: flex; gap: 22px; flex-wrap: wrap; }
.pulse div { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; }
.pulse b { display: block; font-family: var(--mono); font-size: 19px; color: var(--text); letter-spacing: 0; }
.pulse b.hot { color: var(--ok); }
.floor { position: relative; border: 1px solid var(--line); border-radius: 24px; padding: 24px; margin-top: 10px;
  background: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 44px 44px, rgba(255, 255, 255, .015); }
.zone-label { position: absolute; top: -11px; left: 24px; background: var(--solid); border-radius: 999px; padding: 1px 12px;
  font-family: var(--mono); font-size: 11px; color: var(--muted-2); letter-spacing: .1em; }
.desks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.desk { position: relative; display: block; background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  border: 1px solid var(--line); border-radius: 20px; padding: 16px; color: inherit; transition: transform .2s, border-color .2s; backdrop-filter: blur(14px); }
.desk:hover { transform: translateY(-3px); border-color: var(--lime); text-decoration: none; }
.desk .top { display: flex; align-items: center; gap: 12px; }
.av { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #06121b; position: relative; flex: none; }
.av.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
.lamp { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--solid); background: var(--muted-2); }
.lamp.work { background: var(--ok); animation: glow 1.6s infinite; } .lamp.wait { background: var(--warn); } .lamp.off { background: #4a4f57; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(126, 224, 166, .6); } 100% { box-shadow: 0 0 0 9px rgba(126, 224, 166, 0); } }
.who b { display: block; font-size: 16px; } .who span { font-size: 12px; color: var(--muted); }
.mkt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--foam); border: 1px solid rgba(31, 102, 255, .4); padding: 3px 9px;
  border-radius: 999px; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.bubble { margin: 14px 0 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
  font-size: 13px; color: var(--muted); min-height: 60px; position: relative; }
.bubble::before { content: ""; position: absolute; top: -7px; left: 18px; width: 12px; height: 12px; background: #0c0f13;
  border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.bubble .hand { color: var(--warn); font-weight: 700; }
.typing { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); animation: tp 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tp { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.dstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dstats div { background: rgba(0, 0, 0, .3); border-radius: 12px; padding: 8px 4px; text-align: center; }
.dstats b { display: block; font-family: var(--mono); font-size: 16px; } .dstats span { font-size: 10.5px; color: var(--muted-2); }
.quota { margin-top: 10px; height: 6px; background: rgba(0, 0, 0, .45); border-radius: 6px; overflow: hidden; }
.quota i { display: block; height: 100%; background: linear-gradient(90deg, var(--lime), var(--foam)); }
.add-desk { border: 1.5px dashed var(--line-2); border-radius: 20px; display: grid; place-items: center; min-height: 240px; color: var(--muted-2); text-align: center; }
.add-desk:hover { color: var(--foam); border-color: var(--foam); text-decoration: none; }
.add-desk b { display: block; font-size: 30px; font-weight: 300; }
.owner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.feed { display: grid; gap: 4px; }
.ev { display: grid; grid-template-columns: 44px 30px 1fr; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.ev time { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.ev p { margin: 0; color: var(--muted); } .ev p b { color: var(--text); } .ev a { color: inherit; }
.todo { display: grid; gap: 10px; }
.task { display: flex; align-items: center; gap: 12px; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.task .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; flex: none;
  background: rgba(242, 192, 99, .14); color: var(--warn); }
.task.good .ic { background: rgba(126, 224, 166, .14); color: var(--ok); } .task.info .ic { background: rgba(31, 102, 255, .16); color: var(--foam); }
.task div { flex: 1; min-width: 0; } .task b { display: block; } .task span { font-size: 12.5px; color: var(--muted); }
.empty-note { color: var(--muted); font-size: 13.5px; padding: 8px 2px; }

/* ---------- bảng kéo thả ---------- */
.board-wrap { overflow-x: auto; padding-bottom: 10px; }
.kanban { display: flex; gap: 12px; width: max-content; }
.lane { width: 240px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 18px; padding: 10px; min-height: 460px;
  display: flex; flex-direction: column; gap: 8px; transition: background .15s, border-color .15s; }
.lane.over { background: rgba(31, 102, 255, .1); border-color: var(--lime); }
.lane.nodrop.over { background: rgba(255, 143, 122, .06); border-color: rgba(255, 143, 122, .4); }
.lane header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); }
.lane header b { font-size: 13px; } .lane header span { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.lane .hint { font-size: 11px; color: var(--muted-2); padding: 0 4px; }
.kcard { background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035)); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 11px; cursor: grab; user-select: none; color: var(--text); display: block; }
.kcard:hover { border-color: var(--line-2); text-decoration: none; }
.kcard.drag { opacity: .4; }
.kcard .r1 { display: flex; gap: 8px; align-items: flex-start; } .kcard .r1 b { flex: 1; font-size: 13px; line-height: 1.3; min-width: 0; }
.kcard .r2 { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; color: var(--muted-2); align-items: center; }
.score { font-family: var(--mono); font-size: 11px; border-radius: 7px; padding: 1px 6px; background: rgba(126, 224, 166, .14); color: var(--ok); }
.score.mid { background: rgba(242, 192, 99, .14); color: var(--warn); }
.tag { border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.oav { margin-left: auto; width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 10px; color: #06121b; }
.more { text-align: center; font-size: 12px; color: var(--muted-2); padding: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #0a0c0f; padding: 10px 18px; border-radius: 999px; font-weight: 700; opacity: 0; transition: .25s;
  pointer-events: none; z-index: 90; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--danger); }

/* ---------- đội agent ---------- */
.team { display: grid; gap: 12px; }
.trow { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr) 160px 210px; gap: 14px; align-items: end; background: var(--glass);
  border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.trow .who { display: flex; gap: 12px; align-items: center; align-self: center; }
.trow .who > div { min-width: 0; }
.trow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-width: 170px; }
.swatches label { margin: 0; }
.swatches input { display: none; }
.swatches span { display: block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches input:checked + span { border-color: var(--text); }
.used { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- thiết lập ---------- */
.steps-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.stp { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: var(--glass);
  border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stp .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-2); color: var(--text); font-size: 12px; }
.stp.done .n { background: rgba(126, 224, 166, .18); color: var(--ok); }
.stp.on { color: var(--text); border-color: rgba(31, 102, 255, .6); background: rgba(31, 102, 255, .12); }
.stp.on .n { background: var(--lime); color: var(--lime-ink); }
.stp:hover { text-decoration: none; color: var(--text); }
.rep { border: 1px dashed var(--line-2); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.checklist { display: grid; gap: 8px; }
.checklist a { display: flex; gap: 10px; align-items: center; color: var(--text); }
.checklist .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--glass-2); }
.checklist .ok .n { background: rgba(126, 224, 166, .18); color: var(--ok); }

/* ---------- báo cáo ---------- */
.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fn { display: grid; grid-template-columns: 150px 1fr 74px; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; }
.fn:hover, .fn:focus { background: var(--glass-2); outline: none; }
.fn-l { font-size: 13.5px; } .fn-bar { height: 14px; display: block; }
.fn-bar i { display: block; height: 14px; background: #3d95e6; border-radius: 0 4px 4px 0; min-width: 2px; }
.fn-v { text-align: right; font-size: 14px; } .fn-v small { display: block; color: var(--muted); font-size: 11.5px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .cross { stroke: rgba(241, 239, 232, .45); stroke-width: 1; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.tip-box { position: absolute; z-index: 90; pointer-events: none; background: var(--solid); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 8px 10px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); min-width: 140px; }
.tt-h { color: var(--muted); margin-bottom: 4px; }
.tt-r { display: flex; align-items: center; gap: 8px; } .tt-r i { width: 12px; height: 2px; border-radius: 2px; }
.tt-r b { min-width: 24px; } .tt-r span { color: var(--muted); }

/* ---------- gói & thanh toán ---------- */
.pricing-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
.lockup-top { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; } .lockup-top img { width: 40px; }
.center { text-align: center; } .center .sub { margin: 6px auto 14px; }
.trial { display: inline-block; padding: 8px 18px; border-radius: 999px; background: rgba(126, 224, 166, .1); border: 1px solid rgba(126, 224, 166, .35);
  color: #d3f6e2; margin-bottom: 12px; }
.term-seg { margin: 6px 0 14px; } .pricing-wrap .term-seg { display: flex; width: max-content; margin: 10px auto 18px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.plan.hot { border-color: rgba(31, 102, 255, .6); background: linear-gradient(160deg, rgba(31, 102, 255, .14), var(--glass)); }
.ribbon { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 800; background: var(--lime); color: var(--lime-ink); padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 18px; margin: 0 0 4px; } .quota-l { color: var(--muted); margin-bottom: 12px; } .quota-l b { color: var(--text); font-size: 22px; }
.pm { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; } .pm.soon { opacity: .55; }
.pm-h { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.pp b { font-size: 25px; letter-spacing: -.02em; } .pp span { color: var(--muted); margin-left: 4px; }
.pm form { margin-top: 10px; }
.incl { color: var(--muted); margin: 16px 0 0; padding-left: 18px; line-height: 1.6; } .incl b { color: var(--text); }
.meter { height: 12px; border-radius: 999px; background: var(--glass-2); overflow: hidden; margin: 6px 0 8px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--lime), var(--foam)); border-radius: 999px; }
.meter i.full { background: var(--warn); }
.qr svg { width: 220px; height: 220px; background: #fff; padding: 10px; border-radius: 16px; }
.code { font-family: var(--mono); font-size: 16px; letter-spacing: .05em; color: var(--foam); }

/* ---------- đăng nhập ---------- */
.auth { max-width: 440px; margin: 8vh auto; padding: 0 16px; }
.auth .lockup { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; font-weight: 800; font-size: 22px; }
.auth .lockup img { width: 44px; }
.auth .card { padding: 28px; }

/* ---------- màn hẹp / điện thoại ---------- */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .owner { grid-template-columns: minmax(0, 1fr); }
  .trow { grid-template-columns: 1fr 1fr; } .trow .who { grid-column: 1 / -1; } .trow .acts { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 860px) {
  .rail { display: none; }
  .brand-m { display: grid; place-items: center; }
  .crumb { display: none; }
  .topbar { padding: 12px 16px; }
  .content { padding: 4px 16px 96px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; gap: 2px;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(10, 12, 15, .9); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); padding: 4px 8px; border-radius: 12px; }
  .tabbar a.on { color: var(--foam); } .tabbar a:hover { text-decoration: none; }
  .g2, .g3, .g4, .plans { grid-template-columns: minmax(0, 1fr); } .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: 1fr; }
  .fn { grid-template-columns: 110px 1fr 60px; }
  h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .lamp.work, .typing i { animation: none; } .desk, .btn { transition: none; } }

/* ---- Trang chủ dashboard ---- */
.dash-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.stat.hero { background: linear-gradient(150deg, rgba(10, 59, 255, .30), rgba(77, 184, 255, .10)); border-color: rgba(31, 102, 255, .45); }
.fn-bar i.brand { background: #1F74FF; }
.chart .hl { fill: rgba(255, 255, 255, .05); }
.todo-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.todo-chip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line);
  color: var(--text); flex: 1 1 260px; min-width: 0; }
.todo-chip:hover { text-decoration: none; border-color: var(--line-2); }
.todo-chip .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; flex: none;
  background: rgba(242, 192, 99, .14); color: var(--warn); }
.todo-chip.good .ic { background: rgba(126, 224, 166, .14); color: var(--ok); } .todo-chip.info .ic { background: rgba(31, 102, 255, .16); color: var(--foam); }
.todo-chip b { display: block; font-size: 13.5px; } .todo-chip small { display: block; color: var(--muted); font-size: 12px; }
.todo-chip .go { margin-left: auto; font-size: 12.5px; color: var(--foam); white-space: nowrap; }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stg { display: block; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--text); }
.stg:hover { text-decoration: none; border-color: rgba(31, 102, 255, .55); }
.stg b { display: block; font-family: var(--mono); font-size: 20px; } .stg span { font-size: 12px; color: var(--muted); }
.stg.zero b { color: var(--muted-2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .dash-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
