@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface2: #1c1c26;
  --border: rgba(255,255,255,0.07);
  --text: #e8e8f0;
  --muted: #7a7a95;
  --accent: #6c63ff;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --font: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── TOP BAR ── */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.topbar .logo-mark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent-color, var(--accent));
}
.topbar .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.topbar .breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.topbar .breadcrumb a:hover { color: var(--text); }
.topbar .breadcrumb .sep { opacity: 0.4; }
.topbar .breadcrumb .current { color: var(--text); }

/* ── PAGE HEADER ── */
.page-header {
  padding: 40px 32px 24px;
  border-bottom: 1px solid var(--border);
}
.page-header .page-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: color-mix(in srgb, var(--accent-color, var(--accent)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-color, var(--accent)) 30%, transparent);
  margin-bottom: 16px;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.page-header p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ── MAIN LAYOUT ── */
.main { padding: 32px; max-width: 1200px; }

/* ── SECTIONS ── */
.section { margin-bottom: 40px; }
.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ── STAT CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent-color, var(--accent));
}
.stat-card .stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── TABLES ── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table-header h3 { font-size: 15px; font-weight: 600; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody td { padding: 14px 20px; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.badge.green { background: rgba(34,197,94,0.12); color: #22c55e; }
.badge.yellow { background: rgba(245,158,11,0.12); color: #f59e0b; }
.badge.red { background: rgba(239,68,68,0.12); color: #ef4444; }
.badge.blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.badge.purple { background: rgba(168,85,247,0.12); color: #a855f7; }
.badge.muted { background: rgba(255,255,255,0.06); color: var(--muted); }

/* ── FORMS ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-color, var(--accent));
}
.form-group textarea { resize: vertical; min-height: 90px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--accent-color, var(--accent));
  color: white;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent-color, var(--accent)); }
.btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.btn-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ── CARD GRID ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.info-card:hover { border-color: color-mix(in srgb, var(--accent-color, var(--accent)) 50%, transparent); }
.info-card .ic-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.info-card .ic-value { font-size: 16px; font-weight: 600; }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-left: 2px solid var(--border);
  padding-left: 24px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color, var(--accent));
  border: 2px solid var(--bg);
}
.timeline-item .tl-date { font-size: 12px; color: var(--muted); min-width: 90px; }
.timeline-item .tl-content h4 { font-size: 14px; font-weight: 600; }
.timeline-item .tl-content p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── PROGRESS ── */
.progress-bar-wrap { background: var(--surface2); border-radius: 100px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 100px; background: var(--accent-color, var(--accent)); transition: width 0.5s ease; }

/* ── ALERTS ── */
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert.info { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); }
.alert.warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); }
.alert.success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); }

/* ── TABS ── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
}
.tab-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--accent-color, var(--accent));
  color: white;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .main { padding: 16px; }
  .page-header { padding: 24px 16px 16px; }
  .topbar { padding: 12px 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
