@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  color-scheme: dark;
  --canvas: #000000;
  --surface: #0c0c0c;
  --surface-raised: #161616;
  --surface-glass: #0c0c0cd9;
  --field: #080808;
  --line: #262626;
  --line-soft: #ffffff10;
  --control-border: #3a3a3a;
  --text: #fafafa;
  --text-secondary: #d4d4d4;
  --muted: #a3a3a3;
  --text-subtle: #8a8a8a;
  --accent: #e8e8e8;
  --accent-strong: #dadada;
  --accent-light: #ffffff;
  --accent-ink: #000000;
  --accent-tint: #ffffff12;
  --accent-border: #ffffff3d;
  --success: #7fe6d3;
  --success-light: #ccfff4;
  --success-tint: #7fe6d317;
  --success-border: #7fe6d366;
  --error: #ff9cbf;
  --error-tint: #f27daa17;
  --error-border: #f27daa66;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px #000000cc, 0 1px 0 #ffffff0a inset;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 85% -10%, #ffffff0f, transparent 60%),
    radial-gradient(700px 520px at -10% 30%, #ffffff08, transparent 60%),
    var(--canvas);
  background-attachment: fixed;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(#ffffff06 1px, transparent 1px), linear-gradient(90deg, #ffffff06 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  z-index: -1;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sprite { position: absolute; }
.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.skip-link:focus { top: 12px; }
code { font-family: var(--mono); font-size: .92em; }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); background: #0b0d1cb8; border-bottom: 1px solid var(--line-soft); }
.header-inner { max-width: 1160px; margin: 0 auto; height: 72px; padding: 0 32px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.brand img { border-radius: 10px; box-shadow: 0 6px 20px -8px #ffffff33; }
.brand b { font-weight: 450; color: var(--text-secondary); margin-left: 3px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav-button { background: none; border: 0; padding: 8px 12px; border-radius: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover, .nav-button:hover { background: #ffffff0d; color: var(--text); }
.lang-switch { display: flex; align-items: center; gap: 2px; padding: 3px 3px 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-subtle); }
.lang-switch .icon { margin-right: 4px; }
.lang-switch button { border: 0; background: none; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); transition: background .18s, color .18s; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--text); }

main { max-width: 1160px; margin: 0 auto; padding: 64px 32px 0; }

/* ---------- hero ---------- */
.hero { max-width: 720px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 1.8px; color: var(--accent); }
.pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent); animation: pulse 2s ease-out infinite; }
}
h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.14; letter-spacing: -2.2px; font-weight: 700; margin: 20px 0 18px; }
h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent-light) 10%, var(--accent) 50%, #a3a3a3 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 16px; line-height: 1.8; color: var(--muted); margin: 0; max-width: 600px; }

/* ---------- layout ---------- */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; margin-top: 44px; align-items: start; }

/* ---------- card ---------- */
.card { position: relative; background: var(--surface-glass); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, #ffffff80, transparent); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 20px 28px 16px; background: #16161680; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text-subtle); transition: color .25s; }
.steps li:nth-child(2) { justify-content: center; }
.steps li:nth-child(3) { justify-content: flex-end; }
.step-dot { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--control-border); border-radius: 50%; font-size: 12px; font-weight: 600; transition: all .25s; }
.steps .active { color: var(--text); }
.steps .active .step-dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.steps .done { color: var(--success); }
.steps .done .step-dot { color: var(--success); border-color: var(--success-border); background: var(--success-tint); }
.steps-bar { height: 2px; background: var(--line); }
.steps-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-strong), var(--success)); transition: width .5s cubic-bezier(.4, 0, .2, 1); }

.card-body { padding: 28px; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.card-heading h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.6px; font-weight: 650; }
.card-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.heading-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(145deg, var(--accent-tint), transparent); border: 1px solid var(--accent-border); color: var(--accent-light); font-size: 20px; }
#activation-form { margin-top: 26px; }
@media (prefers-reduced-motion: no-preference) { .view:not([hidden]) { animation: view-in .35s cubic-bezier(.2, .8, .3, 1) both; } }

