:root {
  --bg: #0b1120;
  --panel: rgba(15, 23, 42, 0.85);
  --panel-strong: #111827;
  --soft: #1f2937;
  --border: rgba(148, 163, 184, 0.18);
  --text: #e5eefc;
  --muted: #9fb0cc;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.28), transparent 28%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.22), transparent 24%),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }
.auth-body { min-height: 100vh; }
.auth-layout,
.app-shell { min-height: 100vh; }
.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
}
.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border-right: 1px solid var(--border);
  background: rgba(9, 15, 31, 0.85);
  backdrop-filter: blur(18px);
}
.brand-block h1,
.topbar h2,
.section-header h3,
.auth-header h2,
.feature-card h2,
.stat-card strong,
.brief-card h3,
.mini-title,
.detail-card h4 { margin: 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a5b4fc;
  margin-bottom: 12px;
}
.sidebar-nav,
.steps-nav { display: grid; gap: 10px; }
.nav-link {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  transition: 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
  background: rgba(79, 70, 229, 0.14);
  border-color: rgba(99, 102, 241, 0.35);
  color: #fff;
}
.content-shell { padding: 28px; }
.topbar,
.panel-section,
.stat-card,
.brief-card,
.detail-card,
.auth-card,
.feature-card,
.progress-card,
.upload-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.topbar,
.panel-section,
.auth-card { padding: 24px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.feature-card {
  padding: 10px 15px;}
.topbar p,
.auth-header p,
.feature-card p,
.helper-text,
.stat-card span,
.brief-card p,
.detail-card p,
.section-subtext { color: var(--muted); }
.stats-grid,
.cards-grid,
.detail-grid,
.two-col-grid,
.three-col-grid {
  display: grid;
  gap: 18px;
}
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; }
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.detail-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.two-col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { padding: 20px; display: grid; gap: 12px; }
.stat-card strong { font-size: 2rem; }
.section-header,
.section-header-wrap,
.toolbar-row,
.auth-actions-row,
.footer-actions { display: flex; align-items: center; gap: 12px; }
.section-header,
.section-header-wrap { justify-content: space-between; margin-bottom: 18px; }
.section-header-wrap { flex-wrap: wrap; }
.toolbar-row { flex-wrap: wrap; }
.field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.field-group span { font-weight: 600; }
.input-control,
.select-control,
.field-group input,
.field-group textarea,
.field-group select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  border-radius: 14px;
  padding: 14px 15px;
  outline: none;
}
.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus,
.input-control:focus,
.select-control:focus {
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  transition: 0.25s ease;
  font-weight: 700;
}
.btn-block { width: 100%; }
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-secondary {
  background: rgba(79, 70, 229, 0.12);
  color: #dbeafe;
  border: 1px solid rgba(99, 102, 241, 0.28);
}
.btn-secondary:hover,
.btn-ghost:hover { background: rgba(99, 102, 241, 0.18); }
.btn-ghost {
  background: transparent;
  color: #d1d5db;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.panel-section { margin-bottom: 24px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th,
.data-table td {
  text-align: left;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}
.badge.pending { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.badge.in_review { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.badge.approved { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.dynamic-stack { display: grid; gap: 14px; }
.item-card,
.detail-card,
.upload-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.65);
  border-radius: 18px;
  padding: 16px;
}
.item-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.mini-title { margin-bottom: 14px; }
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 1200;
}
.toast {
  min-width: 280px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow);
}
.toast.success { border-color: rgba(16, 185, 129, 0.45); }
.toast.error { border-color: rgba(239, 68, 68, 0.45); }
.toast.info { border-color: rgba(59, 130, 246, 0.45); }
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.top-gap { margin-top: 16px; }
.stack-form { display: grid; gap: 12px; }
.narrow-panel { max-width: 900px; }
.glass-card { backdrop-filter: blur(22px); }
.helper-text { margin-top: 14px; font-size: 0.92rem; }
.empty-state {
  padding: 24px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  color: var(--muted);
}
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { gap: 22px; }
  .stats-grid,
  .two-col-grid,
  .three-col-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .content-shell,
  .sidebar,
  .topbar,
  .panel-section,
  .auth-card { padding: 18px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
