/* ================================================================
   PRATHIBHA INSTITUTE — Design System
   Theme: Navy Blue (#0A1F44) + Teal + Amber accents
   ================================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --navy:          #0A1F44;
  --navy-dark:     #071530;
  --navy-mid:      #122654;
  --navy-light:    #1a3568;
  --navy-hover:    #1e3e7b;
  --navy-subtle:   rgba(10, 31, 68, 0.08);

  --teal:          #0d9488;
  --teal-light:    #e6f7f6;

  --amber:         #d97706;
  --amber-light:   #fef3c7;

  --rose:          #e11d48;
  --rose-light:    #ffe4e6;

  --blue-accent:   #2563eb;
  --blue-light:    #dbeafe;

  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --border:        #e2e8f0;
  --border-light:  #f1f5f9;

  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;

  --sidebar-w:     260px;
  --sidebar-w-sm:  72px;
  --header-h:      62px;

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --shadow-sm:     0 1px 3px rgba(10,31,68,0.08), 0 1px 2px rgba(10,31,68,0.04);
  --shadow:        0 4px 16px rgba(10,31,68,0.10), 0 1px 4px rgba(10,31,68,0.06);
  --shadow-lg:     0 12px 40px rgba(10,31,68,0.14), 0 4px 12px rgba(10,31,68,0.08);
  --shadow-hover:  0 8px 28px rgba(10,31,68,0.16);

  --transition:    all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ================================================================
   AUTHENTICATED APP LAYOUT
   ================================================================ */

/* ── App shell ─────────────────────────────────────────────── */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-body {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ================================================================
   FIXED HEADER
   ================================================================ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  z-index: 1030;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* Logo area */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: var(--sidebar-w);
  flex-shrink: 0;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.sidebar-toggle-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(13,148,136,0.4);
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.logo-accent { color: #5eead4; }

/* Search bar */
.header-search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
}

.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,0.45); }
.search-input:focus {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 3px rgba(94,234,212,0.15);
}

/* Search dropdown */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
}
.search-dropdown.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: background 0.15s;
}
.search-result-item:hover {
  background: var(--navy-subtle);
  color: var(--navy);
}

