:root {
  --navy: #031b33;
  --navy-2: #062845;
  --ink: #071a33;
  --muted: #62718a;
  --faint: #8c99ac;
  --canvas: #f6f8fb;
  --surface: #ffffff;
  --line: #dfe5ed;
  --line-strong: #cbd4e0;
  --cobalt: #0b5cff;
  --cobalt-dark: #084bcc;
  --cobalt-soft: #edf4ff;
  --emerald: #10a86b;
  --emerald-soft: #eaf9f2;
  --amber: #eea300;
  --amber-soft: #fff7df;
  --red: #de3c4b;
  --red-soft: #fff0f2;
  --shadow-sm: 0 3px 10px rgba(7, 26, 51, .04);
  --shadow-lg: 0 24px 64px rgba(3, 27, 51, .18);
}

* { box-sizing: border-box; }

html { background: var(--canvas); overflow-x: hidden; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
select { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(11, 92, 255, .18);
  outline-offset: 2px;
}

.is-hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 7px solid var(--cobalt);
  border-radius: 9px 9px 12px 9px;
  transform: rotate(30deg);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-left: 3px solid white;
  border-bottom: 3px solid white;
  border-radius: 2px;
}

.brand-mark > span {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--cobalt);
  right: -8px;
  top: 7px;
}

.brand-mark--large {
  width: 58px;
  height: 58px;
  border-width: 10px;
  border-radius: 14px 14px 18px 14px;
  margin: 0 auto 28px;
}

.brand-mark--large::before { inset: 6px; border-width: 4px; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: auto;
  padding: 40px 20px 92px;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 88px 88px;
}

.auth-rail {
  position: absolute;
  top: 0;
  bottom: 10%;
  left: 50%;
  width: 2px;
  background: var(--cobalt);
  box-shadow: 0 0 28px rgba(11, 92, 255, .35);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 44px 40px 36px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 18px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 8, 24, .38), inset 0 0 0 4px #f7f9fc;
}

.auth-card h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
  letter-spacing: -.04em;
}

.auth-card > p:not(.form-error) {
  max-width: 330px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #40516c;
  font-size: 13px;
  font-weight: 700;
}

.input-wrap { position: relative; }

.input-wrap input,
.form-field input,
.form-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 0 13px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}

.input-wrap input { min-height: 52px; padding-right: 48px; font-size: 14px; }

.input-wrap input:hover,
.form-field input:hover,
.form-field select:hover { border-color: #aab6c5; }

.input-wrap input:focus,
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(11, 92, 255, .1);
}

.input-action { position: absolute; right: 8px; top: 7px; }

.form-error {
  min-height: 18px;
  margin: 7px 0 5px;
  color: var(--red);
  font-size: 13px;
}

.primary-button,
.secondary-button,
.danger-button,
.secondary-icon-button,
.dashed-button {
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
}

