
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #eef2f7;
  --line: #e5e7eb;
  --brand: #111827;
  --blue: #2563eb;
  --green: #059669;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; }

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

.sidebar {
  width: 280px;
  background: #0f172a;
  color: white;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding: 0 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.brand p {
  margin: 3px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.nav-section {
  margin-top: 22px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
  padding: 0 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,0.08);
  color: white;
}

.main {
  flex: 1;
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.page-title h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.05em;
}

.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 780px;
  line-height: 1.55;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 17px;
  font-weight: 800;
  background: var(--brand);
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn.secondary {
  background: white;
  color: var(--brand);
  border: 1px solid var(--line);
}

.select, input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 18px;
}

.kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.kpi {
  background: white;
  border: 1px solid var(--soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.04);
  min-height: 128px;
}

.kpi .label {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi .value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin: 12px 0 6px;
}

.kpi .note {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.panel {
  background: white;
  border: 1px solid var(--soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.04);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.panel h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.panel-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.45;
}

.two-col {
  grid-template-columns: 2fr 1fr;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  padding: 14px 10px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

.strong { font-weight: 900; }

.muted { color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.green { background: #dcfce7; color: #166534; }
.badge.blue { background: #dbeafe; color: #1e40af; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.gray { background: #e5e7eb; color: #374151; }
.badge.purple { background: #ede9fe; color: #5b21b6; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.event {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.event:last-child { border-bottom: none; }

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 4px;
  box-shadow: 0 0 0 5px #dbeafe;
}

.event-title {
  font-weight: 900;
  margin-bottom: 3px;
}

.event-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.metric-row:last-child { border-bottom: none; }

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab {
  padding: 9px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.tab.active {
  background: #111827;
  color: white;
}

.hero {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.20), transparent 34%),
    radial-gradient(circle at bottom right, rgba(124,58,237,0.20), transparent 35%),
    #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.hero-card, .login-card {
  width: 100%;
  max-width: 860px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 54px;
  text-align: center;
}

.hero h1 {
  font-size: 64px;
  letter-spacing: -0.08em;
  margin: 0;
}

.hero .tagline {
  font-size: 24px;
  font-weight: 900;
  margin: 16px 0 8px;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 700px;
  margin: 0 auto 28px;
}

.pill-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.pill {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 9px 12px;
  color: #475569;
  font-weight: 800;
  font-size: 13px;
}

.login-card {
  max-width: 460px;
  text-align: left;
}

.login-card h1 {
  text-align: center;
  margin: 0;
  font-size: 36px;
  letter-spacing: -0.06em;
}

.login-card .hint {
  text-align: center;
  margin: 8px 0 28px;
  color: var(--muted);
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 900;
  color: #334155;
}

.form-group input,
.form-group select {
  width: 100%;
}

.full-btn {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.notice {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
  padding: 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 18px;
}

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid, .three-col { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .main { padding: 18px; }
  .hero-card, .login-card { padding: 30px; }
  .hero h1 { font-size: 44px; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
