/* FrameFleet public website. The /admin area uses separate styles and is outside this redesign. */

:root {
  --paper: #F4F6F8;
  --paper-2: #E8EDF2;
  --paper-3: #D9E1E8;
  --ink: #122430;
  --ink-2: #455863;
  --pen: #315BE8;
  --pen-deep: #2445B8;
  --pen-wash: #DEE5FF;
  --frame: #D5E66F;
  --frame-wash: #F2F7CF;
  --brick: #B64545;
  --brick-wash: #F6E1DE;
  --amber-ink: #7D5212;
  --amber-wash: #F8ECD3;
  --line: #CFD8DE;
  --line-strong: #71848F;
  --white: #FFFFFF;
  --sans: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --r-frame: 4px;
  --r-control: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 92px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--pen); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--pen-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 800; letter-spacing: -0.022em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.375rem, 1.4rem + 3.6vw, 4.25rem); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; }
code, kbd { font: 0.88em var(--mono); color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; overflow-wrap: anywhere; }
::selection { background: var(--frame-wash); }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-left: max(var(--gutter), (100% - var(--max)) / 2); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--white); border-radius: 8px; }
.skip:focus { top: 12px; }
.muted { color: var(--ink-2); }
.studio { font-weight: 500; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Nút: xanh bút cho thao tác chính, viền mực cho thao tác phụ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 22px; border-radius: var(--r-control);
  border: 2px solid transparent; font: 700 1rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer; color: var(--ink); background: none;
}
.btn:hover { text-decoration: none; }
.btn svg { flex: none; }
.btn-primary { background: var(--pen); color: var(--white); }
.btn-primary:hover { background: var(--pen-deep); color: var(--white); }
.btn-secondary { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.btn-secondary:hover { background: var(--paper-2); color: var(--ink); }
.btn-quiet { border-color: var(--line); color: var(--ink-2); }
.btn-quiet:hover { border-color: var(--line-strong); color: var(--ink); }
.btn-danger { border-color: var(--brick); color: var(--brick); background: var(--paper); }
.btn-danger:hover { background: var(--brick-wash); color: var(--brick); }
.btn-small { min-height: 42px; padding: 8px 16px; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.text-link { font-weight: 700; }

/* Đầu trang */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(244, 246, 248, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* FrameFleet: hệ thống điều phối sản xuất video hàng loạt */
.signal { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--pen-deep); font-weight: 700; font-size: .9rem; }
.signal::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--frame); box-shadow: 0 0 0 5px rgba(213,230,111,.32); }
.fleet-hero { min-height: calc(100vh - 72px); display: grid; align-items: center; }
.fleet-hero h1 { max-width: 10ch; }
.queue-map { position: relative; overflow: hidden; padding: clamp(24px,4vw,42px); border: 2px solid var(--ink); border-radius: 18px; background: var(--white); box-shadow: 14px 14px 0 var(--pen-wash); }
.queue-map::before { content: ""; position: absolute; width: 240px; height: 240px; right: -100px; top: -120px; border-radius: 50%; background: var(--frame-wash); }
.queue-head, .queue-foot { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.queue-head { padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.queue-head span { font-weight: 800; font-size: 1.15rem; }
.queue-head strong { padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: .8rem; }
.queue-map ol { position: relative; list-style: none; margin: 0; padding: 10px 0; }
.queue-map li { --progress: 0%; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 18px 0 22px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.queue-map li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: linear-gradient(90deg,var(--pen) var(--progress),transparent var(--progress)); }
.queue-map li.done { --progress: 100%; }
.queue-map li.active:nth-child(2) { --progress: 75%; }
.queue-map li.active:nth-child(3) { --progress: 50%; }
.queue-map li:nth-child(4) { --progress: 50%; }
.queue-map li:nth-child(5) { --progress: 33%; }
.queue-map li span { font-weight: 650; }
.queue-map li b { font: 700 .85rem var(--mono); color: var(--pen-deep); }
.queue-foot { padding-top: 16px; color: var(--ink-2); font-size: .78rem; font-weight: 700; }
.queue-foot span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--line-strong); }
.queue-foot span:first-child::before { background: #218A62; }
.queue-foot span:nth-child(2)::before { background: var(--pen); }
.queue-foot span:last-child::before { background: #E9A23B; }
.fleet-flow { list-style: none; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.fleet-flow li { position: relative; padding: 28px 22px 30px; border-right: 1px solid var(--line); }
.fleet-flow li:last-child { border-right: 0; }
.fleet-flow li::before { content: ""; position: absolute; top: -6px; left: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--pen); }
.fleet-flow span { color: var(--pen-deep); font: 700 .75rem var(--mono); }
.fleet-flow h3 { margin-top: 32px; min-height: 2.5em; }
.fleet-flow p { margin-top: 10px; color: var(--ink-2); font-size: .95rem; }
.use-cases .section-head { margin-bottom: 32px; }
.case-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 2px solid var(--ink); background: var(--white); }
.case-grid article { min-height: 190px; padding: 26px 22px; border-right: 1px solid var(--line); }
.case-grid article:last-child { border-right: 0; }
.case-grid strong { display: block; font-size: 1.05rem; }
.case-grid p { margin-top: 50px; color: var(--ink-2); font-size: .9rem; }
.menu { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.menu nav { display: flex; gap: 22px; }
.menu nav a, .signin { position: relative; padding-block: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.menu nav a:hover, .signin:hover { color: var(--ink); text-decoration: none; }
.menu nav a[aria-current="page"], .signin[aria-current="page"] { color: var(--ink); }
.menu nav a[aria-current="page"]::after, .signin[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px; border-radius: 2px; background: var(--pen); }
.lang { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 8px; }
.lang a { padding: 3px 9px; border-radius: 5px; font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.lang a:hover { color: var(--ink); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.menu-toggle { display: none; margin-left: auto; min-height: 44px; padding: 6px 16px; background: none; border: 2px solid var(--ink); border-radius: 8px; color: var(--ink); font: 700 0.9375rem var(--sans); cursor: pointer; }

.hero { padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.hero h1 { max-width: 11ch; }
.lede { margin-top: 22px; max-width: 32rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); color: var(--ink-2); }
.release { margin-top: 16px; font-size: 0.875rem; color: var(--ink-2); }

/* Bản đồ biên tập mới: đồ họa chữ thuần, không dùng ảnh hoặc video demo */
/* Khối nội dung */
.band { padding-block: clamp(64px, 9vw, 112px); }
.band + .band { border-top: 1px solid var(--line); }
.band-alt { background: var(--paper-2); }
.section-head { max-width: 42rem; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 1.0625rem; max-width: 38rem; }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 32px; margin-bottom: clamp(28px, 4vw, 44px); }
.head-row .section-head { margin-bottom: 0; }

/* Quy trình: một đường bút liền */
.path { --g: clamp(20px, 3vw, 40px); list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--g); position: relative; counter-reset: step; }
.path::before { content: ""; position: absolute; left: 22px; right: calc((100% - 3 * var(--g)) / 4 - 24px); top: 22px; height: 2.5px; border-radius: 2px; background: var(--pen); }
.path li { position: relative; counter-increment: step; padding-top: 70px; }
.path li::before { content: counter(step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2.5px solid var(--pen); background: var(--paper-2); color: var(--pen); font-weight: 800; }
.path li:last-child::before { border-color: var(--frame); background: var(--frame); color: var(--ink); }
.path h3 { font-size: 1.25rem; }
.path p { margin-top: 8px; color: var(--ink-2); font-size: 1rem; }
.path .spec { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: 0.875rem; font-weight: 600; color: var(--pen-deep); }

/* Quyền kiểm soát */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split .section-head { margin: 0; }
.facts { border-top: 2px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 6px 28px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { color: var(--ink-2); font-size: 1rem; }
.keyline { margin-top: 6px; font: 600 0.9375rem var(--mono); letter-spacing: 0.04em; color: var(--ink); }

/* Câu hỏi thường gặp: trả lời mở sẵn */
.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.qa > div { padding-block: 22px; border-top: 1px solid var(--line); }
.qa dt { font-weight: 700; font-size: 1.0625rem; }
.qa dd { margin-top: 8px; color: var(--ink-2); font-size: 1rem; max-width: 34rem; }

/* Lời mời cuối trang */
.closing { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.closing p { margin-top: 12px; color: var(--ink-2); max-width: 34rem; }
.closing .actions { margin-top: 0; }

/* ---------- Trang nội dung ---------- */
.page-head { padding-block: clamp(48px, 7vw, 88px) clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.5rem); max-width: 18ch; }
.page-head p { margin-top: 16px; max-width: 40rem; color: var(--ink-2); font-size: 1.125rem; }
.page-head .actions { margin-top: 28px; }
.doc { padding-block: 48px 104px; }
.doc h2 { margin-top: 52px; font-size: 1.5rem; }
.doc h3 { margin-top: 28px; font-size: 1.125rem; }
.doc p, .doc ul, .doc ol { margin-top: 14px; color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 6px; }
.doc > :first-child { margin-top: 0; }
.doc strong { color: var(--ink); }
.note { margin-top: 24px; padding: 16px 18px; background: var(--paper-2); border-left: 3px solid var(--pen); border-radius: 0 var(--r-frame) var(--r-frame) 0; color: var(--ink-2); font-size: 1rem; }
.note-warn { border-left-color: var(--frame); background: var(--frame-wash); }

/* Hướng dẫn theo nhiệm vụ */
.guide { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 46rem); gap: clamp(32px, 6vw, 96px); padding-block: 48px 104px; }
.toc { position: sticky; top: 104px; align-self: start; }
.toc p { font-size: 0.875rem; font-weight: 700; color: var(--ink-2); }
.toc ol { list-style: none; margin-top: 12px; padding: 0; border-left: 2px solid var(--line); counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; margin-left: -2px; padding: 8px 0 8px 14px; border-left: 2px solid transparent; color: var(--ink-2); font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.toc a::before { content: counter(toc); color: var(--pen); font-weight: 800; min-width: 1ch; }
.toc a:hover, .toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--pen); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 48px 66px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--pen); background: var(--paper); color: var(--pen); font-weight: 800; }
.steps > li::after { content: ""; position: absolute; left: 21px; top: 52px; bottom: 8px; width: 2.5px; border-radius: 2px; background: var(--pen-wash); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { content: none; }
.steps h2 { margin-top: 6px; font-size: 1.375rem; }
.steps h3 { margin-top: 8px; font-size: 1.125rem; }
.steps p { margin-top: 10px; color: var(--ink-2); }
.steps .note { margin-top: 18px; }
.table-wrap { margin-top: 20px; overflow-x: auto; border: 1.5px solid var(--ink); border-radius: var(--r-frame); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--paper-2); font-weight: 700; }
td { color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* Trang giới thiệu */
.principles { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.principles li { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 8px 40px; padding-block: 26px; border-bottom: 1px solid var(--line); }
.principles h3 { font-size: 1.25rem; }
.principles p { color: var(--ink-2); max-width: 40rem; }
.imprint { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.imprint h2 { font-size: 1.25rem; }
.imprint p, .imprint address { margin-top: 10px; color: var(--ink-2); font-style: normal; }

/* Trang tải về */
.release-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: clamp(28px, 4vw, 56px); align-items: start; padding: clamp(24px, 3.5vw, 40px); background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-frame); }
.release-sheet h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.release-sheet .file { margin-top: 8px; font: 600 0.9375rem var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.release-sheet .actions { margin-top: 24px; }
.release-sheet .after { margin-top: 14px; font-size: 0.9375rem; color: var(--ink-2); max-width: 34rem; }
.spec-list { border-top: 1px solid var(--line); }
.spec-list > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.spec-list dt { color: var(--ink-2); }
.spec-list dd { font-weight: 700; text-align: right; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); margin-top: clamp(48px, 7vw, 80px); }
.two-col > div > h2 { font-size: 1.5rem; }
.two-col .steps { margin-top: 28px; }
.two-col .facts { margin-top: 24px; }
.two-col .facts > div { grid-template-columns: 1fr; }

/* ---------- Tài khoản và xác thực ---------- */
.auth { padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(56px, 8vw, 104px); }
.auth-shell { width: min(980px, 100%); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 6vw, 88px); align-items: start; }
.auth-aside { padding-top: 12px; }
.auth-aside h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.375rem); max-width: 14ch; }
.auth-aside > p { margin-top: 14px; color: var(--ink-2); max-width: 26rem; }
.auth-uses { list-style: none; margin-top: 28px; padding: 0; border-top: 1px solid var(--line); max-width: 26rem; }
.auth-uses li { display: flex; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-2); }
.auth-uses svg { flex: none; margin-top: 3px; color: var(--pen); }
.auth-help { margin-top: 20px; font-size: 0.9375rem; color: var(--ink-2); }
.auth-form { padding: clamp(24px, 3.5vw, 36px); background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-frame); }
.auth-form h1 { font-size: clamp(1.625rem, 1.4rem + 0.8vw, 2rem); letter-spacing: -0.02em; }
.auth-form .sub { margin-top: 8px; color: var(--ink-2); font-size: 0.9375rem; }
form { margin-top: 26px; }
.field + .field { margin-top: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.9375rem; font-weight: 700; color: var(--ink); }
.input { position: relative; }
.input input { width: 100%; min-height: 50px; padding: 12px 14px; background: var(--white); border: 1.5px solid var(--line-strong); border-radius: 8px; color: var(--ink); font: 1rem var(--sans); }
.input:has(.reveal) input { padding-right: 52px; }
.input input::placeholder { color: #7A8C89; }
.input input:focus { outline: none; border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-wash); }
.input input[aria-invalid="true"] { border-color: var(--brick); box-shadow: 0 0 0 3px var(--brick-wash); }
.input input:disabled { background: var(--paper-2); }
.reveal { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 42px; height: 42px; background: none; border: 0; border-radius: 6px; color: var(--ink-2); cursor: pointer; }
.reveal:hover { color: var(--ink); background: var(--paper-2); }
.reveal[aria-pressed="true"] { color: var(--pen); }
.hint { margin-top: 8px; font-size: 0.875rem; color: var(--ink-2); }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 0.9375rem; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--pen); }
.form-msg { margin-top: 16px; padding: 12px 14px; border-radius: 6px; border-left: 3px solid; font-size: 0.9375rem; }
.form-msg.error { background: var(--brick-wash); border-color: var(--brick); color: #7E2C25; }
.form-msg.ok { background: var(--pen-wash); border-color: var(--pen); color: var(--pen-deep); }
form .btn-primary { margin-top: 22px; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 0.875rem; color: var(--ink-2); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Bảng tài khoản */
.dash { padding-block: 44px 104px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.dash-head h1 { font-size: clamp(1.875rem, 1.4rem + 1.4vw, 2.5rem); }
.dash-head p { margin-top: 8px; color: var(--ink-2); }
.dash-head .actions { margin-top: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 36px; align-items: start; }
.panel { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-frame); padding: clamp(20px, 3vw, 28px); }
.profile { display: grid; gap: 16px; }
.profile h2 { font-size: 1.125rem; }
.avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--pen); font-weight: 800; font-size: 1.125rem; color: var(--white); }
.profile dl div { padding-block: 10px; border-top: 1px solid var(--line); }
.profile dt { font-size: 0.875rem; color: var(--ink-2); }
.profile dd { margin-top: 2px; font-weight: 600; overflow-wrap: anywhere; }
.lic-title { font-size: 1.375rem; margin-bottom: 16px; }
.licenses { display: grid; gap: 20px; }
.license-card { padding: clamp(20px, 3vw, 28px); background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-frame); }
.license-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.license-key { font: 600 1.0625rem var(--mono); letter-spacing: 0.03em; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-size: 0.875rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-active { background: var(--pen-wash); color: var(--pen-deep); }
.status-expired { background: var(--amber-wash); color: var(--amber-ink); }
.status-blocked { background: var(--brick-wash); color: #8F3A32; }
.status-wait { background: var(--paper-2); color: var(--ink-2); }
.license-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 20px; border-top: 1px solid var(--line); }
.license-meta > div { padding: 12px 12px 12px 0; }
.license-meta dt { font-size: 0.8125rem; color: var(--ink-2); }
.license-meta dd { margin-top: 2px; font-weight: 700; }
.license-help { margin-top: 14px; }
.devices { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.devices h3 { font-size: 1rem; }
.devices > p.muted { margin-top: 8px; font-size: 0.9375rem; }
.device-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.device-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.device-list strong { display: block; }
.device-list span { font-size: 0.875rem; color: var(--ink-2); }
.empty { padding: 36px 28px; text-align: left; color: var(--ink-2); background: var(--white); border: 2px dashed var(--line-strong); border-radius: var(--r-frame); }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 1.125rem; }
.empty .actions { margin-top: 18px; }
.loading { display: flex; align-items: center; gap: 12px; padding: 56px 0; color: var(--ink-2); }
.loading::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--pen-wash); border-top-color: var(--pen); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Trạng thái hệ thống */
.verdict { display: flex; gap: 18px; align-items: flex-start; padding: clamp(20px, 3vw, 28px); background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-frame); }
.verdict-mark { flex: none; width: 18px; height: 18px; margin-top: 8px; border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 5px var(--paper-2); }
.verdict[data-state="ok"] { border-color: var(--pen); }
.verdict[data-state="ok"] .verdict-mark { background: var(--pen); box-shadow: 0 0 0 5px var(--pen-wash); }
.verdict[data-state="down"] { border-color: var(--brick); }
.verdict[data-state="down"] .verdict-mark { background: var(--brick); box-shadow: 0 0 0 5px var(--brick-wash); }
.verdict h2 { margin-top: 0; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); }
.verdict p { margin-top: 8px; color: var(--ink-2); }
.verdict-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.verdict-meta p { font-size: 0.9375rem; color: var(--ink-2); }
ul.checks { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.checks li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.checks strong { display: block; }
.checks .muted { font-size: 0.9375rem; }

/* 404: khung chưa vẽ */
.lost { padding-block: clamp(56px, 10vw, 128px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(32px, 6vw, 88px); align-items: center; }
.lost h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
.lost p { margin-top: 14px; max-width: 32rem; color: var(--ink-2); }
.lost .blank { position: relative; aspect-ratio: 9 / 16; max-width: 20rem; border: 2px dashed var(--line-strong); border-radius: var(--r-frame); display: grid; place-items: center; color: var(--ink-2); font-weight: 800; font-size: clamp(3rem, 2rem + 4vw, 5rem); letter-spacing: -0.04em; background: var(--white); }
.lost .blank span { position: absolute; top: -14px; left: 12px; padding: 2px 9px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; font-size: 0.8125rem; letter-spacing: 0; color: var(--ink); }
.lost ul { list-style: none; margin-top: 28px; padding: 0; border-top: 1px solid var(--line); max-width: 32rem; }
.lost li a { display: block; padding-block: 12px; border-bottom: 1px solid var(--line); font-weight: 700; text-decoration: none; }

/* Bảng giá */
.cycles { display: inline-flex; padding: 4px; gap: 4px; border: 1.5px solid var(--ink); border-radius: var(--r-control); background: var(--white); }
.cycles button { min-height: 42px; padding: 8px 16px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font: 700 0.9375rem var(--sans); cursor: pointer; }
.cycles button:hover { color: var(--ink); }
.cycles button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; }
.plan { display: flex; flex-direction: column; padding: 24px; background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--r-frame); }
.plan.featured { border: 3px solid var(--frame); }
.plan .badge { align-self: flex-start; margin-bottom: 10px; padding: 2px 10px; border-radius: 4px; background: var(--frame); font-size: 0.8125rem; font-weight: 700; }
.plan h2 { font-size: 1.375rem; }
.plan .desc { margin-top: 6px; color: var(--ink-2); font-size: 0.9375rem; }
.plan .price { margin-top: 18px; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.plan .suffix { color: var(--ink-2); font-size: 0.875rem; }
.plan .quota { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-weight: 700; font-size: 0.9375rem; color: var(--pen-deep); }
.plan ul { list-style: none; margin-top: 12px; padding: 0; flex: 1; }
.plan li { position: relative; padding: 6px 0 6px 24px; font-size: 0.9375rem; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 10px; height: 5px; border-left: 2px solid var(--pen); border-bottom: 2px solid var(--pen); transform: rotate(-45deg); }
.plan .btn { margin-top: 18px; }

/* Chân trang */
.site-footer { border-top: 2px solid var(--ink); background: var(--paper-2); padding-block: 56px 40px; font-size: 0.9375rem; color: var(--ink-2); }
.foot { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-tag { margin-top: 14px; max-width: 24rem; }
.foot h2 { font-size: 0.9375rem; font-weight: 700; letter-spacing: 0; }
.foot ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.foot ul a { display: inline-block; padding-block: 4px; color: var(--ink-2); text-decoration: none; }
.foot ul a:hover { color: var(--ink); text-decoration: underline; }
.foot address { margin-top: 14px; font-style: normal; line-height: 1.6; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-strong); font-size: 0.875rem; }

/* ---------- Màn hình hẹp ---------- */
@media (max-width: 1080px) {
  .menu nav { gap: 16px; }
  .menu { gap: 18px; }
}
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  }
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .header-dl .lbl-long { display: none; }
  .path { grid-template-columns: 1fr; gap: 0; }
  .path li { padding: 0 0 32px 66px; }
  .path li::after { content: ""; position: absolute; left: 21px; top: 54px; bottom: 6px; width: 2.5px; background: var(--pen); border-radius: 2px; }
  .path li:last-child { padding-bottom: 0; }
  .path li:last-child::after { content: none; }
  .actions .btn { flex: 1 1 100%; }
  .foot { grid-template-columns: 1fr 1fr; }
  .steps > li { padding-left: 58px; }
  .license-meta { grid-template-columns: 1fr 1fr; }
  .verdict { flex-direction: column; gap: 10px; }
  .verdict-mark { margin-top: 0; }
  .auth-form { padding: 22px 18px; }
  .cycles { display: flex; width: 100%; }
  .cycles button { flex: 1; padding-inline: 8px; }
  .queue-map { padding: 22px 18px; box-shadow: 7px 7px 0 var(--pen-wash); }
  .fleet-flow, .case-grid { grid-template-columns: 1fr; }
  .fleet-flow li, .case-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .fleet-flow li:last-child, .case-grid article:last-child { border-bottom: 0; }
  .fleet-flow h3 { min-height: 0; margin-top: 18px; }
  .case-grid article { min-height: 0; }
  .case-grid p { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.pricing { padding-block: 40px 104px; }