/* User controls */
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-icon {
  position: relative;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.btn-icon:hover { background: rgba(255,255,255,0.1); color: #fff; }

.badge-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: #f97316;
  border-radius: 50%;
  border: 2px solid var(--navy);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 5px 14px 5px 6px;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}
.user-pill:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.user-pill::after { display: none !important; } /* hide BS caret */

.user-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.user-name { font-weight: 500; }
.chevron { font-size: 0.7rem; opacity: 0.7; }

/* User dropdown */
.user-dropdown {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  padding: 6px 0;
  margin-top: 8px !important;
}
.user-dropdown .dropdown-header {
  padding: 10px 16px 8px;
}
.user-dropdown .dropdown-item {
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: 0;
  transition: background 0.15s;
}
.user-dropdown .dropdown-item:hover { background: var(--navy-subtle); }
.user-dropdown .dropdown-item.text-danger:hover { background: #fff1f2; }
.user-dropdown .dropdown-divider { margin: 4px 0; border-color: var(--border-light); }

/* ================================================================
   LEFT SIDEBAR
   ================================================================ */
.app-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: var(--navy-dark);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1020;
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1), transform 0.25s cubic-bezier(0.4,0,0.2,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Collapsed sidebar (desktop) */
.app-sidebar.collapsed {
  width: var(--sidebar-w-sm);
}
.app-sidebar.collapsed .sidebar-link-text,
.app-sidebar.collapsed .sidebar-section-label,
.app-sidebar.collapsed .sidebar-badge,
.app-sidebar.collapsed .sidebar-footer .sidebar-link-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}
.app-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 10px 0;
}
.app-sidebar.collapsed .sidebar-link-icon { margin: 0; }

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  padding: 20px 12px 12px;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.30);
  padding: 0 10px;
  margin-bottom: 6px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.60);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(37,99,235,0.35), rgba(13,148,136,0.20));
  color: #fff;
  border-left: 3px solid #5eead4;
  padding-left: 9px;
}
.sidebar-link.active .sidebar-link-icon { color: #5eead4; }

.sidebar-link-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.sidebar-link-text {
  transition: opacity 0.2s, width 0.2s;
  overflow: hidden;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--blue-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 100px;
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: auto;
  white-space: nowrap;
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1015;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* When sidebar is collapsed */
.app-sidebar.collapsed ~ .app-main,
.app-sidebar.collapsed + .sidebar-overlay + .app-main {
  margin-left: var(--sidebar-w-sm);
}

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

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-navy {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn-navy:hover {
  background: var(--navy-hover);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn-navy-outline {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn-navy-outline:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-1px);
}

/* ================================================================
   STAT CARDS
   ================================================================ */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: none;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.1;
  background: #fff;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.stat-card--blue   { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; }
.stat-card--teal   { background: linear-gradient(135deg, #0f766e, #0d9488); color: #fff; }
.stat-card--amber  { background: linear-gradient(135deg, #92400e, #d97706); color: #fff; }
.stat-card--rose   { background: linear-gradient(135deg, #9f1239, #e11d48); color: #fff; }
.stat-card--orange { background: linear-gradient(135deg, #c2410c, #ea580c); color: #fff; }
.stat-card--red    { background: linear-gradient(135deg, #991b1b, #dc2626); color: #fff; }
.stat-card--purple { background: linear-gradient(135deg, #6b21a8, #9333ea); color: #fff; }
.stat-card--green  { background: linear-gradient(135deg, #166534, #16a34a); color: #fff; }

.stat-card__icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.18);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.stat-card__body { flex: 1; }
.stat-card__label {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.82;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card__value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compact variant — used when 6 cards share a row (e.g. Reports overview) */
.stat-card--compact {
  padding: 16px 14px 14px;
  gap: 12px;
}
.stat-card--compact .stat-card__icon {
  width: 42px;
  height: 42px;
  font-size: 1.15rem;
}
.stat-card--compact .stat-card__value {
  font-size: 1.05rem;
}
.stat-card--compact .stat-card__label {
  font-size: 0.7rem;
}
.stat-card__trend {
  font-size: 0.75rem;
  opacity: 0.82;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ================================================================
   DASH CARDS (generic content cards)
   ================================================================ */
.dash-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  overflow: hidden;
}
.dash-card:hover { box-shadow: var(--shadow); }

.dash-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.dash-card__header-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-accent);
  text-decoration: none;
}
.dash-card__header-link:hover { text-decoration: underline; }

.dash-card__body { padding: 20px; }

/* Color helpers for icons inside headers */
.text-navy  { color: var(--navy) !important; }
.text-teal  { color: var(--teal) !important; }
.text-amber { color: var(--amber) !important; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-state__icon {
  font-size: 2.5rem;
  color: var(--border);
  display: block;
  margin-bottom: 12px;
}
.empty-state__text {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.empty-state__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ================================================================
   QUICK ACTION BUTTONS
   ================================================================ */
.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.quick-action-btn i:first-child {
  width: 20px;
  text-align: center;
  color: var(--navy);
  font-size: 1rem;
}
.quick-action-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: translateX(3px);
}
.quick-action-btn:hover i { color: #fff !important; }

/* ================================================================
   MODULE CARDS (bottom row)
   ================================================================ */
.module-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--navy);
  color: var(--text-primary);
}
.module-card:hover .module-card__arrow {
  transform: translateX(4px);
  color: var(--navy);
}

.module-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.module-card__icon--blue  { background: var(--blue-light);  color: var(--blue-accent); }
.module-card__icon--teal  { background: var(--teal-light);  color: var(--teal); }
.module-card__icon--amber { background: var(--amber-light); color: var(--amber); }
.module-card__icon--rose  { background: var(--rose-light);  color: var(--rose); }

.module-card__label {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.module-card__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
}
.module-card__arrow {
  position: absolute;
  bottom: 20px; right: 20px;
  font-size: 1.1rem;
  color: var(--border);
  transition: var(--transition);
}

/* ================================================================
   COURSE CARDS
   ================================================================ */
.course-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition);
  overflow: hidden;
}
.course-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(10, 31, 68, 0.18);
  transform: translateY(-3px);
}
.course-card--inactive {
  opacity: 0.72;
}
.course-card--inactive:hover {
  opacity: 1;
}

/* Top strip */
.course-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 0;
}
.course-card__icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: var(--blue-light);
  color: var(--blue-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.course-card__badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge-active {
  background: #dcfce7;
  color: #15803d;
}
.badge-inactive {
  background: #f1f5f9;
  color: var(--text-muted);
}

/* Body */
.course-card__body {
  padding: 12px 16px 14px;
  flex: 1;
}
.course-card__name {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}
.course-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.course-card__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.course-card__meta-item i {
  font-size: 0.85rem;
  color: var(--teal);
  flex-shrink: 0;
}
.course-card__price {
  font-weight: 700;
  color: var(--navy);
}
.course-card__concepts {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Action row */
.course-card__actions {
  display: flex;
  border-top: 1px solid var(--border-light);
}
.btn-card-edit,
.btn-card-delete {
  flex: 1;
  padding: 9px 0;
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-card-edit {
  color: var(--navy);
  border-right: 1px solid var(--border-light);
}
.btn-card-edit:hover {
  background: var(--navy-subtle);
  color: var(--navy-dark);
}
.btn-card-delete {
  color: var(--rose);
}
.btn-card-delete:hover {
  background: var(--rose-light);
}

/* ── Modal Navy theme ── */
.modal-navy .modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(10,31,68,0.18), 0 4px 16px rgba(10,31,68,0.10);
  overflow: hidden;                         /* clip children to rounded corners */
  background: var(--surface);
}
.modal-navy .modal-header {
  background: var(--navy);
  color: #fff;
  border-radius: 0;
  border-bottom: none;
  padding: 18px 22px;
}
.modal-navy .modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.modal-navy .modal-body {
  background: var(--surface);
  color: var(--text-primary);
  padding: 22px;
}
.modal-navy .modal-footer {
  background: var(--surface-2);
  padding: 14px 22px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-navy .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.modal-navy p,
.modal-navy .text-muted,
.modal-navy .form-text {
  color: var(--text-muted) !important;
}
.modal-navy strong {
  color: var(--text-primary);
}
.modal-navy .form-control,
.modal-navy .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text-primary);
}
.modal-navy .form-control::placeholder {
  color: var(--text-muted);
}
.modal-navy .form-control:focus,
.modal-navy .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10,31,68,0.10);
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
}
.modal-navy textarea.form-control {
  resize: vertical;
  min-height: 72px;
}

/* Form section divider inside modals */
.form-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 6px 0 4px;
  border-bottom: 1px solid rgba(13,148,136,0.18);
  margin-bottom: 4px;
}

/* btn-navy-outline inside modals (light body) */
.modal-navy .btn-navy-outline {
  color: var(--text-secondary);
  border-color: var(--border);
  background: var(--surface);
}
.modal-navy .btn-navy-outline:hover {
  color: var(--navy);
  border-color: var(--navy);
  background: var(--navy-subtle);
  transform: none;
}

/* ================================================================
   APP FOOTER
   ================================================================ */
.app-footer {
  text-align: center;
  padding: 20px;
  margin-top: 36px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* ================================================================
   AUTH PAGES (login)
   ================================================================ */
.auth-body {
  background: var(--surface-2);
  min-height: 100vh;
}

.auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Left branding panel */
.auth-brand-panel {
  flex: 0 0 42%;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, #1a4a8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
}

.auth-brand-content { position: relative; z-index: 2; }

.auth-logo {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 8px 32px rgba(13,148,136,0.4);
}

.auth-brand-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.auth-brand-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  margin-top: 6px;
}

.auth-feature-list { display: flex; flex-direction: column; gap: 14px; }
.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.80);
  font-size: 0.9rem;
}
.auth-feature-item i { color: #5eead4; font-size: 1rem; flex-shrink: 0; }

/* Decorative circles */
.auth-deco-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.auth-deco-circle--1 {
  width: 320px; height: 320px;
  top: -80px; right: -100px;
}
.auth-deco-circle--2 {
  width: 200px; height: 200px;
  bottom: -40px; left: -60px;
}

/* Right form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--surface);
}

.auth-form-inner { width: 100%; max-width: 400px; }

.auth-form-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.auth-form-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Floating label inputs */
.auth-input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: var(--transition);
  background: var(--surface-2);
  padding-right: 42px;
}
.auth-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10,31,68,0.10);
  background: #fff;
}

/* Password toggle */
.pwd-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
  z-index: 5;
  line-height: 1;
}
.pwd-toggle:hover { color: var(--navy); }

.auth-alert-error {
  background: var(--rose-light);
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.btn-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--navy), var(--navy-hover));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.2px;
}
.btn-auth-submit:hover {
  background: linear-gradient(135deg, var(--navy-hover), var(--navy-light));
  box-shadow: 0 6px 20px rgba(10,31,68,0.30);
  transform: translateY(-1px);
}

.auth-footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet (< 992px) — sidebar becomes drawer */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
  }
  .app-sidebar.mobile-open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0 !important;
  }
  .header-logo {
    min-width: auto;
  }
  .logo-text { display: none; }

  /* Auth: stack panels on tablet */
  .auth-brand-panel { flex: 0 0 38%; padding: 40px 30px; }
  .auth-brand-title { font-size: 1.5rem; }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  .header-search { max-width: 100%; }
  .logo-text { display: none; }

  .page-content { padding: 16px 16px 0; }
  .page-header { flex-direction: column; align-items: flex-start; }

  /* Auth: single column on mobile */
  .auth-wrapper { flex-direction: column; }
  .auth-brand-panel {
    flex: none;
    min-height: 220px;
    padding: 36px 24px 32px;
  }
  .auth-feature-list { display: none; }
  .auth-deco-circle--1 { width: 160px; height: 160px; }
  .auth-form-panel { padding: 32px 20px; }
  .auth-form-inner { max-width: 100%; }
}

