/**
 * ============================================================================
 * InstituteCRM — AURORA Theme Override v2
 * Dark & Light modes, glassmorphism effects, refined admin panels,
 * smooth animations, and premium component polish.
 * ============================================================================
 */

/* ========================================================================== */
/* Dark Theme                                                                 */
/* ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0c0f1a;
  --foreground: #f1f5f9;
  --card: #151926;
  --card-subtle: #1a1f30;
  --card-foreground: #f1f5f9;

  /* Brand Primary — Indigo-Violet Fusion */
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-active: #4f46e5;
  --primary-foreground: #ffffff;
  --primary-subtle: rgba(129, 140, 248, 0.1);
  --primary-glow: rgba(129, 140, 248, 0.2);

  /* Secondary & Muted */
  --secondary: #1e2438;
  --secondary-foreground: #e2e8f0;
  --muted: #1e2438;
  --muted-foreground: #94a3b8;
  --accent: #1e1b4b;
  --accent-foreground: #f1f5f9;

  /* Status */
  --success: #34d399;
  --success-foreground: #ffffff;
  --success-subtle: rgba(52, 211, 153, 0.1);
  --success-border: rgba(52, 211, 153, 0.25);
  --success-text: #6ee7b7;

  --warning: #fbbf24;
  --warning-foreground: #ffffff;
  --warning-subtle: rgba(251, 191, 36, 0.1);
  --warning-border: rgba(251, 191, 36, 0.25);
  --warning-text: #fde68a;

  --destructive: #f87171;
  --destructive-foreground: #ffffff;
  --destructive-subtle: rgba(248, 113, 113, 0.1);
  --destructive-border: rgba(248, 113, 113, 0.25);
  --destructive-text: #fca5a5;

  /* Borders & Inputs */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --input: rgba(255, 255, 255, 0.12);
  --input-bg: #1a1f30;
  --ring: #818cf8;

  /* Sidebar */
  --sidebar: #080b14;
  --sidebar-hover: #111625;
  --sidebar-foreground: #f1f5f9;
  --sidebar-muted: #94a3b8;
  --sidebar-accent: rgba(255, 255, 255, 0.05);
  --sidebar-border: rgba(255, 255, 255, 0.05);

  /* Gradients & Shadows */
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-surface: linear-gradient(180deg, #151926 0%, #111520 100%);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 8px 30px rgba(129, 140, 248, 0.2);
  --shadow-panel: var(--shadow-xl);
}

:root[data-theme="dark"] .topbar {
  background: rgba(12, 15, 26, 0.8);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] table.sheet thead th {
  background: #1a1f30;
  color: #cbd5e1;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] table.sheet tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
:root[data-theme="dark"] table.sheet tbody tr:hover td { background: rgba(129, 140, 248, 0.05); }

:root[data-theme="dark"] table.sheet .rownum {
  background: #131723;
  color: #94a3b8;
  border-right-color: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] table.sheet thead .rownum { background: #1a1f30; color: #cbd5e1; }
:root[data-theme="dark"] table.sheet tfoot td { background: #1a1f30; border-top-color: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] table.sheet tbody tr.rec-detail-row td { background: #111520; }

:root[data-theme="dark"] .quick-range-btns { background: #1a1f30; border-color: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] .btn.quick-range.active { background: var(--primary); color: #ffffff; }

:root[data-theme="dark"] .btn-paid { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.25); }
:root[data-theme="dark"] .btn-due { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.25); }

:root[data-theme="dark"] .alert {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
}

/* ========================================================================== */
/* Dark Mode Form Inputs & Search Boxes (High Contrast & Clear Readability)    */
/* ========================================================================== */
:root[data-theme="dark"] .table-search,
:root[data-theme="dark"] select.table-search,
:root[data-theme="dark"] .fee-search-compact,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .time12-input,
:root[data-theme="dark"] .input,
:root[data-theme="dark"] input[type="search"],
:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] input[type="tel"] {
  background-color: #1a1f30 !important;
  color: #f8fafc !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  caret-color: #818cf8 !important;
}

:root[data-theme="dark"] select option {
  background-color: #1a1f30 !important;
  color: #f8fafc !important;
}

:root[data-theme="dark"] .table-search::placeholder,
:root[data-theme="dark"] select.table-search::placeholder,
:root[data-theme="dark"] .fee-search-compact::placeholder,
:root[data-theme="dark"] .field input::placeholder,
:root[data-theme="dark"] .field textarea::placeholder,
:root[data-theme="dark"] .input::placeholder,
:root[data-theme="dark"] input[type="search"]::placeholder,
:root[data-theme="dark"] input::placeholder {
  color: #94a3b8 !important;
  opacity: 0.85 !important;
}

:root[data-theme="dark"] .table-search:focus,
:root[data-theme="dark"] select.table-search:focus,
:root[data-theme="dark"] .fee-search-compact:focus,
:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .field textarea:focus,
:root[data-theme="dark"] .field select:focus,
:root[data-theme="dark"] .time12-input:focus,
:root[data-theme="dark"] .input:focus,
:root[data-theme="dark"] input[type="search"]:focus,
:root[data-theme="dark"] input[type="text"]:focus,
:root[data-theme="dark"] input[type="password"]:focus,
:root[data-theme="dark"] input[type="email"]:focus,
:root[data-theme="dark"] input[type="number"]:focus,
:root[data-theme="dark"] input[type="tel"]:focus {
  background-color: #1e2438 !important;
  color: #ffffff !important;
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3) !important;
  outline: none !important;
}

