/* ============================================================
   EDCHIMP PORTAL — SHARED BASE STYLESHEET
   Version 2.0 | Single source of truth for all 60 pages
   DO NOT modify per-page CSS files to override anything here.
   All components live here. Page CSS = page-unique rules only.
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* Core Brand */
  --azure-10:      #0a1628;
  --azure-20:      #1c2b4a;
  --azure-35:      #4a5568;
  --azure-59:      #8892a4;
  --cyan-primary:  #26c2ea;
  --cyan-dark:     #1a9bbf;
  --teal:          #00c9a7;

  /* Semantic */
  --green:         #10b981;
  --amber:         #f59e0b;
  --red:           #ef4444;
  --purple:        #8b5cf6;
  --blue-info:     #3b82f6;

  /* Backgrounds */
  --bg-page:       #f0fcff;
  --bg-card:       #ffffff;
  --bg-hover:      #e8f9ff;

  /* Borders */
  --border-light:  #e2eff5;
  --border-mid:    #c8dde8;

  /* Sidebar */
  --sidebar-grad-top:    #000000f7;
  --sidebar-grad-bottom: rgba(38,194,234,0.97);

  /* Layout */
  --sidebar-w:     260px;
  --topbar-h:      64px;

  /* Typography */
  --font-body:     'Plus Jakarta Sans', sans-serif;
  --font-display:  'Poppins', sans-serif;

  /* Elevation */
  --shadow-xs:     0 1px 3px rgba(10,22,40,0.06);
  --shadow-sm:     0 2px 8px rgba(10,22,40,0.08);
  --shadow-md:     0 4px 16px rgba(10,22,40,0.10);
  --shadow-lg:     0 8px 32px rgba(10,22,40,0.14);

  /* Border Radius */
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
  --radius-xl:     20px;
  --radius-pill:   999px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--azure-20);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan-primary); text-decoration: none; }
a:hover { color: var(--cyan-dark); }

img { max-width: 100%; display: block; }

button { cursor: pointer; font-family: var(--font-body); }

input, select, textarea { font-family: var(--font-body); }

ul, ol { list-style: none; }

/* ============================================================
   3. PORTAL SHELL LAYOUT
   ============================================================ */
.portal-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  grid-row: 1 / -1;
  grid-column: 1;
  background: linear-gradient(180deg, var(--sidebar-grad-top) 0%, var(--sidebar-grad-bottom) 100%);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-logo-mark {
  width: 34px;
  height: 34px;
  background: var(--cyan-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.role-badge {
  margin: 12px 14px 8px;
  background: rgba(38,194,234,0.15);
  border: 1px solid rgba(38,194,234,0.3);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--cyan-primary);
  text-transform: uppercase;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 9px;
  letter-spacing: 1.4px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  padding: 14px 18px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  position: relative;
  text-decoration: none;
  margin: 1px 8px;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--cyan-primary);
  color: #fff;
}

.nav-item.active:hover {
  background: var(--cyan-dark);
}

.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.nav-item.active .nav-badge { background: rgba(255,255,255,0.25); }

/* nav-badge-red — high-alert count badge on nav items (was duplicated in 17 page CSS files) */
.nav-badge-red {
  background: var(--red) !important;
  color: var(--bg-card) !important;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar-circle-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-name { font-weight: 700; font-size: 13px; color: #fff; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 1px; }

.btn-logout {
  display: block;
  text-align: center;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-logout:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* Topbar */
.topbar {
  grid-column: 2;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  flex: 1;
  max-width: 420px;
}

.topbar-search-input {
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  width: 100%;
  color: var(--azure-10);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.topbar-icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  color: var(--azure-35);
}
.topbar-icon-btn:hover { background: var(--bg-hover); }

.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid #fff;
}

.topbar-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-primary), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.topbar-username { font-weight: 600; font-size: 13px; color: var(--azure-10); }

/* Main Content */
.main-content {
  grid-column: 2;
  padding: 32px;
  overflow-y: auto;
  background: var(--bg-page);
  min-height: calc(100vh - var(--topbar-h));
}

/* ============================================================
   4. TYPOGRAPHY SCALE
   ============================================================ */
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--azure-10);
  line-height: 1.2;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--azure-10);
}

.card-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--azure-10);
}

.text-sm   { font-size: 12px; }
.text-xs   { font-size: 11px; }
/* !important ensures these win inside table cells, cards, and other
   inherited-color contexts. Removes the need for page-level overrides.
   (Batch 5 deduplication — 3 page CSS files had !important copies) */