/* Small mobile (< 480px) */
@media (max-width: 479.98px) {
  .app-header { padding: 0 12px; gap: 8px; }
  .stat-card__value { font-size: 1.5rem; }
  .page-title { font-size: 1.15rem; }
  .btn-navy, .btn-navy-outline { padding: 7px 14px; font-size: 0.8rem; }
}


/* ================================================================
   STUDENTS MODULE � List + Detail styles
   ================================================================ */

/* -- Small avatar in table rows ---------------------------- */
.student-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0;
}

/* -- Large avatar on detail page header -------------------- */
.student-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* -- Enrollment count badge in table ----------------------- */
.enrollment-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue-accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  min-width: 26px;
  line-height: 1.4;
}

/* -- Small count pill in card headers --------------------- */
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-subtle);
  color: var(--navy);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 8px;
  line-height: 1.5;
}

/* -- Small icon-only action button ------------------------- */
.btn-icon-sm {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.btn-icon-sm:hover {
  background: var(--navy-subtle);
  color: var(--navy);
}
.btn-icon-sm.text-danger:hover {
  background: var(--rose-light);
  color: var(--rose);
}

/* -- Small labelled action buttons ------------------------- */
.btn-sm-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-sm-view {
  background: var(--blue-light);
  color: var(--blue-accent);
  border-color: #bfdbfe;
}
.btn-sm-view:hover { background: #dbeafe; color: #1d4ed8; }
.btn-sm-edit {
  background: var(--amber-light);
  color: var(--amber);
  border-color: #fde68a;
}
.btn-sm-edit:hover { background: #fef3c7; color: #b45309; }
.btn-sm-delete {
  background: var(--rose-light);
  color: var(--rose);
  border-color: #fecdd3;
}
.btn-sm-delete:hover { background: #ffe4e6; color: #be123c; }

/* -- Student detail page header card ----------------------- */
.student-header-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1f4590 100%);
  border-radius: 14px;
  padding: 24px 28px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(10, 31, 68, 0.20);
}

/* -- Header action buttons (Edit / Delete on detail page) -- */
.btn-header-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-header-action:hover { background: rgba(255, 255, 255, 0.20); }
.btn-header-danger { border-color: rgba(225, 29, 72, 0.5); }
.btn-header-danger:hover {
  background: rgba(225, 29, 72, 0.25);
  border-color: rgba(225, 29, 72, 0.7);
}

/* -- Personal info rows ------------------------------------- */
.info-row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.info-row:last-child { border-bottom: none; }
.info-label {
  flex: 0 0 120px;
  color: var(--text-secondary);
  font-weight: 500;
}
.info-value {
  flex: 1;
  color: var(--text-primary);
  word-break: break-word;
}
.info-divider {
  margin: 12px 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* -- Enrollment status badges ------------------------------- */
.enrollment-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}
.status-ongoing   { background: var(--blue-light);   color: var(--blue-accent); }
.status-completed { background: #dcfce7;              color: #15803d; }
.status-dropped   { background: #f1f5f9;              color: #64748b; }

/* -- Enrollment card ---------------------------------------- */
.enrollment-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow 0.15s;
}
.enrollment-card:hover { box-shadow: 0 2px 8px rgba(10,31,68,0.08); }

.enrollment-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
}
.enrollment-card__course {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}
.enrollment-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.enr-meta-item { display: inline-flex; align-items: center; gap: 3px; }

.enrollment-card__fee {
  padding: 10px 16px;
}
.enrollment-card__actions {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border-light);
}

/* -- Fee progress bar --------------------------------------- */
.fee-bar-track {
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.fee-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) 0%, #0fa896 100%);
  transition: width 0.4s ease;
  min-width: 4px;
}
.fee-bar-fill--cleared {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

/* -- Pay Fees button ---------------------------------------- */
.btn-pay-fee {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 8px;
  background: var(--teal-light);
  color: var(--teal);
  border: 1px solid rgba(13, 148, 136, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-pay-fee:hover { background: #ccf0ee; }

/* -- Certificate row ---------------------------------------- */
.cert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--surface-2);
}
.cert-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--amber-light);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cert-row__body { flex: 1; min-width: 0; }

/* -- Empty state -------------------------------------------- */
.empty-state {
  text-align: center;
  color: var(--text-muted);
}
.empty-state__icon {
  font-size: 2.2rem;
  color: var(--border);
  display: block;
  margin-bottom: 8px;
}
.empty-state__text {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.empty-state__sub {
  font-size: 0.78rem;
  margin-bottom: 0;
}

/* -- dash-card header with flex space-between --------------- */
.dash-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.dash-card__body {
  padding: 20px;
}

/* -- Teal/amber text helpers -------------------------------- */
.text-teal  { color: var(--teal)  !important; }
.text-amber { color: var(--amber) !important; }
.text-navy  { color: var(--navy)  !important; }


/* ================================================================
   TRANSACTIONS / LEDGER styles
   ================================================================ */

/* -- Summary stat cards ---------------------------------------- */
.ledger-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ledger-stat__icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.ledger-stat__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.ledger-stat__value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

/* Income card � teal */
.ledger-stat--income {
  background: var(--teal-light);
}
.ledger-stat--income .ledger-stat__icon {
  background: rgba(13, 148, 136, 0.15);
  color: var(--teal);
}
.ledger-stat--income .ledger-stat__label { color: var(--teal); }
.ledger-stat--income .ledger-stat__value { color: var(--teal); }

/* Expense card � rose */
.ledger-stat--expense {
  background: var(--rose-light);
}
.ledger-stat--expense .ledger-stat__icon {
  background: rgba(225, 29, 72, 0.12);
  color: var(--rose);
}
.ledger-stat--expense .ledger-stat__label { color: var(--rose); }
.ledger-stat--expense .ledger-stat__value { color: var(--rose); }

/* Balance card � positive (navy) */
.ledger-stat--balance-pos {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
}
.ledger-stat--balance-pos .ledger-stat__icon {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.ledger-stat--balance-pos .ledger-stat__label { color: rgba(255,255,255,0.75); }
.ledger-stat--balance-pos .ledger-stat__value { color: #fff; }

/* Balance card � negative (red) */
.ledger-stat--balance-neg {
  background: #fff0f3;
}
.ledger-stat--balance-neg .ledger-stat__icon {
  background: rgba(225, 29, 72, 0.12);
  color: var(--rose);
}
.ledger-stat--balance-neg .ledger-stat__label { color: var(--rose); }
.ledger-stat--balance-neg .ledger-stat__value { color: var(--rose); }

/* -- Ledger table ----------------------------------------------- */
.ledger-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  white-space: nowrap;
}
.ledger-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.ledger-table tbody tr:last-child td { border-bottom: none; }
.ledger-table tbody tr:hover { background: var(--surface-2); }

/* -- Transaction type badges ------------------------------------ */
.txn-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
}
.txn-badge--income  { background: var(--teal-light);  color: var(--teal); }
.txn-badge--expense { background: var(--rose-light);  color: var(--rose); }

/* -- Amount column colouring ------------------------------------ */
.txn-amount--income  { color: var(--teal); }
.txn-amount--expense { color: var(--rose); }

/* -- Student link in ledger ------------------------------------- */
.txn-link:hover { text-decoration: underline !important; }

/* -- Search box (small, inline in card header) ------------------ */
.search-wrapper-sm {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-icon-sm {
  position: absolute;
  left: 9px;
  color: var(--text-muted);
  font-size: 0.78rem;
  pointer-events: none;
}
.search-input-sm {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px 5px 28px;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--text-primary);
  width: 180px;
  transition: border-color 0.15s;
  outline: none;
}
.search-input-sm:focus { border-color: var(--navy); }


/* ═══════════════════════════════════════════════════════
   Certificate styles
═══════════════════════════════════════════════════════ */

/* "Generate Certificate" button inside enrollment card */
.btn-gen-cert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  background: transparent;
  border: 1px dashed var(--teal);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-gen-cert:hover {
  background: var(--teal);
  color: #fff;
}

/* Issued certificate strip inside enrollment card */
.enrollment-card__cert {
  border-top: 1px solid var(--border);
}
.enrollment-cert--issued {
  font-size: 0.82rem;
}
.enrollment-cert--issued .text-amber {
  color: var(--amber);
  font-size: 1rem;
}

/* Certificate template table row highlight */
.cert-template-row.default-template {
  background: rgba(13, 148, 136, 0.06);
}

/* monospace cert ID chip */
.font-monospace {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  letter-spacing: 0.04em;
}


/* ═══════════════════════════════════════════════════════
   Batch card styles
═══════════════════════════════════════════════════════ */

.batch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;
}
.batch-card:hover {
  box-shadow: 0 4px 20px rgba(10,31,68,0.10);
  transform: translateY(-2px);
}

.batch-card__course-tag {
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 14px;
  letter-spacing: 0.02em;
}

.batch-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 12px 14px 6px;
}

