:root {
  color-scheme: light;
  --font-body: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Lexend', sans-serif;
  --font-sans: var(--font-body);
  --font-mono: 'JetBrains Mono', monospace;
  --bg: #eef4ff;
  --bg-elevated: rgba(255, 255, 255, 0.82);
  --bg-soft: rgba(244, 248, 255, 0.92);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-muted: rgba(236, 242, 252, 0.85);
  --line: rgba(56, 82, 133, 0.12);
  --line-strong: rgba(56, 82, 133, 0.22);
  --text: #11203a;
  --text-soft: #4b648f;
  --text-muted: #7283a1;
  --accent: #0fb2e0;
  --accent-2: #5867ff;
  --accent-3: #11b46c;
  --accent-primary: var(--accent);
  --accent-purple: var(--accent-2);
  --danger: #e24d67;
  --warning: #c98817;
  --bg-primary: var(--bg);
  --shadow: 0 25px 80px rgba(66, 100, 160, 0.18);
  --shadow-soft: 0 16px 38px rgba(66, 100, 160, 0.14);
  --body-gradient-start: rgba(248, 250, 255, 0.94);
  --body-gradient-end: rgba(233, 241, 255, 1);
  --glow-1: rgba(15, 178, 224, 0.16);
  --glow-2: rgba(88, 103, 255, 0.14);
  --table-head-bg: rgba(245, 248, 255, 0.96);
  --popover-bg: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --topbar-height: 60px;
  --sidebar-width: 260px;
  --content-width: 1400px;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #08111f;
  --bg-elevated: rgba(12, 24, 40, 0.72);
  --bg-soft: rgba(16, 34, 57, 0.58);
  --surface: rgba(9, 20, 34, 0.8);
  --surface-strong: rgba(14, 29, 48, 0.92);
  --surface-muted: rgba(10, 22, 37, 0.58);
  --line: rgba(166, 194, 230, 0.14);
  --line-strong: rgba(166, 194, 230, 0.24);
  --text: #edf4ff;
  --text-soft: #a4b8d6;
  --text-muted: #7f93b0;
  --accent: #66e0ff;
  --accent-2: #7d7cff;
  --accent-3: #4de28e;
  --accent-primary: var(--accent);
  --accent-purple: var(--accent-2);
  --danger: #ff6b81;
  --warning: #ffb84d;
  --bg-primary: var(--bg);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.2);
  --body-gradient-start: rgba(8, 17, 31, 0.8);
  --body-gradient-end: rgba(8, 17, 31, 1);
  --glow-1: rgba(102, 224, 255, 0.18);
  --glow-2: rgba(125, 124, 255, 0.16);
  --table-head-bg: rgba(8, 19, 32, 0.94);
  --popover-bg: rgba(8, 19, 32, 0.98);
  --glass-border: var(--line);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--glow-1), transparent 30%),
    radial-gradient(circle at top right, var(--glow-2), transparent 32%),
    linear-gradient(180deg, var(--body-gradient-start), var(--body-gradient-end));
  background-color: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6,
.headline,
.brand strong {
  font-family: var(--font-heading);
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.1rem;
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
}

body::before {
  width: 22rem;
  height: 22rem;
  top: -6rem;
  left: -4rem;
  background: var(--glow-1);
}

body::after {
  width: 18rem;
  height: 18rem;
  bottom: 5rem;
  right: -3rem;
  background: var(--glow-2);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.app-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 18, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 20;
}

.app-shell.sidebar-open .app-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(86vw, var(--sidebar-width));
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-elevated), var(--surface-strong));
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  transform: translateX(-102%);
  transition: transform 240ms ease;
  z-index: 30;
}