.text-muted { color: var(--azure-59) !important; }
.text-secondary { color: var(--azure-35); }
.text-green { color: var(--green) !important; }
.text-amber { color: var(--amber) !important; }
.text-red   { color: var(--red) !important; }
.text-cyan  { color: var(--cyan-primary) !important; }
.text-purple { color: var(--purple); }
.font-bold  { font-weight: 700; }
.font-semi  { font-weight: 600; }

/* ============================================================
   5. PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.page-header-left { flex: 1; }
.page-header-right { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

.breadcrumb { font-size: 12px; color: var(--azure-59); margin-bottom: 4px; }
.breadcrumb a { color: var(--cyan-primary); }
.breadcrumb a:hover { color: var(--cyan-dark); }

.page-desc { font-size: 14px; color: var(--azure-35); margin-top: 4px; }

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary   { background: var(--cyan-primary); color: #fff; }
.btn-primary:hover { background: var(--cyan-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); color: #fff; }

.btn-secondary { background: transparent; color: var(--azure-10); border: 1.5px solid var(--border-mid); }
.btn-secondary:hover { border-color: var(--cyan-primary); color: var(--cyan-primary); }

.btn-ghost     { background: transparent; color: var(--azure-35); border: none; }
.btn-ghost:hover { color: var(--azure-10); background: var(--bg-hover); }

.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-success   { background: var(--green); color: #fff; }
.btn-success:hover { background: #059669; }

.btn-amber     { background: var(--amber); color: #fff; }
.btn-amber:hover { background: #d97706; }

.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-lg  { padding: 13px 28px; font-size: 14px; }
.btn-icon { padding: 8px; }

/* ============================================================
   7. STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge::before { content: '•'; font-size: 8px; }

.badge-green  { background: #d1fae5; color: #065f46; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-grey   { background: #f1f5f9; color: var(--azure-35); }
.badge-teal   { background: #ccfbf1; color: #065f46; }
.badge-cyan   { background: #e0f9ff; color: #0e7490; }

/* Tag pills (no dot) */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag-blue   { background: #dbeafe; color: #1e40af; }
.tag-green  { background: #d1fae5; color: #065f46; }
.tag-amber  { background: #fef3c7; color: #92400e; }
.tag-purple { background: #ede9fe; color: #5b21b6; }
.tag-grey   { background: #f1f5f9; color: var(--azure-35); }
.tag-teal   { background: #ccfbf1; color: #065f46; }
.tag-red    { background: #fee2e2; color: #991b1b; }
.tag-cyan   { background: #e0f9ff; color: #0e7490; }

/* ============================================================
   8. STAT CARDS
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s;
  text-decoration: none;
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon-cyan   { background: #e0f9ff; }
.stat-icon-green  { background: #d1fae5; }
.stat-icon-amber  { background: #fef3c7; }
.stat-icon-purple { background: #ede9fe; }
.stat-icon-teal   { background: #ccfbf1; }
.stat-icon-blue   { background: #dbeafe; }

.stat-body { flex: 1; }

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--azure-10);
  line-height: 1;
}

.stat-label { font-size: 13px; color: var(--azure-35); font-weight: 500; margin-top: 4px; }

.stat-delta { font-size: 12px; font-weight: 700; margin-top: 6px; }
.stat-delta.positive { color: var(--green); }
.stat-delta.negative { color: var(--red); }

/* Clickable stat card link */
.stat-card-link { cursor: pointer; }
.stat-card-link:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ============================================================
   9. DATA TABLES
   ============================================================ */
.table-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.search-box input {
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  width: 100%;
  color: var(--azure-10);
}

.search-icon { color: var(--azure-59); font-size: 14px; }

.table-filters { display: flex; gap: 4px; }

.filter-tab {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  color: var(--azure-35);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab.active { background: var(--cyan-primary); color: #fff; }
.filter-tab:hover:not(.active) { background: var(--bg-hover); color: var(--azure-10); }

.table-actions { display: flex; gap: 8px; margin-left: auto; }

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  text-align: left;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--azure-59);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 500;
  color: var(--azure-20);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody tr.row-urgent { background: #fff9f9; border-left: 3px solid var(--red); }
.data-table tbody tr.row-warning { background: #fffbf0; border-left: 3px solid var(--amber); }

/* Cell helpers */
.cell-name { display: flex; align-items: center; gap: 10px; }
.cell-name .name { font-weight: 700; font-size: 13px; color: var(--azure-10); }
.cell-name .sub  { font-size: 11px; color: var(--azure-59); margin-top: 1px; }

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-primary), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}

/* Avatar colour variants */
.av-cyan   { background: linear-gradient(135deg, #26c2ea, #00c9a7); }
.av-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.av-amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.av-green  { background: linear-gradient(135deg, #10b981, #059669); }
.av-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.av-blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.av-teal   { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.av-pink   { background: linear-gradient(135deg, #ec4899, #db2777); }

/* Table footer + pagination */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
}

.table-count { font-size: 12px; color: var(--azure-59); }

.pagination { display: flex; gap: 4px; }

.page-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  color: var(--azure-35);
  transition: all 0.15s;
}

.page-btn:hover { border-color: var(--cyan-primary); color: var(--cyan-primary); }
.page-btn.active { background: var(--cyan-primary); border-color: var(--cyan-primary); color: #fff; font-weight: 700; }
.page-btn-ellipsis { border: none; background: none; cursor: default; color: var(--azure-59); }

/* ============================================================
   10. CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.card-title { font-family: var(--font-body); font-weight: 700; font-size: 16px; color: var(--azure-10); }
.card-subtitle { font-size: 12px; color: var(--azure-59); margin-top: 2px; }
.card-body { padding: 24px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border-light); background: var(--bg-page); }

/* Spaced card helpers */
.card + .card { margin-top: 20px; }
.card-spaced  { margin-top: 20px; }

/* ============================================================
   11. FORM ELEMENTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--azure-20); }
.required { color: var(--red); }

.form-input, .form-select, .form-textarea {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--azure-10);
  background: var(--bg-card);
  transition: border-color 0.15s;
  outline: none;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 3px rgba(38,194,234,0.12);
}

.form-input:disabled, .form-select:disabled, .form-textarea:disabled {
  background: var(--bg-page);
  color: var(--azure-59);
  cursor: not-allowed;
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint { font-size: 11px; color: var(--azure-59); }
.form-hint-spaced { font-size: 11px; color: var(--azure-59); margin-top: 4px; }

.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.form-grid-spaced { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.form-group-spaced { margin-top: 16px; }

/* Input with badge/prefix */
.input-with-badge {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-with-badge .input-prefix {
  padding: 10px 12px;
  background: var(--bg-page);
  border-right: 1.5px solid var(--border-mid);
  font-size: 12px;
  color: var(--azure-59);
  font-weight: 600;
  white-space: nowrap;
}

.input-with-badge input {
  border: none;
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  background: transparent;
  color: var(--azure-10);
}

/* Section dividers in forms */
.form-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--azure-59);
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  margin-top: 24px;
}

/* ============================================================
   12. TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}

.tab {
  background: none;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--azure-59);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  white-space: nowrap;
}

.tab.active { color: var(--cyan-primary); border-bottom-color: var(--cyan-primary); }
.tab:hover:not(.active) { color: var(--azure-20); background: var(--bg-hover); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel.hidden { display: none; }

/* ============================================================
   13. EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
  gap: 12px;
  text-align: center;
}

.empty-icon { font-size: 48px; opacity: 0.4; }
.empty-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--azure-20); }
.empty-desc { font-size: 13px; color: var(--azure-59); max-width: 340px; line-height: 1.6; }

/* ============================================================
   14. NOTIFICATION PANEL
   ============================================================ */
.notif-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.notif-panel.open { right: 0; }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.notif-title { font-weight: 700; font-size: 16px; color: var(--azure-10); }
.notif-close { background: none; border: none; font-size: 13px; color: var(--cyan-primary); cursor: pointer; font-weight: 600; }

.notif-list { flex: 1; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: #f0f9ff; }

.notif-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.notif-text { font-size: 13px; color: var(--azure-20); line-height: 1.5; font-weight: 500; }
.notif-time { font-size: 11px; color: var(--azure-59); margin-top: 4px; }

/* Notification overlay */
.notif-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.3);
  z-index: 999;
}

.notif-overlay.open { display: block; }

/* ============================================================
   15. MODALS
   ============================================================ */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-lg { max-width: 720px; }
.modal-sm { max-width: 400px; }

@keyframes modalIn {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--azure-10); }
.modal-close { background: none; border: none; font-size: 20px; color: var(--azure-59); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--azure-10); }
.modal-body  { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 10px; }

/* ============================================================
   16. ALERT / BANNER
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 20px;
}

.alert-icon { font-size: 18px; flex-shrink: 0; }
.alert-body { flex: 1; }
.alert-title { font-weight: 700; margin-bottom: 2px; }

.alert-warning { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }
.alert-danger  { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info    { background: #dbeafe; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #d1fae5; border: 1px solid #a7f3d0; color: #065f46; }

/* ============================================================
   17. INFO GRID (Key-value pairs in profile/detail pages)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.info-item {}
.info-label { font-size: 11px; font-weight: 700; color: var(--azure-59); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 3px; }
.info-value { font-size: 13px; font-weight: 600; color: var(--azure-10); }

/* ============================================================
   18. TIMELINE
   ============================================================ */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-mid);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.timeline-dot.done    { background: var(--green); }
.timeline-dot.active  { background: var(--cyan-primary); }
.timeline-dot.pending { background: var(--border-mid); }

.timeline-item:not(:last-child) .timeline-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 10px);
  background: var(--border-light);
}

.timeline-content { flex: 1; }
.timeline-title { font-weight: 700; font-size: 13px; color: var(--azure-10); }
.timeline-meta  { font-size: 11px; color: var(--azure-59); margin-top: 2px; }
.timeline-body  { font-size: 13px; color: var(--azure-35); margin-top: 6px; line-height: 1.5; }

/* ============================================================
   19. HORIZONTAL APPLICATION STAGE TIMELINE
   ============================================================ */
.stage-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 20px 24px;
  overflow-x: auto;
}

.stage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 90px;
  position: relative;
}

.stage-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  width: calc(100% - 28px);
  height: 2px;
  background: var(--border-light);
  z-index: 0;
}

.stage-item.done::after { background: var(--green); }

.stage-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--azure-59);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.stage-item.done .stage-circle    { background: var(--green); color: #fff; }
.stage-item.active .stage-circle  { background: var(--cyan-primary); color: #fff; }
.stage-item.pending .stage-circle { background: var(--border-light); color: var(--azure-59); }

.stage-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--azure-59);
  text-align: center;
  margin-top: 6px;
  line-height: 1.3;
  max-width: 80px;
}

.stage-item.done .stage-label   { color: var(--green); }
.stage-item.active .stage-label { color: var(--cyan-primary); font-weight: 700; }

.stage-date {
  font-size: 10px;
  color: var(--azure-59);
  margin-top: 2px;
  text-align: center;
}

/* ============================================================
   20. DOCUMENT CHECKLIST
   ============================================================ */
.doc-checklist { display: flex; flex-direction: column; gap: 0; }

.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.doc-item:last-child { border-bottom: none; }
.doc-item:hover { background: var(--bg-hover); }

.doc-status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.doc-status-icon.verified  { background: #d1fae5; }
.doc-status-icon.pending   { background: #fef3c7; }
.doc-status-icon.missing   { background: #fee2e2; }
.doc-status-icon.review    { background: #dbeafe; }

.doc-name { font-weight: 600; font-size: 13px; color: var(--azure-10); flex: 1; }
.doc-meta { font-size: 11px; color: var(--azure-59); margin-top: 1px; }
.doc-actions { display: flex; gap: 6px; }

/* ============================================================
   21. PROGRESS BAR
   ============================================================ */
.progress-bar-wrap { background: var(--border-light); border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar { height: 6px; border-radius: var(--radius-pill); background: var(--cyan-primary); transition: width 0.3s ease; }
.progress-bar.bar-green  { background: var(--green); }
.progress-bar.bar-amber  { background: var(--amber); }
.progress-bar.bar-red    { background: var(--red); }
.progress-bar.bar-purple { background: var(--purple); }
.progress-bar.bar-thick  { height: 10px; }

/* ============================================================
   22. TOGGLE SWITCH
   ============================================================ */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13px; font-weight: 600; color: var(--azure-10); }
.toggle-hint  { font-size: 11px; color: var(--azure-59); margin-top: 2px; }

.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-mid);
  border-radius: var(--radius-pill);
  transition: 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--cyan-primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   23. STAT SUMMARY CHIPS (for list pages)
   ============================================================ */
.status-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.status-chip-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}

.status-chip-label { font-size: 12px; color: var(--azure-35); font-weight: 500; }

/* ============================================================
   24. EXPLORE PAGES — Filter Bar + Card Grid
   ============================================================ */
.explore-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
}

.filter-bar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 130px; }
.filter-group-label { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; color: var(--azure-59); text-transform: uppercase; }

.filter-select {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--azure-10);
  background: var(--bg-card);
  outline: none;
  cursor: pointer;
}

.filter-select:focus { border-color: var(--cyan-primary); }

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex: 2;
  min-width: 200px;
}

.filter-search input {
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  width: 100%;
  color: var(--azure-10);
}

/* Country/field quick-filter pills */
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.filter-pill {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  color: var(--azure-35);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-pill:hover  { border-color: var(--cyan-primary); color: var(--cyan-primary); }
.filter-pill.active { border-color: var(--cyan-primary); background: var(--cyan-primary); color: #fff; }

/* University card grid */
.uni-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.uni-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.uni-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.uni-card-banner {
  height: 90px;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  position: relative;
}

.uni-card-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  position: absolute;
  bottom: -16px;
  left: 14px;
}

.uni-card-body { padding: 24px 16px 16px; }
.uni-card-name { font-weight: 700; font-size: 14px; color: var(--azure-10); margin-bottom: 4px; }
.uni-card-location { font-size: 12px; color: var(--azure-59); margin-bottom: 10px; }

.uni-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.uni-meta-item { font-size: 11px; }
.uni-meta-label { color: var(--azure-59); }
.uni-meta-value { font-weight: 700; color: var(--azure-10); margin-top: 1px; }

.uni-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Program cards */
.program-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.program-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.program-card-header {
  height: 6px;
}

.program-card-body { padding: 16px; }
.program-card-name { font-weight: 700; font-size: 14px; color: var(--azure-10); margin-bottom: 4px; }
.program-card-uni  { font-size: 12px; color: var(--azure-59); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

.program-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.program-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Small icon box (uni/program logo in tables) */
.icon-box-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 9px;
  color: #fff;
  flex-shrink: 0;
}

/* ============================================================
   25. DASHBOARD LAYOUT HELPERS
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.dashboard-grid-wide {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.dashboard-col-main { display: flex; flex-direction: column; gap: 20px; }
.dashboard-col-side { display: flex; flex-direction: column; gap: 20px; }

/* ============================================================
   26. SETTINGS PAGE LAYOUT
   ============================================================ */
.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.settings-nav {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: sticky;
  top: calc(var(--topbar-h) + 32px);
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--azure-35);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: all 0.15s;
}

.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: var(--bg-hover); color: var(--azure-10); }
.settings-nav-item.active { background: #f0f9ff; color: var(--cyan-primary); border-left: 3px solid var(--cyan-primary); }
.settings-nav-item.danger { color: var(--red); }
.settings-nav-item.danger:hover { background: #fff5f5; }

.settings-section { display: none; }
.settings-section.active { display: block; }

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  margin-top: 24px;
}

/* ============================================================
   27. SAVE TOAST
   ============================================================ */
.save-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--azure-10);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-toast.visible { transform: translateY(0); opacity: 1; }

/* ============================================================
   28. LAYOUT UTILITIES
   ============================================================ */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end  { justify-content: flex-end; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.ml-auto { margin-left: auto; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.p-0   { padding: 0; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   29. RESPONSIVE (1280px and below — stat grid collapses)
   ============================================================ */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid-wide { grid-template-columns: 1fr; }
  .uni-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .portal-shell { grid-template-columns: 72px 1fr; }
  --sidebar-w: 72px;
  .sidebar-logo-text { display: none; }
  .role-badge { display: none; }
  .nav-item { padding: 10px; justify-content: center; }
  .nav-icon { width: auto; }
  .nav-item span:not(.nav-icon):not(.nav-badge) { display: none; }
  .sidebar-user-name, .sidebar-user-role { display: none; }
  .sidebar-footer { padding: 10px 8px; }
  .settings-layout { grid-template-columns: 1fr; }
}


/* ============================================================
   MISSING GLOBAL UTILITIES — added by audit fix pass
   These were being used across multiple pages without definition
   ============================================================ */

/* portal-main: legacy alias for main-content grid placement */
.portal-main {
  grid-column: 2;
  padding: 32px;
  overflow-y: auto;
  background: var(--bg-page);
  min-height: calc(100vh - var(--topbar-h));
}

/* stats-row: horizontal quick-stats strip (legacy alias for stats-strip) */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* stat-num: legacy alias for stat-value in dashboard quick-stats */
.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  color: var(--azure-10);
}

/* page-header-top: flex row for title + CTA in page headers */
.page-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

/* form-grid-2: two-column form layout */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* page-tabs global (moved from individual page CSS files) */
.page-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
}
.page-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--azure-35);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.page-tab:hover  { color: var(--azure-10); }
.page-tab.active { color: var(--cyan-primary); border-bottom-color: var(--cyan-primary); }
.tab-count       { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--bg-page); color: var(--azure-35); }
.tab-count-amber { background: #fef3c7; color: #92400e; }
.tab-count-red   { background: #fee2e2; color: var(--red); }
.tab-count-cyan  { background: rgba(38,194,234,0.12); color: var(--cyan-dark); }
.tab-count-green { background: #d1fae5; color: #065f46; }

/* pipeline-tiles global (moved from 9 separate page CSS files) */
.pipeline-tiles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pipeline-tile {
  flex: 1;
  min-width: 80px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  cursor: pointer;
  transition: transform 0.1s;
}
.pipeline-tile:hover { transform: translateY(-2px); }
.active-tile { background: rgba(38,194,234,0.08); border-color: rgba(38,194,234,0.25); }
.active-tile .pt-count { color: var(--cyan-primary); }
.pt-dot   { width: 8px; height: 8px; border-radius: 50%; margin: 0 auto 4px; }
.pt-count { font-family: var(--font-display); font-weight: 900; font-size: 20px; line-height: 1; color: var(--azure-10); }
.pt-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; color: var(--azure-35); }
.tile-all        { background: rgba(38,194,234,0.08); border-color: rgba(38,194,234,0.25); }
.tile-all        .pt-count { color: var(--cyan-primary); }
.tile-submitted  { background: #eff6ff; border-color: #bfdbfe; }
.tile-submitted  .pt-count { color: var(--blue-info); }
.tile-review     { background: #fffbeb; border-color: #fde68a; }
.tile-review     .pt-count { color: var(--amber); }
.tile-docs       { background: #fff5f5; border-color: #fecaca; }
.tile-docs       .pt-count { color: var(--red); }
.tile-offer      { background: #f0fdf4; border-color: #bbf7d0; }
.tile-offer      .pt-count { color: var(--green); }
.tile-enrolled   { background: rgba(38,194,234,0.06); border-color: rgba(38,194,234,0.2); }
.tile-enrolled   .pt-count { color: var(--teal); }
.tile-conditional { background: #faf5ff; border-color: #e9d5ff; }
.tile-conditional .pt-count { color: var(--purple); }
.tile-deferred   { background: #f5f5f4; border-color: #d6d3d1; }
.tile-deferred   .pt-count { color: var(--azure-59); }

/* stats-strip and stat-value global (from team/dashboard pages) */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--azure-10);
  line-height: 1;
}

/* ── Standardised commission status badges ──────────────────── */
.comm-status-pending   { background: #fef3c7; color: #92400e; }
.comm-status-paid      { background: #d1fae5; color: #065f46; }
.comm-status-overdue   { background: #fee2e2; color: var(--red); }
.comm-status-disputed  { background: #faf5ff; color: var(--purple); }
.comm-status-approved  { background: rgba(38,194,234,0.1); color: var(--cyan-dark); }

/* ============================================================
   30. SHARED DETAIL PAGE COMPONENTS
   Moved from 4 shared-*.css files (LOW-02 audit fix)
   ============================================================ */

/* Apply via EPA banner (shown on program/university detail pages for non-EPA roles) */
.apply-via-epa-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;background:rgba(38,194,234,0.05);border:1.5px solid var(--cyan-primary);border-radius:var(--radius-lg);margin-bottom:20px;flex-wrap:wrap;}
.aveb-left{display:flex;align-items:flex-start;gap:14px;flex:1;}
.aveb-icon{font-size:22px;flex-shrink:0;}
.aveb-title{font-weight:700;font-size:13px;color:var(--azure-10);margin-bottom:3px;}
.aveb-desc{font-size:12px;color:var(--azure-35);line-height:1.5;}

/* AI match result strip (shown on student profile and application detail) */
.ai-match-result{display:flex;align-items:center;gap:16px;padding:14px 20px;background:#f0fdf4;border:1.5px solid #bbf7d0;border-radius:var(--radius-lg);margin-bottom:20px;flex-wrap:wrap;}
.amr-icon{font-size:22px;flex-shrink:0;}
.amr-body{flex:1;}
.amr-title{font-weight:700;font-size:13px;color:var(--azure-10);margin-bottom:3px;}
.amr-details{font-size:12px;color:var(--azure-35);}
.amr-badge{display:inline-flex;padding:4px 12px;border-radius:var(--radius-pill);background:var(--green);color:#fff;font-size:11px;font-weight:700;}

/* ============================================================
   31. SKELETON LOADING STATES
   Global shimmer animation for data-loading placeholders.
   Usage: add class="skeleton skeleton-text" to placeholder elements.
   ============================================================ */

@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--border-light) 25%,
    #e8f4f8 50%,
    var(--border-light) 75%
  );
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

/* Text line placeholder: height matches typical line heights */
.skeleton-text {
  height: 13px;
  margin-bottom: 6px;
  border-radius: 4px;
  display: block;
}
.skeleton-text.sk-w-80  { width: 80%;  }
.skeleton-text.sk-w-60  { width: 60%;  }
.skeleton-text.sk-w-40  { width: 40%;  }
.skeleton-text.sk-w-100 { width: 100%; }

/* Heading placeholder */
.skeleton-heading {
  height: 20px;
  margin-bottom: 10px;
  border-radius: 4px;
  display: block;
  width: 55%;
}

/* Circular avatar placeholder */
.skeleton-avatar {
  border-radius: 50% !important;
  flex-shrink: 0;
}
.skeleton-avatar-sm  { width: 32px; height: 32px; }
.skeleton-avatar-md  { width: 40px; height: 40px; }

/* Badge placeholder */
.skeleton-badge {
  height: 22px;
  width: 80px;
  border-radius: var(--radius-pill) !important;
}

/* Full table row skeleton */
.skeleton-row td {
  padding: 14px 16px;
}
.skeleton-row td > * {
  background: linear-gradient(90deg,
    var(--border-light) 25%,
    #e8f4f8 50%,
    var(--border-light) 75%
  );
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
  display: block;
  height: 13px;
  width: 70%;
  user-select: none;
  pointer-events: none;
}

/* body.modal-open scroll lock (F-03) */
body.modal-open { overflow: hidden; }

/* Stat card skeleton */
.skeleton-stat {
  height: 90px;
  border-radius: var(--radius-lg) !important;
}

/* Card skeleton */
.skeleton-card {
  height: 120px;
  border-radius: var(--radius-lg) !important;
}

/* Button to trigger skeleton preview (dev helper — hidden in prod) */
.skeleton-demo-trigger { display: none; }

/* ============================================================
   32. EMPTY STATE DESIGNS
   Global component for empty tables, lists, and card grids.
   Usage: <div class="empty-state"> … </div>
   Or inside a table: <tr><td colspan="99"><div class="empty-state"> … </div></td></tr>
   ============================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
  text-align: center;
  gap: 8px;
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.empty-state-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--azure-20);
}

.empty-state-desc {
  font-size: 13px;
  color: var(--azure-59);
  line-height: 1.6;
  max-width: 340px;
}

.empty-state-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Compact variant for small panels */
.empty-state-sm {
  padding: 28px 20px;
}
.empty-state-sm .empty-state-icon { font-size: 28px; }
.empty-state-sm .empty-state-title { font-size: 13px; }
.empty-state-sm .empty-state-desc  { font-size: 12px; }

/* Inside a table cell */
.empty-state-row td { padding: 0 !important; border: none !important; }

/* E-07: Document upload progress bar */
.upload-progress-wrap {
  margin-top: 10px;
  display: none;
}
.upload-progress-wrap.active { display: block; }
.upload-progress-bar-track {
  background: var(--border-light, #e5e7eb);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}
.upload-progress-bar-fill {
  background: var(--cyan-primary, #26c2ea);
  height: 6px;
  border-radius: 999px;
  width: 0%;
  transition: width 0.25s ease;
}
.upload-progress-label {
  font-size: 11px;
  color: var(--azure-59, #6b7280);
  display: flex;
  justify-content: space-between;
}
.upload-drop-zone.drop-active {
  border-color: var(--cyan-primary, #26c2ea);
  background: rgba(38, 194, 234, 0.05);
}