/* ---------- fields ---------- */
.field { margin-bottom: 22px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
label { font-size: 14px; font-weight: 550; display: block; }
.required { color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 60%; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid; }
.chip[data-state="ok"] { color: var(--success); background: var(--success-tint); border-color: var(--success-border); }
.chip[data-state="bad"] { color: var(--error); background: var(--error-tint); border-color: var(--error-border); }
.input-wrap, .textarea-wrap { position: relative; margin-top: 10px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--field); transition: border-color .18s, box-shadow .18s; }
.input-wrap { display: flex; align-items: center; }
.input-wrap > .icon { color: var(--text-subtle); margin-left: 15px; font-size: 18px; }
.input-wrap:focus-within, .textarea-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.input-wrap[data-state="ok"], .textarea-wrap[data-state="ok"] { border-color: var(--success-border); }
.input-wrap[data-state="bad"]:not(:focus-within), .textarea-wrap[data-state="bad"]:not(:focus-within) { border-color: var(--error-border); }
input:not([type=checkbox]) { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 15px 12px; font-family: var(--mono); font-size: 14px; letter-spacing: .3px; }
input::placeholder, textarea::placeholder { color: var(--text-subtle); opacity: .75; }
textarea { display: block; resize: vertical; width: 100%; min-height: 176px; background: none; border: 0; padding: 15px 15px 52px; color: var(--text-secondary); font-family: var(--mono); font-size: 13px; line-height: 1.7; outline: none; }
.ghost-button { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); color: var(--text-secondary); font-size: 12px; font-weight: 550; transition: border-color .15s, color .15s; }
.ghost-button:hover { border-color: var(--accent-border); color: var(--text); }
.textarea-tools { position: absolute; right: 4px; bottom: 8px; display: flex; }
.drop-hint { position: absolute; inset: 6px; display: none; place-items: center; align-content: center; gap: 8px; border: 1.5px dashed var(--accent); border-radius: 8px; background: #080808ee; color: var(--accent-light); font-size: 14px; font-weight: 600; pointer-events: none; }
.drop-hint .icon { font-size: 26px; }
.textarea-wrap.dragging .drop-hint { display: grid; }
.field-hint { color: var(--text-subtle); font-size: 12.5px; line-height: 1.65; margin: 9px 0 0; }
.field-hint code { color: var(--accent-light); }
.privacy { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; margin: 4px 0 22px; border-radius: var(--radius-sm); background: var(--accent-tint); border: 1px solid var(--accent-border); color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.privacy .icon { color: var(--accent); font-size: 18px; margin-top: 1px; }

/* ---------- buttons ---------- */
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 13px 20px; border-radius: 12px; font-size: 15px; font-weight: 650; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.primary { position: relative; isolation: isolate; overflow: hidden; border: 0; background: linear-gradient(110deg, var(--accent-light), var(--accent) 45%, var(--accent-strong)); color: var(--accent-ink); box-shadow: 0 10px 30px -12px #ffffff40, 0 1px 0 #ffffff80 inset; }
.primary:hover:enabled, a.primary:hover { box-shadow: 0 14px 36px -10px #ffffff55, 0 1px 0 #ffffff80 inset; transform: translateY(-1px); }
.primary:active:enabled { transform: translateY(0); }
.secondary { margin-top: 10px; background: transparent; color: var(--text-secondary); border: 1px solid var(--control-border); font-size: 14px; font-weight: 550; }
.secondary:hover:enabled, a.secondary:hover { border-color: var(--accent-border); color: var(--text); background: #ffffff06; }
.btn-icon { transition: transform .2s; }
.primary:hover:enabled .btn-icon, a.primary:hover .btn-icon { transform: translateX(3px); }
.primary[aria-busy="true"] { opacity: 1; cursor: progress; }
.spinner { display: none; width: 17px; height: 17px; border: 2px solid #00000033; border-top-color: currentColor; border-right-color: currentColor; border-radius: 50%; }
.primary[aria-busy="true"] .spinner { display: block; }
.primary[aria-busy="true"] .btn-icon { display: none; }
.link-button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--accent); font-size: 14px; font-weight: 550; }
.link-button:hover .icon { transform: translateX(3px); }
.link-button .icon { transition: transform .2s; }
.link-button.muted { color: var(--text-subtle); font-size: 13px; }
.link-button.muted:hover { color: var(--text); }

/* ---------- confirm ---------- */
.account { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 16px; border-radius: var(--radius); background: var(--surface-raised); border: 1px solid var(--line); }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); font-weight: 700; font-size: 17px; }
.account-info { min-width: 0; }
.account strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-info span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--success-tint); color: var(--success); font-size: 12px; font-weight: 550; white-space: nowrap; }
.plan-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px; margin-bottom: 6px; border-radius: var(--radius); border: 1px solid var(--accent-border); background: radial-gradient(120% 140% at 0% 0%, #ffffff12, transparent 60%), var(--field); }
.plan-summary > div { display: grid; gap: 3px; }
.plan-summary-label, .plan-summary-price > span { font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.plan-summary strong { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--accent-light); }
.plan-summary > div > span:last-child:not(.plan-summary-label) { font-size: 13px; color: var(--text-secondary); }
.plan-summary-price { text-align: right; }
.plan-summary-price strong { color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; }
.details { margin: 0; font-size: 14px; }
.details > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); flex-shrink: 0; }
.details dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.details code { font-size: 12.5px; color: var(--text-secondary); }
.code-status { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 6px; color: var(--success); font-size: 12px; font-weight: 550; }
.confirm-note { font-size: 13.5px; line-height: 1.75; color: var(--muted); margin: 18px 0; }
.checkbox-label { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 450; line-height: 1.6; margin-bottom: 22px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .18s, background .18s; }
.checkbox-label:hover { border-color: var(--control-border); }
.checkbox-label input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.checkbox-box { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--control-border); border-radius: 6px; color: transparent; transition: all .18s; }
.checkbox-box .icon { stroke-width: 3; width: 13px; height: 13px; }
.checkbox-label:has(input:checked) { border-color: var(--accent-border); background: var(--accent-tint); }
.checkbox-label input:checked + .checkbox-box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.checkbox-label input:focus-visible + .checkbox-box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- progress ---------- */
.progress { display: grid; gap: 14px; padding: 16px 18px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); list-style: none; color: var(--text-subtle); font-size: 14px; }
.progress li { display: flex; align-items: center; gap: 11px; transition: color .2s; }
.progress-marker { display: grid; place-items: center; flex: 0 0 22px; height: 22px; border: 1px solid var(--control-border); border-radius: 50%; font-size: 11px; }
.progress-content { flex: 1; }
.progress-track { display: none; overflow: hidden; height: 5px; margin-top: 9px; border-radius: 999px; background: var(--line); }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent-light)); }
.progress [data-state="active"] .progress-track { display: block; }
.progress [data-state="active"] { color: var(--accent-light); font-weight: 600; }
.progress [data-state="active"] .progress-marker { border-color: var(--accent); }
.progress [data-state="active"] .progress-marker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.progress [data-state="done"] { color: var(--text-secondary); }
.progress [data-state="done"] .progress-marker { border-color: var(--success-border); background: var(--success-tint); color: var(--success); }
.progress [data-state="done"] .progress-marker::before { content: '✓'; }

