@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #1a56c8;
  --primary-gradient: linear-gradient(135deg, #0d2d6b 0%, #1a56c8 100%);
  --accent: #0d9488;
  --bg: #e8eaed;
  --card: #ffffff;
  --sidebar-bg: #0d1e46;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #dde1e7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --success: #16a34a;
  --success-light: #f0fdf4;
  --danger: #dc2626;
  --danger-light: #fef2f2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* ─── SIDEBAR ─── */
.layout { display: flex; }
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}
.sidebar-logo {
  background: var(--primary-gradient);
  padding: 24px 20px;
  color: #fff;
}
.acname { font-weight: 800; font-size: 16px; letter-spacing: 0.05em; }
.acsub { font-size: 10px; opacity: 0.6; text-transform: uppercase; margin-top: 4px; letter-spacing: 0.1em; }

.sidebar-sec { padding: 20px 14px 0; }
.sidebar-sec-lbl {
  font-size: 10px; font-weight: 800; color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; padding-left: 10px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; color: rgba(255,255,255,0.65);
  font-size: 13.5px; font-weight: 600; border-radius: 10px;
  transition: all 0.2s; margin-bottom: 4px;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.15); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.nav-icon { font-size: 16px; width: 22px; text-align: center; }

.sidebar-foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.07); font-size: 11px; color: rgba(255,255,255,0.2); }

/* ─── MAIN CONTENT ─── */
.main-content { margin-left: 260px; flex: 1; padding: 24px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; background: #fff; padding: 16px 24px;
  border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-weight: 800; font-size: 18px; color: var(--primary); }

.page-content { flex: 1; }

/* ─── CARDS ─── */
.card {
  background: #fff; border-radius: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px;
}
.card-header {
  padding: 18px 24px; border-bottom: 1px solid #f3f4f6;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-weight: 800; font-size: 15px; color: #374151; }
.card-body { padding: 24px; }

/* ─── STATS ─── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border-radius: 16px; padding: 20px; border: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow);
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.ic-blue{background:#eff6ff} .ic-teal{background:#f0fdfa} .ic-yellow{background:#fffbeb} .ic-red{background:#fef2f2} .ic-green{background:#f0fdf4} .ic-purple{background:#f5f3ff}
.stat-val { font-size: 24px; font-weight: 800; line-height: 1; color: var(--primary); }
.stat-lbl { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-top: 5px; letter-spacing: 0.05em; }

/* ─── FORMS ─── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-control {
  height: 42px; width: 100%; border-radius: 8px; border: 1px solid #d1d5db;
  padding: 0 14px; font-family: inherit; font-size: 14px; background: #f9fafb;
  outline: none; transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--primary); background: #fff; }
.form-label { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; display: block; letter-spacing: 0.05em; }
textarea.form-control { height: auto; padding-top: 10px; min-height: 80px; }

/* ─── BUTTONS ─── */
.btn {
  height: 40px; border-radius: 8px; font-weight: 700; border: none; cursor: pointer;
  padding: 0 20px; font-family: inherit; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; transition: all 0.2s; white-space: nowrap;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 14px; }
.btn-primary { background: var(--primary-gradient); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(26, 86, 200, 0.3); }
.btn-success { background: var(--accent); color: #fff; }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: #374151; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: #f3f4f6; color: var(--text-main); }

/* ─── TABLES ─── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #f9fafb; padding: 14px 20px; font-size: 11px; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--border);
  letter-spacing: 0.05em;
}
.data-table td { padding: 16px 20px; font-size: 13.5px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.data-table tr:hover td { background: #fcfcfd; }
.td-name { font-weight: 700; color: #1e293b; }
.td-id { font-size: 11px; color: var(--text-muted); font-family: monospace; margin-top: 2px; }

/* ─── BADGES ─── */
.badge {
  font-size: 10.5px; font-weight: 700; padding: 4px 12px; border-radius: 30px; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-active { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1d4ed8; }
.badge-completed { background: #e0f2fe; color: #0369a1; }
.badge-dropped { background: #fee2e2; color: #991b1b; }
.badge-monthly { background: #dcfce7; color: #15803d; }
.badge-admission { background: #ede9fe; color: #6d28d9; }

/* ─── ALERTS ─── */
.alert { padding: 14px 20px; border-radius: 12px; font-size: 14px; margin-bottom: 20px; border-left: 5px solid; display: flex; gap: 12px; align-items: center; }
.alert-success { background: var(--success-light); border-color: var(--success); color: #15803d; }
.alert-warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.alert-danger { background: var(--danger-light); border-color: var(--danger); color: #991b1b; }

/* ─── PROFILE HEADER ─── */
.profile-head { background: var(--primary-gradient); border-radius: 16px; padding: 30px; color: #fff; margin-bottom: 24px; display: flex; align-items: center; gap: 24px; }
.profile-avatar { width: 70px; height: 70px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
.profile-sid { font-size: 12px; opacity: 0.6; font-weight: 700; letter-spacing: 0.05em; }
.profile-name { font-size: 26px; font-weight: 800; margin: 4px 0; }
.profile-course { font-size: 14px; opacity: 0.8; }

/* ─── INFO GRID ─── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.info-lbl { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.info-val { font-size: 15px; font-weight: 700; color: #1e293b; }

/* ─── SEARCH ─── */
.search-box { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--border); border-radius: 10px; padding: 0 16px; height: 44px; transition: border-color 0.2s; }
.search-box:focus-within { border-color: var(--primary); }
.search-box input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 14px; width: 100%; color: var(--text-main); }

/* ─── UTILS ─── */
.d-flex { display: flex; } .ac { align-items: center; } .gap8 { gap: 8px; } .gap12 { gap: 12px; }
.tr { text-align: right; } .tc { text-align: center; }
.bold { font-weight: 800; } .muted { color: var(--text-muted); } .mono { font-family: monospace; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb16 { margin-bottom: 16px; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-260px); }
  .main-content { margin-left: 0; padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── MODULE EDITOR ─── */
.module-row {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.module-row:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
}
