/* ============================================================
   College Bunkers Admin Panel — base styles (Phase 1 shell)
   Design tokens follow ADMIN-PANEL.md §8 (dark sidebar, light content).
   ============================================================ */

:root {
  --sidebar-bg:    #0f172a;
  --sidebar-fg:    #cbd5e1;
  --sidebar-active:#1e3a8a;
  --topbar-h:      56px;
  --sidebar-w:     240px;
  --primary:       #1565c0;
  --primary-dark:  #0d47a1;
  --bg:            #f6f8fb;
  --card-bg:       #ffffff;
  --border:        #e2e8f0;
  --text:          #0f172a;
  --muted:         #64748b;
  --danger:        #dc2626;
  --success:       #16a34a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--sidebar-bg);
  color: #fff;
}
.sidebar-toggle { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.brand { font-weight: 600; font-size: 17px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.scope-chip {
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: #1e293b; color: #e2e8f0;
}
.admin-identity { font-size: 13px; color: #cbd5e1; }
.admin-identity small { display: block; color: #94a3b8; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: calc(100vh - var(--topbar-h)); }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  transition: margin-left .2s ease;
}
.sidebar.collapsed { margin-left: calc(-1 * var(--sidebar-w)); }
.sidebar-nav ul { list-style: none; margin: 0; padding: 12px 8px; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: 8px; color: var(--sidebar-fg);
  text-decoration: none;
}
.sidebar-nav li a:hover { background: #1e293b; color: #fff; }
.sidebar-nav li.active a { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav-icon { width: 20px; text-align: center; }

.content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}
.page-title { margin: 0 0 16px; font-size: 22px; }

/* ---------- cards / stats ---------- */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.welcome-card { margin-bottom: 20px; }
.welcome-card h2 { margin: 0 0 6px; }
.welcome-card p { margin: 0; color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary-dark); }
.stat-label { color: var(--muted); margin-top: 4px; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; font-size: 14px;
  text-decoration: none; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: none; border-color: #334155; color: #e2e8f0; }
.btn-outline:hover { background: #1e293b; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.btn-approve, .btn-approve:hover { background: var(--success); border-color: var(--success); color: #fff; }
.btn-block { width: 100%; }
.inline { display: inline; }

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=password], input[type=email] {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; font-size: 14px;
}
input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ---------- alerts / notifications ---------- */
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-success { background: #ecfdf3; color: var(--success); border: 1px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: var(--danger);  border: 1px solid #fecaca; }

/* ---------- login page ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; 
  background: linear-gradient(160deg, #0d47a1, #0f172a);
}
.login-card {
  width: 360px; max-width: 92vw; background: #fff;
  border-radius: 16px; padding: 28px;
  box-shadow: 0 20px 40px rgba(2, 6, 23, .35);
}
.login-brand { font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.login-card h1 { margin: 6px 0 18px; font-size: 20px; }
.login-card .btn { margin-top: 18px; }
.login-hint { margin-top: 16px; color: var(--muted); font-size: 12px; }

/* ---------- footer ---------- */
.footer {
  display: none;
}

/* ---------- maintenance banner (ADMIN-PANEL.md §9.3) ---------- */
.maintenance-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; background: #fef3c7; color: #92400e;
  border-bottom: 1px solid #fde68a; font-size: 13px; text-align: center;
}
.maintenance-banner a { color: var(--primary); font-weight: 600; }

/* ---------- grouped sidebar nav (ADMIN-PANEL.md §11.1) ---------- */
.nav-section { margin-top: 10px; }
.nav-section:first-child { margin-top: 0; }
.nav-section-title {
  padding: 6px 12px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: #64748b;
}
.nav-badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px;
  border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 700; text-align: center; line-height: 1.5;
}

/* ---------- verification queue (Phase 4) ---------- */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-transform: capitalize;
}
.badge-pending  { background: #fef3c7; color: #b45309; }
.badge-approved { background: #d1fae5; color: #047857; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }

.muted        { color: var(--muted); }
.muted-label  { display: block; font-size: 11px; text-transform: uppercase;
               letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }

.thumb { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.thumb-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: #e2e8f0; color: var(--muted); font-size: 13px;
}
.id-thumb {
  max-width: 220px; max-height: 140px; border-radius: 8px;
  border: 1px solid var(--border); object-fit: contain; margin-top: 6px;
}

.verif-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px 16px; margin-top: 10px;
}

.btn-approve { background: var(--success); color: #fff; border: none; }
.btn-approve:hover { background: #12853b; color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover  { background: #b91c1c; color: #fff; }

details > summary { list-style: none; cursor: pointer; }
details[open] > summary { margin-bottom: 6px; }
textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border);
           border-radius: 8px; font-family: inherit; font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  .sidebar { margin-left: calc(-1 * var(--sidebar-w)); position: fixed; z-index: 15; height: 100%; }
  .sidebar.open { margin-left: 0; }
}

/* ---------- tables (ADMIN-PANEL.md §11.2) ---------- */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%; border-collapse: collapse;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; font-size: 14px;
}
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th {
  background: #f8fafc; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: #475569;
}
.table tbody tr:hover { background: #f8fafc; }
.table tr:last-child td { border-bottom: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; }

/* ---------- filter chips (ADMIN-PANEL.md §5.1) ---------- */
.filter-checkboxes { display: flex; gap: 8px 14px; flex-wrap: wrap; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; font-weight: 500; font-size: 13px; cursor: pointer;
}

/* ---------- selects / date inputs ---------- */
select, input[type=date] {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; font-size: 14px;
}

/* ---------- activity list ---------- */
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li {
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.activity-list li:last-child { border-bottom: none; }
.activity-list .muted { display: inline; margin-left: 8px; font-size: 12px; }

/* ---------- dashboard (ADMIN-PANEL.md §4) ---------- */
a.stat-box { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease; }
a.stat-box:hover { border-color: var(--primary); }
.stat-box { position: relative; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.stat-sub.amber, .amber { color: #b45309; }
.active-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card-bg); font-size: 13px;
}
.active-chip strong { color: var(--primary-dark); }
.card-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; }