/* Chrome / Safari / Edge search cancel 'x' clear icon in dark mode */
:root[data-theme="dark"] input[type="search"]::-webkit-search-cancel-button {
  filter: brightness(0) invert(0.85);
  cursor: pointer;
}

/* Chrome autofill styling in dark mode */
:root[data-theme="dark"] input:-webkit-autofill,
:root[data-theme="dark"] input:-webkit-autofill:hover, 
:root[data-theme="dark"] input:-webkit-autofill:focus,
:root[data-theme="dark"] textarea:-webkit-autofill,
:root[data-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: #f8fafc !important;
  -webkit-box-shadow: 0 0 0px 1000px #1a1f30 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ========================================================================== */
/* Light Theme                                                                */
/* ========================================================================== */
:root[data-theme="light"] {
  color-scheme: light;
  --background: #f0f2f8;
  --foreground: #111827;
  --card: #ffffff;
  --card-subtle: #fafbff;
  --card-foreground: #111827;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-active: #4338ca;
  --primary-foreground: #ffffff;
  --primary-subtle: rgba(99, 102, 241, 0.08);
  --primary-glow: rgba(99, 102, 241, 0.22);

  --secondary: #f1f3f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f3f9;
  --muted-foreground: #6b7280;
  --accent: #f5f3ff;
  --accent-foreground: #111827;

  /* Status */
  --success: #10b981;
  --success-foreground: #ffffff;
  --success-subtle: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --warning: #f59e0b;
  --warning-foreground: #ffffff;
  --warning-subtle: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --destructive-subtle: #fef2f2;
  --destructive-border: #fecaca;
  --destructive-text: #991b1b;

  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.13);
  --input: rgba(0, 0, 0, 0.08);
  --input-bg: #ffffff;
  --ring: #6366f1;

  /* Sidebar — Deep Space */
  --sidebar: #111827;
  --sidebar-hover: #1f2937;
  --sidebar-foreground: #f9fafb;
  --sidebar-muted: #9ca3af;
  --sidebar-accent: rgba(255, 255, 255, 0.06);
  --sidebar-border: rgba(255, 255, 255, 0.06);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.1);
  --shadow-panel: var(--shadow-xl);
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

:root[data-theme="light"] .topbar {
  background: rgba(240, 242, 248, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border);
}

:root[data-theme="light"] table.sheet thead th { background: #f3f4f8; color: #4b5563; border-bottom-color: var(--border); }
:root[data-theme="light"] table.sheet tbody tr:nth-child(even) td { background: #fafbfe; }
:root[data-theme="light"] table.sheet tbody tr:hover td { background: rgba(99, 102, 241, 0.04); }

:root[data-theme="light"] table.sheet .rownum { background: #f8f9fc; color: var(--muted-foreground); border-right-color: var(--border); }
:root[data-theme="light"] table.sheet thead .rownum { background: #f3f4f8; }
:root[data-theme="light"] table.sheet tfoot td { background: #f3f4f8; border-top-color: var(--border); }

/* ========================================================================== */
/* Collapsed Sidebar Tooltips                                                 */
/* ========================================================================== */
.shell.collapsed .sidebar { overflow: visible; }
.shell.collapsed .side-link { position: relative; }

.shell.collapsed .side-link::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  background: #1e293b;
  color: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 100;
}

.shell.collapsed .side-link:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ========================================================================== */
/* Theme Toggle Button                                                        */
/* ========================================================================== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
}

.theme-toggle:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--primary);
}

.theme-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.theme-toggle svg { flex-shrink: 0; width: 16px; height: 16px; }

@media (max-width: 640px) {
  .theme-toggle { width: 38px; padding: 0; }
  .theme-toggle .theme-label { display: none; }
  .topbar-right .badge { display: none; }
  .fee-reminder-topbar-btn {
    padding: 0.35rem 0.55rem !important;
    gap: 0.25rem !important;
    font-size: 0.72rem !important;
  }
  .fee-reminder-topbar-btn svg {
    width: 14px;
    height: 14px;
  }
  #fee-reminder-badge-text {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
  }
}

/* ========================================================================== */
/* Notification System                                                        */
/* ========================================================================== */
.notif-wrap { position: relative; }

.notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.notif-btn:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--primary);
}

.notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.notif-count[hidden], .notif-panel[hidden] { display: none; }

.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 360px;
  max-width: 92vw;
  max-height: 440px;
  overflow-y: auto;
  z-index: 80;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  animation: modal-fade 0.2s ease;
}

.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.notif-clear {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--destructive);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.notif-clear:hover { text-decoration: underline; }

.notif-empty { padding: 2rem 1rem; text-align: center; color: var(--muted-foreground); font-size: 0.85rem; }

.notif-list { list-style: none; margin: 0; padding: 0; }

.notif-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0.8rem 2.25rem 0.8rem 1.25rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.notif-item:hover { background: var(--accent); }

.notif-del {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.notif-del:hover {
  background: var(--destructive-subtle);
  color: var(--destructive);
}

/* ========================================================================== */
/* Settings Table (Admin)                                                     */
/* ========================================================================== */
.settings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.settings-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted-foreground);
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.settings-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.settings-table .input { width: 100%; min-width: 130px; }

.st-pw-wrap { display: flex; gap: 0.45rem; align-items: center; }
.st-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }

/* ========================================================================== */
/* Slides Manager                                                             */
/* ========================================================================== */
.slide-list { list-style: none; margin: 0; padding: 0; }

