:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #08090c;
  color: #f4f4f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 15% 10%, #1b2535 0, #08090c 38%); }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 72px);
  border-bottom: 1px solid #ffffff12;
}

.brand { color: #fff; text-decoration: none; font-weight: 800; letter-spacing: -.05em; font-size: 1.4rem; }
.status { display: flex; gap: 8px; align-items: center; color: #a1a1aa; font-size: .86rem; }
.status i { width: 8px; height: 8px; background: #34d399; border-radius: 999px; box-shadow: 0 0 16px #34d399; }
#app { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: clamp(40px, 8vw, 100px) 0; }

.auth-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 8vw, 100px); align-items: center; }
.intro-card h1, .dashboard h1 { margin: 10px 0 20px; font-size: clamp(3rem, 7vw, 6.8rem); line-height: .94; letter-spacing: -.08em; }
.intro-card h1 span, .dashboard h1 span { color: #7dd3fc; }
.eyebrow { margin: 0; color: #7dd3fc; text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 800; }
.lead { color: #a1a1aa; line-height: 1.7; max-width: 620px; }
.feature-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 32px 0 0; list-style: none; }
.feature-list li { border: 1px solid #ffffff18; background: #ffffff08; padding: 10px 14px; border-radius: 999px; color: #d4d4d8; font-size: .84rem; }

.form-card, .metric, .import-panel, .source-section, .loading-panel {
  border: 1px solid #ffffff14;
  background: #111318d9;
  box-shadow: 0 24px 80px #0008;
  border-radius: 22px;
}
.form-card { padding: 24px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #08090c; border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.tab { border: 0; border-radius: 9px; padding: 11px; color: #71717a; background: transparent; font-weight: 700; }
.tab.active { color: #fff; background: #27272a; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #d4d4d8; font-size: .86rem; font-weight: 700; }
input, select { width: 100%; border: 1px solid #ffffff1c; background: #08090c; color: #fff; border-radius: 12px; padding: 13px 14px; outline: none; }
input:focus, select:focus { border-color: #7dd3fc; box-shadow: 0 0 0 3px #7dd3fc22; }
.hidden { display: none; }
.form-message { min-height: 20px; margin: -4px 0; color: #fda4af; font-size: .84rem; }
.primary-button, .secondary-button { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 800; }
.primary-button { background: #e0f2fe; color: #082f49; }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { background: #27272a; color: #fff; }

.dashboard { display: grid; gap: 32px; }
.dashboard-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dashboard h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.metric { display: grid; gap: 16px; padding: 22px; }
.metric span { color: #a1a1aa; font-size: .85rem; }
.metric strong { font-size: 2.3rem; letter-spacing: -.06em; }
.import-panel { display: grid; grid-template-columns: .75fr 1.25fr; gap: 36px; padding: 28px; }
.import-panel h2, .source-section h2 { margin: 8px 0; }
.import-panel p:last-child { color: #a1a1aa; margin-bottom: 0; }
.import-form { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; }
.import-form .check-label, .import-form .form-message, .import-form button { grid-column: 1 / -1; }
.check-label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check-label input { width: 18px; height: 18px; }
.source-section { padding: 28px; }
.source-list { display: grid; gap: 10px; margin-top: 24px; }
.source-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid #ffffff12; border-radius: 14px; background: #08090c; }
.source-item h3 { margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.source-meta { display: flex; flex-wrap: wrap; gap: 10px; color: #71717a; font-size: .78rem; }
.source-status { padding: 7px 10px; border-radius: 999px; background: #27272a; color: #bae6fd; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.empty-state { color: #71717a; padding: 18px 0; }
.loading-panel { padding: 40px; color: #a1a1aa; }

@media (max-width: 800px) {
  .auth-layout { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-head { align-items: stretch; flex-direction: column; }
  .import-panel { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  #app { width: min(100% - 24px, 1200px); padding-top: 28px; }
  .site-header { padding: 0 16px; }
  .metric-grid { grid-template-columns: 1fr; }
  .import-form { grid-template-columns: 1fr; }
  .source-item { grid-template-columns: 1fr; }
}
