:root {
  --brand-50: #eaf7fa;
  --brand-100: #d2eff5;
  --brand-200: #a6dfea;
  --brand-300: #54c1d4;
  --brand-500: #32b0c6;
  --brand-600: #2991a3;
  --brand-700: #1f6f7d;
  --brand-ink: #0b3a42;
  --ink-900: #101316;
  --ink-800: #1b1e23;
  --ink-700: #2b2f36;
  --ink-500: #5f6672;
  --ink-400: #868c97;
  --ink-300: #b4b9c2;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --success: #12805c;
  --success-soft: #e6f6ef;
  --warning: #a15c00;
  --warning-soft: #fff4e0;
  --danger: #c0293b;
  --danger-soft: #fdecee;
  --info: #1c6fa8;
  --info-soft: #e8f2fb;
  --violet: #6d4fd8;
  --violet-soft: #f0ecfd;
  --text: var(--ink-900);
  --text-muted: var(--ink-500);
  --text-soft: var(--ink-400);
  --focus: 0 0 0 3px rgba(50, 176, 198, .35);
  --shadow-sm: 0 1px 2px rgba(16, 19, 22, .06);
  --shadow: 0 1px 3px rgba(16, 19, 22, .06), 0 8px 24px rgba(16, 19, 22, .06);
  --shadow-lg: 0 12px 40px rgba(16, 19, 22, .14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --sidebar: 256px;
  --topbar: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-50: #0f2a30;
    --brand-100: #12353d;
    --brand-200: #1d5662;
    --brand-500: #45bfd4;
    --brand-600: #6ccadb;
    --brand-700: #9fdde8;
    --brand-ink: #d6f3f8;
    --ink-900: #eef0f3;
    --ink-800: #d9dde3;
    --ink-700: #c1c7d0;
    --ink-500: #98a0ab;
    --ink-400: #7a828d;
    --ink-300: #4d545e;
    --line: #262b31;
    --line-strong: #353b43;
    --bg: #0e1114;
    --surface: #161a1f;
    --surface-2: #1b2026;
    --success: #4cc79a;
    --success-soft: #11291f;
    --warning: #f0b45a;
    --warning-soft: #2e2311;
    --danger: #f2717f;
    --danger-soft: #331519;
    --info: #6fb6ea;
    --info-soft: #132433;
    --violet: #a993f5;
    --violet-soft: #221b38;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand-50: #0f2a30;
  --brand-100: #12353d;
  --brand-200: #1d5662;
  --brand-500: #45bfd4;
  --brand-600: #6ccadb;
  --brand-700: #9fdde8;
  --brand-ink: #d6f3f8;
  --ink-900: #eef0f3;
  --ink-800: #d9dde3;
  --ink-700: #c1c7d0;
  --ink-500: #98a0ab;
  --ink-400: #7a828d;
  --ink-300: #4d545e;
  --line: #262b31;
  --line-strong: #353b43;
  --bg: #0e1114;
  --surface: #161a1f;
  --surface-2: #1b2026;
  --success: #4cc79a;
  --success-soft: #11291f;
  --warning: #f0b45a;
  --warning-soft: #2e2311;
  --danger: #f2717f;
  --danger-soft: #331519;
  --info: #6fb6ea;
  --info-soft: #132433;
  --violet: #a993f5;
  --violet-soft: #221b38;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.soft { color: var(--text-soft); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 22px; height: 22px; }

.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 16px !important; }
.center { text-align: center; }
.right { text-align: right; }

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --btn-bg: var(--surface-2); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand-600); --btn-fg: #fff; --btn-border: transparent; box-shadow: 0 1px 2px rgba(41, 145, 163, .3), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-primary:hover { --btn-bg: var(--brand-700); --btn-fg: #fff; }
:root[data-theme="dark"] .btn-primary { --btn-fg: #06262c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { --btn-fg: #06262c; } }
.btn-dark { --btn-bg: var(--ink-900); --btn-fg: var(--surface); --btn-border: transparent; }
.btn-dark:hover { --btn-bg: var(--ink-700); --btn-fg: var(--surface); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); }
.btn-soft { --btn-bg: var(--brand-50); --btn-fg: var(--brand-700); --btn-border: transparent; }
.btn-soft:hover { --btn-bg: var(--brand-100); }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: transparent; }
.btn-danger:hover { --btn-bg: #a51f30; --btn-fg: #fff; }
.btn-danger-soft { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-border: transparent; }
.btn-success { --btn-bg: var(--success); --btn-fg: #fff; --btn-border: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-tight .card-body { padding: 16px; }
.card-link { display: block; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--brand-200); box-shadow: var(--shadow); color: inherit; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.no-dot::before { display: none; }
.pill-draft { color: var(--ink-500); }
.pill-in_review { color: var(--violet); background: var(--violet-soft); border-color: transparent; }
.pill-rejected, .pill-danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.pill-awaiting_payment, .pill-warning { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.pill-scheduled, .pill-info { color: var(--info); background: var(--info-soft); border-color: transparent; }
.pill-active, .pill-success { color: var(--success); background: var(--success-soft); border-color: transparent; }
.pill-active::before { animation: pulse 1.6s infinite; }
.pill-paused { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.pill-completed { color: var(--brand-700); background: var(--brand-50); border-color: transparent; }
.pill-cancelled { color: var(--ink-400); }
.pill-brand { color: var(--brand-700); background: var(--brand-50); border-color: transparent; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; font-weight: 700; border-radius: 999px; background: var(--brand-500); color: #fff; }
.badge-danger { background: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.chip button { border: 0; background: none; color: var(--text-soft); cursor: pointer; padding: 0; font-size: 16px; line-height: 1; }
.chip.chip-danger { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid transparent; font-size: 14px; }
.alert .icon { margin-top: 2px; }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-danger, .alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-brand { background: var(--brand-50); color: var(--brand-700); }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-body { color: var(--text); }
.alert-title { font-weight: 650; }

.field { display: block; }
.field + .field { margin-top: 18px; }
.label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.label .optional { font-weight: 400; color: var(--text-soft); }
.help { margin-top: 6px; font-size: 13px; color: var(--text-muted); }
.error { margin-top: 6px; font-size: 13px; color: var(--danger); font-weight: 500; }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23868c97' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--text-soft); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.input-group { display: flex; align-items: stretch; }
.input-group > :first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-addon { display: inline-flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.input-sm { min-height: 34px !important; padding: 6px 10px !important; font-size: 14px !important; border-radius: 8px !important; }
.counter { float: right; font-size: 12px; color: var(--text-soft); font-weight: 400; }

.choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.choice {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice:hover { border-color: var(--brand-300); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .choice-mark { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); flex: 0 0 auto; display: grid; place-items: center; margin-top: 1px; background: var(--surface); transition: all .15s; }
.choice input[type="radio"] ~ .choice-mark { border-radius: 50%; }
.choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-500); }
.choice:has(input:checked) .choice-mark { border-color: var(--brand-500); background: var(--brand-500); }
.choice:has(input:checked) .choice-mark::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #fff; }
.choice input[type="radio"]:checked ~ .choice-mark::after { border-radius: 50%; }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice-title { font-weight: 600; display: block; }
.choice-text { font-size: 13px; color: var(--text-muted); display: block; margin-top: 2px; }
.choice-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-600); flex: 0 0 auto; }
.choice-price { margin-left: auto; text-align: right; font-weight: 700; white-space: nowrap; }
.choice-sm { padding: 10px 14px; align-items: center; }

.segmented { display: inline-flex; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; gap: 4px; flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }

.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.toggle input { position: absolute; opacity: 0; }
.toggle-track { width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; flex: 0 0 auto; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--brand-500); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--focus); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .right { text-align: right; }
.table-compact td { padding: 10px 16px; }
.table a.row-link { color: var(--text); font-weight: 600; }
.table a.row-link:hover { color: var(--brand-600); }
.table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand-500); }
.thumb { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.thumb-lg { width: 96px; height: 54px; }
.thumb-empty { display: grid; place-items: center; color: var(--text-soft); }

@media (max-width: 768px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table-cards td { padding: 4px 0; border: 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-cards td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--text-soft); text-align: left; font-weight: 600; }
  .table-cards td.cell-main { display: flex; justify-content: flex-start; text-align: left; padding-bottom: 8px; }
  .table-cards td.cell-main::before { display: none; }
}

.stat { padding: 18px 20px; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.stat-label .icon { color: var(--brand-500); }
.stat-value { margin-top: 8px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 2px; font-size: 13px; color: var(--text-soft); }
.trend-up { color: var(--success); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }

.empty { text-align: center; padding: 48px 24px; }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; }
.empty-icon .icon { width: 26px; height: 26px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--text-muted); max-width: 420px; margin: 0 auto 20px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--brand-600); border-color: var(--brand-500); }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 13px; font-weight: 600; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-muted); background: var(--surface); white-space: nowrap; }
.filter-chip:hover { color: var(--text); border-color: var(--ink-300); }
.filter-chip.is-active { background: var(--ink-900); color: var(--surface); border-color: var(--ink-900); }
.filter-chip .count { font-size: 11px; opacity: .7; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 14px; }

.dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

.price-box { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.price-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.price-line .muted { font-size: 13px; }
.price-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 8px; border-top: 1px dashed var(--line-strong); font-weight: 700; font-size: 20px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-500); }
.timeline .when { font-size: 12px; color: var(--text-soft); }

.tracker { display: flex; align-items: flex-start; gap: 0; }
.tracker-step { flex: 1; text-align: center; position: relative; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.tracker-step::before { content: ""; position: absolute; top: 19px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: var(--line); }
.tracker-step:first-child::before { display: none; }
.tracker-dot { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1.5px solid var(--line-strong); color: var(--text-soft); position: relative; z-index: 1; }
.tracker-step.is-done { color: var(--text); }
.tracker-step.is-done .tracker-dot { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-600); }
.tracker-step.is-done::before, .tracker-step.is-current::before { background: var(--brand-300); }
.tracker-step.is-current { color: var(--brand-700); }
.tracker-step.is-current .tracker-dot { background: var(--brand-500); border-color: var(--brand-500); color: #fff; box-shadow: 0 0 0 5px var(--brand-50); }
.tracker-step.is-bad .tracker-dot { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 0 0 0 5px var(--danger-soft); }
.tracker-step.is-bad { color: var(--danger); }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item.is-danger { color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--line); margin: 6px 0; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 19, 22, .5); backdrop-filter: blur(2px); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-lg { max-width: 720px; }
.modal-head { padding: 20px 24px 0; }
.modal-body { padding: 16px 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) {
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-width: none; }
  .modal-foot .btn { flex: 1; }
}

.toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--ink-900); color: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 14px; animation: toast-in .25s ease-out; }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: #5fd3a6; }
.toast-error .icon { color: #ff8c99; }
.toast-warning .icon { color: #ffc56b; }
.toast-info .icon { color: var(--brand-300); }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 0 0 8px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .toasts { left: 16px; right: 16px; bottom: 84px; max-width: none; } }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand-500); border-radius: inherit; transition: width .2s; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-300), var(--brand-600)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; text-transform: uppercase; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo-full { height: 32px; width: auto; display: block; }
.logo-mark { width: 36px; height: 36px; flex: 0 0 auto; display: none; }

.app { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 50; transition: transform .2s; }
.sidebar-head { height: var(--topbar); display: flex; align-items: center; padding: 0 20px; flex: 0 0 auto; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); }
.nav-section { margin: 18px 12px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-muted); font-weight: 550; font-size: 14px; transition: background .12s, color .12s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--brand-50); color: var(--brand-700); }
.nav-link.is-active .icon { color: var(--brand-600); }
.nav-link .badge { margin-left: auto; }
.main { flex: 1; min-width: 0; margin-left: var(--sidebar); display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; }
.topbar.is-scrolled { border-color: var(--line); }
.topbar-title { font-weight: 650; font-size: 15px; }
.content { padding: 24px 28px 48px; width: 100%; max-width: 1280px; margin: 0 auto; }
.content-narrow > * { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--text-muted); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand-600); }
.menu-toggle { display: none; }
.scrim { display: none; }
.bottom-nav { display: none; }

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: none; }
  .scrim.is-open { display: block; position: fixed; inset: 0; background: rgba(16, 19, 22, .45); z-index: 45; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px 40px; }
}
@media (max-width: 768px) {
  .has-bottom-nav .content { padding-bottom: 96px; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; font-size: 11px; font-weight: 600; color: var(--text-soft); border-radius: 10px; }
  .bottom-nav a.is-active { color: var(--brand-600); }
  .bottom-nav a.is-primary .icon { width: 44px; height: 44px; padding: 11px; margin-top: -20px; border-radius: 50%; background: var(--brand-500); color: #fff; box-shadow: 0 6px 16px rgba(50, 176, 198, .45); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .page-head { align-items: flex-start; }
  .page-head .page-actions { width: 100%; }
  .page-head .page-actions .btn { flex: 1; }
  .hide-sm { display: none !important; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
}
@media (min-width: 769px) { .show-sm { display: none !important; } }
@media (max-width: 1100px) and (min-width: 769px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats-row { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) 420px; }
.sticky { position: sticky; top: calc(var(--topbar) + 16px); }
@media (max-width: 1100px) { .split, .split-wide { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }

.wizard { display: grid; grid-template-columns: 240px minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.wizard-steps { list-style: none; margin: 0; padding: 0; position: sticky; top: calc(var(--topbar) + 16px); }
.wizard-step { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-muted); }
.wizard-step a, .wizard-step span.link { display: flex; gap: 12px; color: inherit; width: 100%; }
.wizard-step .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface); border: 1.5px solid var(--line-strong); flex: 0 0 auto; }
.wizard-step .t { font-weight: 600; color: var(--text); font-size: 14px; display: block; }
.wizard-step .h { font-size: 12px; display: block; }
.wizard-step.is-current { background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.wizard-step.is-current .num { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.wizard-step.is-done .num { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-200); }
.wizard-step.is-locked { opacity: .55; }
.wizard-progress { display: none; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.wizard-section { padding: 24px; }
.wizard-section + .wizard-section { border-top: 1px solid var(--line); }
.wizard-section h2 { margin-bottom: 4px; }
.wizard-section > .muted:first-of-type { margin-bottom: 18px; }
@media (max-width: 1280px) { .wizard { grid-template-columns: 200px minmax(0, 1fr) 300px; gap: 20px; } }
@media (max-width: 1100px) {
  .wizard { grid-template-columns: minmax(0, 1fr); }
  .wizard-steps { display: none; }
  .wizard-progress { display: block; margin-bottom: 16px; }
  .wizard-aside { order: 3; }
}
@media (max-width: 768px) {
  .wizard-section { padding: 18px 16px; }
  .wizard-actions { position: sticky; bottom: 0; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); z-index: 30; }
  .wizard-actions .btn { flex: 1; }
  .has-bottom-nav.wizard-page .bottom-nav { display: none; }
  .has-bottom-nav.wizard-page { padding-bottom: 0; }
}

.dropzone { display: block; position: relative; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 28px; text-align: center; background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand-500); background: var(--brand-50); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--brand-600); box-shadow: var(--shadow-sm); }
.media-preview { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-preview .media-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }

