/* =====================================================
   Montinis Design System — ported from claude.ai/design
   ===================================================== */

:root{
  /* warm neutral canvas */
  --bg:        oklch(0.985 0.004 70);
  --bg-2:      oklch(0.965 0.005 70);
  --surface:   #ffffff;
  --surface-2: oklch(0.985 0.004 70);
  --border:    oklch(0.918 0.005 70);
  --border-2:  oklch(0.95 0.004 70);

  --ink:       oklch(0.24 0.012 55);
  --ink-2:     oklch(0.44 0.012 55);
  --muted:     oklch(0.58 0.010 60);
  --faint:     oklch(0.72 0.008 60);

  /* coral primary */
  --primary:        oklch(0.64 0.19 32);
  --primary-hover:  oklch(0.58 0.19 32);
  --primary-soft:   oklch(0.95 0.035 40);
  --primary-soft-2: oklch(0.92 0.055 38);
  --on-primary:     #fff;

  /* status */
  --green:      oklch(0.62 0.13 158);
  --green-soft: oklch(0.95 0.04 158);
  --green-ink:  oklch(0.42 0.12 158);
  --amber:      oklch(0.74 0.13 75);
  --amber-soft: oklch(0.95 0.05 80);
  --amber-ink:  oklch(0.48 0.12 70);
  --blue:       oklch(0.62 0.13 250);
  --blue-soft:  oklch(0.95 0.035 250);
  --blue-ink:   oklch(0.42 0.12 250);
  --violet:     oklch(0.60 0.15 295);
  --violet-soft:oklch(0.95 0.04 295);
  --red:        oklch(0.55 0.18 25);
  --red-soft:   oklch(0.96 0.04 25);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px oklch(0.4 0.02 60 / 0.05), 0 1px 3px oklch(0.4 0.02 60 / 0.04);
  --shadow-md: 0 4px 14px oklch(0.4 0.02 60 / 0.06), 0 2px 6px oklch(0.4 0.02 60 / 0.04);
  --shadow-lg: 0 18px 50px oklch(0.4 0.02 60 / 0.12), 0 6px 18px oklch(0.4 0.02 60 / 0.06);

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
a { color: var(--primary-hover); text-decoration: none; }
::selection { background: var(--primary-soft-2); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: oklch(0.86 0.006 70); border-radius: 99px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: oklch(0.78 0.008 70); }

@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes growBar { from{transform:scaleY(0)} to{transform:scaleY(1)} }

/* ========== Layout shell ========== */
.app-shell { display: flex; min-height: 100vh; background: var(--bg); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-content { padding: 30px 32px 60px; flex: 1; }

/* ========== Sidebar ========== */
.sidebar {
  width: 244px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  padding: 22px 22px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--border-2); min-height: 69px;
}
.sidebar-brand .brand-name {
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(140deg, var(--primary), oklch(0.7 0.18 50));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px oklch(0.64 0.19 32 / 0.35);
}
.brand-mark svg { width: 18px; height: 18px; fill: #fff; stroke: #fff; }

.sidebar-nav { padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-section {
  font-size: 10.5px; font-weight: 700; color: var(--faint);
  letter-spacing: 0.08em; padding: 6px 12px 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 11px;
  font-size: 14px; font-weight: 600;
  color: var(--ink-2); text-decoration: none;
  position: relative; transition: all .15s; cursor: pointer;
  border: none; background: transparent; width: 100%; text-align: left;
}
.sidebar-link:hover { background: var(--bg-2); color: var(--ink-2); }
.sidebar-link.active { background: var(--primary-soft); color: var(--primary-hover); }
.sidebar-link.active::before {
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 3px; height: 20px;
  border-radius: 99px; background: var(--primary);
}
.sidebar-link svg { width: 19px; height: 19px; flex-shrink: 0; }

.sidebar-footer { padding: 14px; border-top: 1px solid var(--border-2); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 8px; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11.5px; color: var(--muted); }

/* ========== Topbar ========== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
  border-bottom: 1px solid var(--border);
  background: oklch(0.99 0.003 70 / 0.8);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.breadcrumb {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--muted);
}
.breadcrumb .crumb-active { color: var(--ink); font-weight: 600; }
.breadcrumb svg { width: 13px; height: 13px; color: var(--faint); }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.health-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted);
  padding: 7px 12px; border-radius: 99px;
  background: var(--green-soft);
}
.health-pill .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--green); }

/* ========== Page header ========== */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-header h1 {
  margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
}
.page-header .page-sub {
  margin: 6px 0 0; color: var(--muted); font-size: 14px;
}
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; padding: 0;
  color: var(--muted); cursor: pointer;
  font-size: 13.5px; font-weight: 600; margin-bottom: 14px;
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }

/* ========== Card ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s;
}
.card.pad-24 { padding: 24px; }
.card.pad-22 { padding: 22px; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card.hoverable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.section-title { font-size: 14.5px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.section-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.section-head { margin-bottom: 16px; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  border-radius: 10px; cursor: pointer; white-space: nowrap;
  transition: all .16s; line-height: 1.2; border: 1px solid transparent;
  text-decoration: none;
}
.btn svg { width: 17px; height: 17px; }
.btn-sm { padding: 7px 12px; font-size: 13px; gap: 6px; border-radius: 9px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { padding: 13px 22px; font-size: 15px; gap: 9px; border-radius: 12px; }
.btn-lg svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px oklch(0.64 0.19 32 / 0.22);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 6px 18px oklch(0.64 0.19 32 / 0.35); color: #fff; }

.btn-soft { background: var(--primary-soft); color: var(--primary-hover); }
.btn-soft:hover { background: var(--primary-soft-2); color: var(--primary-hover); }

.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-outline:hover { background: var(--bg-2); color: var(--ink); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); }

.btn-danger { background: var(--surface); color: var(--red); border-color: var(--border); }
.btn-danger:hover { background: var(--red-soft); }

.btn-block { width: 100%; }

/* Icon-only button */
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: 9px; cursor: pointer; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--muted);
  transition: all .14s; text-decoration: none;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); border-color: var(--border); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); border-color: oklch(0.85 0.08 25); }