.primary-button { background: var(--cobalt); color: white; box-shadow: 0 5px 14px rgba(11, 92, 255, .18); }
.primary-button:hover { background: var(--cobalt-dark); transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.secondary-button { border: 1px solid var(--line-strong); background: white; color: var(--ink); box-shadow: var(--shadow-sm); }
.secondary-button:hover { border-color: #aab6c5; background: #f8fafc; }
.danger-button { background: var(--red); color: white; }
.danger-button:hover { background: #c82e3c; }
.auth-submit { width: 100%; min-height: 52px; font-size: 15px; }

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.security-note .app-icon { width: 17px; height: 17px; }

.auth-footer {
  position: absolute;
  z-index: 1;
  bottom: 34px;
  margin: 0;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  letter-spacing: .01em;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, background .2s;
}

.icon-button:hover { background: #f0f3f8; color: var(--ink); }

.app-shell { min-height: 100vh; background: var(--canvas); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 224px;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  color: white;
  background: var(--navy);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.05);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -2px;
  width: 2px;
  height: 0;
  background: var(--cobalt);
  animation: railGrow .8s .15s ease-out forwards;
}

@keyframes railGrow { to { height: 96px; } }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.sidebar-nav { display: grid; gap: 6px; margin-top: 38px; }

.nav-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255,255,255,.72);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: background .2s, color .2s, transform .2s;
}

.nav-item:hover { background: rgba(255,255,255,.07); color: white; }
.nav-item.is-active { background: #0b4fa9; color: white; box-shadow: inset 3px 0 0 var(--cobalt), 0 8px 18px rgba(0,0,0,.12); }
.nav-item .app-icon { width: 19px; height: 19px; }

.sidebar-bottom { margin-top: auto; }

.sync-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 5px rgba(16,168,107,.09);
}

.sync-state strong,
.profile-row strong { display: block; font-size: 12px; font-weight: 700; }
.sync-state small,
.profile-row small { display: block; margin-top: 4px; color: rgba(255,255,255,.55); font-size: 10px; line-height: 1.45; }

.profile-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 14px 4px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0b55c4;
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-logout { color: rgba(255,255,255,.55); }
.sidebar-logout:hover { color: white; background: rgba(255,255,255,.08); }

.workspace {
  min-height: 100vh;
  margin-left: 224px;
  padding: 28px clamp(22px, 3vw, 48px) 52px;
  transition: margin-right .3s cubic-bezier(.2,.8,.2,1);
}

.mobile-header,
.mobile-nav { display: none; }

.view { display: none; max-width: 1320px; margin: 0 auto; animation: viewIn .24s ease-out; }
.view.is-active { display: block; }

@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.view-header {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.view-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 2.2vw, 32px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.045em;
}

.view-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header-actions { display: flex; gap: 10px; align-items: center; }

.search-control {
  width: min(320px, 28vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: white;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}

.search-control:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(11,92,255,.08); }
.search-control .app-icon { width: 17px; height: 17px; flex: 0 0 17px; }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-control input::placeholder { color: var(--faint); }
.search-control kbd { min-width: 23px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafc; color: var(--faint); font: 10px/1 monospace; text-align: center; }
.search-control--small { width: 240px; }

.metrics-band {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.metrics-band::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--cobalt);
}

.metrics-band--three { grid-template-columns: repeat(3, 1fr); }

.metric {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px clamp(14px, 2vw, 26px);
  border-right: 1px solid var(--line);
}

.metric:last-child { border-right: 0; }

.metric-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--cobalt-soft);
  color: var(--cobalt);
}