.app-shell.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar-top,
.sidebar-foot,
.topbar,
.hero-panel,
.glass-card,
.table-card,
.progress-card,
.toast,
.nav-link,
.stat-card,
.kpi-band,
.filter-bar,
.results-toolbar,
.settings-stack > .glass-card,
.history-item {
  backdrop-filter: blur(20px);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand strong,
.nav-link strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand small,
.nav-link small,
.eyebrow {
  display: block;
  font-size: 0.69rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgba(102, 224, 255, 0.2), rgba(125, 124, 255, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-orb {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(102, 224, 255, 0.45);
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem 0.65rem 0.8rem;
  border-radius: 0.9rem;
  text-decoration: none;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  transform: none;
  border-color: rgba(56, 82, 133, 0.08);
  border-left-color: var(--accent);
  color: var(--text);
  background: rgba(255, 255, 255, 0.42);
}

.nav-icon {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-icon .icon {
  font-size: 1rem;
}

.nav-icon svg,
.brand-glyph {
  width: 18px;
  height: 18px;
  display: block;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-title-stack {
  display: grid;
  gap: 0.55rem;
}

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

.status-pill,
.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.8rem;
}

.status-pill.success {
  border-color: rgba(77, 226, 142, 0.35);
  color: var(--accent-3);
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent-3);
  box-shadow: 0 0 14px rgba(77, 226, 142, 0.55);
}

.main-panel {
  min-height: 100vh;
  padding: 0.8rem;
}

.topbar {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: min(100%, var(--content-width));
  margin: 0 auto 0.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, var(--surface), var(--surface-muted));
  box-shadow: var(--shadow-soft);
}

.topbar-leading,
.topbar-actions,
.theme-toggle,
.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.page-title {
  margin: 0.12rem 0 0;
  font-size: clamp(1.35rem, 1.9vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.content-shell {
  width: min(100%, var(--content-width));
  margin: 0 auto 1.6rem;
  display: grid;
  gap: 0.8rem;
}

.hero-panel,
.glass-card,
.table-card,
.progress-card,
.toast {
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, var(--surface), var(--surface-strong));
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1.2rem;
}

.hero-panel::after {
  content: '';
  position: absolute;
  inset: auto -6rem -8rem auto;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(102, 224, 255, 0.22), transparent 68%);
}

.hero-grid,
.stats-grid,
.extractor-layout,
.settings-grid,
.history-grid {
  display: grid;
  gap: 0.8rem;
}

.hero-grid {
  grid-template-columns: 1fr;
}

.hero-copy {
  display: grid;
  gap: 0.8rem;
}

.headline {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.lead {
  margin: 0;
  max-width: 52rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.hero-actions,
.toolbar-actions,
.inline-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-meta,
.meta-list,
.settings-stack,
.quota-list,
.history-list,
.field-grid,
.filter-grid,
.form-stack,
.results-stack {
  display: grid;
  gap: 0.8rem;
}

.kpi-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.kpi-band.compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stat-card {
  padding: 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.stat-card h3,
.glass-card h3,
.table-card h3,
.settings-stack h3 {
  margin: 0;
  font-size: 1.1rem;
}

.stat-value {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.glass-card,
.table-card {
  padding: 1.25rem;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.section-head p,
.section-copy,
.muted,
.table-caption {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
}

.button,
.icon-btn,
.toggle,
.menu-toggle,
.theme-toggle {
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button,
.icon-btn {
  border: 1px solid transparent;
  cursor: pointer;
}

.button {
  min-height: 2.35rem;
  padding: 0.5rem 1rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
}

.button:hover,
.icon-btn:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08111f;
  font-weight: 800;
}

.button.secondary {
  border-color: var(--line-strong);
}

.button.ghost {
  color: var(--text-soft);
}

.button.success {
  background: linear-gradient(135deg, rgba(77, 226, 142, 0.92), rgba(55, 180, 155, 0.92));
  color: #04140d;
  font-weight: 800;
}

.button.danger {
  background: rgba(255, 107, 129, 0.14);
  border-color: rgba(255, 107, 129, 0.3);
  color: #ffd7de;
}

.icon-btn {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.icon-btn span,
.menu-toggle span,
.sidebar-close span,
.progress-card-head .icon-btn span {
  position: relative;
  display: block;
  width: 1rem;
  height: 1rem;
}

.menu-toggle span::before,
.menu-toggle span::after,
.menu-toggle span,
.sidebar-close span::before,
.sidebar-close span::after,
.progress-card-head .icon-btn span::before,
.progress-card-head .icon-btn span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle span {
  top: 0.42rem;
}

.menu-toggle span::before {
  top: -0.35rem;
}

.menu-toggle span::after {
  top: 0.35rem;
}

.sidebar-close span::before,
.progress-card-head .icon-btn span::before {
  top: 0.45rem;
  transform: rotate(45deg);
}

.sidebar-close span::after,
.progress-card-head .icon-btn span::after {
  top: 0.45rem;
  transform: rotate(-45deg);
}

.theme-toggle {
  min-height: 2.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.theme-toggle-track {
  width: 2.4rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle-thumb {
  width: 0.96rem;
  height: 0.96rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translateX(0);
  transition: transform 180ms ease;
}

[data-theme='dark'] .theme-toggle-thumb {
  transform: translateX(1.02rem);
}

.theme-label {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Material Symbols Outlined';
  font-size: 20px;
  line-height: 1;
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.button .icon,
.badge .icon,
.pill .icon,
.validation-badge .icon,
.auth-feature-icon .icon {
  font-size: 18px;
}

.icon-btn .icon,
.sort-indicator .icon,
.saved-search-remove .icon {
  font-size: 18px;
}

.field-grid,
.filter-grid,
.stats-grid,
.settings-grid,
.history-grid,
.extractor-layout {
  grid-template-columns: 1fr;
}

.field,
.field-inline,
.slider-field {
  display: grid;
  gap: 0.35rem;
}

.field label,
.slider-field label,
.field-inline label {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.field-inline input {
  width: 100%;
  min-height: 36px;
  padding: 0.65rem 0.8rem;
  border-radius: 0.8rem;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 0 0 1px transparent;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.field-inline input:focus {
  border-color: rgba(102, 224, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(102, 224, 255, 0.12);
}

.field-hint,
.microcopy {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.validation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  white-space: nowrap;
}

.validation-badge.valid {
  border-color: rgba(77, 226, 142, 0.32);
  color: var(--accent-3);
  background: rgba(77, 226, 142, 0.08);
}

.validation-badge.invalid {
  border-color: rgba(255, 107, 129, 0.34);
  color: var(--danger);
  background: rgba(255, 107, 129, 0.08);
}

.validation-badge.neutral {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
}

.status-card {
  display: grid;
  gap: 0.8rem;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-card.not-configured {
  border-style: dashed;
}

.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.7rem;
  cursor: help;
}

.field-inline {
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.6rem;
}

.toggle-row,
.checkbox-row,
.quota-row,
.history-item,
.summary-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.toggle {
  width: 3rem;
  height: 1.7rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 0.14rem;
  left: 0.14rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 180ms ease;
}

.toggle.active {
  background: linear-gradient(135deg, rgba(102, 224, 255, 0.65), rgba(125, 124, 255, 0.65));
}

.toggle.active::after {
  transform: translateX(1.25rem);
}

.checkbox-row {
  justify-content: flex-start;
  gap: 0.75rem;
}

.checkbox-row input,
.table-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.slider-field output {
  justify-self: start;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.slider-field input[type='range'] {
  width: 100%;
  accent-color: var(--accent);
}

.quota-list {
  margin-top: 0.5rem;
}

.quota-row {
  align-items: center;
}

.quota-row strong {
  font-size: 0.92rem;
}

.quota-progress {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.quota-progress span,
.progress-value {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  background-size: 200% 100%;
  animation: shimmer 2.4s linear infinite;
}

.progress-track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.progress-dialog {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 10, 18, 0.56);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 40;
}

.progress-dialog.open {
  opacity: 1;
  pointer-events: auto;
}

.progress-card {
  width: min(100%, 33rem);
  padding: 1rem;
}

.progress-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.progress-description {
  color: var(--text-soft);
}

.progress-current-place {
  margin: -0.25rem 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.5rem;
  z-index: 50;
}

.toast {
  width: min(90vw, 22rem);
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.25rem;
  animation: slideIn 180ms ease;
}

.toast strong {
  font-size: 0.84rem;
}

.toast p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.toast.success {
  border-color: rgba(77, 226, 142, 0.26);
}

.toast.error {
  border-color: rgba(255, 107, 129, 0.26);
}

.extractor-layout {
  align-items: start;
}

.table-card {
  overflow: hidden;
}

.results-toolbar,
.filter-bar {
  display: grid;
  gap: 0.7rem;
}

.results-toolbar-main,
.results-summary-badges,
.table-footer,
.table-footer-actions,
.details-panel,
.rating-cell {
  display: flex;
  gap: 0.7rem;
}

.toolbar-actions {
  justify-content: flex-start;
}

.results-toolbar-main,
.table-footer {
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.results-summary-badges,
.table-footer-actions,
.details-panel,
.rating-cell {
  align-items: center;
  flex-wrap: wrap;
}

.results-count-badge.subtle,
.pagination-pill,
.status-pill-inline {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.maps-table-wrap {
  max-width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  font-size: 12px;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head-bg);
  color: var(--text-soft);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tbody tr:nth-child(odd) {
  background: rgba(17, 32, 58, 0.02);
}

.data-table tbody tr:hover {
  background: rgba(15, 178, 224, 0.06);
}

.details-row:hover {
  background: transparent !important;
}

.details-panel {
  justify-content: space-between;
  padding: 0.2rem 0;
  color: var(--text-soft);
}

.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable.active {
  color: var(--accent);
}

.sortable .sort-indicator {
  margin-left: 0.3rem;
  font-family: var(--font-mono);
}

.empty-state {
  padding: 1.8rem 1rem;
  text-align: center;
  color: var(--text-soft);
}

.empty-state h3 {
  margin: 0.4rem 0 0.25rem;
  color: var(--text);
  font-size: 1.1rem;
}

.empty-state p,
.empty-state .eyebrow {
  max-width: 28rem;
  margin-inline: auto;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--text-soft);
}

.history-list {
  gap: 0.7rem;
}

.history-item {
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
}

.history-main {
  flex: 1;
  min-width: 14rem;
}

.history-main h4 {
  margin: 0;
}

.history-main p,
.history-meta {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.chip-list.compact {
  margin-top: 0.7rem;
}

.saved-searches-block {
  display: grid;
  gap: 0.75rem;
}

.saved-searches-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.saved-search-list,
.activity-feed {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.saved-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.saved-search-chip small {
  color: var(--text-muted);
}

.saved-search-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(255, 107, 129, 0.14);
  color: var(--danger);
  font-weight: 700;
}

.saved-search-empty {
  font-size: 0.88rem;
}

.popover-anchor {
  position: relative;
}

.floating-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 14;
  min-width: 16rem;
  padding: 0.55rem;
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--popover-bg);
  box-shadow: var(--shadow-soft);
}

.popover-option {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.popover-option span {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.popover-option:hover {
  background: rgba(102, 224, 255, 0.12);
}

.column-popover {
  min-width: 13rem;
}

.results-note,
.notice {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 184, 77, 0.24);
  background: rgba(255, 184, 77, 0.08);
  color: var(--text-soft);
}

.summary-strip {
  display: grid;
  gap: 0.6rem;
}

.summary-chip {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.autocomplete-field {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  gap: 0.25rem;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--popover-bg);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.category-menu {
  gap: 0.55rem;
}

.autocomplete-group {
  display: grid;
  gap: 0.3rem;
}

.autocomplete-group-label {
  padding: 0.25rem 0.55rem 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.autocomplete-option {
  display: grid;
  gap: 0.18rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.autocomplete-option span {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.autocomplete-option:hover,
.autocomplete-option.active {
  background: rgba(102, 224, 255, 0.12);
}

.cost-strip {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cost-strip.prominent {
  margin-top: 0.25rem;
}

.cost-estimate-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(102, 224, 255, 0.2);
  background: linear-gradient(135deg, rgba(102, 224, 255, 0.12), rgba(125, 124, 255, 0.12));
}

.cost-estimate-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.cost-estimate-card span:last-child {
  color: var(--text-soft);
}

.cost-estimate-card.subtle {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.results-cost-meta {
  display: grid;
  gap: 0.25rem;
  min-width: min(100%, 24rem);
}

.results-cost-line {
  font-size: 0.88rem;
  color: var(--text-soft);
  text-align: right;
}

@media (max-width: 900px) {
  .results-cost-meta,
  .results-cost-line {
    text-align: left;
  }
}

.price-level-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.checkbox-row.compact {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.results-highlights {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.result-metric-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.result-metric-card strong {
  font-size: 1.2rem;
}

.result-metric-card span:last-child {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.data-table-wide {
  min-width: 1180px;
}

.result-primary {
  display: grid;
  gap: 0.45rem;
  min-width: 12rem;
}

.website-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.website-status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--text-muted);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.website-status-dot.checking {
  background: var(--warning);
}

.website-status-dot.reachable {
  background: var(--accent-3);
}

.website-status-dot.dead,
.website-status-dot.unreachable {
  background: var(--danger);
}

.history-preview-panel {
  margin-top: 1rem;
}

.result-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(102, 224, 255, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-badge.subtle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--accent);
  text-decoration: none;
}

.link-icon:hover {
  background: rgba(102, 224, 255, 0.1);
  text-decoration: none;
}

.rating-stars {
  color: #ffcc66;
  letter-spacing: 0.04em;
}

.rating-value {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.table-footer {
  margin-top: 0.7rem;
}

.table-footer-meta {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.mobile-only {
  display: none;
}

.mobile-details-btn {
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.link {
  color: var(--accent);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

@keyframes shimmer {
  0% {
    background-position: 0 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 880px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) 1fr;
  }

  .sidebar {
    transform: translateX(0);
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .sidebar-close,
  .menu-toggle {
    display: none;
  }

  .app-backdrop {
    display: none;
  }

  .main-panel {
    padding: 1rem 1rem 1.5rem 0;
  }

  .hero-grid,
  .extractor-layout,
  .settings-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .results-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .results-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(20rem, 0.8fr);
  }

  .kpi-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 879px) {
  .theme-label {
    display: none;
  }

  .topbar {
    padding: 0.7rem 0.85rem;
  }

  .topbar-leading {
    width: 100%;
  }

  .topbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .main-panel {
    padding: 0.75rem;
  }

  .topbar,
  .hero-panel,
  .glass-card,
  .table-card {
    border-radius: 1rem;
  }

  .button,
  .theme-toggle {
    width: 100%;
  }

  .topbar-actions,
  .hero-actions,
  .toolbar-actions,
  .inline-actions,
  .form-actions {
    width: 100%;
  }

  .field-inline {
    grid-template-columns: 1fr;
  }

  .results-toolbar {
    gap: 0.75rem;
  }

  .mobile-hide {
    display: none;
  }

  .mobile-only {
    display: flex;
  }

  .details-panel {
    display: grid;
    gap: 0.45rem;
  }

  .table-footer,
  .table-footer-actions,
  .results-toolbar-main {
    align-items: stretch;
  }

  .toast-stack {
    right: 0.75rem;
    left: 0.75rem;
  }

  .toast {
    width: auto;
  }
}

.user-panel,
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-panel {
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.7rem;
}

.user-copy {
  min-width: 0;
  display: grid;
}

.user-copy strong,
.user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy small,
.topbar-user-copy {
  color: var(--muted, rgba(255, 255, 255, 0.6));
}

.user-avatar {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ff7a18, #ffb347);
  color: #111;
  flex: 0 0 auto;
}

.user-avatar.small {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.button.compact {
  width: auto;
  min-width: 0;
  padding: 0.45rem 0.75rem;
}

.history-item.compact {
  padding-block: 0.8rem;
}

body.auth-route .sidebar,
body.auth-route .topbar {
  display: none;
}

body.auth-route .main-panel {
  padding: 0;
  min-height: 100vh;
}

body.auth-route .content-shell {
  min-height: 100vh;
  padding: 0;
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(102, 224, 255, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(125, 124, 255, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(8, 17, 31, 0.92), rgba(8, 17, 31, 1));
}

.auth-panel-left {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  color: white;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before,
.auth-panel-left::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-panel-left::before {
  width: 20rem;
  height: 20rem;
  top: -5rem;
  right: -5rem;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(10px);
}

.auth-panel-left::after {
  width: 16rem;
  height: 16rem;
  bottom: -4rem;
  left: -4rem;
  background: rgba(8, 17, 31, 0.18);
  filter: blur(16px);
}

.auth-panel-left > * {
  position: relative;
  z-index: 1;
}

.auth-panel-copy {
  max-width: 32rem;
  margin-bottom: 2rem;
}

.auth-panel-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.auth-panel-tagline-main {
  margin: 1rem 0 0;
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.88);
}

.auth-panel-tagline-sub {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.auth-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
  max-width: 34rem;
}

.auth-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
}

.auth-feature-icon {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.95rem;
  font-weight: 800;
}

.auth-panel-right {
  flex: 0 0 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 1.5rem;
}

.auth-brand {
  margin-bottom: 1.25rem;
}

.auth-brand-inverse .brand-mark {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
}

.auth-brand-inverse .brand-orb {
  background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.7));
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.35);
}

.auth-brand-inverse small,
.auth-brand-inverse strong,
.auth-eyebrow-inverse {
  color: rgba(255, 255, 255, 0.94);
}

.auth-brand-inverse small,
.auth-eyebrow-inverse {
  opacity: 0.82;
}

.auth-card-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-head {
  margin-bottom: 1rem;
  text-align: center;
}

.auth-head p {
  max-width: 26rem;
  margin-inline: auto;
}

.auth-form {
  margin-bottom: 0.75rem;
}

.auth-form .field {
  gap: 0.55rem;
}

.auth-form .field input {
  min-height: 44px;
  padding: 0.8rem 0.9rem;
}

.auth-actions {
  margin-top: 0.5rem;
}

.auth-actions .button {
  width: 100%;
  min-height: 44px;
}

.auth-switch {
  margin: 0;
  color: var(--muted, rgba(255, 255, 255, 0.68));
  text-align: center;
}

@media (max-width: 768px) {
  .topbar-user-copy {
    display: none;
  }

  .user-panel {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .auth-panel-left {
    display: none;
  }

  .auth-panel-right {
    flex: 1;
    min-height: 100vh;
    padding: 1rem;
  }

  .auth-card {
    padding: 1.35rem;
    max-width: 460px;
  }
}