.slide-row {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.slide-row:last-child { border-bottom: none; }

.slide-thumb {
  position: relative;
  width: 112px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.slide-thumb img, .slide-thumb video { width: 100%; height: 100%; object-fit: cover; }

.slide-thumb .tag {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
}

.slide-meta { flex: 1; min-width: 0; }
.slide-meta .name { font-weight: 700; font-size: 0.95rem; margin: 0; }
.slide-meta .email { margin: 0.2rem 0 0; font-size: 0.8125rem; color: var(--muted-foreground); }

/* ========================================================================== */
/* Media Picker / Upload Preview Card                                         */
/* ========================================================================== */
.media-pick {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.65rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--accent);
}

.media-pick-thumb {
  width: 90px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.media-pick-thumb img, .media-pick-thumb video { width: 100%; height: 100%; object-fit: cover; }

.media-pick-info { min-width: 0; flex: 1; }
.media-pick-info .name { font-weight: 700; font-size: 0.85rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-pick-info .email { font-size: 0.75rem; margin: 0.15rem 0 0; color: var(--muted-foreground); }

/* Logo Box & Institute Preview */
.logo-box {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.logo-box.lg { width: 58px; height: 58px; border-radius: var(--radius-xl); }

.institute-preview {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.15rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--accent);
  animation: fadeInFast 0.15s ease-out;
}

@keyframes fadeInFast {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.institute-preview .institute-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin: 0;
  color: var(--foreground);
}

.ea-group-row:hover {
  background: var(--accent) !important;
  border-color: var(--border) !important;
}

#ea-group-checkboxes-host::-webkit-scrollbar {
  width: 6px;
}
#ea-group-checkboxes-host::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ========================================================================== */
/* Clickable Status Badges                                                    */
/* ========================================================================== */
.badge-click {
  cursor: pointer;
  border: 1px dashed currentColor;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.badge-click:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

/* Completed Course Button */
table.sheet th.complete-col, table.sheet td.complete-col { text-align: center; vertical-align: middle; }
table.sheet td.complete-col { min-width: 210px; }

table.sheet .complete-col .rec-complete {
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ========================================================================== */
/* Alert Banners & Restricted Wraps                                           */
/* ========================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  border: 1px solid var(--destructive-border);
  background: var(--destructive-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.35rem;
  margin-bottom: 1.4rem;
}

.alert strong { display: block; font-size: 0.9rem; color: var(--destructive); }
.alert p { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--muted-foreground); }

.restricted-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar);
  padding: 3rem 1.5rem;
}

.restricted-box {
  width: 100%;
  max-width: 28rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
}

.restricted-tag {
  margin-top: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.full-center-msg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
  text-align: center;
}

/* 12-Hour Time Picker */
.time12-row { display: flex; align-items: center; gap: 8px; }
.time12-row select { flex: 1 1 0; min-width: 0; }
.time12-sep { font-weight: 700; opacity: 0.6; }

/* ========================================================================== */
/* ADMIN PANEL — Professional Tab Navigation                                  */
/* ========================================================================== */
/* Topbar z-index guarantee */
.topbar {
  z-index: 40 !important;
}

.admin-subnav {
  position: sticky;
  top: 68px;
  z-index: 30;
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: .5rem .75rem;
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  overflow-x: auto;
}

:root[data-theme="dark"] .admin-subnav {
  background: rgba(18, 22, 36, 0.94);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] .admin-subnav {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .95rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-foreground);
  font-size: .835rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  letter-spacing: .01em;
  font-family: var(--font-sans);
}

.admin-tab-btn .tab-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.admin-tab-btn .tab-ico svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
  transition: transform .2s ease;
}

.admin-tab-btn:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.15);
}

.admin-tab-btn:hover .tab-ico svg {
  transform: scale(1.1);
}

.admin-tab-btn.admin-tab-active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.admin-tab-btn.admin-tab-active .tab-ico svg {
  stroke: #fff;
}

@media (max-width: 768px) {
  .admin-subnav {
    flex-wrap: nowrap;
    padding: .4rem .5rem;
    gap: .25rem;
  }
}

/* Admin sidebar refinements */
.shell .sidebar { border-right: 1px solid var(--sidebar-border); }

.side-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem 1rem;
  border-radius: var(--radius-md);
  margin: .1rem 0;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--sidebar-muted);
  transition: all .18s ease;
  border: 1px solid transparent;
  background: transparent;
}

.side-link:hover {
  background: rgba(99,102,241,.08);
  color: #c7d2fe;
}

.side-link.active {
  background: var(--gradient-brand) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(99,102,241,.25);
}

/* Admin dashboard header */
.admin-header-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-header-strip h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.admin-header-strip p {
  margin-top: .3rem;
  font-size: .85rem;
  color: var(--muted-foreground);
}

/* Premium stat cards */
.stat-card {
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--border) !important;
  transition: transform .22s, box-shadow .22s, border-color .22s !important;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg) !important;
  border-color: rgba(99,102,241,.15) !important;
}

/* Section cards */
.section-card {
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--border) !important;
}

/* List rows */
.list-row {
  border-radius: var(--radius-md);
  transition: background .15s;
}

.list-row:hover { background: var(--primary-subtle); }

/* Utility spacing */
.mb-4 { margin-bottom: 1.25rem !important; }

/* ========================================================================== */
/* Custom Scrollbar (global)                                                  */
/* ========================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }

/* ========================================================================== */
/* Selection Color                                                            */
/* ========================================================================== */
::-moz-selection { background: rgba(99, 102, 241, 0.2); color: var(--foreground); }
::selection { background: rgba(99, 102, 241, 0.2); color: var(--foreground); }

/* ========================================================================== */
/* Fee Management — Quick Search Result Card & Pay / History Actions          */
/* ========================================================================== */
.fee-quick-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: 0.35rem 0 0.5rem;
}

