:root {
  --navy: #0A1628;
  --navy2: #1A3A5C;
  --gold: #C9992A;
  --gold2: #E8B84B;
  --cream: #F8F4EE;
  --sidebar-w: 240px;
  --danger: #dc3545;
  --success: #198754;
  --info: #0d6efd;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: #f1f3f6;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  background: var(--navy2);
  padding: 20px 18px;
  border-bottom: 2px solid var(--gold);
}
.sidebar-brand .college { font-size: .7rem; color: var(--gold2); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-brand h2 { color: #fff; font-size: 1rem; font-weight: 700; line-height: 1.3; margin-top: 4px; }

.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-group { margin-bottom: 6px; }
.nav-label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: #6e7fa3; padding: 10px 18px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; color: #b0bdd4; text-decoration: none;
  font-size: .88rem; transition: all .2s; border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: rgba(201,153,42,.12); color: var(--gold2); border-left-color: var(--gold); }
.nav-link svg { width: 16px; height: 16px; opacity: .8; flex-shrink: 0; }

.sidebar-footer { padding: 16px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer a { color: #6e7fa3; font-size: .82rem; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.sidebar-footer a:hover { color: #fff; }

/* ── Main ─────────────────────────────────────────────── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: #fff;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e2e6ea;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar h1 { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: .85rem; color: #666; }
.topbar-right a { color: var(--gold); text-decoration: none; font-weight: 600; }
.topbar-right a:hover { text-decoration: underline; }

.page-content { padding: 28px; flex: 1; }

/* ── Cards ────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: #fff; border-radius: 12px; padding: 22px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07); border-left: 4px solid var(--gold);
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; color: var(--gold2); }
.stat-info .num { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-info .lbl { font-size: .78rem; color: #888; margin-top: 3px; }

/* ── Card wrapper ─────────────────────────────────────── */
.card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07); margin-bottom: 24px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f0f0f0;
}
.card-header h3 { font-size: 1rem; font-weight: 700; color: var(--navy); }

/* ── Table ────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  background: #f8f9fa; padding: 11px 14px; text-align: left;
  font-weight: 600; color: #555; border-bottom: 2px solid #e9ecef; white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.data-table tr:hover td { background: #fafbff; }
.data-table tr:last-child td { border-bottom: none; }

/* ── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .74rem; font-weight: 600;
}
.badge-success { background: #d1e7dd; color: #0a5236; }
.badge-danger  { background: #f8d7da; color: #842029; }
.badge-info    { background: #cff4fc; color: #055160; }
.badge-warning { background: #fff3cd; color: #664d03; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 7px; font-size: .87rem;
  font-weight: 600; cursor: pointer; border: none; text-decoration: none;
  transition: all .2s; font-family: inherit; white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy2); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold2); color: var(--navy); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #bb2d3b; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #146c43; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-outline { background: transparent; border: 1.5px solid; }
.btn-outline-danger { color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }

/* ── Forms ────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-row.one { grid-template-columns: 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .84rem; font-weight: 600; color: #444; }
.form-control {
  padding: 9px 13px; border: 1.5px solid #dee2e6; border-radius: 7px;
  font-size: .9rem; font-family: inherit; transition: border-color .2s;
  background: #fff;
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,153,42,.12); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-control-file { font-size: .88rem; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.form-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--navy); }

/* ── Alerts / Flash ───────────────────────────────────── */
.alert {
  padding: 12px 18px; border-radius: 8px; margin-bottom: 18px;
  font-size: .9rem; font-weight: 500; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #d1e7dd; color: #0a5236; border: 1px solid #a3cfbb; }
.alert-danger  { background: #f8d7da; color: #842029; border: 1px solid #f1aeb5; }
.alert-info    { background: #cff4fc; color: #055160; border: 1px solid #9eeaf9; }
.alert-warning { background: #fff3cd; color: #664d03; border: 1px solid #ffe69c; }

/* ── Gallery grid ─────────────────────────────────────── */
.gallery-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px;
}
.gallery-thumb {
  position: relative; border-radius: 10px; overflow: hidden;
  aspect-ratio: 4/3; background: #eee;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb-overlay {
  position: absolute; inset: 0; background: rgba(10,22,40,.7);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; opacity: 0; transition: opacity .2s;
}
.gallery-thumb:hover .gallery-thumb-overlay { opacity: 1; }
.gallery-thumb-overlay .caption { color: #fff; font-size: .78rem; text-align: center; padding: 0 8px; }

/* ── Photo preview ────────────────────────────────────── */
.photo-preview { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 2px solid #e0e0e0; }

/* ── Auth pages ───────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  padding: 20px;
}
.auth-card {
  background: #fff; border-radius: 16px; padding: 40px 36px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .circle {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.auth-logo .circle svg { width: 32px; height: 32px; color: var(--gold2); }
.auth-logo h2 { color: var(--navy); font-size: 1.3rem; }
.auth-logo p { color: #888; font-size: .85rem; margin-top: 4px; }
.auth-card h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: 22px; font-weight: 700; }

/* ── Unread indicator ─────────────────────────────────── */
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; margin-right: 4px; }

/* ── Responsive ───────────────────────────────────────── */
@media(max-width: 900px) {
  .sidebar { width: 100%; min-height: auto; position: static; flex-direction: row; overflow-x: auto; }
  .main-wrap { margin-left: 0; }
  body { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr 1fr; }
}