/* ---------- success ---------- */
.success { text-align: center; padding: 4px 0; }
.success-icon { position: relative; display: grid; place-items: center; width: 72px; height: 72px; margin: 6px auto 22px; border-radius: 50%; background: var(--success-tint); color: var(--success); border: 1px solid var(--success-border); font-size: 32px; }
.success-icon .icon { stroke-width: 2.6; }
.success h2 { font-size: 28px; letter-spacing: -.8px; margin: 12px 0 8px; }
.success-lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.receipt { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, var(--surface-raised), var(--field)); overflow: hidden; }
.receipt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px dashed var(--control-border); font-size: 12px; color: var(--muted); }
.receipt-head > span:first-child { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text-secondary); }
.receipt dl { margin: 0; padding: 0 18px; }
.receipt dl > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 16px; padding: 13px 0; }
.receipt dl > div + div { border-top: 1px solid var(--line); }
.receipt dt { color: var(--muted); font-size: 13px; }
.receipt dd { margin: 0; font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.receipt code { display: inline-block; padding: 4px 9px; border: 1px solid var(--success-border); border-radius: 6px; background: var(--success-tint); color: var(--success); font-size: 12px; letter-spacing: .06em; white-space: nowrap; }
.accent-text { color: var(--accent-light); }
.success-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.success-actions .secondary { margin-top: 0; }

.error { display: flex; gap: 10px; border: 1px solid var(--error-border); background: var(--error-tint); color: var(--error); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.65; margin: 16px 0 0; }
.error::before { content: '!'; display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--error); color: var(--canvas); font-size: 12px; font-weight: 800; }
@media (prefers-reduced-motion: no-preference) { .error:not([hidden]) { animation: shake .4s ease; } }
.card-footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-subtle); background: #08080880; }
.footer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-tint); }

