/* =====================================================================
   GCTU Performance Monitoring System v2 — Complete Design System
   Brand: deep blue (#003B71) + gold (#C8A24B)
   ===================================================================== */

:root {
  --brand-blue:        #003B71;
  --brand-blue-2:      #1F5F94;
  --brand-blue-dark:   #0A2647;
  --brand-gold:        #C8A24B;
  --brand-gold-dark:   #9C7A2D;
  --brand-gold-soft:   #F4E9CC;

  --r-excellent:       #0E8C5A;
  --r-good:            #1F5F94;
  --r-satisfactory:    #C8A24B;
  --r-poor:            #D97706;
  --r-bad:             #B23A48;

  --ink-900: #0F172A;
  --ink-700: #334155;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-50:  #F8FAFC;
  --white:   #FFFFFF;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --s-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --s-md: 0 6px 20px rgba(0,59,113,.08);
  --s-lg: 0 18px 50px rgba(0,59,113,.14);

  --f-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-body:    'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--f-body);
  background: var(--ink-50);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  font-size: 15px;
}
h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--brand-blue);
  margin-top: 0; letter-spacing: -.01em;
}
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
a { color: var(--brand-blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
hr.hr { border: 0; border-top: 1px solid var(--ink-200); margin: 18px 0; }

/* ============== TOP BAR ============== */
.topbar {
  background: linear-gradient(135deg, var(--brand-blue-dark) 0%, var(--brand-blue) 60%, var(--brand-blue-2) 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(0,0,0,.15);
}
.topbar::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--brand-gold) 0%, #e6c97a 50%, var(--brand-gold) 100%);
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-family: var(--f-display);
  font-weight: 700; font-size: 1.05rem;
}
.brand img { width: 42px; height: 42px; }
.brand small {
  display: block; font-family: var(--f-body); font-weight: 400;
  font-size: 11px; letter-spacing: 1.4px;
  color: var(--brand-gold); text-transform: uppercase;
  margin-top: 2px;
}
.brand:hover { text-decoration: none; }

.topnav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.topnav a {
  color: rgba(255,255,255,.88);
  padding: 7px 12px; border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 500;
  transition: background .15s ease;
}
.topnav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.topnav a.active {
  background: rgba(200,162,75,.18); color: var(--brand-gold);
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 22px;
  background: rgba(255,255,255,.10); color: #fff; font-size: .85rem;
  margin-left: 10px;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-gold); color: var(--brand-blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .82rem;
}
.user-chip a { color: var(--brand-gold); margin-left: 4px; }
.user-chip a:hover { color: #fff; }

/* ============== BELL ============== */
.bell {
  position: relative; width: 38px; height: 38px;
  border: 0; cursor: pointer; border-radius: 50%;
  background: rgba(255,255,255,.10);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.bell:hover { background: rgba(255,255,255,.18); }
.bell .count {
  position: absolute; top: -3px; right: -3px;
  background: var(--brand-gold); color: var(--brand-blue-dark);
  font-size: .65rem; font-weight: 700;
  padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center;
}
.bell-panel {
  position: absolute; top: 56px; right: 24px;
  width: 360px; max-height: 480px; overflow-y: auto;
  background: #fff; border-radius: var(--r-md);
  box-shadow: var(--s-lg);
  border: 1px solid var(--ink-200);
  z-index: 90; display: none;
}
.bell-panel.open { display: block; }
.bell-panel .panel-head {
  padding: 12px 16px; border-bottom: 1px solid var(--ink-100);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--ink-50);
}
.bell-panel .panel-head strong { color: var(--brand-blue); font-family: var(--f-display); }
.bell-panel .panel-head button {
  background: none; border: 0; font-size: .8rem; cursor: pointer;
  color: var(--brand-blue-2); font-weight: 600;
}
.bell-panel ul { list-style: none; margin: 0; padding: 0; }
.bell-panel .item {
  padding: 12px 16px; border-bottom: 1px solid var(--ink-100);
  cursor: pointer; transition: background .15s;
}
.bell-panel .item:hover { background: var(--ink-50); }
.bell-panel .item.unread { background: rgba(0,59,113,.04); border-left: 3px solid var(--brand-gold); }
.bell-panel .item .title { font-weight: 600; color: var(--ink-900); font-size: .9rem; }
.bell-panel .item .body  { color: var(--ink-700); font-size: .82rem; margin-top: 2px; }
.bell-panel .item .ago   { color: var(--ink-500); font-size: .72rem; margin-top: 4px; }
.bell-panel .item.empty  { text-align: center; padding: 30px 16px; color: var(--ink-500); cursor: default; }

/* ============== LAYOUT ============== */
.layout { display: flex; min-height: calc(100vh - 64px); background: var(--ink-50); }
.sidebar {
  width: 240px; flex: 0 0 240px;
  background: #fff; border-right: 1px solid var(--ink-200);
  padding: 18px 0;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.side-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  color: var(--ink-700); font-size: .92rem; font-weight: 500;
  transition: all .15s; text-decoration: none;
}
.side-nav-item:hover { background: var(--ink-100); color: var(--brand-blue); text-decoration: none; }
.side-nav-item.active {
  background: linear-gradient(90deg, rgba(0,59,113,.08), rgba(200,162,75,.05));
  color: var(--brand-blue); font-weight: 600;
  border-left: 3px solid var(--brand-gold); padding-left: 11px;
}
.side-nav-divider { height: 1px; background: var(--ink-200); margin: 14px 18px; }
.nav-icon { font-size: 1.05rem; width: 20px; text-align: center; }

.main-content {
  flex: 1; padding: 26px 32px;
  max-width: calc(100vw - 240px);
  overflow-x: auto;
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--ink-200); }
  .side-nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; }
  .side-nav-item { white-space: nowrap; }
  .side-nav-divider { display: none; }
  .main-content { max-width: 100%; padding: 18px; }
}