.icon-btn.active { color: var(--primary); }

/* ========== Forms ========== */
.field { margin-bottom: 18px; }
.field-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 7px;
}
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.mono { font-family: var(--mono); }
.input-group {
  display: flex; align-items: stretch; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input-group .input { border: none; box-shadow: none !important; border-radius: 0; flex: 1; }
.input-prefix, .input-suffix {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--bg-2); color: var(--muted);
  font-size: 13.5px; font-family: var(--mono); white-space: nowrap;
}
.input-prefix { border-right: 1px solid var(--border); }
.input-suffix { border-left: 1px solid var(--border); padding: 0; }
.input-suffix button {
  border: none; background: var(--bg-2); padding: 0 14px; cursor: pointer;
  color: var(--primary-hover); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; white-space: nowrap; height: 100%;
}
.input-suffix button:hover { background: var(--primary-soft); }

textarea.input { resize: vertical; min-height: 96px; font-family: inherit; }

/* Toggle switch */
.switch {
  display: inline-block; width: 40px; height: 22px; border-radius: 99px;
  border: none; cursor: pointer; padding: 3px;
  background: oklch(0.86 0.006 70); transition: background .2s;
  position: relative; vertical-align: middle;
}
.switch::after {
  content: ""; display: block; width: 16px; height: 16px;
  border-radius: 99px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s; transform: translateX(0);
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(18px); }
.switch-row { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
/* Visually hide the native checkbox but keep it accessible to forms + screen readers */
.switch-checkbox {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.switch-checkbox:focus-visible + .switch { box-shadow: 0 0 0 3px var(--primary-soft); }

/* Segmented control */
.segmented {
  display: inline-flex; gap: 4px;
  background: var(--bg-2); padding: 4px;
  border-radius: 11px; border: 1px solid var(--border-2);
}
.segmented button {
  padding: 7px 14px; font-size: 13px; font-weight: 600;
  border-radius: 8px; cursor: pointer; border: none;
  background: transparent; color: var(--muted); transition: all .15s;
}
.segmented button.active {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
}

/* Countdown stepper */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.stepper button {
  width: 42px; height: 42px; border: none; cursor: pointer;
  background: var(--bg-2); font-size: 18px; color: var(--ink-2);
}
.stepper button:first-child { border-right: 1px solid var(--border); }
.stepper button:last-child { border-left: 1px solid var(--border); }
.stepper .value {
  width: 64px; text-align: center; font-size: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stepper .unit { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Dropzone */
.dropzone {
  display: block;
  border: 1.5px dashed var(--border); border-radius: 12px;
  padding: 22px; text-align: center;
  background: var(--bg-2); cursor: pointer;
  transition: all .15s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary); background: var(--primary-soft);
}
.dropzone .dz-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; margin: 0 auto 10px; color: var(--muted);
}
.dropzone .dz-text { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.dropzone .dz-text strong { color: var(--primary-hover); font-weight: 600; }
.dropzone .dz-hint { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Visually-hidden but accessible (for native file input) */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}

/* Banner preview card (sau khi đã chọn ảnh hoặc đã lưu sẵn) */
.banner-preview {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); overflow: hidden;
  display: flex; flex-direction: column;
}
.banner-preview-img {
  width: 100%; max-height: 200px; object-fit: cover;
  background: var(--bg-2); display: block;
}
.banner-preview-media { width: 100%; display: block; background: var(--bg-2); }
.banner-preview-media-el {
  display: block; width: 100%; max-height: 240px; object-fit: contain;
  background: var(--bg-2);
}
video.banner-preview-media-el { background: #000; }
.banner-preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid var(--border-2);
  background: var(--bg);
}
.banner-preview-name {
  font-size: 12.5px; color: var(--muted); font-family: var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1;
}
.banner-preview-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: 10px; }

/* ========== Badges ========== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; line-height: 1.4;
  background: var(--bg-2); color: var(--ink-2);
}
.badge.dot { padding-left: 8px; }
.badge.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--faint);
}
.badge-green { background: var(--green-soft); color: var(--green-ink); }
.badge-green.dot::before { background: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber-ink); }
.badge-amber.dot::before { background: var(--amber); }
.badge-coral { background: var(--primary-soft); color: var(--primary-hover); }
.badge-coral.dot::before { background: var(--primary); }
.badge-blue { background: var(--blue-soft); color: var(--blue-ink); }
.badge-blue.dot::before { background: var(--blue); }

/* Status pill (table) */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  cursor: pointer;
}
.status-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--faint);
}
.status-pill.on {
  background: var(--green-soft); color: var(--green-ink);
  border-color: var(--green-soft);
}
.status-pill.on::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* Tracking dots (FB/GA/TT chips) */
.track-dot {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  padding: 3px 6px; border-radius: 6px; letter-spacing: 0.02em;
  background: var(--bg-2); color: var(--faint); opacity: 0.6;
}
.track-dot.on { background: var(--blue-soft); color: var(--blue-ink); opacity: 1; }