.fee-quick-idle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.05);
  border: 1px dashed rgba(99, 102, 241, 0.22);
  font-size: 0.76rem;
  color: var(--muted-foreground);
  line-height: 1.45;
}

:root[data-theme="dark"] .fee-quick-idle {
  background: rgba(129, 140, 248, 0.06);
  border-color: rgba(129, 140, 248, 0.2);
  color: #94a3b8;
}

.fee-quick-no-match {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-size: 0.78rem;
  color: var(--destructive);
  text-align: center;
  line-height: 1.4;
}

.fee-quick-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 3px;
}

.fee-quick-student-card {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--card-subtle);
  border: 1.5px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-xs);
}

:root[data-theme="dark"] .fee-quick-student-card {
  background: #111522;
  border-color: rgba(255, 255, 255, 0.1);
}

.fee-quick-student-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.fee-quick-st-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.fee-quick-st-info {
  min-width: 0;
  flex: 1;
}

.fee-quick-st-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fee-quick-st-sub {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.fee-quick-st-roll b {
  color: var(--primary);
  font-weight: 700;
}

.fee-quick-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  flex-shrink: 0;
}

.fee-quick-st-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
}

:root[data-theme="dark"] .fee-quick-st-stats {
  background: rgba(255, 255, 255, 0.04);
}

.fee-quick-stat {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.fee-quick-stat .label {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  font-weight: 600;
}

.fee-quick-stat .val {
  font-size: 0.76rem;
  font-weight: 700;
}

.fee-quick-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.fee-quick-btns .btn {
  padding: 0.42rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius-md);
}

.fee-quick-btns .btn-primary {
  background: var(--gradient-brand);
  border: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.fee-quick-btns .btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.fee-quick-btns .btn-outline:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.fee-quick-more-count {
  font-size: 0.7rem;
  text-align: center;
  color: var(--muted-foreground);
  padding: 0.2rem 0;
}

/* ========================================================================== */
/* Fee Installment Reminders Modal & Topbar Badge                             */
/* ========================================================================== */
.fee-reminder-topbar-btn {
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}
.fee-reminder-topbar-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
@keyframes feePulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.fee-rem-alert-pulsing {
  animation: feePulse 2s infinite;
}

.fee-rem-modal {
  background: var(--background) !important;
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 0 !important;
  max-width: 960px;
  width: 95vw;
  max-height: 90vh;
}

.fee-rem-modal .modal-head {
  padding: 14px 20px;
}

.frm-kpi-grid {
  padding: 12px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--border);
}

.frm-kpi-card {
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.frm-kpi-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.frm-kpi-count {
  font-size: 1.1rem;
  font-weight: 700;
}

.frm-kpi-sub {
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

.frm-kpi-amt {
  font-size: 0.9rem;
  font-weight: 700;
}

.frm-filter-bar {
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

#frm-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.frm-search-wrap input {
  width: 220px;
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.frm-modal-body {
  padding: 0 !important;
  overflow-y: auto !important;
  flex: 1 1 auto;
  min-height: 240px;
  max-height: 520px;
}

.frm-desktop-table {
  display: block;
  width: 100%;
}

.frm-mobile-cards {
  display: none;
}

.frm-modal-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.frm-footer-left, .frm-footer-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fee-rem-modal .sheet th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
}

.fee-rem-modal .sheet tr:hover td {
  background: rgba(99, 102, 241, 0.05);
}

/* Card Styling for Mobile */
.frm-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.frm-card-overdue {
  border-left: 4px solid #ef4444 !important;
  background: rgba(239, 68, 68, 0.02);
}

.frm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.frm-card-roll {
  background: #4338ca;
  color: #ffffff;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.frm-card-idx {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 600;
}

.frm-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--foreground);
}

.frm-card-sub {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.frm-card-fin-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 2px 0;
}