/* ---------- sidebar ---------- */
.sidebar { display: grid; gap: 18px; }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #0c0c0caa; }
.section-label { font-size: 12px; letter-spacing: 1.6px; color: var(--accent); font-weight: 600; }
.guide h2 { font-size: 20px; font-weight: 650; letter-spacing: -.5px; margin: 10px 0 22px; }
.guide-item { display: flex; gap: 14px; margin-bottom: 20px; }
.guide-number { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-raised); border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--accent-light); }
.guide-item h3 { margin: 2px 0 5px; font-size: 14px; font-weight: 600; }
.guide-item p { margin: 0; color: var(--text-subtle); font-size: 13px; line-height: 1.7; }
.history-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.history-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; margin: 0 0 3px; white-space: nowrap; }
.history-heading > div > span { font-size: 12px; color: var(--text-subtle); }
.history-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-raised); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.history-clear { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); color: var(--text-subtle); font-size: 13px; transition: color .15s, border-color .15s; }
.history-clear:hover { color: var(--error); border-color: var(--error-border); }
.history-list { position: relative; list-style: none; margin: 0; padding: 0; }
.history-empty { display: grid; justify-items: center; gap: 4px; padding: 22px 0 8px; text-align: center; color: var(--text-subtle); font-size: 13px; line-height: 1.6; }
.history-empty strong { color: var(--text-secondary); font-weight: 550; }
/* Dạng dòng thời gian: chấm tròn nối bằng một vạch dọc */
.history-item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 10px 11px 6px; margin: 0 -10px 0 -6px; border-radius: 12px; transition: background .15s; }
.history-item:hover { background: #ffffff06; }
.history-item:not(:last-child)::after { content: ''; position: absolute; left: 20px; top: 41px; bottom: -11px; width: 1px; background: linear-gradient(var(--line), transparent); }
.history-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--success-border); background: #07130f; color: var(--success); font-size: 13px; box-shadow: 0 0 0 4px var(--surface); }
.history-mark .icon { stroke-width: 2.8; }
.history-item[data-tier="ultra"] .history-mark { border-color: #ffffff55; background: linear-gradient(140deg, #ffffff22, #ffffff05); color: var(--text); }
.history-info { min-width: 0; }
.history-top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.history-top strong { font-size: 13.5px; font-weight: 650; color: var(--text); }
.history-pill { padding: 1px 7px; border-radius: 999px; border: 1px solid var(--success-border); background: var(--success-tint); color: var(--success); font-size: 10.5px; font-weight: 650; }
.history-info code { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .4px; }
.history-when { text-align: right; white-space: nowrap; }
.history-when span { display: block; font-size: 12px; font-weight: 550; color: var(--text-secondary); }
.history-when small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-subtle); font-variant-numeric: tabular-nums; }