.batch-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 14px 12px;
}
.batch-card__meta-item {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}
.batch-card__meta-item.text-teal {
  color: var(--teal);
  font-weight: 600;
}

.batch-card__actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Badge for course name in tables */
.badge-course-tag {
  display: inline-block;
  background: rgba(10,31,68,0.08);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 8px;
}

/* ── Global Search Dropdown enhancements ─────────────────────────────────── */
.search-dropdown {
  max-height: 420px;
  overflow-y: auto;
}

.search-result-section {
  padding: 6px 16px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-subtle, #f8f9fb);
  border-bottom: 1px solid var(--border);
}
.search-result-section:not(:first-child) {
  border-top: 1px solid var(--border);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover      { background: var(--navy-subtle, #eef1f8); }

.search-result-icon-wrap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.badge-search-student {
  background: rgba(13,148,136,0.12);
  color: var(--teal);
}
.badge-search-course {
  background: rgba(10,31,68,0.1);
  color: var(--navy);
}
.badge-search-cert {
  background: rgba(217,119,6,0.12);
  color: var(--amber);
}

.search-result-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.search-result-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-arrow {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}
.search-result-item:hover .search-result-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Loading & empty states */
.search-loading,
.search-empty {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }
.search-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM
════════════════════════════════════════════════════════════ */
.toast-container-custom {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 340px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px 18px;
  border-left: 4px solid;
  animation: toastIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  position: relative;
  overflow: hidden;
  pointer-events: all;
}

.toast-item.toast-hiding {
  animation: toastOut 0.26s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.95); }
  to   { opacity: 1; transform: translateX(0)    scale(1);    }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0)   scale(1);    }
  to   { opacity: 0; transform: translateX(60%) scale(0.95); }
}

