:root {
  color-scheme: light;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --sidebar: #1e293b;
  --surface: #f8fafc;
  --line: #e2e8f0;
  --muted: #64748b;
  --text: #0f172a;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

body.auth-pending .app { visibility: hidden; }
body.auth-pending::before {
  content: "Loading…";
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface);
}

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 15rem;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: #e2e8f0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid #334155;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}
.brand svg, .nav-link svg, .logout svg { width: 1.15rem; height: 1.15rem; flex: none; }
.brand svg { color: #3b82f6; }
.nav { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 0.75rem; flex: 1; }
.nav-link, .logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 0.6rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  width: 100%;
}
.nav-link:hover, .logout:hover, .user-name:hover { background: #1e293b; color: #fff; }
.nav-link.active { background: rgba(51, 65, 85, 0.85); color: #fff; }
.sidebar-foot { border-top: 1px solid #334155; padding: 1rem; }
.user-name {
  display: block;
  margin-bottom: 0.75rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main { flex: 1; min-width: 0; padding: 1.75rem 2rem 2.25rem; overflow-x: auto; }
.page-header { margin-bottom: 1.35rem; }
h1 { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; }
h2 { margin: 0 0 1rem; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.subtitle, .hint, .label { color: var(--muted); }
.subtitle { margin: 0.35rem 0 0; font-size: 0.92rem; line-height: 1.45; }
.hint { font-size: 0.875rem; }
.label { display: block; margin-bottom: 0.35rem; font-size: 0.8rem; font-weight: 600; color: #475569; }
.strong { font-weight: 600; margin: 0; }
.prose { max-width: 42rem; color: #475569; font-size: 0.95rem; line-height: 1.55; }

.card, .panel, .stat-card, .table-wrap.card, .auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.card, .panel { padding: 1.25rem 1.3rem; margin-bottom: 1.15rem; }
.card-narrow, .panel-narrow { max-width: 56rem; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card { padding: 1.25rem; position: relative; overflow: hidden; }
.stat-card p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.stat-card strong { display: block; margin-top: 0.5rem; font-size: 1.8rem; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.plain-list li, .bar-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-size: 0.92rem; }

.dash .stat-card {
  padding: 1.15rem 1.2rem 1.2rem;
  border: 0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.dash .stat-card::after {
  content: "";
  position: absolute;
  inset: auto -1.5rem -1.5rem auto;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  opacity: 0.14;
  background: currentColor;
}
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.stat-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
}
.stat-icon svg { width: 1.1rem; height: 1.1rem; }
.stat-note { display: block; margin-top: 0.35rem; color: #64748b; font-size: 0.78rem; }
.dash .stat-card strong { margin-top: 0.85rem; letter-spacing: -0.03em; }
.accent-blue { background: linear-gradient(160deg, #eff6ff, #dbeafe); color: #1d4ed8; }
.accent-green { background: linear-gradient(160deg, #ecfdf5, #d1fae5); color: #047857; }
.accent-cyan { background: linear-gradient(160deg, #ecfeff, #cffafe); color: #0e7490; }
.accent-amber { background: linear-gradient(160deg, #fffbeb, #fef3c7); color: #b45309; }
.accent-blue p, .accent-green p, .accent-cyan p, .accent-amber p { color: inherit; opacity: 0.78; }
.accent-blue strong, .accent-green strong, .accent-cyan strong, .accent-amber strong { color: inherit; }

.dash-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: -0.35rem 0 1.35rem;
}
.dash-action {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  box-shadow: var(--card-shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.dash-action:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}
.dash-action strong { font-size: 0.92rem; color: var(--text); }
.dash-action span { color: var(--muted); font-size: 0.8rem; }
.dash-split { margin-bottom: 1.25rem; }
.dash-panel { padding: 1.25rem 1.3rem; }
.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.col-num,
td.cell-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body[data-page="campaigns"] td.cell-num {
  text-align: left;
}
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
}
.th-sort:hover { color: var(--accent, #2563eb); }
.th-sort-icon {
  font-size: 0.75rem;
  opacity: 0.85;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.panel-head h2 { margin: 0; font-size: 1rem; }
.panel-sub { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.8rem; }
.panel-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
}
.panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid #f1f5f9;
}
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.filter-bar .input,
.filter-bar select.input {
  width: auto;
  background: #f8fafc;
  border-color: #dbe3ee;
  min-height: 2.5rem;
}
.filter-bar .input-grow {
  flex: 1 1 14rem;
  min-width: 11rem;
  max-width: none;
}
.filter-bar select.input {
  flex: 0 0 12rem;
  width: 12rem;
}
.filter-bar .btn,
.filter-bar .toolbar-end {
  flex: none;
  white-space: nowrap;
}
.filter-bar .toolbar-end { margin-left: auto; }
.filter-bar .input:focus,
.filter-bar select.input:focus {
  background: #fff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.detail-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.15rem;
  border-radius: 0.95rem;
  background: linear-gradient(145deg, #eff6ff, #f8fafc 55%, #fff);
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.detail-hero .meta-row { margin: 0 0 0.65rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.wizard-card .steps {
  margin-bottom: 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.wizard-card .step-line { width: 3.5rem; }
.form-card .input,
.form-card select.input,
.form-card textarea.input {
  background: #f8fafc;
  border-color: #dbe3ee;
}
.form-card .input:focus,
.form-card select.input:focus,
.form-card textarea.input:focus {
  background: #fff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.empty-state {
  margin: 0;
  padding: 1.5rem 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.rank-item { display: flex; gap: 0.75rem; align-items: center; }
.rank-badge {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
}
.rank-item:nth-child(1) .rank-badge { background: #2563eb; }
.rank-item:nth-child(2) .rank-badge { background: #0ea5e9; }
.rank-item:nth-child(3) .rank-badge { background: #64748b; }
.rank-body { flex: 1; min-width: 0; }
.rank-title { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.4rem; font-size: 0.9rem; }
.rank-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-title strong { color: #0f172a; }
.rank-track { height: 0.45rem; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.rank-fill { height: 100%; background: linear-gradient(90deg, #60a5fa, #2563eb); border-radius: 999px; }
.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 0.45rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}
.dash-table .col-actions { width: 8.5rem; text-align: right; }
.dash-table td.cell-actions { text-align: right; white-space: nowrap; }

.dash-table th,
.panel table th,
.table-wrap table th { background: #f8fafc; }
.dash-table tbody tr:hover td,
.panel table tbody tr:hover td,
.table-wrap table tbody tr:hover td { background: #f8fbff; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.toolbar-end { margin-left: auto; }
.toolbar-end-only { justify-content: flex-end; }
.row-between { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 0.9rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }

.input, .field input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  color: var(--text);
}
.input-grow { max-width: 18rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; max-width: 16rem; }
textarea.input { resize: vertical; }
.field { position: relative; display: block; }
.field input { padding-left: 2.5rem; padding-right: 4rem; }
.field-icon, .field-action {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.field-icon { left: 0.75rem; display: flex; }
.field-icon svg { width: 1rem; height: 1rem; }
.field-action {
  right: 0.65rem;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.7rem;
  border: 1px solid transparent;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: #e2e8f0; color: #1e293b; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-outline { background: #fff; color: var(--brand); border-color: #93c5fd; }
.btn-outline:hover { background: #eff6ff; }
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.1rem; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; color: #ef4444; padding: 0.25rem; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-green { background: #ecfdf5; color: #047857; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-blue { background: #eff6ff; color: #1d4ed8; }
.badge-amber { background: #fffbeb; color: #92400e; }

.table-wrap { overflow-x: auto; border-radius: 0.75rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
th { color: #64748b; font-weight: 600; background: #f8fafc; font-size: 0.78rem; letter-spacing: 0.01em; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table tbody tr:last-child td { border-bottom: 0; }
.cell-clip { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-fold { max-width: 18rem; }
.url-fold-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  list-style: none;
}
.url-fold-summary::-webkit-details-marker { display: none; }
.url-fold-hint {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
}
.url-fold-hint-hide { display: none; }
.url-fold[open] .url-fold-hint-view { display: none; }
.url-fold[open] .url-fold-hint-hide { display: inline; }
.url-cell-short.cell-clip {
  display: inline-block;
  vertical-align: top;
  max-width: 16rem;
}
.url-fold-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed #e2e8f0;
}
.url-fold-full {
  flex: 1 1 100%;
  word-break: break-all;
  white-space: normal;
  font-size: 0.8rem;
}
.url-fold-full.code-pill { display: inline-block; max-width: 100%; white-space: normal; word-break: break-all; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; }
.link { color: var(--brand); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.empty { color: var(--muted); padding: 1.25rem 1rem; text-align: center; }

.form-error { color: #dc2626; font-size: 0.875rem; margin: 0.5rem 0; }
.form-success { color: #047857; font-size: 0.875rem; }
.banner {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: linear-gradient(145deg, #ecfdf5, #f0fdf4);
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.08);
}
.summary {
  background: linear-gradient(160deg, #f8fafc, #eff6ff);
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.summary p { margin: 0.3rem 0; }

.steps { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.step { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; }
.step.current { color: var(--text); font-weight: 600; }
.step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.step.current .step-num { border-color: var(--brand); color: var(--brand); }
.step.done .step-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-line { width: 2rem; height: 1px; background: #e2e8f0; display: none; }
@media (min-width: 800px) { .step-line { display: inline-block; } }

.chart { display: flex; flex-direction: column; gap: 0.55rem; min-height: 8rem; }
.bar-track { flex: 1; height: 0.55rem; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 999px; }
.bar-label { width: 3.2rem; color: var(--muted); font-size: 0.75rem; }
.bar-value { width: 2rem; text-align: right; font-size: 0.8rem; font-weight: 600; }
.chart-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(2.4rem, 1fr);
  align-items: end;
  gap: 0.55rem;
  min-height: 13rem;
  padding: 0.25rem 0.15rem 0;
}
.col-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 0;
  height: 100%;
}
.col-value { color: #475569; font-size: 0.72rem; font-weight: 600; }
.col-track {
  width: 100%;
  max-width: 2rem;
  height: 9.5rem;
  display: flex;
  align-items: flex-end;
  border-radius: 0.7rem 0.7rem 0.35rem 0.35rem;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  overflow: hidden;
}
.col-fill {
  width: 100%;
  border-radius: 0.65rem 0.65rem 0.3rem 0.3rem;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  min-height: 0.35rem;
}
.col-label {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.28), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(14, 165, 233, 0.18), transparent 28%),
    linear-gradient(160deg, #0f172a 0%, #1e293b 48%, #0b1220 100%);
  position: relative;
  overflow: hidden;
}
.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, #000 35%, transparent 78%);
  pointer-events: none;
}
.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 26.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: #fff;
}
.auth-brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}
.auth-brand-mark svg { width: 1.25rem; height: 1.25rem; }
.auth-brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.auth-panel, .auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.1rem;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
}
.auth-panel { padding: 1.75rem 1.6rem 1.6rem; }
.auth-card { padding: 2rem; }
.auth-header { margin-bottom: 1.35rem; text-align: center; }
.auth-panel h1,
.auth-card h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.auth-header .subtitle,
.auth-card .subtitle {
  margin: 0.45rem auto 0;
  max-width: 22rem;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.45;
}
.auth-panel .field input {
  height: 2.85rem;
  border-color: #dbe3ee;
  background: #f8fafc;
}
.auth-panel .field input:focus {
  background: #fff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.auth-panel #login-form.stack { gap: 1.05rem; }
.auth-google { margin-top: 0.25rem; }
.check { display: flex; align-items: center; gap: 0.45rem; color: var(--brand); font-size: 0.9rem; }
.or-line { display: flex; align-items: center; gap: 0.75rem; margin: 1.15rem 0; color: #94a3b8; font-size: 0.75rem; }
.or-line::before, .or-line::after { content: ""; height: 1px; background: #e2e8f0; flex: 1; }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem; min-height: 2.75rem; }
.google-icon { display: flex; flex-shrink: 0; line-height: 0; }
@media (max-width: 520px) {
  .auth-panel { padding: 1.4rem 1.15rem 1.25rem; }
  .auth-brand-name { font-size: 1.2rem; }
}
.pager { display: flex; gap: 0.5rem; margin-top: 0; }

.form-grid { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.form-grid > .panel-head { grid-column: 1 / -1; margin-bottom: 0.15rem; }
.users-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; }
@media (max-width: 1100px) {
  .stat-grid, .split, .users-grid, .dash-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .app { display: block; }
  .sidebar { width: 100%; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .stat-grid, .split, .users-grid, .dash-actions { grid-template-columns: 1fr; }
  .main { padding: 1rem; }
  .input-grow, .mono { max-width: none; }
  .chart-columns { grid-auto-columns: minmax(2rem, 1fr); gap: 0.35rem; }
  .filter-bar {
    flex-wrap: wrap;
    padding: 0.75rem;
  }
  .filter-bar .input-grow,
  .filter-bar select.input {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
  .filter-bar .toolbar-end {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  .panel-foot { flex-direction: column; align-items: stretch; }
  .pager { width: 100%; }
  .pager .btn { flex: 1; }
  .detail-actions { width: 100%; }
  .detail-actions .btn { flex: 1; justify-content: center; }
  .row-between { flex-direction: column-reverse; align-items: stretch; }
  .row-between .btn { width: 100%; justify-content: center; }
}

.dest-editor.panel { padding: 1.35rem 1.4rem; }
.dest-intro { margin: 0 0 1rem; font-size: 0.85rem; color: #64748b; }
.dest-row-block {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fafc;
  overflow: hidden;
}
.dest-row-block + .dest-row-block { margin-top: 0.65rem; }
.dest-row-block .dest-row {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.dest-row-schedule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.dest-row-schedule .schedule-field { min-width: 0; }
.dest-row-schedule .input {
  width: 100%;
  margin-top: 0.25rem;
}
@media (max-width: 640px) {
  .dest-row-schedule { grid-template-columns: 1fr; }
}
.dest-editor .steps { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.dest-editor .step-line { width: 4rem; }
.dest-head,
.dest-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 0.85fr) minmax(0, 1.55fr) minmax(0, 1.25fr) 4.75rem;
  gap: 0.75rem;
  align-items: center;
}
.dest-head {
  padding: 0 0.85rem 0.45rem;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.dest-head abbr { text-decoration: none; color: #dc2626; }
.dest-optional { font-weight: 500; color: #94a3b8; }
.dest-rows { display: flex; flex-direction: column; gap: 0.65rem; }
.dest-row {
  padding: 0.7rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.dest-index {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe3ee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}
.dest-field { display: block; min-width: 0; }
.dest-label { display: none; }
.dest-row select,
.dest-row input {
  width: 100%;
  height: 2.55rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.6rem;
  background: #fff;
  padding: 0 0.75rem;
  color: var(--text);
}
.dest-row input::placeholder { color: #94a3b8; }
.dest-row select:focus,
.dest-row input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); outline: none; }
.dest-remove {
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
}
.dest-remove:hover { background: #fef2f2; }
.dest-add {
  width: 100%;
  margin-top: 0.75rem;
  border: 1px dashed #93c5fd;
  background: #f8fbff;
  color: var(--brand);
  border-radius: 0.75rem;
  padding: 0.72rem 1rem;
  font-weight: 600;
}
.dest-add:hover { background: #eff6ff; }
.dest-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 960px) {
  .dest-head { display: none; }
  .dest-row { grid-template-columns: 1fr auto; }
  .dest-index { grid-column: 1; }
  .dest-remove { grid-column: 2; justify-self: end; }
  .dest-field { grid-column: 1 / -1; }
  .dest-label {
    display: block;
    margin-bottom: 0.3rem;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
  }
}