.frm-fin-lbl {
  font-size: 0.65rem;
  color: var(--muted-foreground);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.frm-fin-val {
  font-size: 0.88rem;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.frm-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

/* Touch scroll smooth support for data sheets */
.sheet-wrap {
  -webkit-overflow-scrolling: touch;
}

/* Mobile Responsive Media Queries */
@media (max-width: 768px) {
  #fee-reminders-modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .fee-rem-modal {
    width: 100% !important;
    max-width: 100% !important;
    height: 94vh !important;
    max-height: 94vh !important;
    border-radius: 16px 16px 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .fee-rem-modal .modal-head {
    padding: 10px 14px !important;
  }

  .frm-kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    padding: 6px 10px !important;
    gap: 6px !important;
  }

  .frm-kpi-card {
    padding: 6px 8px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .frm-kpi-title {
    font-size: 0.62rem !important;
  }

  .frm-kpi-count {
    font-size: 0.88rem !important;
  }

  .frm-kpi-unit {
    display: none;
  }

  .frm-kpi-amt-wrap {
    text-align: left !important;
    margin-top: 2px;
  }

  .frm-kpi-sub {
    display: none;
  }

  .frm-kpi-amt {
    font-size: 0.75rem !important;
  }

  .frm-filter-bar {
    padding: 8px 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  #frm-tabs {
    width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 3px !important;
    scrollbar-width: none;
  }

  #frm-tabs::-webkit-scrollbar {
    display: none;
  }

  #frm-tabs button {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 0.74rem !important;
    padding: 4px 9px !important;
    border-radius: 16px !important;
  }

  .frm-search-wrap {
    width: 100% !important;
  }

  .frm-search-wrap input {
    width: 100% !important;
    font-size: 0.82rem !important;
  }

  .frm-modal-body {
    min-height: 200px !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Switch: Hide desktop table, show mobile card list */
  .frm-desktop-table {
    display: none !important;
  }

  .frm-mobile-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .frm-modal-footer {
    padding: 8px 10px !important;
    flex-direction: column-reverse !important;
    gap: 6px !important;
  }

  .frm-footer-left, .frm-footer-right {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .frm-footer-left button, .frm-footer-right button {
    font-size: 0.75rem !important;
    padding: 5px 8px !important;
  }

  /* Floating bubbles container on mobile */
  .fup-bubbles {
    right: 0.5rem !important;
    left: 0.5rem !important;
    bottom: 0.5rem !important;
    max-width: calc(100vw - 1rem) !important;
  }
  .fup-bubble {
    padding: 0.75rem 0.85rem !important;
  }
}

/* ========================================================================== */
/* User Dashboard Overview: Left 1-Column Compact Cards + Right Charts Area   */
/* ========================================================================== */
.user-overview-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 0.75rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1100px) {
  .user-overview-container {
    grid-template-columns: 240px 1fr;
    gap: 1.15rem;
  }
}

@media (max-width: 860px) {
  .user-overview-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Left sidebar: 1 column of compact cards */
.user-overview-left {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.user-overview-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.15rem 0.35rem 0.25rem;
}

.user-kpi-pill {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.user-kpi-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Compact Stat Card */
.stat-card-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.stat-card-compact:hover {
  transform: translateX(4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.1);
  background: var(--surface);
}

.stat-card-compact:active {
  transform: translateX(1px);
}

.stat-card-compact-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.2s ease;
}

.stat-card-compact:hover .stat-card-compact-icon {
  transform: scale(1.08);
}

.stat-card-compact-icon svg {
  width: 17px;
  height: 17px;
}

.stat-card-compact-content {
  flex: 1;
  min-width: 0;
}

.stat-card-compact-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.stat-card-compact-hint {
  font-size: 0.68rem;
  color: var(--muted-foreground);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.stat-card-compact-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex: none;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Accent tone border and background for compact cards */
.stat-card-compact.card-tone-admission {
  border-left: 3.5px solid #3b82f6;
}
.stat-card-compact.card-tone-admission .stat-card-compact-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}
.stat-card-compact.card-tone-inquiry {
  border-left: 3.5px solid #10b981;
}
.stat-card-compact.card-tone-inquiry .stat-card-compact-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.stat-card-compact.card-tone-followup {
  border-left: 3.5px solid #f59e0b;
}
.stat-card-compact.card-tone-followup .stat-card-compact-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.stat-card-compact.card-tone-idcards {
  border-left: 3.5px solid #06b6d4;
}
.stat-card-compact.card-tone-idcards .stat-card-compact-icon {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
}
.stat-card-compact.card-tone-fees {
  border-left: 3.5px solid #ec4899;
}
.stat-card-compact.card-tone-fees .stat-card-compact-icon {
  background: rgba(236, 72, 153, 0.12);
  color: #ec4899;
}
.stat-card-compact.card-tone-courses {
  border-left: 3.5px solid #8b5cf6;
}
.stat-card-compact.card-tone-courses .stat-card-compact-icon {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}
.stat-card-compact.card-tone-completed {
  border-left: 3.5px solid #14b8a6;
}
.stat-card-compact.card-tone-completed .stat-card-compact-icon {
  background: rgba(20, 184, 166, 0.12);
  color: #14b8a6;
}

/* Right side charts dashboard */
.user-overview-right {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
}

/* Top Quick Metrics Summary Strip */
.uoc-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.uoc-strip-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s, border-color 0.18s;
}

.uoc-strip-item:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
}

.uoc-strip-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex: none;
}

.uoc-strip-info {
  min-width: 0;
  flex: 1;
}

.uoc-strip-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  font-weight: 700;
  line-height: 1.1;
}

.uoc-strip-val {
  font-size: 1.22rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--foreground);
  margin-top: 2px;
  line-height: 1.1;
}

.uoc-strip-sub {
  font-size: 0.67rem;
  color: var(--muted-foreground);
  margin-top: 1px;
}

/* Charts Grid */
.uoc-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

@media (max-width: 1100px) {
  .uoc-chart-grid {
    grid-template-columns: 1fr;
  }
}

.uoc-chart-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.uoc-chart-box.full-width {
  grid-column: 1 / -1;
}

.uoc-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.uoc-chart-title {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.uoc-chart-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  font-weight: 600;
}

/* Spline Area Line chart */
.uoc-spline-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.uoc-spline-gridline {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3, 3;
  opacity: 0.6;
}

.uoc-spline-pt {
  transition: r 0.18s ease, stroke-width 0.18s ease;
  cursor: pointer;
}
.uoc-spline-pt:hover {
  r: 5.5;
  stroke-width: 2.5;
}

/* Donut container */
.uoc-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.25rem 0;
}

.uoc-donut-svg {
  width: 150px;
  height: 150px;
  flex: none;
}

.uoc-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  min-width: 160px;
}

.uoc-donut-legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
}

.uoc-donut-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.uoc-donut-legend .lbl {
  color: var(--muted-foreground);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uoc-donut-legend .val {
  font-weight: 700;
  color: var(--foreground);
}

.uoc-donut-legend .pct {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  min-width: 2.4rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Fee Gauge & Breakdown */
.uoc-fee-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.15rem;
  align-items: center;
}

@media (max-width: 580px) {
  .uoc-fee-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.uoc-fee-gauge {
  width: 130px;
  height: 130px;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
}

.uoc-fee-gauge svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.uoc-fee-gauge-text {
  position: absolute;
  text-align: center;
  pointer-events: none;
}

.uoc-fee-gauge-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--foreground);
  line-height: 1;
}