.metric-icon .app-icon { width: 20px; height: 20px; }
.metric small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.metric strong { display: block; color: var(--ink); font-size: 24px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.metric em { display: block; margin-top: 7px; color: var(--emerald); font-size: 10px; font-style: normal; font-weight: 700; }

.section-toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar-left { display: flex; align-items: center; gap: 12px; }

.select-control {
  position: relative;
  min-width: 145px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.select-control select {
  width: 100%;
  height: 100%;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 35px 0 12px;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.select-control > .app-icon:last-child { position: absolute; right: 10px; width: 14px; height: 14px; pointer-events: none; }
.date-select { min-width: 210px; height: 44px; padding-left: 12px; }
.date-select > .app-icon:first-child { width: 17px; height: 17px; flex: 0 0 17px; }
.date-select select { padding-left: 0; }
.count-label { color: var(--faint); font-size: 11px; }

.secondary-icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.secondary-icon-button:hover { color: var(--cobalt); border-color: #9ab9f5; }
.secondary-icon-button.is-loading .app-icon { animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.data-surface,
.chart-surface {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.table-scroll { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table thead { background: #fbfcfe; }
.data-table th {
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: #5d6c83;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  min-height: 70px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: #30425d;
  font-size: 13px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s, box-shadow .15s; }
.data-table tbody tr:hover { background: #f9fbff; }
.pages-table th:nth-child(1) { width: 23%; }
.pages-table th:nth-child(2) { width: 18%; }
.pages-table th:nth-child(3) { width: 23%; }
.pages-table th:nth-child(4) { width: 13%; }
.pages-table th:nth-child(5) { width: 16%; }
.pages-table th:nth-child(6) { width: 7%; }

.page-row.is-selected { background: var(--cobalt-soft); box-shadow: inset 3px 0 0 var(--cobalt); }
.page-cell { display: flex; align-items: center; gap: 10px; }
.row-expand { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.row-expand:hover { background: white; color: var(--cobalt); }
.row-expand .app-icon { width: 14px; height: 14px; transition: transform .2s; }
.page-row.is-selected .row-expand .app-icon { transform: rotate(90deg); }
.cell-primary { display: block; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cell-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.rule-code { font-size: 12px; color: #51617a; }

.pixel-stack { display: flex; flex-wrap: wrap; gap: 4px; }
.pixel-tag {
  min-width: 116px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  line-height: 1.15;
}
.pixel-tag .app-icon { width: 13px; height: 13px; flex: 0 0 13px; color: var(--cobalt); }
.pixel-tag strong { display: block; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.pixel-tag small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .02em; }
.more-pixels { align-self: center; color: var(--muted); font-size: 10px; font-weight: 700; }

.status-label { display: inline-flex; align-items: center; gap: 6px; color: var(--emerald); font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-label.is-paused { color: var(--amber); }
.status-label.is-pending { color: #8a6c1b; }
.status-label.is-error { color: var(--red); }

.row-actions { display: flex; justify-content: flex-end; }
.row-menu-button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.row-menu-button:hover { background: white; color: var(--ink); box-shadow: var(--shadow-sm); }
.row-menu-button .app-icon { width: 16px; height: 16px; }

.table-footer {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.pagination { display: flex; gap: 5px; }
.pagination button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--muted); cursor: pointer; font-size: 11px; }
.pagination button:hover:not(:disabled) { border-color: #96b7f4; color: var(--cobalt); }
.pagination button.is-current { border-color: var(--cobalt); background: var(--cobalt); color: white; }
.pagination button:disabled { cursor: not-allowed; opacity: .45; }
.pagination .app-icon { width: 13px; height: 13px; }
.page-size { justify-self: end; }

.empty-state { padding: 70px 20px; color: var(--muted); text-align: center; }
.empty-state .empty-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 12px; background: var(--cobalt-soft); color: var(--cobalt); }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 0; font-size: 12px; }

.surface-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}
.surface-heading h2 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.surface-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.chart-legend span { width: 18px; height: 3px; border-radius: 2px; background: var(--cobalt); }
.chart-surface { margin-bottom: 18px; }
.leads-chart { min-height: 300px; padding: 0 20px 18px; }
.leads-chart svg { width: 100%; height: 280px; overflow: visible; }
.chart-grid { stroke: #dfe5ed; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis-label { fill: #7c899d; font: 10px "Manrope", sans-serif; }
.chart-line { fill: none; stroke: var(--cobalt); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#chartAreaGradient); }
.chart-dot { fill: var(--cobalt); stroke: white; stroke-width: 3; }
.chart-value { fill: #293c59; font: 700 10px "Manrope", sans-serif; text-anchor: middle; }
.stats-table-surface { margin-top: 0; }
.stats-table-surface .data-table th:nth-child(1) { width: 23%; }
.stats-table-surface .data-table th:nth-child(2) { width: 17%; }
.trend { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; }
.trend.is-up { color: var(--emerald); }
.trend.is-down { color: var(--red); }
.sparkline { width: 56px; height: 18px; margin-left: 9px; vertical-align: middle; }
.domain-link { color: var(--cobalt); font-weight: 700; }

.domains-surface { margin-top: 18px; }
.domain-name { display: flex; align-items: center; gap: 9px; }
.domain-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--cobalt-soft); color: var(--cobalt); }
.domain-icon .app-icon { width: 15px; height: 15px; }
.proxy-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.cloud-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: transparent;
  opacity: 0;
  transition: opacity .25s;
}
.overlay.is-visible { opacity: 1; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  width: min(420px, 100vw);
  background: white;
  box-shadow: -18px 0 55px rgba(3, 27, 51, .14);
  transform: translateX(102%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-form { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.drawer-header,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-header h2,
.modal-header h2,
.confirm-card h2 { margin: 0; color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.025em; }
.drawer-header p,
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.drawer-body { overflow-y: auto; padding: 24px 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: block; }
.form-field--wide { grid-column: 1 / -1; }
.form-field > span { display: block; margin-bottom: 7px; color: #3d4d67; font-size: 12px; font-weight: 700; }
.form-field small { display: block; margin-top: 6px; color: var(--faint); font-size: 10px; }
.pixels-editor { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.editor-heading h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 800; }
.editor-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.editor-heading > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.pixel-editor-list { display: grid; gap: 10px; }
.pixel-editor-row { position: relative; display: grid; grid-template-columns: 1fr 34px; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.pixel-editor-row .form-field > span { font-size: 10px; }
.pixel-editor-row .form-field:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
.pixel-editor-row .remove-pixel { grid-column: 2; grid-row: 1; }
.remove-pixel { align-self: end; width: 34px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); cursor: pointer; }
.remove-pixel:hover { border-color: #f3a4ad; background: var(--red-soft); color: var(--red); }
.remove-pixel .app-icon { width: 16px; height: 16px; }
.dashed-button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; border: 1px dashed #8db2ff; background: #f8fbff; color: var(--cobalt); }
.dashed-button:hover { border-color: var(--cobalt); background: var(--cobalt-soft); }
.dashed-button .app-icon { width: 15px; height: 15px; }
.drawer-footer,
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 26px; border-top: 1px solid var(--line); background: white; }

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(3, 27, 51, .42);
  backdrop-filter: blur(4px);
  animation: modalFade .2s ease-out;
}
@keyframes modalFade { from { opacity: 0; } }
.modal-card {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-body { display: grid; gap: 16px; padding: 22px 26px; }
.domain-record-grid { gap: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.switch-row > span strong { display: block; color: var(--ink); font-size: 12px; }
.switch-row > span small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 40px; height: 22px; flex: 0 0 40px; border-radius: 999px; background: #c7d0dc; transition: background .2s; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(3,27,51,.24); transition: transform .2s; }
.switch-row input:checked + i { background: var(--cobalt); }
.switch-row input:checked + i::after { transform: translateX(18px); }
.switch-row input:focus-visible + i { outline: 3px solid rgba(11,92,255,.18); outline-offset: 2px; }
.info-strip { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid #c9dafb; border-radius: 8px; background: #f3f7ff; color: #405679; font-size: 11px; line-height: 1.45; }
.info-strip .app-icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--cobalt); }
.domain-result { padding: 12px; border-radius: 8px; font-size: 11px; line-height: 1.5; }
.domain-result.is-success { display: block; border: 1px solid #b9ead4; background: var(--emerald-soft); color: #0b7650; }
.domain-result.is-error { display: block; border: 1px solid #f4bdc4; background: var(--red-soft); color: #a42331; }
.ns-result { display: grid; gap: 8px; margin-top: 9px; }
.ns-copy { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #b9decf; border-radius: 7px; background: white; color: #176849; cursor: pointer; font: 600 10px/1.4 monospace; text-align: left; }
.ns-copy .app-icon { width: 14px; height: 14px; flex: 0 0 14px; }

.confirm-card { max-width: 400px; padding: 28px; text-align: center; }
.confirm-icon { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 13px; background: var(--red-soft); color: var(--red); }
.confirm-icon .app-icon { width: 22px; height: 22px; }
.confirm-card p { margin: 10px auto 22px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); box-shadow: 0 16px 38px rgba(3,27,51,.16); font-size: 11px; line-height: 1.5; animation: toastIn .25s ease-out; pointer-events: auto; }
.toast .app-icon { width: 17px; height: 17px; flex: 0 0 17px; color: var(--emerald); }
.toast.is-error .app-icon { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

body.has-overlay { overflow: hidden; }

@media (min-width: 1200px) {
  body.drawer-open .workspace { margin-right: 420px; padding-left: 32px; padding-right: 32px; }
  body.drawer-open .view-header h1 { white-space: nowrap; }
  body.drawer-open .view-header .search-control { width: 280px; }
}

@media (max-width: 1150px) {
  .workspace { padding-left: 24px; padding-right: 24px; }
  .metric { padding-left: 16px; padding-right: 16px; }
  .metric-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .pages-table th:nth-child(3), .pages-table td:nth-child(3) { display: none; }
  .pages-table th:nth-child(1) { width: 29%; }
  .pages-table th:nth-child(2) { width: 25%; }
  .pages-table th:nth-child(4) { width: 18%; }
  .pages-table th:nth-child(5) { width: 20%; }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding: 86px 18px 92px; }
  .mobile-header { position: fixed; inset: 0 0 auto; z-index: 40; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: var(--navy); color: white; box-shadow: 0 8px 24px rgba(3,27,51,.12); }
  .mobile-header .sidebar-brand { padding: 0; font-size: 15px; }
  .mobile-header .brand-mark { width: 29px; height: 29px; flex-basis: 29px; border-width: 6px; }
  .mobile-header .icon-button { color: rgba(255,255,255,.72); }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 40; height: 68px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(3,27,51,.08); backdrop-filter: blur(12px); }
  .mobile-nav .nav-item { min-height: 50px; flex-direction: column; justify-content: center; gap: 3px; padding: 0; color: var(--muted); font-size: 10px; text-align: center; }
  .mobile-nav .nav-item:hover { background: var(--cobalt-soft); color: var(--cobalt); }
  .mobile-nav .nav-item.is-active { background: var(--cobalt-soft); color: var(--cobalt); box-shadow: none; }
  .mobile-nav .nav-item .app-icon { width: 18px; height: 18px; }
  .view-header { flex-direction: column; align-items: stretch; margin-bottom: 18px; }
  .header-actions { width: 100%; }
  .search-control { width: auto; flex: 1 1 auto; }
  .metrics-band { grid-template-columns: repeat(2, 1fr); }
  .metrics-band--three { grid-template-columns: repeat(3, 1fr); }
  .metric { min-height: 92px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-last-child(-n+2) { border-bottom: 0; }
  .metrics-band--three .metric { border-bottom: 0; }
  .metrics-band--three .metric:nth-child(2) { border-right: 1px solid var(--line); }
  .metric em { display: none; }
  .pages-table th:nth-child(2), .pages-table td:nth-child(2), .pages-table th:nth-child(5), .pages-table td:nth-child(5) { display: none; }
  .pages-table th:nth-child(1) { width: 48%; }
  .pages-table th:nth-child(4) { width: 35%; }
  .pages-table th:nth-child(6) { width: 17%; }
  .chart-surface .surface-heading { padding-bottom: 4px; }
  .leads-chart { overflow-x: auto; }
  .leads-chart svg { min-width: 680px; }
  .overlay { background: rgba(3, 27, 51, .18); backdrop-filter: blur(2px); }
}

@media (max-width: 600px) {
  .auth-screen { padding: 24px 14px 74px; background-size: 56px 56px; }
  .auth-card { padding: 36px 22px 28px; }
  .auth-card h1 { font-size: 25px; }
  .workspace { padding-left: 12px; padding-right: 12px; }
  .view-header h1 { font-size: 25px; }
  .view-header p { line-height: 1.5; }
  .header-actions { align-items: stretch; }
  .header-actions .search-control { min-width: 0; }
  .header-actions .primary-button { width: 44px; flex: 0 0 44px; padding: 0; font-size: 0; }
  .header-actions .primary-button .app-icon { width: 19px; height: 19px; }
  .metrics-band,
  .metrics-band--three { grid-template-columns: repeat(2, 1fr); }
  .metrics-band--three .metric { border-bottom: 1px solid var(--line); }
  .metrics-band--three .metric:nth-child(2) { border-right: 0; }
  .metrics-band--three .metric:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .metric { min-height: 84px; gap: 10px; padding: 13px; }
  .metric-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .metric-icon .app-icon { width: 17px; height: 17px; }
  .metric small { font-size: 11px; }
  .metric strong { font-size: 21px; }
  .count-label { display: none; }
  .data-table th { padding: 0 10px; }
  .data-table td { padding: 10px; }
  .page-cell { gap: 5px; }
  .table-footer { grid-template-columns: 1fr auto; }
  .pagination { display: none; }
  .page-size { justify-self: end; }
  .surface-heading { align-items: flex-start; padding: 15px 13px; }
  .surface-heading .search-control { width: 145px; flex: 0 0 145px; }
  .surface-heading .secondary-button { width: 40px; min-height: 40px; padding: 0; font-size: 0; }
  .surface-heading .secondary-button .app-icon { width: 17px; height: 17px; }
  .drawer-header, .drawer-body, .drawer-footer, .modal-header, .modal-body, .modal-footer { padding-left: 18px; padding-right: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field--wide { grid-column: auto; }
  .modal-shell { padding: 12px; align-items: end; }
  .modal-card { border-radius: 16px 16px 10px 10px; }
  .domain-record-grid { grid-template-columns: 1fr 1fr; }
  .date-select { width: 100%; }
  .stats-table-surface .data-table { min-width: 650px; }
  .domains-surface .data-table { min-width: 720px; }
  .toast-region { right: 16px; bottom: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