/* Slug pill */
.slug-pill {
  font-family: var(--mono); font-size: 13.5px; font-weight: 600;
  color: var(--primary-hover); background: var(--primary-soft);
  padding: 3px 8px; border-radius: 7px; white-space: nowrap;
}

/* Avatar */
.avatar {
  width: 34px; height: 34px; border-radius: 99px;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
  flex-shrink: 0;
}

/* ========== Tables ========== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.data-table th {
  text-align: left; padding: 13px 18px;
  font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em;
}
.data-table th.center { text-align: center; }
.data-table th.right { text-align: right; }
.data-table tbody tr { border-bottom: 1px solid var(--border-2); transition: background .12s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table td { padding: 15px 18px; vertical-align: middle; }
.data-table td.center { text-align: center; }
.data-table td.right { text-align: right; }
.data-table td.truncate { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.target-url {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 12.5px; font-family: var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.target-url svg { width: 13px; height: 13px; color: var(--faint); flex-shrink: 0; }

.empty-state {
  padding: 64px 20px; text-align: center; color: var(--muted);
}
.empty-state .empty-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--bg-2); display: grid; place-items: center;
  margin: 0 auto 14px; color: var(--faint);
}
.empty-state .empty-title { font-weight: 600; color: var(--ink-2); }
.empty-state .empty-sub { font-size: 13.5px; margin-top: 4px; }

/* ========== KPI cards ========== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s;
}
.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
}
.kpi-icon svg { width: 20px; height: 20px; }
.kpi-icon.tone-coral { background: var(--primary-soft); color: var(--primary); }
.kpi-icon.tone-blue  { background: var(--blue-soft); color: var(--blue); }
.kpi-icon.tone-green { background: var(--green-soft); color: var(--green); }
.kpi-icon.tone-violet{ background: var(--violet-soft); color: var(--violet); }
.kpi-value {
  font-size: 30px; font-weight: 800; margin-top: 16px;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.kpi-label { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.kpi-sub { font-size: 12.5px; color: var(--faint); margin-top: 7px; }

/* ========== Alerts ========== */
.alert {
  padding: 11px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; margin-bottom: 16px;
  display: flex; gap: 9px; align-items: flex-start;
}
.alert-success { background: var(--green-soft); color: var(--green-ink); }
.alert-danger { background: var(--red-soft); color: var(--red); }
.alert-amber { background: var(--amber-soft); color: var(--amber-ink); }