.uoc-fee-gauge-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-top: 2px;
  font-weight: 700;
}

.uoc-fee-stats {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.uoc-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.78rem;
}

.uoc-fee-row-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-foreground);
  font-weight: 600;
}

.uoc-fee-row-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Course ranking bars */
.uoc-course-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.uoc-course-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.uoc-course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.uoc-course-name {
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.uoc-course-rank {
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--primary);
  flex: none;
}

.uoc-course-val {
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.uoc-course-track {
  height: 7px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.uoc-course-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #6366f1, #3b82f6);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Status Pill List for Inquiries / Followups */
.uoc-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
}

.uoc-pill-card {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.uoc-pill-card-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.uoc-pill-card-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-display);
}

/* ========================================================================== */
/* User Overview Header & Period Toolbar                                      */
/* ========================================================================== */
.user-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 0.95rem;
  flex-wrap: wrap;
}

.user-welcome-wrap {
  flex: 1;
  min-width: 240px;
}

.user-welcome-wrap h1 {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.user-welcome-wrap p {
  font-size: clamp(0.72rem, 1.2vw, 0.84rem);
}

.user-period-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.45rem 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  max-width: 100%;
}

.uoc-admin-filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 0.35rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.uoc-admin-user-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.uoc-admin-user-select {
  font-weight: 700 !important;
  color: var(--primary) !important;
  background: var(--surface) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.35) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.35rem 0.75rem !important;
  min-width: 220px !important;
  cursor: pointer !important;
}

.uoc-admin-user-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
}

@media (max-width: 640px) {
  .uoc-admin-filter-row {
    justify-content: stretch;
  }
  .uoc-admin-user-group {
    justify-content: stretch;
  }
  .uoc-admin-user-select {
    width: 100% !important;
    min-width: 0 !important;
  }
}

.uoc-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}

.user-period-modes {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.uoc-mode-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.uoc-mode-btn:hover {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.04);
}

.uoc-mode-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.user-period-selectors {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 2px;
  width: 100%;
}

.uoc-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.uoc-select-lbl {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  font-weight: 600;
  white-space: nowrap;
}

.uoc-select {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.32rem 0.65rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.uoc-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.uoc-active-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 3px 9px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ========================================================================== */
/* Universal Responsive Breakpoints for All Devices                           */
/* ========================================================================== */

/* Extra Large Monitors & Desktops (1440px - 2560px+) */
@media (min-width: 1440px) {
  .app-main {
    max-width: 1680px !important;
  }
  .user-overview-container {
    grid-template-columns: 300px 1fr;
    gap: 1.75rem;
  }
  .uoc-strip {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1920px) {
  .app-main {
    max-width: 1840px !important;
  }
  .user-overview-container {
    grid-template-columns: 320px 1fr;
    gap: 2rem;
  }
}

/* Medium Tablets & Small Laptops (max-width: 960px) */
@media (max-width: 960px) {
  .user-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .user-period-toolbar {
    align-items: stretch;
    width: 100%;
  }
  .user-overview-container {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }
  .user-kpi-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.65rem;
  }
  .uoc-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .uoc-chart-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices & Small Tablets (max-width: 640px) */
@media (max-width: 640px) {
  .app-main {
    padding: 1rem 0.75rem 3rem !important;
  }
  .user-welcome-wrap h1 {
    font-size: 1.35rem !important;
  }
  .user-period-toolbar {
    padding: 0.5rem 0.65rem;
  }
  .uoc-toolbar-top {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .uoc-active-badge {
    align-self: flex-start;
  }
  .user-period-modes {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
  .uoc-mode-btn {
    flex: 1;
    text-align: center;
    padding: 0.42rem 0.25rem;
    font-size: 0.72rem;
    min-width: 0;
  }
  .user-period-selectors {
    justify-content: stretch;
    gap: 0.45rem;
  }
  .uoc-select-group {
    flex: 1 1 120px;
    min-width: 0;
  }
  .uoc-select {
    width: 100%;
    min-height: 36px;
  }
  .user-kpi-col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .stat-card-compact {
    padding: 0.55rem 0.65rem;
    gap: 0.55rem;
  }
  .stat-card-compact-icon {
    width: 30px;
    height: 30px;
  }
  .stat-card-compact-icon svg {
    width: 15px;
    height: 15px;
  }
  .stat-card-compact-label {
    font-size: 0.72rem;
  }
  .stat-card-compact-hint {
    font-size: 0.64rem;
  }
  .stat-card-compact-val {
    font-size: 1.15rem;
  }
  .uoc-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }
  .uoc-strip-item {
    padding: 0.6rem 0.7rem;
    gap: 0.55rem;
  }
  .uoc-strip-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .uoc-strip-val {
    font-size: 1.08rem;
  }
  .uoc-strip-label {
    font-size: 0.64rem;
  }
  .uoc-chart-box {
    padding: 1rem 0.85rem;
    border-radius: var(--radius-lg);
  }
  .uoc-donut-wrap {
    gap: 1rem;
  }
  .uoc-donut-svg {
    width: 130px;
    height: 130px;
  }
  .uoc-fee-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.85rem;
  }
}

/* Compact Mobile (max-width: 420px) - iPhone SE, Galaxy Fold, Small Android */
@media (max-width: 420px) {
  .app-main {
    padding: 0.75rem 0.5rem 3rem !important;
  }
  .user-welcome-wrap h1 {
    font-size: 1.25rem !important;
  }
  .uoc-mode-btn {
    padding: 0.38rem 0.15rem;
    font-size: 0.66rem;
    letter-spacing: -0.01em;
  }
  .user-kpi-col {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .stat-card-compact {
    padding: 0.55rem 0.75rem;
  }
  .uoc-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }
  .uoc-strip-item {
    padding: 0.5rem 0.55rem;
    gap: 0.45rem;
  }
  .uoc-strip-sub {
    display: none;
  }
  .uoc-chart-box {
    padding: 0.85rem 0.7rem;
  }
  .uoc-chart-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .uoc-donut-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .uoc-donut-legend {
    width: 100%;
    min-width: 0;
  }
  .uoc-fee-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.75rem;
  }
  .uoc-pill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }
  .uoc-course-name {
    max-width: 60%;
  }
}