.toast-item--success { border-color: var(--teal); }
.toast-item--error   { border-color: var(--rose); }
.toast-item--warning { border-color: var(--amber); }
.toast-item--info    { border-color: var(--blue-accent); }

.toast-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-item--success .toast-icon { background: var(--teal-light);  color: var(--teal); }
.toast-item--error   .toast-icon { background: var(--rose-light);  color: var(--rose); }
.toast-item--warning .toast-icon { background: var(--amber-light); color: var(--amber); }
.toast-item--info    .toast-icon { background: var(--blue-light);  color: var(--blue-accent); }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.toast-item--success .toast-title { color: var(--teal); }
.toast-item--error   .toast-title { color: var(--rose); }
.toast-item--warning .toast-title { color: var(--amber); }
.toast-item--info    .toast-title { color: var(--blue-accent); }

.toast-text {
  font-size: 0.855rem;
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
}

.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 0.95rem;
  padding: 0; flex-shrink: 0; line-height: 1;
  transition: color 0.15s; align-self: flex-start;
}
.toast-close:hover { color: var(--text-primary); }

.toast-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: currentColor;
  border-radius: 0 0 0 var(--radius);
  animation: toastProgress var(--toast-dur, 4s) linear forwards;
}
.toast-item--success .toast-progress { color: var(--teal); }
.toast-item--error   .toast-progress { color: var(--rose); }
.toast-item--warning .toast-progress { color: var(--amber); }
.toast-item--info    .toast-progress { color: var(--blue-accent); }

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%;   }
}