/* ---------- sections ---------- */
.pricing, .faq { margin-top: 96px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -1.2px; font-weight: 700; margin: 12px 0; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; gap: 20px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px 22px 22px; border: 1px solid var(--line); border-radius: 20px; background: #0c0c0ccc; transition: transform .25s, border-color .25s, box-shadow .25s; }
.plan:hover { transform: translateY(-3px); border-color: var(--control-border); box-shadow: var(--shadow); }
.plan.featured { border-color: var(--accent-border); background: radial-gradient(120% 80% at 50% 0%, #ffffff14, transparent 65%), #111111; box-shadow: 0 30px 70px -30px #ffffff33; }
.plan-ribbon { position: absolute; top: -12px; left: 24px; padding: 4px 12px; border-radius: 999px; background: linear-gradient(110deg, var(--accent-light), var(--accent-strong)); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .6px; }
.plan h3 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
.plan-tagline { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.plan-price { display: grid; gap: 6px; margin: 22px 0; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.plan-was { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-subtle); }
.plan-was s { color: var(--muted); text-decoration-color: var(--error); text-decoration-thickness: 1.5px; font-variant-numeric: tabular-nums; }
.plan-off { padding: 2px 8px; border-radius: 999px; background: var(--success-tint); border: 1px solid var(--success-border); color: var(--success); font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.plan-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.plan-now strong { font-size: 26px; font-weight: 750; letter-spacing: -1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 680px) { .plan-now strong { font-size: 32px; } }
.plan.featured .plan-now strong { background: linear-gradient(100deg, var(--accent-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-now span { color: var(--text-subtle); font-size: 14px; }
.plan-alt { color: var(--text-subtle); font-size: 13px; font-variant-numeric: tabular-nums; }
.currency-switch { display: inline-flex; margin-top: 22px; padding: 3px; }
.currency-switch button { padding: 6px 14px; }
.plan-summary-price small { font-size: 12px; color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.plan-features { display: grid; gap: 11px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 14px; color: var(--text-secondary); }
.plan-features li { display: flex; align-items: center; gap: 10px; }
.plan-features .icon { color: var(--success); stroke-width: 2.4; }
.plan-actions { display: grid; gap: 12px; justify-items: center; margin-top: auto; }
.plan-actions .secondary { margin-top: 0; }

.faq-list { display: grid; gap: 12px; max-width: 780px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #0c0c0caa; transition: border-color .2s, background .2s; }
.faq details[open] { border-color: var(--accent-border); background: #111111; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); font-size: 17px; font-weight: 500; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }

.page-footer { margin-top: 96px; border-top: 1px solid var(--line-soft); }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 36px 32px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; color: var(--text-subtle); font-size: 13px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { border-radius: 8px; }
.footer-brand strong { display: block; color: var(--text); font-size: 14px; font-weight: 650; }
.footer-brand span { display: block; margin-top: 2px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--text); }
.footer-legal { max-width: 1160px; margin: 0 auto; padding: 16px 32px 30px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid var(--line-soft); color: var(--text-subtle); font-size: 12px; }
@media (max-width: 680px) { .footer-inner, .footer-legal { padding-left: 16px; padding-right: 16px; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--surface-raised); border: 1px solid var(--control-border); box-shadow: var(--shadow); font-size: 14px; font-weight: 550; transform: translate(-50%, 16px); opacity: 0; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="ok"] { border-color: var(--success-border); color: var(--success-light); }
.toast[data-kind="error"] { border-color: var(--error-border); color: var(--error); }

/* ---------- dialog ---------- */
dialog { isolation: isolate; contain: layout paint; background: var(--surface); color: var(--text); border: 1px solid var(--control-border); border-radius: 20px; width: min(500px, calc(100% - 32px)); padding: 28px; box-shadow: 0 30px 100px #00000099; }
dialog::backdrop { background: #000000e6; }
@media (prefers-reduced-motion: no-preference) { dialog[open] { animation: view-in .3s cubic-bezier(.2, .8, .3, 1); } }
.dialog-top { display: flex; justify-content: space-between; align-items: center; }
.close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-raised); border: 1px solid var(--line); color: var(--text-secondary); font-size: 20px; line-height: 1; }
dialog h2 { font-size: 23px; letter-spacing: -.6px; margin: 18px 0 8px; }
dialog p, dialog li { font-size: 14px; line-height: 1.85; color: var(--text-secondary); }
dialog ol { padding-left: 20px; }
dialog li::marker { color: var(--accent); font-weight: 700; }
#help-done, #checkout-use { margin-top: 18px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .primary[aria-busy="true"]::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, #ffffff8a 50%, transparent 70%); animation: shimmer 1.4s ease-in-out infinite; }
  .primary[aria-busy="true"] .spinner { animation: spin .7s linear infinite; }
  .success-icon { animation: pop .5s cubic-bezier(.2, .8, .3, 1.45) both; }
  .success-icon::before, .success-icon::after { content: ''; position: absolute; pointer-events: none; }
  .success-icon::before { inset: 0; border: 1px solid var(--success); border-radius: 50%; animation: ring .8s .12s ease-out both; }
  .success-icon::after { inset: calc(50% - 2.5px); width: 5px; height: 5px; border-radius: 50%; box-shadow: 0 -52px var(--success-light), 38px -35px var(--accent), 51px 10px var(--success-light), 27px 45px var(--accent-light), -27px 44px var(--success-light), -52px 9px var(--accent), -37px -36px var(--success); animation: sparks .75s .1s ease-out both; }
  .receipt { animation: view-in .5s .15s cubic-bezier(.2, .8, .3, 1) both; }
}
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: .4; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes ring { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
@keyframes sparks { 0% { opacity: 0; transform: scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes pulse { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .header-inner { height: 62px; padding: 0 16px; gap: 10px; }
  .brand { font-size: 17px; }
  .brand img { width: 30px; height: 30px; }
  .nav a { display: none; }
  .nav-button { padding: 8px; font-size: 13px; }
  main { padding: 36px 16px 0; }
  h1 { letter-spacing: -1.4px; }
  .lead { font-size: 15px; }
  .workspace { margin-top: 30px; gap: 20px; }
  .card { border-radius: 16px; }
  .steps { padding: 16px; }
  .steps li { font-size: 13px; gap: 7px; }
  .card-body { padding: 22px 16px; }
  .sidebar { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .account { flex-wrap: wrap; }
  .badge { margin-left: 58px; }
  .plan-summary { flex-direction: column; align-items: flex-start; }
  .plan-summary-price { text-align: left; }
  .success-actions { grid-template-columns: 1fr; }
  .success-actions .primary { order: -1; }
  .pricing, .faq { margin-top: 72px; }
  .footer-inner { flex-direction: column; padding: 22px 16px 28px; }
}
@media (max-width: 420px) {
  .brand b { display: none; }
  .receipt dl > div { grid-template-columns: 1fr; gap: 4px; }
  .receipt dd { text-align: left; }
  .chip { max-width: 55%; }
}

/* ---------- checkout ---------- */
.field-hint a, .faq details p a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }
.field-hint a:hover, .faq details p a:hover { color: var(--text); }
.plan-actions .primary { margin: 0; }
.checkout { width: min(460px, calc(100% - 32px)); }
.checkout-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 16px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.checkout-head h2 { margin: 0 0 4px; }
.checkout-head > div:first-child > span { color: var(--muted); font-size: 13px; }
.checkout-amount { display: grid; text-align: right; }
.checkout-amount strong { font-size: 24px; font-weight: 750; letter-spacing: -.6px; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, var(--accent-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.checkout-amount small { color: var(--text-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.qr-box { position: relative; display: grid; place-items: center; width: 256px; height: 256px; margin: 0 auto; padding: 8px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 20px 50px -20px #ffffff33; }
.qr-box img { display: block; width: 240px; height: 240px; }
.qr-spinner { display: block; width: 34px; height: 34px; border-color: #00000022; border-top-color: var(--accent-strong); border-right-color: var(--accent-strong); border-width: 3px; }
.checkout-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 6px; }
.checkout-meta .chip { max-width: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; will-change: opacity; }
.checkout-timer { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.checkout-timer.urgent { color: var(--error); }
.checkout-steps { margin: 14px 0 18px; padding-left: 20px; }
.checkout-steps li { font-size: 13.5px; line-height: 1.75; color: var(--text-secondary); }
.checkout-steps li::marker { color: var(--accent); font-weight: 700; }
.checkout-cancel { display: block; margin: 14px auto 0; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 16px; padding: 12px 8px 12px 16px; border: 1px dashed var(--success-border); border-radius: var(--radius-sm); background: var(--success-tint); }
.code-box code { font-size: 13.5px; font-weight: 600; color: var(--success-light); letter-spacing: .3px; overflow-wrap: anywhere; text-align: left; }
.code-box .ghost-button { margin: 0; flex-shrink: 0; }
.checkout-ended { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 6px 0 2px; }
.ended-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 6px; border-radius: 50%; font-size: 26px; border: 1px solid; }
.ended-icon .icon { stroke-width: 2.2; }
.checkout-ended[data-state="cancelled"] .ended-icon { color: var(--error); background: var(--error-tint); border-color: var(--error-border); box-shadow: 0 0 0 6px #f27daa0d; }
.checkout-ended[data-state="expired"] .ended-icon { color: #ffd18a; background: #ffd18a17; border-color: #ffd18a55; box-shadow: 0 0 0 6px #ffd18a0d; }
.checkout-ended strong { font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
.checkout-ended p { max-width: 340px; margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.checkout-ended-actions { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 10px; width: 100%; margin-top: 14px; }
.checkout-ended-actions > button { margin: 0 !important; min-height: 48px; }
.checkout-order { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin: 20px 0 0; padding-top: 16px; border-top: 1px dashed var(--line); text-align: center; font-size: 12px; color: var(--text-subtle); }
.checkout-order code { padding: 3px 8px; border-radius: 6px; background: var(--field); border: 1px solid var(--line); color: var(--text-secondary); font-size: 11.5px; user-select: all; }
.checkout .error { margin-top: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .qr-spinner { animation: spin .8s linear infinite; }
  .live-dot { animation: blink 1.4s ease-in-out infinite; }
}
@keyframes blink { 50% { opacity: .3; } }
@media (max-width: 420px) {
  .qr-box { width: 228px; height: 228px; }
  .qr-box img { width: 212px; height: 212px; }
  .checkout-ended-actions { grid-template-columns: 1fr; }
}

.resume-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding: 13px 18px; border: 1px solid var(--success-border); border-radius: var(--radius); background: var(--success-tint); color: var(--success-light); font-size: 14px; font-weight: 500; }
.resume-bar > .icon { color: var(--success); font-size: 18px; }
.resume-bar .link-button { margin-left: auto; color: var(--success); }
.checkout-delivered { margin: 4px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); color: var(--muted); font-size: 13.5px; line-height: 1.7; text-align: left; }
@media (max-width: 680px) { .resume-bar { margin-top: 22px; } .resume-bar .link-button { margin-left: 30px; } }

.warranty-note { display: flex; align-items: flex-start; gap: 10px; max-width: 760px; margin: 24px auto 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #0c0c0caa; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.warranty-note .icon { color: var(--accent); font-size: 18px; margin-top: 2px; }
.warranty-note strong { color: var(--text-secondary); font-weight: 600; }
.warranty-note.compact { margin: 14px 0 0; padding: 10px 12px; font-size: 12.5px; }

.sale-toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 12px; max-width: min(340px, calc(100% - 32px)); padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow); transform: translateY(16px); opacity: 0; transition: opacity .3s, transform .3s; }
.sale-toast.show { opacity: 1; transform: none; }
.sale-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--success-tint); color: var(--success); font-size: 17px; }
.sale-toast strong { display: block; font-size: 13.5px; font-weight: 600; }
.sale-toast small { display: block; margin-top: 2px; color: var(--text-subtle); font-size: 12px; }
.sale-close { align-self: flex-start; margin-left: 4px; border: 0; background: none; color: var(--text-subtle); font-size: 18px; line-height: 1; padding: 2px 4px; }
.sale-close:hover { color: var(--text); }
@media (max-width: 680px) { .sale-toast { right: 16px; left: 16px; bottom: 16px; max-width: none; } }

.plan-features li:first-child { padding: 8px 10px; margin: 0 -10px 2px; border-radius: 8px; background: var(--accent-tint); color: var(--text); font-weight: 600; }
.plan-features li:first-child .icon { color: var(--accent); }
.plan-features li { align-items: flex-start; line-height: 1.5; }
.plan-features li .icon { margin-top: 2px; }

/* ---------- support ---------- */
.support-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-light); text-decoration: none; font-weight: 500; }
.support-link .icon { width: 15px; height: 15px; }
.support-link:hover { color: var(--text); }
.support-link b { font-weight: 600; color: var(--text); }
.nav a, .nav-button { white-space: nowrap; }
.nav .nav-support { display: inline-flex; color: var(--accent-light); }
@media (max-width: 560px) {
  .nav .nav-support { padding: 8px; }
  .nav .nav-support span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav .nav-support .icon { width: 18px; height: 18px; }
}
.checkout-support { margin: 12px 0 0; text-align: center; font-size: 13px; }
.footer-inner .support-link { font-size: 13px; }

/* ---------- lookup: nhập bên trái, kết quả bên phải ---------- */
.lookup { width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 48px); }
.lookup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: stretch; }
.lookup-input h2 { margin-top: 0; }
.lookup textarea { min-height: 260px; padding-bottom: 48px; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.lookup-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lookup-count { flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.lookup-count.over { color: var(--error); }
.lookup form .primary { width: 100%; margin-top: 16px; }
.lookup .error { margin-top: 14px; }
.lookup-panel { display: flex; flex-direction: column; min-height: 420px; max-height: min(620px, calc(100dvh - 160px)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); overflow: hidden; }
.lookup-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lookup-panel-head strong { font-size: 14px; font-weight: 650; }
.lookup-panel-head .ghost-button { margin: 0; }
.lookup-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.lookup-filter { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.lookup-filter b { font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.lookup-filter:hover { border-color: var(--accent-border); color: var(--text); }
.lookup-filter[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.lookup-filter[aria-selected="true"] b { color: var(--accent-ink); }
.lookup-filter[data-status="available"]:not([aria-selected="true"]) b { color: var(--success); }
.lookup-filter[data-status="invalid"]:not([aria-selected="true"]) b { color: var(--error); }
.lookup-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 32px 24px; text-align: center; color: var(--text-subtle); font-size: 13px; line-height: 1.6; }
.lookup-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px dashed var(--control-border); color: var(--muted); font-size: 18px; }
.lookup-results { flex: 1; list-style: none; margin: 0; padding: 6px 8px 8px; overflow-y: auto; }
.lookup-item { display: flex; gap: 12px; align-items: center; padding: 11px 8px; border-bottom: 1px solid var(--line); }
.lookup-item:last-child { border-bottom: 0; }
.lookup-index { flex-shrink: 0; width: 22px; font-family: var(--mono); font-size: 11.5px; color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.lookup-info { flex: 1; min-width: 0; }
.lookup-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lookup-info code { font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--text); letter-spacing: .3px; }
.lookup-info small { display: block; margin-top: 3px; color: var(--text-subtle); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.lookup-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid; font-size: 11px; font-weight: 600; }
.lookup-item[data-status="available"] .lookup-badge { color: var(--success); background: var(--success-tint); border-color: var(--success-border); }
.lookup-item[data-status="used"] .lookup-badge { color: var(--text-secondary); background: var(--accent-tint); border-color: var(--accent-border); }
.lookup-item[data-status="invalid"] .lookup-badge { color: var(--error); background: var(--error-tint); border-color: var(--error-border); }
.lookup-item[data-status="invalid"] code { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--error-border); }
.lookup-use { flex-shrink: 0; margin: 0; }
@media (max-width: 820px) {
  .lookup-grid { grid-template-columns: 1fr; }
  .lookup textarea { min-height: 140px; }
  .lookup-panel { min-height: 220px; max-height: none; }
  .lookup-results { overflow: visible; }
}
@media (max-width: 420px) {
  #help-open { display: none; }
  .lookup-item { flex-wrap: wrap; }
  .lookup-use { margin-left: 34px; }
}

/* Danh sách mã của đơn nhiều mã: một khối, chép hoặc tải một lần */
.code-sheet { border: 1px dashed var(--success-border); border-radius: var(--radius-sm); background: var(--success-tint); overflow: hidden; text-align: left; }
.code-sheet-head { padding: 8px 12px; border-bottom: 1px dashed var(--success-border); font-size: 12px; font-weight: 600; color: var(--success); }
.code-sheet textarea { display: block; width: 100%; margin: 0; padding: 10px 12px; border: 0; background: transparent; color: var(--success-light); font-family: var(--mono); font-size: 13px; line-height: 1.75; resize: none; white-space: pre; overflow-x: auto; }
.code-sheet textarea:focus { outline: none; }
.code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.code-actions .secondary { margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Lưu ý bắt buộc: tài khoản phải đang không có gói */
.plan-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 11px 13px; border: 1px solid var(--error-border); border-radius: var(--radius-sm); background: var(--error-tint); color: var(--text-secondary); font-size: 13px; line-height: 1.65; text-align: left; }
.plan-note .icon { flex-shrink: 0; color: var(--error); font-size: 17px; margin-top: 2px; }
.plan-note strong { color: var(--error); font-weight: 650; }
.checkout .plan-note { margin: 14px 0 0; font-size: 12.5px; }
#confirm-view .plan-note { margin: 18px 0 0; }

/* Chọn số lượng mã trên thẻ gói */
.qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; font-size: 13px; color: var(--muted); }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); overflow: hidden; }
.qty-control button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--text-secondary); font-size: 17px; line-height: 1; cursor: pointer; }
.qty-control button:hover:not(:disabled) { color: var(--accent); background: var(--accent-tint); }
.qty-control button:disabled { opacity: .35; cursor: not-allowed; }
.qty-control output { min-width: 32px; text-align: center; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.qty-total { width: 100%; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.qty-total strong { color: var(--text-secondary); font-weight: 650; }

/* Danh sách mã của đơn nhiều mã */
.code-list { display: grid; gap: 8px; margin: 6px 0 10px; }
.code-list .code-box { margin: 0; }

/* Chọn số lượng trong hộp thoại thanh toán */
.qty-large { margin: 4px 0 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); font-size: 14px; color: var(--text-secondary); }
.qty-large .qty-control button { width: 40px; height: 40px; font-size: 19px; }
.qty-large .qty-control output { min-width: 40px; font-size: 16px; }
.qty-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.qty-preset { flex: 1; min-width: 48px; padding: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); color: var(--text-secondary); font-weight: 600; font-size: 13px; }
.qty-preset:hover { border-color: var(--accent-border); color: var(--text); }
.qty-preset[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.qty-hint { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
#checkout-choose .plan-note { margin: 12px 0 18px; }
#checkout-choose .primary { width: 100%; margin: 0; }

/* Nút hành động ở hero */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-cta { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: auto; min-width: 180px; margin: 0; padding: 0 24px; height: 50px; border-radius: 12px; font-size: 15px; font-weight: 650; text-decoration: none; }
.hero-cta.secondary { background: #ffffff08; }
@media (max-width: 480px) { .hero-cta { flex: 1; min-width: 0; padding: 0 14px; } }

/* Ghi chú bảo hành dưới hero */
.warranty-banner { display: flex; align-items: center; gap: 14px; margin: 40px 0 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(100deg, #ffffff0a, transparent 55%), var(--surface); }
.warranty-banner-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--success-border); background: var(--success-tint); color: var(--success); font-size: 18px; }
.warranty-banner strong { display: block; font-size: 14px; font-weight: 650; color: var(--text); }
.warranty-banner strong + span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* Danh sách mã: vừa đủ số dòng */
.code-sheet textarea { min-height: 0; height: auto; }

/* Số lượt kích hoạt dưới nút ở hero */
.stat-line { display: inline-flex; align-items: center; gap: 9px; margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.stat-line .live-dot { color: var(--success); box-shadow: 0 0 0 4px var(--success-tint); }
.stat-line #stat-text { color: var(--text-secondary); font-weight: 550; }

/* Tồn kho trên thẻ gói */
.plan-stock { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 14px 0 0; padding: 5px 11px; border: 1px solid var(--success-border); border-radius: 999px; background: var(--success-tint); color: var(--success-light); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-stock .live-dot { color: var(--success); }