/* ========================================================================== */
/* Sidebar Submenu & Accordion Dropdown (User Data)                           */
/* ========================================================================== */
.side-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 1px 0;
}

.side-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted, #94a3b8);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.side-group-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.side-group.show-all .side-group-toggle,
.side-group.has-active-child .side-group-toggle,
.side-group-toggle.group-active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.2);
}

.side-arrow {
  margin-left: auto;
  font-size: 0.72rem;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.side-group.show-all .side-arrow {
  opacity: 1;
  transform: rotate(180deg);
}

.side-submenu {
  display: none;
  flex-direction: column;
  gap: 3px;
  padding-left: 0.75rem;
  margin: 4px 0 6px 1.1rem;
  border-left: 2px solid rgba(99, 102, 241, 0.3);
}

/* Submenu is displayed when user opens all options OR when an item is active */
.side-group.show-all .side-submenu,
.side-group.has-active-child .side-submenu {
  display: flex;
  animation: slideDownSubmenu 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownSubmenu {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.side-sublink {
  font-size: 0.82rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  color: var(--sidebar-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

/* All menu options always visible for instant 1-click navigation */
.side-sublink {
  display: flex !important;
}

.side-sublink .ico {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}

.side-sublink:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.side-sublink.active {
  background: var(--gradient-brand, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35) !important;
}

.shell.collapsed .side-submenu {
  display: none !important;
}

.shell.collapsed .side-arrow {
  display: none !important;
}

/* ========================================================================== */
/* Topbar Back / Forward Navigation Arrows                                    */
/* ========================================================================== */
.topbar-nav-arrows {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  margin-right: 0.75rem;
}

.btn-nav-arrow {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  padding: 0;
}

.btn-nav-arrow:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-nav-arrow:active {
  transform: translateY(0);
}

[data-theme="light"] .btn-nav-arrow {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
}

[data-theme="light"] .btn-nav-arrow:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #312e81;
}

/* ========================================================================== */
/* Fixed Header & Seamless Scrollable Viewport                                */
/* ========================================================================== */
html.shell-fixed-layout,
html.shell-fixed-layout body,
html.shell-fixed-layout #app,
body:has(.shell),
html:has(.shell),
#app:has(.shell) {
  height: 100% !important;
  overflow: hidden !important;
}

.shell {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

.shell-main {
  height: 100vh !important;
  max-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-width: 0 !important;
}

.topbar {
  position: sticky !important;
  top: 0 !important;
  flex-shrink: 0 !important;
  z-index: 100 !important;
  background: rgba(12, 15, 26, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

:root[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

.app-main {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

/* ========================================================================== */
/* Super Admin: High-Density Compact Admin Management                         */
/* ========================================================================== */
.admin-compact-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.admin-compact-card:hover {
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.admin-compact-card.drawer-open {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15) !important;
}

.admin-feat-chip {
  transition: background-color 0.15s, border-color 0.15s;
}

.admin-feat-chip:hover {
  background: var(--accent) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.admin-search-wrap input:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* ========================================================================== */
/* Admission Payment UPI Modal — Compact Non-Scroll 1-Screen Layout           */
/* ========================================================================== */
.modal.upi-payment-modal {
  max-width: 590px !important;
  width: 95% !important;
  padding: 1.15rem 1.35rem !important;
  max-height: 92vh !important;
  overflow: visible !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
}

.upi-modal-head {
  margin-bottom: 0.75rem !important;
  padding-bottom: 0.65rem !important;
  border-bottom: 1px solid var(--border) !important;
}

.upi-modal-layout {
  display: grid;
  grid-template-columns: 195px 1fr;
  gap: 1.15rem;
  align-items: stretch;
}

.upi-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-subtle, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.6rem;
}

.upi-qr-box {
  background: #ffffff;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 175px;
  height: 175px;
}

.upi-qr-box #upi-qr img,
.upi-qr-box #upi-qr canvas {
  width: 159px !important;
  height: 159px !important;
  object-fit: contain !important;
}

.upi-payee-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0.45rem 0 0.15rem;
  line-height: 1.2;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upi-id-meta {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.2;
  word-break: break-all;
}

.upi-id-meta strong {
  color: var(--primary);
}

.upi-direct-link {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.35rem;
  text-decoration: underline;
}

.upi-action-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.upi-steps-box {
  background: var(--card-subtle, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
}

.upi-steps-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--foreground);
  display: block;
  margin-bottom: 0.2rem;
}

.upi-steps-text {
  font-size: 0.73rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.35;
}

.upi-utr-input {
  width: 100% !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  padding: 0.55rem 0.75rem !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background: var(--input-bg) !important;
  color: var(--foreground) !important;
}

.upi-utr-input:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

.upi-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.upi-actions-row .btn {
  padding: 0.5rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 540px) {
  .modal.upi-payment-modal {
    padding: 1rem !important;
    max-height: 96vh !important;
    overflow-y: auto !important;
  }
  .upi-modal-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .upi-qr-box {
    width: 140px;
    height: 140px;
  }
  .upi-qr-box #upi-qr img,
  .upi-qr-box #upi-qr canvas {
    width: 124px !important;
    height: 124px !important;
  }
}

/* ========================================================================== */
/* Admission Form Single-Screen Fit Layout (No Scroll)                         */
/* ========================================================================== */
.modal.modal-admission-fit {
  max-width: 1080px !important;
  width: 96vw !important;
  max-height: 94vh !important;
  padding: 0.85rem 1.35rem 0.75rem !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.45) !important;
}

.modal.modal-admission-fit .modal-head {
  margin-bottom: 0.5rem !important;
  padding-bottom: 0.4rem !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
}

.modal.modal-admission-fit .modal-head h3 {
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

.modal.modal-admission-fit .modal-head .desc {
  font-size: 0.75rem !important;
  margin: 0.15rem 0 0 !important;
  line-height: 1.25 !important;
  color: var(--muted-foreground) !important;
}

.modal.modal-admission-fit .modal-close {
  width: 28px !important;
  height: 28px !important;
  font-size: 1.15rem !important;
  flex-shrink: 0 !important;
}

.modal.modal-admission-fit .modal-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0.15rem 0.2rem !important;
  flex: 1 1 auto !important;
}

.modal.modal-admission-fit #modal-form {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.45rem 0.8rem !important;
  align-items: start !important;
}

.modal.modal-admission-fit .field {
  margin-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

.modal.modal-admission-fit .field label {
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.2rem !important;
  color: var(--foreground) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

.modal.modal-admission-fit .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.modal.modal-admission-fit .field select,
.modal.modal-admission-fit .field textarea {
  padding: 0.35rem 0.6rem !important;
  height: 33px !important;
  min-height: 33px !important;
  font-size: 0.8125rem !important;
  border-radius: var(--radius-sm, 6px) !important;
  border-width: 1.5px !important;
  line-height: 1.2 !important;
  background: var(--input-bg) !important;
  box-sizing: border-box !important;
}

.modal.modal-admission-fit .field-notes {
  grid-column: span 2 !important;
}

.modal.modal-admission-fit .field-notes textarea {
  height: 33px !important;
  min-height: 33px !important;
  resize: none !important;
  font-family: inherit !important;
}

.modal.modal-admission-fit .field-notes textarea:focus {
  height: 52px !important;
  position: relative !important;
  z-index: 10 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.modal.modal-admission-fit .field-file-row {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  height: 33px !important;
  min-height: 33px !important;
}

.modal.modal-admission-fit .field-file-row .logo-box.lg {
  width: 33px !important;
  height: 33px !important;
  min-width: 33px !important;
  border-radius: 6px !important;
  margin: 0 !important;
  padding: 2px !important;
  border: 1.5px solid var(--border) !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}

.modal.modal-admission-fit .field input[type="file"] {
  height: 33px !important;
  min-height: 33px !important;
  font-size: 0.74rem !important;
  padding: 0.15rem 0.3rem !important;
  border: 1px dashed var(--border-strong) !important;
  border-radius: 6px !important;
  background: var(--input-bg) !important;
  cursor: pointer !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  line-height: 1.4 !important;
}

.modal.modal-admission-fit .field input[type="file"]::file-selector-button {
  padding: 0.22rem 0.6rem !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  color: var(--foreground) !important;
  cursor: pointer !important;
  margin-right: 0.45rem !important;
  transition: all 0.15s ease !important;
}

.modal.modal-admission-fit .field input[type="file"]::file-selector-button:hover {
  background: var(--muted) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.modal.modal-admission-fit .field-hint {
  font-size: 0.68rem !important;
  margin-top: 0.15rem !important;
  line-height: 1.15 !important;
}

.modal.modal-admission-fit .media-pick {
  padding: 0.2rem 0.4rem !important;
  margin-top: 0.2rem !important;
  gap: 0.35rem !important;
  border-radius: 6px !important;
}

.modal.modal-admission-fit .media-pick-thumb {
  width: 26px !important;
  height: 26px !important;
}

.modal.modal-admission-fit .media-pick-info .name {
  font-size: 0.7rem !important;
  line-height: 1.1 !important;
}

.modal.modal-admission-fit .media-pick-info .email {
  font-size: 0.65rem !important;
}

.modal.modal-admission-fit .media-pick button {
  padding: 0.15rem 0.4rem !important;
  font-size: 0.68rem !important;
}

.modal.modal-admission-fit .modal-footer {
  margin-top: 0.45rem !important;
  padding-top: 0.45rem !important;
  border-top: 1px solid var(--border) !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 0.55rem !important;
}

.modal.modal-admission-fit .modal-footer .btn {
  padding: 0.38rem 1rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
}

/* Responsive fallbacks if screen/browser is smaller */
@media (max-width: 900px) {
  .modal.modal-admission-fit {
    max-height: 96vh !important;
  }
  .modal.modal-admission-fit #modal-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .modal.modal-admission-fit .field-notes {
    grid-column: span 1 !important;
  }
}

@media (max-width: 640px) {
  .modal.modal-admission-fit {
    padding: 0.75rem 1rem !important;
    max-height: 96vh !important;
  }
  .modal.modal-admission-fit .modal-body {
    overflow-y: auto !important;
  }
  .modal.modal-admission-fit #modal-form {
    grid-template-columns: 1fr 1fr !important;
  }
  .modal.modal-admission-fit .field-notes {
    grid-column: span 2 !important;
  }
}

@media (max-width: 480px) {
  .modal.modal-admission-fit #modal-form {
    grid-template-columns: 1fr !important;
  }
  .modal.modal-admission-fit .field-notes {
    grid-column: span 1 !important;
  }
}