/* ════════════════════════════════════════════════════════════
   TABLE PAGINATION
════════════════════════════════════════════════════════════ */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.tp-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.tp-info strong { color: var(--text-secondary); }

.tp-pages {
  display: flex;
  align-items: center;
  gap: 3px;
}

.tp-btn {
  min-width: 32px; height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.tp-btn:hover:not(:disabled):not(.active) {
  background: var(--navy-subtle);
  border-color: var(--navy);
  color: var(--navy);
}
.tp-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.tp-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.tp-ellipsis {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 4px;
  user-select: none;
}

/* ════════════════════════════════════════════════════════════
   ENHANCED STATUS / FEE BADGES
════════════════════════════════════════════════════════════ */
.badge-fee-due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--rose-light);
  color: var(--rose);
  border: 1px solid #fecdd3;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}
.badge-fee-clear {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}
.badge-enrollment {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--blue-light);
  color: var(--blue-accent);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 9px;
}

/* status-active (used in cert templates) */
.badge-status {
  display: inline-flex; align-items: center; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; padding: 2px 8px;
}
.status-active   { background: #dcfce7; color: #15803d; }
.status-inactive { background: #f1f5f9; color: #64748b; }

/* ════════════════════════════════════════════════════════════
   ENHANCED TABLE STYLES (global overrides)
════════════════════════════════════════════════════════════ */
.table > thead > tr > th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-bottom: 2px solid var(--border) !important;
  padding: 10px 14px;
  white-space: nowrap;
  vertical-align: middle;
}
.table > tbody > tr > td {
  padding: 11px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light) !important;
}
.table > tbody > tr:last-child > td { border-bottom: none !important; }
.table-hover > tbody > tr { transition: background 0.12s; }
.table-hover > tbody > tr:hover > td { background: rgba(10,31,68,0.025); }

