:root {
  --bg: #07101f;
  --bg-deep: #040a14;
  --surface: #0d1829;
  --surface-raised: #111e31;
  --surface-soft: #142238;
  --surface-hover: #172942;
  --border: #22324a;
  --border-bright: #304763;
  --text: #eef5ff;
  --muted: #8d9cb2;
  --muted-bright: #b3c0d1;
  --blue: #3278ff;
  --blue-bright: #5593ff;
  --blue-soft: rgba(50, 120, 255, .13);
  --green: #38d996;
  --green-soft: rgba(56, 217, 150, .13);
  --amber: #f6b94b;
  --amber-soft: rgba(246, 185, 75, .13);
  --red: #ff6678;
  --red-soft: rgba(255, 102, 120, .13);
  --violet: #a77bf3;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .22);
  --max-width: 1480px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -8%, rgba(46, 111, 235, .12), transparent 31rem),
    linear-gradient(180deg, #081323 0, var(--bg) 46rem);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:not(:disabled), [role="button"] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}

::selection { color: #fff; background: rgba(50, 120, 255, .55); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(5, 12, 23, .65); }
::-webkit-scrollbar-thumb { background: #263a56; border: 2px solid #091423; border-radius: 999px; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: -4rem;
  padding: .7rem 1rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }

.app-header {
  position: sticky;
  z-index: 40;
  top: 0;
  height: 72px;
  border-bottom: 1px solid rgba(44, 64, 91, .72);
  background: rgba(7, 16, 31, .82);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 48px), var(--max-width));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(96, 151, 255, .55);
  border-radius: 11px;
  background: linear-gradient(145deg, #2f76ff, #1c4fc6);
  box-shadow: 0 8px 24px rgba(47, 118, 255, .25), inset 0 1px rgba(255, 255, 255, .22);
  color: white;
  font-weight: 900;
  letter-spacing: -.06em;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  right: -9px;
  top: -8px;
  border: 5px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 16px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.brand-large .brand-mark { width: 46px; height: 46px; border-radius: 13px; font-size: 18px; }
.brand-large .brand-copy strong { font-size: 20px; }
.brand-large .brand-copy small { font-size: 10px; }

.header-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted-bright);
  font-size: 13px;
  font-weight: 650;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); background: rgba(255, 255, 255, .045); }
.nav-icon { color: var(--muted); font-size: 15px; }
.nav-button { background: transparent; }
.logout-form { margin: 0; }
.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-left: 4px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-bright);
  background: rgba(255, 255, 255, .025);
  font-size: 12px;
}
.account-avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #dce8ff; background: var(--blue-soft); font-size: 11px; font-weight: 800; }

.page-shell { width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; padding: 42px 0 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.page-heading h1 { max-width: 720px; margin: 10px 0 8px; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.04em; }
.page-heading p { max-width: 700px; margin: 0; color: var(--muted-bright); font-size: 15px; }
.eyebrow, .step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7da9ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.step-kicker { margin-bottom: 6px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-dot-live { background: var(--green); box-shadow: 0 0 0 5px rgba(56, 217, 150, .09); }
.heading-stat { display: grid; min-width: 112px; padding: 13px 18px; border: 1px solid var(--border); border-radius: 13px; text-align: right; background: rgba(13, 24, 41, .72); }
.heading-stat span { font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.heading-stat small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 30, 49, .93), rgba(11, 22, 39, .96));
  box-shadow: 0 16px 40px rgba(0, 0, 0, .13);
}
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 26px 20px; }
.panel-header h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.025em; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel-index { color: rgba(128, 154, 189, .12); font: 800 38px/1 var(--mono); letter-spacing: -.08em; }
.compact-panel-header { padding-bottom: 15px; }