/* ========== Two-column form layout ========== */
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.two-col .col-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.col-stack { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col .col-side { position: static; }
}

/* ========== Utility ========== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.tabnum { font-variant-numeric: tabular-nums; }

/* Quill overrides */
.ql-toolbar.ql-snow { border-color: var(--border) !important; border-top-left-radius: 10px; border-top-right-radius: 10px; background: var(--bg-2); }
.ql-container.ql-snow { border-color: var(--border) !important; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; min-height: 120px; font-family: var(--font); }

/* Preview panel (mini bumper) */
.preview-card { overflow: hidden; padding: 0; }
.preview-head {
  padding: 12px 16px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 8px; background: var(--bg-2);
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.preview-body { padding: 18px; background: linear-gradient(135deg, #fff5f0, #ffe9df); }
.preview-inner {
  background: #fff; border-radius: 13px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.preview-banner {
  height: 74px; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, oklch(0.93 0.02 50) 0 10px, oklch(0.95 0.015 50) 10px 20px);
  color: var(--faint); font-size: 11px; font-family: var(--mono);
}
.preview-content { padding: 16px 16px 14px; text-align: center; }
.preview-title { font-size: 14px; font-weight: 700; color: var(--primary-hover); line-height: 1.3; }
.preview-msg { font-size: 11.5px; color: var(--muted); margin: 7px 0 10px; line-height: 1.5; }
.preview-progress { height: 5px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-bottom: 9px; }
.preview-progress > div { height: 100%; background: var(--primary); width: 62%; }
.preview-cd { font-size: 10.5px; color: var(--faint); }
.preview-btn {
  margin-top: 10px; background: var(--primary); color: #fff;
  padding: 8px; border-radius: 99px; font-size: 12px; font-weight: 700;
}

/* ========== Login split layout ========== */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 880px) { .login-shell { grid-template-columns: 1fr; } .login-brand { display: none; } }
.login-brand {
  position: relative; overflow: hidden;
  padding: 48px 52px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(155deg, oklch(0.62 0.2 32), oklch(0.55 0.19 18));
}
.login-brand::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background:
    radial-gradient(600px 400px at 80% 20%, rgba(255,255,255,.18), transparent),
    radial-gradient(500px 500px at 10% 90%, rgba(255,255,255,.12), transparent);
}
.login-brand > * { position: relative; }
.login-brand-top { display: flex; align-items: center; gap: 12px; }
.login-brand-top .brand-mark { width: 38px; height: 38px; background: rgba(255,255,255,.18); box-shadow: none; backdrop-filter: blur(4px); }
.login-brand-top .brand-mark svg { width: 22px; height: 22px; }
.login-brand-name { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.login-headline { font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; max-width: 420px; }
.login-tagline { font-size: 15.5px; opacity: 0.9; margin-top: 16px; max-width: 400px; line-height: 1.6; }
.login-stats { display: flex; gap: 26px; margin-top: 34px; }
.login-stats .stat-num { font-size: 26px; font-weight: 800; }
.login-stats .stat-label { font-size: 12.5px; opacity: 0.82; }
.login-foot { font-size: 12.5px; opacity: 0.75; }
.login-form {
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.login-form-inner { width: 100%; max-width: 360px; }
.login-form h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.login-form .login-sub { color: var(--muted); font-size: 14px; margin: 8px 0 28px; }
.login-secure {
  text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--faint);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.login-secure svg { width: 14px; height: 14px; }

/* ========== Bumper public page ========== */
.bumper-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: linear-gradient(135deg, #fff5f0 0%, #ffe4d6 100%);
}
.bumper-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(190,80,40,.18);
  max-width: 480px; width: 100%; overflow: hidden; text-align: center;
}
/* Banner trên trang bumper — hiển thị TRỌN media (contain), không crop, không tràn viewport */
.bumper-banner-img,
.bumper-banner-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;           /* không vượt 60% chiều cao viewport */
  object-fit: contain;          /* show toàn bộ media, letterbox nếu aspect lệch */
  background: #000;             /* khung đen khi letterbox */
}
.bumper-banner-img { background: var(--bg-2); }
.bumper-banner-video {
  /* pointer-events: none chặn user tap pause/play (vì không có controls) */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bumper-banner-video::-webkit-media-controls { display: none !important; }
.bumper-banner-video::-webkit-media-controls-enclosure { display: none !important; }

/* ── Mobile (≤ 600px): khít hơn, video tối đa 55vh để chừa chỗ cho text + countdown ── */
@media (max-width: 600px) {
  .bumper-shell { padding: 12px 10px; }
  .bumper-card  { border-radius: 16px; }
  .bumper-body  { padding: 20px 18px 18px; }
  .bumper-title { font-size: 20px; line-height: 1.25; }
  .bumper-msg   { font-size: 14px; }
  .bumper-banner-img,
  .bumper-banner-video { max-height: 55vh; }
  .bumper-progress { margin: 18px 0 10px; }
  .bumper-cd b { font-size: 16px; }
}

/* ── Mobile rất ngắn (landscape phone) — ép video gọn hơn nữa ── */
@media (max-height: 500px) {
  .bumper-banner-img,
  .bumper-banner-video { max-height: 45vh; }
  .bumper-shell { padding: 8px; }
  .bumper-body  { padding: 14px 16px 14px; }
}
.bumper-banner-placeholder {
  height: 170px;
  background: repeating-linear-gradient(135deg, oklch(0.93 0.03 40) 0 14px, oklch(0.95 0.02 40) 14px 28px);
  display: grid; place-items: center;
  color: oklch(0.6 0.05 40); font-family: var(--mono); font-size: 13px;
}
.bumper-body { padding: 30px 30px 26px; }
.bumper-title {
  font-size: 24px; font-weight: 800; color: var(--primary-hover);
  margin: 0 0 12px; line-height: 1.3; letter-spacing: -0.01em;
}
.bumper-msg { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin: 0 0 4px; }
.bumper-msg img { max-width: 100%; height: auto; border-radius: 8px; }
.bumper-progress {
  height: 7px; background: var(--bg-2); border-radius: 99px;
  overflow: hidden; margin: 26px 0 14px;
}
.bumper-progress > i { display: block; height: 100%; background: var(--primary); width: 0%; transition: width .1s linear; }
.bumper-cd { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.bumper-cd b { color: var(--ink); font-size: 18px; padding: 0 4px; }
.bumper-foot { margin-top: 22px; font-size: 11.5px; color: var(--faint); }

.preview-banner-strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: var(--ink); color: #fff;
  flex-wrap: wrap; gap: 12px; font-size: 13px;
}
.preview-banner-strip .back-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.1); border: none; color: #fff;
  padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none;
}
.preview-banner-strip .back-pill:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ========== 404 ========== */
.fullscreen-center {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, #fff5f0, #ffe4d6); padding: 40px;
}
.fullscreen-center .nf-box { text-align: center; }
.fullscreen-center h1 { font-size: 96px; margin: 0; color: var(--primary); font-weight: 800; letter-spacing: -0.04em; }
.fullscreen-center p { color: var(--ink-2); font-size: 16px; max-width: 360px; margin: 12px auto 0; }
