/* ============================================================
   COLLEGE CMS — ADMIN PANEL STYLESHEET
   Dark sidebar + clean white content area
   Fonts: Syne (headings) + DM Sans (body)
   ============================================================ */

:root {
  --sb-bg:     #0f172a;
  --sb-hover:  #1e293b;
  --sb-active: #1d4ed8;
  --sb-text:   rgba(255,255,255,.7);
  --sb-width:  240px;
  --gold:      #f59e0b;
  --navy:      #1e3a5f;
  --radius:    8px;
  --content-bg:#f1f5f9;
  --card-bg:   #ffffff;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
body.admin-body {
  font-family: 'DM Sans', sans-serif;
  background: var(--content-bg);
  margin: 0;
  display: flex;
  min-height: 100vh;
}
h1,h2,h3,h4,h5 { font-family: 'Syne', sans-serif; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.admin-sidebar {
  width: var(--sb-width);
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1050;
  transition: transform .3s ease, width .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.admin-sidebar.collapsed { transform: translateX(-100%); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
.brand-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .9rem; color: #fff; line-height: 1.2; }
.brand-role { font-size: 10px; color: var(--gold); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: .75rem 0; }
.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: .9rem 1rem .3rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  color: var(--sb-text);
  text-decoration: none;
  font-size: .855rem;
  font-weight: 500;
  border-radius: 0;
  transition: background .2s, color .2s;
  position: relative;
  white-space: nowrap;
}
.nav-item i { width: 16px; text-align: center; font-size: .9rem; opacity: .8; flex-shrink: 0; }
.nav-item:hover { background: var(--sb-hover); color: #fff; }
.nav-item.active {
  background: rgba(29,78,216,.2);
  color: #fff;
  border-left: 3px solid var(--gold);
}
.nav-item.active i { opacity: 1; }
.nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 4px;
}
.text-danger-light { color: #fca5a5 !important; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: .5rem 0;
}

/* ── MAIN AREA ────────────────────────────────────────────── */
.admin-main {
  margin-left: var(--sb-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .3s ease;
}
.admin-main.expanded { margin-left: 0; }

.admin-topbar {
  background: var(--card-bg);
  border-bottom: 1px solid #e2e8f0;
  padding: .75rem 1.5rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.topbar-title { font-family: 'Syne', sans-serif; font-size: .95rem; color: var(--navy); }
.sidebar-toggle {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: .35rem .65rem;
  color: #64748b;
}

.admin-content { padding-top: 1.5rem; }

/* ── STAT CARDS ───────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid #e8edf2;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,.10); transform: translateY(-2px); }
.stat-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.si-blue   { background: #eff6ff; color: #2563eb; }
.si-green  { background: #f0fdf4; color: #16a34a; }
.si-gold   { background: #fffbeb; color: #d97706; }
.si-purple { background: #faf5ff; color: #7c3aed; }
.si-red    { background: #fef2f2; color: #dc2626; }
.si-teal   { background: #f0fdfa; color: #0d9488; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--navy); }
.stat-label { font-size: .78rem; color: #64748b; font-weight: 500; margin-top: .2rem; }

/* ── ADMIN CARD ───────────────────────────────────────────── */
.admin-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid #e8edf2;
  overflow: hidden;
}
.admin-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafcff;
}
.admin-card-header h6 {
  font-family: 'Syne', sans-serif;
  font-size: .9rem;
  color: var(--navy);
  margin: 0;
}
.admin-card-body { padding: 1.25rem; }

/* ── DATA TABLE ───────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .855rem;
}
.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.admin-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}
.admin-table tr:hover td { background: #f8faff; }
.admin-table tr:last-child td { border-bottom: none; }

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.form-label { font-weight: 500; font-size: .85rem; color: #374151; margin-bottom: .3rem; }
.form-control, .form-select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: .875rem;
  padding: .55rem .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid #e8edf2;
  margin-bottom: 1.5rem;
}
.form-section-title {
  font-family: 'Syne', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid #f1f5f9;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary { background: #1d4ed8; border-color: #1d4ed8; font-weight: 600; font-size: .855rem; }
.btn-primary:hover { background: #1e40af; border-color: #1e40af; }
.btn-success { background: #16a34a; border-color: #16a34a; font-weight: 600; font-size: .855rem; }
.btn-danger  { background: #dc2626; border-color: #dc2626; font-weight: 600; font-size: .855rem; }
.btn-warning { background: #d97706; border-color: #d97706; color: #fff; font-weight: 600; font-size: .855rem; }
.btn-secondary { background: #64748b; border-color: #64748b; font-weight: 600; font-size: .855rem; }
.btn-outline-secondary { border-color: #cbd5e1; color: #475569; font-size: .855rem; }
.btn-sm { font-size: .78rem; padding: .3rem .7rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }

/* ── STATUS BADGES ────────────────────────────────────────── */
.badge-status-on  { background: #dcfce7; color: #15803d; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.badge-status-off { background: #fee2e2; color: #b91c1c; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.badge-featured   { background: #fef9c3; color: #a16207; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; }

/* ── PHOTO GRID (admin) ───────────────────────────────────── */
.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.admin-photo-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 2px solid #e2e8f0;
}
.admin-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo-delete {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(220,38,38,.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s;
}
.admin-photo-item:hover .admin-photo-delete { opacity: 1; }

/* ── DROP ZONE ────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #f8fafc;
}
.drop-zone:hover, .drop-zone.dragover { border-color: #2563eb; background: #eff6ff; }
.drop-zone i { font-size: 2.5rem; color: #94a3b8; margin-bottom: .75rem; }
.drop-zone p { color: #64748b; font-size: .875rem; margin: 0; }

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo i { font-size: 2.5rem; color: var(--gold); }
.login-title { font-family: 'Syne', sans-serif; font-size: 1.4rem; color: var(--navy); text-align: center; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.mobile-open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); }
}