.api-key-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
  padding: 20px 22px;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  border-color: rgba(57, 93, 148, .72);
}
.api-key-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--blue-bright), #7858e8);
}
.api-key-summary { display: flex; min-width: 0; align-items: center; gap: 14px; }
.api-key-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(88, 145, 255, .4);
  border-radius: 11px;
  color: #a9c6ff;
  background: var(--blue-soft);
  font: 800 10px/1 var(--mono);
  letter-spacing: .04em;
}
.api-key-copy { min-width: 0; }
.api-key-copy .step-kicker { margin-bottom: 3px; }
.api-key-copy h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.api-key-copy p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.api-key-overview { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.api-key-status-line { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.api-key-state {
  display: inline-flex;
  min-height: 28px;
  padding: 0 10px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-bright);
  background: rgba(255, 255, 255, .025);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.api-key-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.api-key-state.is-loading { color: #77a7ff; border-color: rgba(71, 132, 255, .3); background: var(--blue-soft); }
.api-key-state.is-loading i { animation: breathe 1.2s ease-in-out infinite; }
.api-key-state.is-configured { color: var(--green); border-color: rgba(56, 217, 150, .28); background: var(--green-soft); }
.api-key-state.is-missing { color: var(--amber); border-color: rgba(246, 185, 75, .28); background: var(--amber-soft); }
.api-key-state.is-error { color: var(--red); border-color: rgba(255, 102, 120, .28); background: var(--red-soft); }
.api-key-masked {
  max-width: 210px;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(45, 65, 94, .8);
  border-radius: 7px;
  color: #9fb0c8;
  background: rgba(4, 10, 20, .48);
  font: 10px/1.2 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-key-editor {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(42, 61, 88, .8);
}
.api-key-form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 20px; }
.api-key-field { min-width: 0; }
.api-key-input-shell {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  background: #091525;
}
.api-key-input-shell:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50, 120, 255, .1); }
.api-key-input-shell input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 13px;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: 0;
  font-family: var(--mono);
  font-size: 12px;
}
.api-key-input-shell input::placeholder { color: #52627a; }
.api-key-input-shell .password-toggle { flex: 0 0 auto; border-left: 1px solid var(--border); }
.api-key-field > small { color: #65758d; font-size: 9px; }
.api-key-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.api-key-error { margin: 12px 0 0; color: #ff9baa; font-size: 11px; }
.billing-panel-compact {
  position: relative;
  margin-bottom: 18px;
  padding: 16px 18px;
  overflow: hidden;
  border-color: rgba(57, 93, 148, .72);
}
.billing-panel-compact::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--blue-bright), var(--green));
}
.billing-header-compact,
.billing-heading,
.billing-controls,
.billing-status-line,
.billing-buttons,
.compact-metric-heading,
.compact-statuses,
.compact-metric-meta,
.billing-compact-foot-meta {
  display: flex;
  align-items: center;
}
.billing-header-compact { justify-content: space-between; gap: 18px; }
.billing-heading { min-width: 0; gap: 10px; }
.billing-heading > div { min-width: 0; }
.billing-heading .step-kicker { margin-bottom: 2px; }
.billing-heading h2 { margin: 1px 0 0; font-size: 15px; }
.billing-heading p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.billing-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(85, 147, 255, .35);
  border-radius: 10px;
  color: var(--blue-bright);
  background: var(--blue-soft);
  font: 800 15px/1 var(--mono);
}
.billing-controls { min-width: 0; justify-content: flex-end; gap: 10px; }
.billing-status-line { min-width: 0; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.billing-buttons { gap: 7px; }
.billing-buttons .button { min-height: 34px; padding: 0 11px; white-space: nowrap; }
.billing-stale-badge {
  display: inline-flex;
  min-height: 22px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid rgba(246, 185, 75, .35);
  border-radius: 999px;
  color: #f5c56d;
  background: rgba(246, 185, 75, .1);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.billing-stale-badge[hidden] { display: none; }
.billing-compact-grid {
  display: grid;
  margin-top: 13px;
  grid-template-columns: minmax(245px, 1.35fr) repeat(3, minmax(135px, 1fr));
  gap: 8px;
}
.billing-compact-usage { display: contents; }
.compact-usage-metric {
  display: grid;
  min-width: 0;
  min-height: 105px;
  padding: 12px 13px;
  align-content: center;
  border: 1px solid rgba(75, 104, 148, .48);
  border-radius: 10px;
  background: rgba(12, 24, 43, .72);
}
.compact-credit-metric {
  border-color: rgba(56, 217, 150, .25);
  background: linear-gradient(145deg, rgba(30, 100, 78, .16), rgba(12, 24, 43, .78));
}
.compact-metric-heading { align-items: flex-start; justify-content: space-between; gap: 8px; }
.compact-metric-heading h3 { margin: 1px 0 0; font-size: 11px; }
.compact-statuses { justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.compact-statuses .api-key-state,
.compact-statuses .billing-stale-badge { min-height: 20px; padding: 0 7px; font-size: 7px; }
.compact-usage-metric > span,
.compact-metric-heading .step-kicker {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.compact-usage-metric > strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font: 800 20px/1.2 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-credit-metric > strong { color: #85e5ba; font-size: 27px; }
.compact-usage-metric > p,
.compact-usage-metric > small,
.compact-usage-metric > time {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}
.compact-usage-metric > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.compact-metric-meta { margin-top: 5px; justify-content: space-between; gap: 8px; }
.compact-metric-meta time { overflow: hidden; color: var(--muted); font: 8px/1.2 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.compact-metric-meta .text-button { flex: 0 0 auto; font-size: 8px; }
.compact-credit-metric.is-warning { border-color: rgba(246, 185, 75, .58); box-shadow: inset 0 0 0 1px rgba(246, 185, 75, .08); }
.compact-credit-metric.is-critical { border-color: rgba(255, 102, 120, .65); box-shadow: inset 0 0 0 1px rgba(255, 102, 120, .1); }
.compact-credit-metric.is-warning > strong { color: #ffd17d; }
.compact-credit-metric.is-critical > strong { color: #ff8d9a; }
.compact-credit-metric.is-stale { border-style: dashed; }
.billing-panel-compact.is-stale .billing-compact-grid { opacity: .84; }
.billing-compact-foot {
  display: grid;
  margin-top: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  color: var(--muted);
  font-size: 8px;
}
.billing-compact-foot > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.billing-compact-foot p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.billing-compact-foot time { flex: 0 0 auto; font-family: var(--mono); white-space: nowrap; }
.billing-compact-foot-meta { flex: 0 0 auto; justify-content: flex-end; gap: 8px; }
.billing-compact-foot a { color: #8eb4ff; font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.compact-settings-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(75, 104, 148, .34); }
.compact-settings-editor .api-key-form,
.compact-settings-editor .credit-balance-form { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 16px; }
.compact-settings-editor .field { min-width: 0; }
.compact-settings-editor .field > small { color: #65758d; font-size: 9px; line-height: 1.55; }
.compact-settings-editor .field a { color: #8ab2ff; text-decoration: underline; text-underline-offset: 2px; }
.credit-money-input {
  position: relative;
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  background: #091525;
}
.credit-money-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50, 120, 255, .1); }
.credit-money-input > span:first-child { position: absolute; left: 13px; z-index: 1; color: var(--muted); font: 700 11px/1 var(--mono); }
.credit-money-input > span:last-child { position: absolute; right: 13px; color: var(--muted); font: 700 8px/1 var(--mono); }
.credit-money-input input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 46px 0 27px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: 12px/1 var(--mono);
}
.credit-money-input input::placeholder { color: #52627a; }
.dashboard-grid { display: grid; grid-template-columns: minmax(340px, .86fr) minmax(540px, 1.4fr); gap: 18px; }
.panel-upload, .panel-preview, .panel-settings { min-width: 0; }
.panel-preview { grid-row: span 2; }
.panel-settings { grid-column: 1; }
.launch-panel { grid-column: 1 / -1; }

.drop-zone {
  position: relative;
  display: flex;
  min-height: 218px;
  margin: 0 26px 24px;
  padding: 28px 20px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  border: 1px dashed #385279;
  border-radius: 13px;
  background: rgba(7, 16, 31, .48);
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  cursor: pointer;
}
.drop-zone::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 110px;
  top: -75px;
  border-radius: 50%;
  background: var(--blue);
  opacity: .1;
  filter: blur(26px);
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--blue-bright); background: rgba(50, 120, 255, .07); transform: translateY(-1px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { display: grid; width: 46px; height: 46px; margin-bottom: 14px; place-items: center; border: 1px solid rgba(70, 133, 255, .4); border-radius: 13px; color: #8cb3ff; background: var(--blue-soft); font-size: 21px; font-weight: 300; }
.drop-title { font-size: 15px; font-weight: 750; }
.drop-copy { margin-top: 5px; color: var(--muted); font-size: 12px; }
.drop-copy strong { color: #80aaff; }
.drop-formats { margin-top: 18px; color: #667791; font: 700 9px/1 var(--mono); letter-spacing: .13em; }

.upload-status { margin: -7px 26px 20px; }
.upload-status-row { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted-bright); font-size: 11px; }
.upload-status-row span:last-child { font-family: var(--mono); }
.mini-progress { height: 3px; overflow: hidden; border-radius: 999px; background: #203149; }
.mini-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .2s ease; }
.upload-queue { display: grid; gap: 8px; margin: -7px 26px 24px; }
.queue-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 54px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 10px; background: rgba(7, 16, 31, .55); transition: border-color .15s, background .15s; }
.queue-file.is-active { border-color: rgba(65, 129, 255, .55); background: var(--blue-soft); }
.queue-file-button { display: contents; color: inherit; text-align: left; }
.file-type { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; color: #a9c4fb; background: #172b49; font: 800 9px/1 var(--mono); }
.file-meta { min-width: 0; }
.file-meta strong, .file-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta strong { font-size: 11px; }
.file-meta small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.queue-state { color: var(--green); font-size: 12px; }
.queue-state.is-loading { color: var(--amber); animation: spin 1s linear infinite; }
.queue-state.is-error { color: var(--red); }
.queue-remove { width: 28px; height: 28px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; }
.queue-remove:hover { color: var(--red); background: var(--red-soft); }
.field-error { margin: -8px 26px 22px; color: #ff9baa; font-size: 11px; }

.compact-field { display: grid; grid-template-columns: auto auto; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.compact-field select { min-width: 135px; height: 36px; padding: 0 32px 0 11px; border: 1px solid var(--border-bright); border-radius: 8px; color: var(--text); background: #0b1728; outline: none; text-transform: none; letter-spacing: 0; }
.compact-field select:focus { border-color: var(--blue); }

.empty-state { display: flex; min-height: 430px; padding: 35px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty-state h3 { margin: 20px 0 6px; font-size: 15px; }
.empty-state p { max-width: 330px; margin: 0; color: var(--muted); font-size: 12px; }
.empty-graphic { position: relative; display: grid; width: 76px; height: 70px; place-items: end center; }
.empty-graphic::before { content: ""; position: absolute; inset: 1px 9px 11px; border: 1px solid #30435f; border-radius: 9px; background: #101e32; transform: rotate(-6deg); }
.empty-graphic::after { content: ""; position: absolute; inset: 7px 2px 4px 16px; border: 1px solid #3c5274; border-radius: 9px; background: #14243a; box-shadow: var(--shadow); }
.empty-graphic i { z-index: 1; display: block; width: 28px; height: 3px; margin: 5px 0 0 11px; border-radius: 99px; background: #3a5378; }
.empty-graphic i:nth-child(2) { width: 36px; }
.empty-graphic i:nth-child(3) { width: 21px; margin-bottom: 16px; }

.dataset-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 26px 18px; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--border); }
.job-ai-strip { display: flex; min-height: 42px; margin: -5px 0 18px; padding: 8px 13px; align-items: center; gap: 13px; border: 1px solid rgba(85, 147, 255, .22); border-radius: 10px; background: rgba(12, 24, 43, .58); }
.job-ai-strip > .step-kicker { flex: 0 0 auto; }
.job-ai-strip dl { display: flex; min-width: 0; margin: 0; align-items: center; flex-wrap: wrap; gap: 6px 13px; }
.job-ai-strip dl > div { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.job-ai-strip dt { color: var(--muted); font-size: 8px; }
.job-ai-strip dd { margin: 0; color: var(--text); font: 800 9px/1 var(--mono); }
.job-ai-strip > small { margin-left: auto; color: var(--muted); font-size: 7px; text-align: right; }
.job-ai-strip code { color: var(--muted-bright); font-size: inherit; }
.dataset-stat { display: flex; min-width: 0; height: 68px; padding: 12px; align-items: center; gap: 10px; background: #0d192a; }
.dataset-stat-icon { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 15px; }
.dataset-stat-icon.is-blue { color: #6ea0ff; background: var(--blue-soft); }
.dataset-stat-icon.is-violet { color: #b28df5; background: rgba(167, 123, 243, .13); }
.dataset-stat-icon.is-amber { color: var(--amber); background: var(--amber-soft); }
.dataset-stat div { min-width: 0; }
.dataset-stat strong, .dataset-stat small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dataset-stat strong { font-size: 12px; }
.dataset-stat small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.table-frame { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: rgba(7, 16, 31, .48); }
.table-scroll { width: 100%; overflow: auto; }
.preview-frame { margin: 0 26px 26px; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th, .data-table td { height: 48px; padding: 0 15px; border-bottom: 1px solid rgba(34, 50, 74, .76); text-align: left; }
.data-table th { height: 42px; color: #7789a4; background: rgba(13, 25, 42, .92); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.data-table td { max-width: 260px; overflow: hidden; color: #bdc8d7; text-overflow: ellipsis; font-size: 11px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:not(.result-detail-row):hover td { background: rgba(255, 255, 255, .018); }
.data-table th.is-detected { color: #85aeff; box-shadow: inset 0 -2px var(--blue); }
.table-caption { display: flex; justify-content: space-between; padding: 9px 14px; border-top: 1px solid var(--border); color: #63748e; font-size: 9px; }

.settings-header { align-items: center; }
.text-button { padding: 5px 0; border: 0; color: #84aaf1; background: transparent; font-size: 11px; font-weight: 700; }
.text-button span { display: inline-block; margin-left: 3px; transition: transform .2s ease; }
.text-button[aria-expanded="true"] span { transform: rotate(180deg); }
.settings-grid { display: grid; gap: 16px; }
.settings-primary { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 2px 26px 26px; }
.settings-secondary { grid-template-columns: 1fr 1.2fr 1.2fr; padding: 4px 26px 26px; }
.field { display: grid; gap: 7px; }
.field-label { color: var(--muted-bright); font-size: 11px; font-weight: 700; }
.field small, .setting-field > small { color: #65758d; font-size: 9px; }
.hint { display: inline-grid; width: 14px; height: 14px; margin-left: 3px; place-items: center; border: 1px solid #3b4f6d; border-radius: 50%; color: #71839d; font-size: 8px; cursor: help; }
.number-input, .input-with-unit { display: flex; height: 40px; align-items: stretch; overflow: hidden; border: 1px solid var(--border-bright); border-radius: 9px; background: #091525; }
.number-input:focus-within, .input-with-unit:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50, 120, 255, .1); }
.number-input button { width: 34px; flex: 0 0 auto; border: 0; color: var(--muted); background: rgba(255, 255, 255, .025); font-size: 16px; }
.number-input button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.number-input input, .input-with-unit input { width: 100%; min-width: 0; border: 0; color: var(--text); background: transparent; text-align: center; outline: none; font-family: var(--mono); font-size: 12px; -moz-appearance: textfield; }
.number-input input::-webkit-inner-spin-button, .input-with-unit input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.input-with-unit input { padding-left: 12px; text-align: left; }
.input-with-unit > span { display: grid; padding: 0 11px; place-items: center; border-left: 1px solid var(--border); color: var(--muted); font-size: 9px; text-transform: uppercase; }
.advanced-settings { border-top: 1px solid rgba(34, 50, 74, .7); }
.setting-field select { width: 100%; height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--border-bright); border-radius: 9px; color: var(--text); background: #091525; font: 11px/1 var(--sans); }
.setting-field select:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(50, 120, 255, .1); }
.setting-field select option { color: var(--text); background: #091525; }
.settings-divider { padding: 15px 26px 8px; color: #64758e; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.switch-setting { display: flex; min-height: 58px; padding-top: 5px; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch-setting > span:first-child { display: grid; }
.switch-setting strong { color: var(--muted-bright); font-size: 11px; }
.switch-setting small { margin-top: 3px; color: #64758d; font-size: 9px; }
.switch-setting input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; border: 1px solid #334760; border-radius: 999px; background: #152338; transition: .18s ease; }
.switch::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #7f8da1; transition: .18s ease; }
.switch-setting input:checked + .switch { border-color: var(--blue); background: var(--blue); }
.switch-setting input:checked + .switch::after { background: #fff; transform: translateX(16px); }
.switch-setting input:focus-visible + .switch { outline: 2px solid var(--blue-bright); outline-offset: 3px; }

.launch-panel { display: flex; min-height: 90px; padding: 17px 20px 17px 25px; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; border: 1px solid rgba(47, 104, 218, .42); border-radius: var(--radius); background: linear-gradient(110deg, rgba(20, 41, 77, .96), rgba(12, 24, 43, .96)); box-shadow: var(--shadow); }
.launch-copy { display: flex; align-items: center; gap: 13px; }
.launch-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(98, 151, 255, .35); border-radius: 10px; color: #91b5fc; background: var(--blue-soft); font-size: 17px; }
.launch-copy div { display: grid; }
.launch-copy strong { font-size: 13px; }
.launch-copy span:not(.launch-icon) { margin-top: 3px; color: var(--muted); font-size: 10px; }

.button { display: inline-flex; min-height: 40px; padding: 0 17px; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 750; letter-spacing: .005em; transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, #3b82ff, #2867e4); box-shadow: 0 9px 25px rgba(38, 104, 230, .22), inset 0 1px rgba(255, 255, 255, .16); }
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #4b8cff, #3473ef); box-shadow: 0 12px 30px rgba(38, 104, 230, .3), inset 0 1px rgba(255, 255, 255, .18); }
.button-primary-soft { color: #bad1ff; border-color: rgba(70, 128, 239, .5); background: var(--blue-soft); box-shadow: none; }
.button-secondary { color: var(--muted-bright); border-color: var(--border-bright); background: rgba(255, 255, 255, .025); }
.button-secondary:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, .055); }
.button-danger { color: white; background: #dd4156; }
.button-danger-quiet { color: #ff94a2; border-color: rgba(255, 102, 120, .28); background: var(--red-soft); }
.button-large { min-height: 50px; border-radius: 11px; font-size: 13px; }
.button-full { width: 100%; }
.button-launch { min-width: 182px; height: 50px; justify-content: space-between; padding: 0 18px 0 21px; text-transform: uppercase; letter-spacing: .08em; }
.button-arrow { font-size: 18px; font-weight: 400; }
.button.is-loading { pointer-events: none; }
.button.is-loading > * { visibility: hidden; }
.button.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; }

.jobs-panel { margin-top: 28px; }
.jobs-frame { margin: 0 26px 26px; }
.jobs-table th:nth-child(1) { width: 17%; }
.jobs-table th:nth-child(4) { min-width: 150px; }
.jobs-table th:nth-child(5) { min-width: 205px; }.job-link { display: inline-flex; align-items: center; gap: 9px; color: #dce8fc; }
.job-link:hover { color: #80aaff; }
.job-glyph { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #2b4367; border-radius: 7px; color: #7ba7fb; background: var(--blue-soft); font: 800 8px/1 var(--mono); }
.date-value { color: var(--muted); }
.filename-cell { display: block; max-width: 215px; overflow: hidden; text-overflow: ellipsis; }
.row-progress { display: flex; align-items: center; gap: 8px; }
.row-progress > span { width: 92px; height: 4px; overflow: hidden; border-radius: 99px; background: #24344b; }
.row-progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.row-progress small { min-width: 29px; color: var(--muted); font: 9px/1 var(--mono); }
.job-progress-summary { display: grid; gap: 5px; }
.job-progress-count { display: flex; align-items: baseline; gap: 4px; color: var(--muted); font: 9px/1 var(--mono); }
.job-progress-count strong { color: var(--text); font-size: 10px; }
.job-progress-summary .row-progress > span { width: 82px; }
.job-results-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.job-result-chip { display: inline-flex; min-height: 24px; padding: 0 7px; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 7px; background: rgba(18, 31, 51, .72); white-space: nowrap; }
.job-result-chip strong,
.job-emails-count,
.job-decision-makers-count,
.job-ai-cost-value { color: var(--text); font: 800 9px/1 var(--mono); }
.job-result-chip small { color: var(--muted); font-size: 7px; letter-spacing: .04em; text-transform: uppercase; }
.job-emails { border-color: rgba(85, 147, 255, .25); background: var(--blue-soft); }
.job-decision-makers { border-color: rgba(167, 123, 243, .25); background: rgba(167, 123, 243, .1); }
.job-ai-cost { display: inline-grid; min-width: 72px; min-height: 30px; padding: 4px 7px; align-content: center; justify-items: start; gap: 2px; border-color: rgba(246, 185, 75, .28); background: var(--amber-soft); }
.job-ai-cost-value { color: #f6c96f; }
.job-ai-cost-label { line-height: 1; letter-spacing: .025em; }
.metric-unknown,
.job-decision-makers-count[aria-label="Unknown"],
.job-ai-cost-value[aria-label="Unknown"] { color: var(--muted); }.status-badge { display: inline-flex; min-height: 25px; padding: 0 9px; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted-bright); background: rgba(255, 255, 255, .03); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent); }
.status-running { color: #61a0ff; border-color: rgba(65, 133, 255, .25); background: var(--blue-soft); }
.status-completed { color: var(--green); border-color: rgba(56, 217, 150, .25); background: var(--green-soft); }
.status-failed, .status-cancelled { color: var(--red); border-color: rgba(255, 102, 120, .23); background: var(--red-soft); }
.status-paused, .status-interrupted { color: var(--amber); border-color: rgba(246, 185, 75, .24); background: var(--amber-soft); }
.status-queued { color: #a9b5c6; }
.status-running i { animation: status-pulse 1.8s ease-out infinite; }
.row-action { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; color: var(--muted); font-size: 16px; }
.row-action:hover { color: var(--text); background: var(--surface-hover); }
.jobs-empty { display: flex; min-height: 135px; margin: 0 26px 26px; align-items: center; justify-content: center; gap: 14px; border: 1px dashed var(--border); border-radius: 11px; color: var(--muted); }
.jobs-empty > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--surface-soft); font-size: 18px; }
.jobs-empty strong { color: var(--muted-bright); font-size: 12px; }
.jobs-empty p { margin: 2px 0 0; font-size: 10px; }
.icon-button { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: rgba(255, 255, 255, .02); font-size: 15px; }
.icon-button:hover:not(:disabled) { color: var(--text); border-color: var(--border-bright); background: rgba(255, 255, 255, .045); }
.icon-button-small { width: 30px; height: 30px; border-radius: 7px; font-size: 12px; }

/* Login */
.login-page { background: var(--bg-deep); }
.login-page .page-shell { width: 100%; padding: 0; }
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(440px, 1.12fr) minmax(420px, .88fr); }
.login-brand-panel { position: relative; display: flex; min-height: 100vh; padding: clamp(38px, 6vw, 76px); align-items: center; overflow: hidden; border-right: 1px solid #1d304b; background: radial-gradient(circle at 20% 30%, rgba(47, 118, 255, .19), transparent 32rem), linear-gradient(145deg, #0d1c32, #07101f 70%); }
.login-brand-panel::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(78, 112, 160, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(78, 112, 160, .18) 1px, transparent 1px); background-size: 54px 54px; mask-image: linear-gradient(135deg, #000, transparent 72%); }
.login-brand-content { position: relative; z-index: 2; width: min(100%, 680px); }
.login-pitch { margin-top: clamp(70px, 12vh, 130px); }
.login-pitch h1 { max-width: 640px; margin: 17px 0 19px; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -.055em; }
.login-pitch p { max-width: 570px; margin: 0; color: #9aaac0; font-size: 16px; line-height: 1.7; }
.signal-grid { display: grid; max-width: 650px; margin-top: clamp(55px, 9vh, 92px); grid-template-columns: repeat(3, 1fr); gap: 10px; }
.signal-card { display: flex; min-height: 100px; padding: 15px; align-items: flex-start; gap: 10px; border: 1px solid rgba(47, 71, 104, .72); border-radius: 12px; background: rgba(10, 23, 42, .62); backdrop-filter: blur(8px); }
.signal-icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #75a5ff; background: var(--blue-soft); }
.signal-card div { display: grid; }
.signal-card strong { font-size: 11px; }
.signal-card span:last-child { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.login-orbit { position: absolute; z-index: 1; border: 1px solid rgba(72, 125, 220, .15); border-radius: 50%; }
.login-orbit-one { width: 390px; height: 390px; right: -180px; bottom: -80px; }
.login-orbit-two { width: 250px; height: 250px; right: -110px; bottom: -10px; }
.login-form-panel { display: flex; min-height: 100vh; padding: 50px clamp(36px, 7vw, 105px); align-items: center; justify-content: center; background: #070f1d; }
.login-card { width: min(100%, 410px); }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 45px; }
.login-heading { margin-bottom: 28px; }
.login-heading h2 { margin: 9px 0 7px; font-size: 31px; line-height: 1.15; letter-spacing: -.04em; }
.login-heading p { margin: 0; color: var(--muted); }
.auth-form { display: grid; gap: 17px; }
.input-shell { display: flex; height: 48px; align-items: center; overflow: hidden; border: 1px solid var(--border-bright); border-radius: 10px; background: #0b1727; transition: border-color .15s, box-shadow .15s; }
.input-shell:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50, 120, 255, .11); }
.input-shell input { width: 100%; height: 100%; min-width: 0; border: 0; color: var(--text); background: transparent; outline: 0; }
.input-shell input::placeholder { color: #52627a; }
.input-prefix { display: grid; width: 43px; place-items: center; color: #63758f; font-size: 12px; }
.password-toggle { align-self: stretch; padding: 0 13px; border: 0; color: #7f91aa; background: transparent; font-size: 10px; font-weight: 700; }
.password-toggle:hover { color: #9fbbec; }
.inline-alert { display: flex; margin-bottom: 18px; padding: 11px 12px; align-items: flex-start; gap: 9px; border: 1px solid; border-radius: 9px; font-size: 11px; }
.inline-alert > span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 50%; font-weight: 900; }
.inline-alert p { margin: 1px 0 0; }
.inline-alert-error { color: #ff9cab; border-color: rgba(255, 102, 120, .3); background: var(--red-soft); }
.inline-alert-error > span { color: white; background: var(--red); }
.security-note { display: flex; margin: 24px 0 0; align-items: center; justify-content: center; gap: 7px; color: #5c6d85; font-size: 9px; }
.security-note span { color: #4b78cc; font-size: 7px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes status-pulse { 0% { box-shadow: 0 0 0 0 rgba(85, 147, 255, .5); } 75%, 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes shimmer { to { transform: translateX(160%); } }
@keyframes breathe { 50% { opacity: .35; } }