/* First/last padding on standard tables */
.table.ps-4-first > thead > tr > th:first-child,
.table.ps-4-first > tbody > tr > td:first-child { padding-left: 24px; }
.table.ps-4-first > thead > tr > th:last-child,
.table.ps-4-first > tbody > tr > td:last-child  { padding-right: 24px; }

/* ════════════════════════════════════════════════════════════
   BUTTON ENHANCEMENTS
════════════════════════════════════════════════════════════ */
.btn-navy:active, .btn-navy-outline:active { transform: translateY(0) !important; box-shadow: none !important; }

.btn-teal {
  display: inline-flex; align-items: center;
  padding: 8px 18px;
  background: var(--teal); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; line-height: 1.4;
}
.btn-teal:hover {
  background: #0b8278; color: #fff;
  box-shadow: 0 4px 14px rgba(13,148,136,0.35);
  transform: translateY(-1px);
}

.btn-rose {
  display: inline-flex; align-items: center;
  padding: 8px 18px;
  background: var(--rose); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; line-height: 1.4;
}
.btn-rose:hover {
  background: #be123c; color: #fff;
  box-shadow: 0 4px 14px rgba(225,29,72,0.30);
  transform: translateY(-1px);
}

/* ════════════════════════════════════════════════════════════
   CARD ACCENT TOP-BORDERS
════════════════════════════════════════════════════════════ */
.dash-card--accent-navy  { border-top: 3px solid var(--navy); }
.dash-card--accent-teal  { border-top: 3px solid var(--teal); }
.dash-card--accent-amber { border-top: 3px solid var(--amber); }
.dash-card--accent-rose  { border-top: 3px solid var(--rose); }
.dash-card--elevated     { box-shadow: var(--shadow); }
.dash-card--elevated:hover { box-shadow: var(--shadow-lg); }