/* ============== PAGE HEADER ============== */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; margin-bottom: 22px;
  padding-bottom: 16px; border-bottom: 1px solid var(--ink-200);
}
.page-title { font-family: var(--f-display); font-size: 1.7rem; color: var(--brand-blue); margin: 0 0 4px; line-height: 1.2; }
.page-subtitle { color: var(--ink-500); font-size: .95rem; margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--ink-500); margin-bottom: 4px; }
.crumbs a { color: var(--ink-500); }
.crumbs a:hover { color: var(--brand-blue); }

/* ============== STATS GRID ============== */
.stats-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 24px;
}
.stat-card {
  background: #fff; border-radius: var(--r-md); padding: 18px 20px;
  display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--ink-200); box-shadow: var(--s-sm);
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--s-md); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-card.stat-gold .stat-icon { background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-dark)); }
.stat-card.stat-green .stat-icon { background: linear-gradient(135deg, #10B981, #059669); }
.stat-card.stat-red .stat-icon { background: linear-gradient(135deg, #EF4444, #DC2626); }
.stat-body { flex: 1; min-width: 0; }
.stat-label {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-500); font-weight: 600; margin-bottom: 3px;
}
.stat-value {
  font-family: var(--f-display); font-size: 1.55rem;
  color: var(--brand-blue); font-weight: 700; line-height: 1;
}
.stat-delta { font-size: .78rem; color: var(--ink-500); margin-top: 4px; }
.stat-delta.up { color: var(--r-excellent); }
.stat-delta.down { color: var(--r-bad); }

/* ============== CARDS ============== */
.card {
  background: #fff; border-radius: var(--r-md);
  border: 1px solid var(--ink-200); box-shadow: var(--s-sm);
  margin-bottom: 18px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--ink-100);
  background: linear-gradient(180deg, #fff, var(--ink-50));
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.card-title { margin: 0; font-size: 1.05rem; color: var(--brand-blue); font-family: var(--f-display); }
.card-body { padding: 18px; }

/* ============== SCORE HERO ============== */
.score-hero {
  background: linear-gradient(135deg, var(--brand-blue-dark), var(--brand-blue));
  color: #fff; border-radius: var(--r-lg);
  padding: 28px 32px; margin-bottom: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  position: relative; overflow: hidden;
}
.score-hero::before {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(200,162,75,.22) 0%, transparent 70%);
}
.score-hero-left { position: relative; z-index: 1; flex: 1; }
.score-hero-left h2 { color: #fff; margin: 0 0 6px; font-size: 1.4rem; }
.score-hero-left p { margin: 0; color: rgba(255,255,255,.85); }
.score-hero-right { position: relative; z-index: 1; text-align: right; }
.score-big {
  font-family: var(--f-display); font-size: 4.2rem;
  font-weight: 700; line-height: 1; color: var(--brand-gold);
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.score-label { color: rgba(255,255,255,.85); font-size: .9rem; margin-top: 4px; }

/* ============== UNIVERSITY SCORE CARD ============== */
.university-score-card {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #fff; border-radius: var(--r-lg);
  padding: 24px 28px; margin-bottom: 22px;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: center;
}
.uni-score-left { text-align: center; }
.uni-score-value {
  font-family: var(--f-display); font-size: 4rem;
  font-weight: 700; color: var(--brand-gold); line-height: 1;
}
.uni-score-label { color: rgba(255,255,255,.85); margin-top: 6px; }
.uni-metric-row {
  display: grid; grid-template-columns: 150px 1fr 60px;
  gap: 10px; align-items: center; margin-bottom: 10px;
}
.uni-metric-row .metric-name { color: rgba(255,255,255,.9); font-size: .88rem; }
.uni-metric-row .metric-val { text-align: right; font-weight: 600; }
.uni-metric-row .progress { background: rgba(255,255,255,.15); }
.uni-metric-row .progress-bar { background: var(--brand-gold); }
@media (max-width: 760px) {
  .university-score-card { grid-template-columns: 1fr; }
}

/* ============== TABLES ============== */
.data-table {
  width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem;
}
.data-table thead th {
  background: var(--ink-50); color: var(--ink-700);
  font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 12px 14px;
  border-bottom: 2px solid var(--brand-gold);
  text-align: left;
}
.data-table tbody td {
  padding: 11px 14px; border-bottom: 1px solid var(--ink-100); vertical-align: middle;
}
.data-table tbody tr:hover { background: rgba(0,59,113,.02); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.cell-primary { font-weight: 600; color: var(--ink-900); }
.cell-secondary { color: var(--ink-500); font-size: .82rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: .88rem; }
.muted { color: var(--ink-500); }
.small { font-size: .82rem; }

/* ============== RANKINGS ============== */
.rankings-table tbody tr.rank-1 { background: linear-gradient(90deg, rgba(255,215,0,.12), transparent); }
.rankings-table tbody tr.rank-2 { background: linear-gradient(90deg, rgba(192,192,192,.10), transparent); }
.rankings-table tbody tr.rank-3 { background: linear-gradient(90deg, rgba(205,127,50,.10), transparent); }
.rank-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.rank-medal.gold   { background: linear-gradient(135deg, #FFD700, #C8A24B); color: #4A3500; }
.rank-medal.silver { background: linear-gradient(135deg, #E8E8E8, #B0B0B0); color: #333; }
.rank-medal.bronze { background: linear-gradient(135deg, #E6A47A, #B87333); color: #fff; }
.rank-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink-100); color: var(--ink-700);
  font-weight: 700; font-size: .9rem;
}
.entity-name { font-weight: 600; }
.entity-type {
  display: inline-block; font-size: .68rem; text-transform: uppercase;
  background: var(--ink-100); color: var(--ink-700);
  padding: 2px 8px; border-radius: 10px; margin-left: 6px; letter-spacing: .04em;
}

/* ============== BADGES & PILLS ============== */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 10px; font-size: .72rem; font-weight: 600;
}
.badge-lg { font-size: .85rem; padding: 5px 14px; }
.badge-excellent      { background: #DCFCE7; color: #065F46; }
.badge-good           { background: #DBEAFE; color: #1E40AF; }
.badge-satisfactory   { background: var(--brand-gold-soft); color: var(--brand-gold-dark); }
.badge-poor           { background: #FED7AA; color: #9A3412; }
.badge-unsatisfactory { background: #FEE2E2; color: #991B1B; }
.badge-muted          { background: var(--ink-100); color: var(--ink-700); }

.role-pill, .entity-pill, .period-pill, .action-pill, .status {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  background: var(--ink-100); color: var(--ink-700);
}
.role-pill.role-vc        { background: #F4E9CC; color: var(--brand-gold-dark); }
.role-pill.role-registrar { background: #FCE7F3; color: #9D174D; }
.role-pill.role-dean      { background: #E0E7FF; color: #3730A3; }
.role-pill.role-director  { background: #DBEAFE; color: #1E3A8A; }
.role-pill.role-hod       { background: #DCFCE7; color: #166534; }
.role-pill.role-staff     { background: var(--ink-100); color: var(--ink-700); }
.entity-pill { background: var(--brand-gold-soft); color: var(--brand-gold-dark); }
.period-pill { background: rgba(0,59,113,.08); color: var(--brand-blue); }

.status-draft     { background: var(--ink-100);  color: var(--ink-700); }
.status-submitted { background: #FEF3C7; color: #92400E; }
.status-approved  { background: #DCFCE7; color: #166534; }
.status-rejected  { background: #FEE2E2; color: #991B1B; }
.status-revision_requested { background: #FED7AA; color: #9A3412; }

/* ============== PROGRESS BAR ============== */
.progress {
  width: 100%; height: 8px; background: var(--ink-100);
  border-radius: 4px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--brand-blue), var(--brand-gold));
  border-radius: 4px; transition: width .4s ease;
}

/* ============== FORMS ============== */
.form-card {
  background: #fff; border-radius: var(--r-md);
  padding: 24px; box-shadow: var(--s-sm);
  border: 1px solid var(--ink-200); max-width: 820px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-full { grid-column: 1 / -1; }
.form-help { font-size: .8rem; color: var(--ink-500); margin-top: 4px; }
.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ink-100);
}
.field { display: flex; flex-direction: column; margin-bottom: 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

input, select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--ink-300); border-radius: var(--r-sm);
  font-family: var(--f-body); font-size: .92rem;
  background: #fff; color: var(--ink-900);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0,59,113,.1);
}
label {
  display: block; font-weight: 600; font-size: .85rem;
  color: var(--ink-700); margin-bottom: 5px;
}

.filter-bar {
  background: #fff; border-radius: var(--r-md);
  padding: 14px 18px; margin-bottom: 18px;
  border: 1px solid var(--ink-200); box-shadow: var(--s-sm);
}
.filter-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-form .field { margin-bottom: 0; }
.filter-form select, .filter-form input { min-width: 160px; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-sm);
  font-family: var(--f-body); font-weight: 600; font-size: .9rem;
  cursor: pointer; border: 1px solid transparent;
  transition: all .15s; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-primary { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue-dark); }
.btn-primary:hover { background: var(--brand-blue-2); color: #fff; }
.btn-gold    { background: var(--brand-gold); color: #fff; border-color: var(--brand-gold-dark); }
.btn-gold:hover { background: var(--brand-gold-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--brand-blue); border-color: var(--ink-300); }
.btn-outline:hover { background: var(--ink-50); border-color: var(--brand-blue); }
.btn-danger  { background: #EF4444; color: #fff; border-color: #DC2626; }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: #10B981; color: #fff; border-color: #059669; }
.btn-success:hover { background: #059669; }

/* ============== ALERTS ============== */
.alert {
  padding: 12px 16px; border-radius: var(--r-md);
  margin-bottom: 16px; font-size: .92rem;
  border-left: 4px solid; display: flex; align-items: center; gap: 10px;
}
.alert-success  { background: #ECFDF5; color: #065F46; border-color: #10B981; }
.alert-error    { background: #FEF2F2; color: #991B1B; border-color: #EF4444; }
.alert-warning  { background: #FFFBEB; color: #92400E; border-color: #D97706; }
.alert-info     { background: #EFF6FF; color: #1E40AF; border-color: var(--brand-blue-2); }

/* ============== MODAL ============== */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.55); z-index: 200;
  align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.modal.open { display: flex; }
.modal-content {
  background: #fff; border-radius: var(--r-lg);
  width: 100%; max-width: 520px; box-shadow: var(--s-lg);
  animation: modalSlide .25s ease;
}
.modal-lg { max-width: 760px; }
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-bottom: 1px solid var(--ink-100);
}
.modal-header h3 { margin: 0; }
.modal-close {
  background: none; border: 0; font-size: 1.6rem; cursor: pointer;
  color: var(--ink-500); padding: 0; line-height: 1; width: 30px; height: 30px;
}
.modal-close:hover { color: var(--brand-blue); }
.modal-content form { padding: 20px 22px; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--ink-100);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ============== APPROVAL CARDS ============== */
.approval-card {
  background: #fff; border-radius: var(--r-md);
  border: 1px solid var(--ink-200); box-shadow: var(--s-sm);
  overflow: hidden; margin-bottom: 14px;
}
.approval-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: linear-gradient(180deg, #fff, var(--ink-50));
  border-bottom: 1px solid var(--ink-100); gap: 12px; flex-wrap: wrap;
}
.approval-kpi { font-weight: 600; color: var(--brand-blue); font-size: 1.02rem; }
.approval-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.approval-body { padding: 16px 18px; }
.approval-numbers {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.num-block { background: var(--ink-50); padding: 10px 14px; border-radius: var(--r-sm); }
.num-label { font-size: .72rem; text-transform: uppercase; color: var(--ink-500); letter-spacing: .04em; }
.num-value { font-weight: 700; color: var(--ink-900); font-size: 1.1rem; margin-top: 2px; }
.approval-narrative {
  background: var(--ink-50); border-left: 3px solid var(--brand-gold);
  padding: 10px 14px; border-radius: var(--r-sm);
  margin: 10px 0; font-size: .92rem; color: var(--ink-700);
}
.approval-actions {
  display: flex; gap: 10px; padding: 14px 18px;
  background: var(--ink-50); border-top: 1px solid var(--ink-100);
  flex-wrap: wrap; align-items: center;
}
.approval-comment { flex: 1; min-width: 200px; }
.approval-comment input { width: 100%; }

/* ============== ACHIEVEMENT BOX ============== */
.achievement-box {
  padding: 14px 16px; border-radius: var(--r-md);
  text-align: center; min-width: 140px;
}
.achievement-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.achievement-pct { font-family: var(--f-display); font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.achievement-detail { font-size: .78rem; margin-top: 2px; }
.achievement-excellent      { background: #DCFCE7; color: #065F46; }
.achievement-good           { background: #DBEAFE; color: #1E40AF; }
.achievement-satisfactory   { background: var(--brand-gold-soft); color: var(--brand-gold-dark); }
.achievement-poor           { background: #FFEDD5; color: #9A3412; }
.achievement-unsatisfactory { background: #FEE2E2; color: #991B1B; }

/* ============== EMPTY STATE ============== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-500); }
.empty-icon  { font-size: 2.5rem; opacity: .35; margin-bottom: 10px; }

/* ============== AUTH PAGES ============== */
.auth-body {
  min-height: 100vh; margin: 0;
  background: linear-gradient(135deg, var(--brand-blue-dark) 0%, var(--brand-blue) 60%, var(--brand-blue-2) 100%);
  display: flex; align-items: center; justify-content: center;
}
.auth-main { width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.auth-card {
  background: #fff; border-radius: var(--r-lg);
  padding: 36px 38px; width: 100%; max-width: 440px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  border-top: 4px solid var(--brand-gold);
}
.auth-logo {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.auth-logo img { width: 56px; height: 56px; }
.auth-logo h2 { margin: 0; font-size: 1.18rem; color: var(--brand-blue); line-height: 1.2; }
.auth-logo .tagline { font-size: .72rem; color: var(--brand-gold-dark); margin: 4px 0 0; letter-spacing: 1px; text-transform: uppercase; }
.auth-heading { color: var(--brand-blue); font-size: 1.35rem; margin: 8px 0 4px; }
.auth-sub { color: var(--ink-500); font-size: .92rem; margin: 0 0 18px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-help { text-align: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ink-100); color: var(--ink-500); }
.auth-help a { color: var(--brand-blue-2); font-weight: 600; }
.auth-back { text-align: center; margin-top: 18px; font-size: .85rem; }

.otp-input {
  font-family: var(--f-display); font-size: 2rem;
  text-align: center; letter-spacing: .5em; padding-left: .5em;
  font-weight: 700; color: var(--brand-blue);
}

/* ============== PUBLIC PAGES ============== */
.public-main { max-width: 1280px; margin: 0 auto; padding: 28px 24px; }
.hero {
  background: linear-gradient(135deg, var(--brand-blue-dark), var(--brand-blue));
  color: #fff; border-radius: var(--r-lg);
  padding: 36px 40px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(200,162,75,.2) 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 2.2rem; margin: 0 0 8px; }
.hero .motto { color: var(--brand-gold); font-style: italic; margin-top: 8px; }
.hero .tagline { color: rgba(255,255,255,.85); font-size: 1rem; }

.leaderboard-card .leader {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--ink-100);
}
.leaderboard-card .leader:last-child { border-bottom: 0; }
.leaderboard-card .leader .rank { width: 28px; font-weight: 700; color: var(--brand-gold); text-align: center; }
.leaderboard-card .leader .name { flex: 1; font-weight: 500; }
.leaderboard-card .leader .score { font-weight: 700; color: var(--brand-blue); }

/* ============== ORGANOGRAM ============== */
.org-root { padding: 20px 0; }
.org-node {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #fff; padding: 18px 26px; border-radius: var(--r-md);
  text-align: center; max-width: 420px; margin: 0 auto 28px;
  box-shadow: var(--s-md);
}
.org-top { border: 2px solid var(--brand-gold); }
.org-title { font-family: var(--f-display); font-size: 1.2rem; font-weight: 700; }
.org-sub { font-size: .88rem; opacity: .9; margin-top: 4px; }
.org-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 14px;
}
.org-card {
  background: #fff; border-radius: var(--r-md);
  padding: 16px 18px; border: 1px solid var(--ink-200); box-shadow: var(--s-sm);
}
.org-card.faculty     { border-top: 3px solid var(--brand-gold); }
.org-card.directorate { border-top: 3px solid var(--brand-blue-2); }
.org-card-title { font-weight: 600; color: var(--brand-blue); margin-bottom: 2px; }
.org-card-sub   { font-size: .82rem; color: var(--ink-500); margin-bottom: 10px; }
.org-children   { padding-left: 12px; border-left: 2px solid var(--ink-100); margin-top: 10px; }
.org-child      { padding: 4px 0; font-size: .88rem; color: var(--ink-700); }
.section-title {
  font-family: var(--f-display); color: var(--brand-blue);
  font-size: 1.3rem; margin: 24px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--brand-gold);
}

/* ============== FOOTER ============== */
.site-footer {
  margin-top: 48px; padding: 22px 28px;
  background: #fff; border-top: 3px solid var(--brand-gold);
  color: var(--ink-500); font-size: 13px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center;
}
.site-footer strong { color: var(--brand-blue); font-family: var(--f-display); }
.link-gold { color: var(--brand-gold-dark); font-weight: 600; }
.link-gold:hover { color: var(--brand-blue); }

/* ============== TABS ============== */
.tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--ink-100);
  margin-bottom: 18px; overflow-x: auto;
}
.tab {
  padding: 10px 18px; cursor: pointer;
  color: var(--ink-500); font-weight: 500;
  background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.tab:hover { color: var(--brand-blue); text-decoration: none; }
.tab.active { color: var(--brand-blue); font-weight: 600; border-bottom-color: var(--brand-gold); }

/* ============== TWO-COL LAYOUT ============== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* ============== PRINT ============== */
@media print {
  .topbar, .sidebar, .bell, .btn, .site-footer, .filter-bar { display: none !important; }
  .main-content { padding: 0; max-width: 100%; }
  .card { box-shadow: none; border: 1px solid var(--ink-300); break-inside: avoid; }
  body { background: #fff; }
}

/* =====================================================================
   ADMIN CRUD additions — pagination, search, modals, action buttons
   ===================================================================== */
.admin-toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--r-md);
  padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--s-sm);
}
.admin-toolbar .field { margin-bottom: 0; min-width: 160px; }
.admin-toolbar .field-grow { flex: 1; min-width: 220px; }
.admin-toolbar .toolbar-actions { margin-left: auto; display: flex; gap: 8px; }

.search-input {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 10px center;
  padding-left: 34px;
}

.pagination {
  display: flex; gap: 4px; justify-content: center; align-items: center;
  padding: 16px 0; flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--r-sm); border: 1px solid var(--ink-200);
  color: var(--ink-700); background: #fff; font-size: .9rem; font-weight: 500;
  text-decoration: none;
}
.pagination a:hover { background: var(--ink-50); color: var(--brand-blue); text-decoration: none; }
.pagination .current { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue-dark); }
.pagination .disabled { color: var(--ink-300); background: var(--ink-50); cursor: not-allowed; }
.pagination .summary { background: none; border: 0; color: var(--ink-500); }

.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions .btn-sm { padding: 5px 9px; font-size: .8rem; min-width: 32px; }
.row-actions .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--ink-200);
  border-radius: var(--r-sm); background: #fff; color: var(--ink-700);
  cursor: pointer; transition: all .15s;
}
.row-actions .icon-btn:hover { border-color: var(--brand-blue); color: var(--brand-blue); text-decoration: none; }
.row-actions .icon-btn.danger:hover { border-color: #EF4444; color: #EF4444; }

/* Modal triggers */
[data-modal-open] { cursor: pointer; }
.modal-content.modal-xl { max-width: 920px; }

.table-wrap { overflow-x: auto; }
.data-table .col-actions { width: 110px; text-align: right; }
.data-table .col-num { width: 60px; text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-status { width: 100px; }
.data-table .col-code { width: 100px; font-family: var(--mono, monospace); }

.sortable {
  cursor: pointer; user-select: none; position: relative;
}
.sortable:hover { color: var(--brand-blue); }
.sortable .sort-ind { opacity: .35; margin-left: 4px; font-size: .75rem; }
.sortable.sort-asc .sort-ind, .sortable.sort-desc .sort-ind { opacity: 1; }

.dialog-overlay { display: none; }
.dialog-overlay.open {
  display: flex; position: fixed; inset: 0;
  background: rgba(15,23,42,.55); z-index: 200;
  align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}

/* =====================================================================
   Detail view helpers
   ===================================================================== */
.grid-2 {
  display: grid; gap: 16px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}
.kv {
  display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0;
}
.kv dt { font-weight: 600; color: var(--ink-700); font-size: .85rem; }
.kv dd { margin: 0; color: var(--ink-900); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative; padding: 10px 0 10px 22px;
  border-left: 2px solid var(--ink-200); margin-left: 6px;
}
.timeline li::before {
  content: ''; position: absolute; left: -6px; top: 16px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-blue); border: 2px solid #fff;
}

.stat-meta { font-size: .8rem; margin-top: 4px; }
.rating-excellent { color: #0E8C5A; }
.rating-good { color: #047857; }
.rating-warning { color: #C2410C; }
.rating-poor { color: #B91C1C; }

/* Small badge variant */
.badge.small { padding: 2px 6px; font-size: .7rem; }