.ad-card { width: 100%; max-width: 320px; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ad-card-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand-100), var(--brand-300)); }
.ad-card-media img, .ad-card-media video { width: 100%; height: 100%; object-fit: cover; }
.ad-card-media .sponsored { position: absolute; left: 10px; top: 10px; padding: 3px 9px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 999px; backdrop-filter: blur(4px); }
.ad-card-media .muted-badge { position: absolute; right: 10px; bottom: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center; }
.ad-card-body { padding: 12px 14px 14px; }
.ad-card-title { font-weight: 700; font-size: 15px; line-height: 1.3; margin-bottom: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ad-card-desc { font-size: 13px; color: var(--text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ad-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.ad-card-advertiser { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.ad-card-cta { padding: 7px 14px; font-size: 13px; font-weight: 700; border-radius: 999px; background: var(--brand-500); color: #fff; white-space: nowrap; }
.phone-frame { width: 300px; max-width: 100%; margin: 0 auto; padding: 12px; border-radius: 40px; background: #0d0f12; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2a2e34; }
.phone-screen { border-radius: 30px; overflow: hidden; background: var(--bg); min-height: 420px; position: relative; }
.phone-notch { position: absolute; left: 50%; top: 8px; width: 90px; height: 24px; margin-left: -45px; background: #0d0f12; border-radius: 999px; z-index: 2; }
.phone-top { height: 120px; background: linear-gradient(160deg, #cfeef4, #9ad6e2); position: relative; }
.phone-top::after { content: ""; position: absolute; left: 40%; top: 46%; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #2d7ff9; }
.phone-sheet { margin-top: -16px; position: relative; background: var(--surface); border-radius: 20px 20px 0 0; padding: 16px 14px; }
.phone-carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.phone-carousel::-webkit-scrollbar { display: none; }
.phone-carousel > * { scroll-snap-align: start; flex: 0 0 82%; }
.phone-carousel .ad-card { max-width: none; box-shadow: none; }
.ad-card.ghost { opacity: .45; }
.browser-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.browser-bar span { margin-left: 8px; flex: 1; font-size: 11px; color: var(--text-soft); background: var(--surface); padding: 4px 10px; border-radius: 6px; }
.browser-body { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.browser-body .ad-card { max-width: none; box-shadow: none; }

.map { height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.preset { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.preset:hover, .preset.is-active { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }
input[type="range"] { width: 100%; accent-color: var(--brand-500); }

.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 700; padding: 0; }
@media (max-width: 380px) { .otp input { width: 40px; height: 50px; } }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-main { display: flex; flex-direction: column; padding: 28px 40px; }
.auth-form { width: 100%; max-width: 420px; margin: auto; padding: 32px 0; }
.auth-form h1 { margin-bottom: 6px; }
.auth-form .lead { color: var(--text-muted); margin-bottom: 28px; }
.auth-side { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(11, 58, 66, .96) 0%, rgba(20, 84, 96, .82) 45%, rgba(11, 58, 66, .45) 100%), url("../img/samples/auth_side.221c58266bc2.jpg") center 30% / cover no-repeat, #0b3a42; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-size: 30px; line-height: 1.15; max-width: 440px; }
.auth-side p { color: rgba(255, 255, 255, .8); max-width: 420px; }
.auth-side .ad-card { position: relative; }
.auth-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: rgba(255, 255, 255, .9); }
.auth-points .icon { color: #a8ecf7; }
@media (max-width: 960px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-main { padding: 20px; } }

.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-item { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-item.is-unread { background: var(--brand-50); }
.notice-dot { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--surface-2); color: var(--brand-600); }
.notice-success .notice-dot { background: var(--success-soft); color: var(--success); }
.notice-danger .notice-dot { background: var(--danger-soft); color: var(--danger); }
.notice-warning .notice-dot { background: var(--warning-soft); color: var(--warning); }

.chart-box { position: relative; height: 280px; }
.chart-box-sm { height: 200px; }
.bar-list { display: grid; gap: 10px; }
.bar-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.bar-item .bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-item .bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand-500); }

.kbd { display: inline-block; padding: 1px 6px; font-size: 11px; font-weight: 700; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-muted); font-family: ui-monospace, monospace; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
pre.code { padding: 14px; overflow-x: auto; white-space: pre; display: block; }
.diff-old { background: var(--danger-soft); color: var(--danger); text-decoration: line-through; padding: 1px 4px; border-radius: 4px; }
.diff-new { background: var(--success-soft); color: var(--success); padding: 1px 4px; border-radius: 4px; }

.inline-edit { display: inline-flex; align-items: center; gap: 4px; }
.inline-edit select, .inline-edit input { width: auto; min-width: 64px; }
.bulk-bar { position: sticky; bottom: 16px; z-index: 30; margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #101316; color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.bulk-bar select, .bulk-bar input { width: auto; min-height: 36px; padding: 6px 34px 6px 10px; background-color: #2b3038; color: #fff; border-color: transparent; }
.bulk-bar input { width: 90px; padding-right: 10px; }
.bulk-bar .btn-ghost { color: #fff; }
.bulk-bar .btn { min-height: 36px; }

.search { position: relative; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-soft); }
.search input { padding-left: 38px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar .search { flex: 1 1 220px; }
.toolbar select { width: auto; min-width: 140px; }
@media (max-width: 768px) {
  .toolbar .search { flex: 1 1 100%; }
  .toolbar select { flex: 1 1 calc(50% - 5px); min-width: 0; }
}

.chart-box:not(.is-ready)::before, .is-loading-media::before, .map:not(.leaflet-container)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.chart-box canvas { opacity: 0; transition: opacity .3s; }
.chart-box.is-ready canvas { opacity: 1; }
.map { position: relative; }
.ad-card-media, .media-preview, .thumb { position: relative; }
.ad-card-media img, .ad-card-media video, .media-preview img, .media-preview video, img.thumb, .lazy-img { transition: opacity .35s ease; }
img.is-loading { opacity: 0; }
.is-loading-media { overflow: hidden; }
.is-loading-media::before { border-radius: 0; z-index: 0; }
.page-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--brand-300), var(--brand-600)); box-shadow: 0 0 10px rgba(50, 176, 198, .6); transition: width .25s ease, opacity .3s ease; opacity: 0; }
.page-progress.is-active { opacity: 1; width: 70%; transition: width 6s cubic-bezier(.1, .7, .2, 1), opacity .2s; }
.page-progress.is-done { opacity: 0; width: 100%; transition: width .2s ease, opacity .4s ease .2s; }
.skeleton-line { display: block; height: 12px; border-radius: 6px; }
.skeleton-line + .skeleton-line { margin-top: 8px; }
.skeleton-value { display: inline-block; width: 120px; height: .8em; vertical-align: middle; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .skeleton, .chart-box::before, .is-loading-media::before, .map::before { animation: none; } }
.toolbar > * { min-width: 0; }
.filter-chips { max-width: 100%; }
@media (max-width: 768px) {
  .page-actions form, .page-actions .row { flex: 1 1 0; min-width: 0; }
  .page-actions form .btn { width: 100%; }
  .page-actions .dropdown { flex: 0 0 auto; }
  .page-actions .dropdown .btn { flex: 0 0 auto; }
  .page-actions select { width: 100% !important; min-width: 0 !important; }
  .page-actions .segmented { width: 100%; }
  .page-actions .segmented label { flex: 1; }
  .page-actions .segmented span { justify-content: center; width: 100%; padding: 8px 6px; }
}

.nav-group { margin-top: 6px; }
.nav-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-radius: 8px; padding: 6px 12px; margin: 12px 0 4px; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { color: var(--text-muted); background: var(--surface-2); }
.nav-group > summary .icon { transition: transform .2s ease; opacity: .7; }
.nav-group:not([open]) > summary .icon { transform: rotate(-90deg); }
.nav-group > .nav-link { margin-top: 2px; }
.sidebar-body nav > .nav-link + .nav-link { margin-top: 2px; }

.grid-2 > .field, .grid-3 > .field, .range-row > .field { margin-top: 0 !important; }
.grid-2, .grid-3, .range-row { align-items: start; }
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card { align-self: stretch; }
.grid-2 + .field, .grid-3 + .field { margin-top: 16px; }
label.toggle + .field, label.toggle + label.toggle { margin-top: 16px; }
.toolbar-stack { flex-direction: column; align-items: stretch; }
.toolbar-stack .search { flex: none; }
.auth-side { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.auth-side .ad-card { flex: 0 0 auto; }
@media (max-height: 760px) { .auth-side .ad-card { display: none; } }

.sidebar, .main { transition: width .2s ease, margin-left .2s ease, transform .2s; }
.nav-link { position: relative; }
.sidebar-toggle { display: none; }
@media (min-width: 1025px) {
  .sidebar-toggle { display: inline-flex; }
  html.sidebar-collapsed .sidebar { width: 76px; }
  html.sidebar-collapsed .main { margin-left: 76px; }
  html.sidebar-collapsed .sidebar .nav-label,
  html.sidebar-collapsed .sidebar .logo-full,
  html.sidebar-collapsed .sidebar .sidebar-pill,
  html.sidebar-collapsed .sidebar-user .grow,
  html.sidebar-collapsed .nav-group > summary .icon { display: none; }
  html.sidebar-collapsed .sidebar-head { justify-content: center; padding: 0; }
  html.sidebar-collapsed .sidebar .logo-mark { display: block; }
  html.sidebar-collapsed .sidebar-body { padding: 8px 10px 16px; }
  html.sidebar-collapsed .nav-link { justify-content: center; padding: 10px; gap: 0; }
  html.sidebar-collapsed .nav-link .badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  html.sidebar-collapsed .nav-group > summary { padding: 0; margin: 10px 6px; height: 1px; background: var(--line); pointer-events: none; }
  html.sidebar-collapsed .sidebar-cta { width: 44px; height: 44px; min-height: 44px; padding: 0; margin: 0 auto 16px; display: flex; }
  html.sidebar-collapsed .sidebar-user { flex-direction: column; gap: 8px; padding: 6px 0 !important; }
}

.confirm-modal { max-width: 440px; }
.confirm-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.confirm-icon.is-danger { background: var(--danger-soft); color: var(--danger); }
.confirm-backdrop { animation: toast-in .15s ease-out; }
.login-tabs { display: flex; width: 100%; }
.login-tabs label { flex: 1; }
.login-tabs span { justify-content: center; width: 100%; }
.auth-side .ad-card { color: var(--text); }

.settings-intro { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
a.card.stat { color: inherit; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.password-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-soft); cursor: pointer; }
.password-eye:hover { color: var(--brand-600); background: var(--surface-2); }
.password-eye:focus-visible { outline: none; box-shadow: var(--focus); }
.password-eye svg { width: 18px; height: 18px; }

img.avatar { object-fit: cover; background: var(--surface-2); }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; }
.sidebar-user-link { flex: 1; min-width: 0; color: inherit; border-radius: 10px; padding: 4px; margin: -4px; transition: background .12s; }
.sidebar-user-link:hover { background: var(--surface-2); color: inherit; }
.profile-photo { display: flex; align-items: center; gap: 20px; }
.profile-photo-frame { width: 88px; height: 88px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.profile-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo .btn { position: relative; }
.locked-input { position: relative; }
.locked-input input { padding-right: 42px; }
.locked-input input:disabled { background: var(--surface-2); color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); cursor: not-allowed; opacity: 1; }
.locked-input .icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-soft); pointer-events: none; }
@media (max-width: 480px) {
  .profile-photo { gap: 14px; }
  .profile-photo-frame, .avatar-xl { width: 72px; height: 72px; font-size: 24px; }
}

.phone-group { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.dial-pick { position: relative; }
.dial-chip { height: 100%; min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 14px; color: var(--text); }
.dial-chip b { font-weight: 650; }
.dial-chip .icon { margin-left: auto; color: var(--text-soft); }
.dial-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; min-height: 0; }
.dial-pick:focus-within .dial-chip { border-color: var(--brand-500); box-shadow: var(--focus); }
.code-help { display: flex; align-items: center; gap: 6px; color: var(--brand-700); }
.code-help .icon { color: var(--brand-600); }
.empty-art { display: block; width: 200px; max-width: 70%; height: auto; margin: 0 auto 12px; }
.status-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 16px; background: var(--bg); }
.status-page .logo { margin-bottom: 8px; }
.status-art { width: 360px; max-width: 90%; height: auto; margin: 8px auto 4px; }
.status-page h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 8px; }
.status-page p { color: var(--text-muted); max-width: 440px; margin: 0 auto 24px; }