/* ════════════════════════════════════════════════════════════
   FORM FOCUS RING — unified across all pages
════════════════════════════════════════════════════════════ */
.form-control:focus, .form-select:focus {
  border-color: var(--navy) !important;
  box-shadow: 0 0 0 3px rgba(10,31,68,0.10) !important;
  outline: none;
}


/* ================================================================
   REPORTS � report card tiles on the reports overview
   ================================================================ */
.report-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  color: var(--text-primary);
}
.report-card:hover {
  box-shadow: 0 6px 24px rgba(10,31,68,0.10);
  border-color: var(--navy);
  transform: translateY(-2px);
  color: var(--navy);
}
.report-card__icon {
  width: 54px; height: 54px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: #fff;
}
.report-card__icon--blue   { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.report-card__icon--orange { background: linear-gradient(135deg, #c2410c, #ea580c); }
.report-card__icon--teal   { background: linear-gradient(135deg, #0f766e, #0d9488); }
.report-card__icon--purple { background: linear-gradient(135deg, #6b21a8, #9333ea); }
.report-card__body { flex: 1; }
.report-card__title { font-size: 1rem; font-weight: 700; color: var(--navy); }
.report-card__desc  { font-size: 0.82rem; color: var(--text-secondary); margin-top: 3px; }
.report-card__arrow { font-size: 1rem; color: var(--text-secondary); flex-shrink: 0; }

/* -- text-purple helper -- */
.text-purple { color: #7c3aed !important; }
