/* Modern Glassmorphic Design System for Smart School Management & SaaS Portal (e.onllar.com) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'SolaimanLipi';
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/solaimanlipi-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'SolaimanLipi';
  font-display: swap;
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/solaimanlipi-bold.woff2') format('woff2');
}

:root {
  --font-primary: 'SolaimanLipi', 'Outfit', sans-serif;
  
  /* Color Palette - Vibrant Dark Mode Base */
  --bg-main: #0b0f19;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 42, 69, 0.85);
  --bg-sidebar: rgba(15, 23, 42, 0.95);
  --bg-topbar: rgba(15, 23, 42, 0.8);
  
  --primary: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --secondary-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  --accent-gold: #f59e0b;
  --accent-gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --success: #10b981;
  --success-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --danger: #ef4444;
  --danger-gradient: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(12px);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 10% 20%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(14, 165, 233, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(245, 158, 11, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Main Layout Grid */
#app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Domain Header & Multi-Tenant Switcher Bar - Hidden to match c.onllar.com/dashboard 100% */
.saas-top-banner, div.saas-top-banner {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  top: -9999px !important;
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glow);
  font-weight: 600;
  color: #a5b4fc;
}

.tenant-selector-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tenant-select {
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* Header & Navbar */
.app-header {
  background: var(--bg-topbar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
}
body.light-theme .app-header {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo img, .brand-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: #818cf8;
  font-weight: 500;
}

/* User & Role Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.role-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: capitalize;
}

.role-admin { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.role-teacher { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.role-student { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.role-parent { background: rgba(14, 165, 233, 0.2); color: #7dd3fc; border: 1px solid rgba(14, 165, 233, 0.4); }
.role-super { background: rgba(168, 85, 247, 0.2); color: #e9d5ff; border: 1px solid rgba(168, 85, 247, 0.4); }

/* Main Content Area */
.app-body {
  display: flex;
  min-height: calc(100vh - 120px);
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700; /* Bold */
  font-size: 16px; /* 16px */
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.nav-item:hover svg {
  color: var(--text-main);
  transform: scale(1.1);
}

.nav-item.active svg,
.nav-dropdown-toggle.active svg {
  color: #ffffff;
}

.nav-item:not(.active):hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateX(4px);
}

.nav-item.active,
.nav-dropdown-toggle.active {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  border-radius: 10px !important;
}

.nav-group-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 16px 12px 6px;
  font-weight: 700;
}

/* Main Screen Workspace */
.main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

/* Page Header Title Section */
.page-title-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Live Counter Clock Badge */
.live-clock-badge {
  font-family: 'Outfit', var(--font-primary);
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-body { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
}

/* SaaS Navigation Dropdown styling */
.nav-dropdown-wrapper {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 700; /* Bold */
  font-size: 16px; /* 16px */
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-dropdown-toggle svg {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.nav-dropdown-toggle:not(.active):hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateX(4px);
}

.nav-dropdown-toggle:not(.active):hover svg {
  color: var(--text-main);
}

.nav-dropdown-items {
  transition: all 0.3s ease;
}

/* Premium Onllar POS Style Login Page Styles */
.login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #020617;
  background-image: radial-gradient(circle at center, rgba(30, 58, 138, 0.1) 0%, #090d16 60%, #000000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  overflow: hidden;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(15, 23, 42, 0.4) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  padding: 40px !important;
  border-radius: 2.5rem !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
  animation: loginFadeIn 0.4s ease-out;
}

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

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-box {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: #3b82f6;
  overflow: hidden;
}

.login-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-header h1 {
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0;
}

.login-header p {
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 8px;
}

.login-error-alert {
  background: rgba(239, 68, 68, 0.1) !important;
  border-left: 4px solid #ef4444 !important;
  border-radius: 0 12px 12px 0 !important;
  color: #ef4444 !important;
  padding: 16px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px !important;
  letter-spacing: 0.05em;
  text-align: left !important;
}

.login-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #d1d5db;
  margin-bottom: 8px;
  display: block;
  margin-left: 4px;
}

.form-control-login {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 16px 16px 16px 48px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-control-login::placeholder {
  color: #334155;
}

.form-control-login:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: rgba(0, 0, 0, 0.3);
}

.login-btn {
  width: 100%;
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 16px;
  border-radius: 1rem;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.login-btn:hover {
  background-color: #1d4ed8;
}

.login-btn:active {
  transform: scale(0.98);
}





/* Submenu items overrides */
.nav-dropdown-items .nav-item {
  font-size: 16px !important;
  font-weight: 400 !important; /* Normal weight when normal */
  padding: 8px 12px !important;
}

.nav-dropdown-items .nav-item.active {
  font-weight: 800 !important; /* Extra Bold when active */
}


/* ==========================================
   Light Theme Styling Overrides
   ========================================== */
body.light-theme {
  --bg-main: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-sidebar: rgba(255, 255, 255, 0.95);
  --bg-topbar: rgba(255, 255, 255, 0.9);
  
  --text-main: #000000;
  --text-muted: #000000;
  --text-dim: #000000;
  
  --border-color: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(99, 102, 241, 0.2);
  
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(at 10% 20%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(14, 165, 233, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(245, 158, 11, 0.02) 0px, transparent 50%);
  color: #000000;
}

/* Sidebar Right Divider & Clean Background (100% matched with c.onllar.com/dashboard) */
.sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
}

body.dark-theme .sidebar {
  background: #0f172a !important;
  border-right: 1px solid #1e293b !important;
  box-shadow: none !important;
}

body.dark-theme .app-header {
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .app-header div[style*="color:#0f172a"] {
  color: #f8fafc !important;
}

body.light-theme .btn-logout-custom:hover {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
}

body.light-theme p,
body.light-theme span,
body.light-theme div,
body.light-theme label,
body.light-theme small,
body.light-theme td,
body.light-theme th,
body.light-theme li,
body.light-theme strong,
body.light-theme b,
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: #000000;
}

body.light-theme .glass-card h1,
body.light-theme .glass-card h2,
body.light-theme .glass-card h3,
body.light-theme .glass-card h4,
body.light-theme .glass-card h5,
body.light-theme .glass-card h6,
body.light-theme .glass-card p,
body.light-theme .glass-card span,
body.light-theme .glass-card div,
body.light-theme .glass-card label,
body.light-theme .glass-card small,
body.light-theme .glass-card li,
body.light-theme .glass-card strong {
  color: #000000 !important;
}

body.light-theme .glass-card .fail-val,
body.light-theme .glass-card span.fail-val,
body.light-theme .glass-card input.fail-val,
body.light-theme .glass-card strong.fail-val,
body.light-theme .fail-val,
.fail-val {
  color: #dc2626 !important;
}

body.light-theme .glass-card .pass-grade-val,
body.light-theme .glass-card span.pass-grade-val {
  color: #15803d !important;
}

/* Account Balance Tiles: Force crisp white text in all themes */
.account-balance-card,
.account-balance-card div,
.account-balance-card span,
.account-balance-name,
.account-balance-amount,
body.light-theme .glass-card .account-balance-card,
body.light-theme .glass-card .account-balance-card div,
body.light-theme .glass-card .account-balance-card span,
body.light-theme .glass-card .account-balance-name,
body.light-theme .glass-card .account-balance-amount {
  color: #ffffff !important;
}

body.light-theme .page-title {
  color: #000000 !important;
}

body.light-theme .nav-item {
  color: #334155;
}

body.light-theme .nav-item:not(.active):hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

body.light-theme .nav-dropdown-toggle {
  color: #334155;
}

body.light-theme .nav-dropdown-toggle:not(.active):hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

body.light-theme .nav-dropdown-items .nav-item:not(.active) {
  color: #475569 !important;
}

/* Selected menu & submenu active and hover state overrides for light theme */
.nav-item.active,
.nav-item.active:hover,
.nav-dropdown-toggle.active,
.nav-dropdown-toggle.active:hover,
.nav-dropdown-items .nav-item.active,
.nav-dropdown-items .nav-item.active:hover,
body.light-theme .nav-item.active,
body.light-theme .nav-item.active:hover,
body.light-theme .nav-dropdown-toggle.active,
body.light-theme .nav-dropdown-toggle.active:hover,
body.light-theme .nav-dropdown-items .nav-item.active,
body.light-theme .nav-dropdown-items .nav-item.active:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

.nav-item.active *,
.nav-item.active:hover *,
.nav-dropdown-toggle.active *,
.nav-dropdown-toggle.active:hover *,
.nav-dropdown-items .nav-item.active *,
.nav-dropdown-items .nav-item.active:hover *,
body.light-theme .nav-item.active *,
body.light-theme .nav-item.active:hover *,
body.light-theme .nav-dropdown-toggle.active *,
body.light-theme .nav-dropdown-toggle.active:hover *,
body.light-theme .nav-dropdown-items .nav-item.active *,
body.light-theme .nav-dropdown-items .nav-item.active:hover * {
  color: #ffffff !important;
}

.nav-item.active svg,
.nav-item.active:hover svg,
.nav-dropdown-toggle.active svg,
.nav-dropdown-toggle.active:hover svg,
.nav-dropdown-items .nav-item.active svg,
.nav-dropdown-items .nav-item.active:hover svg,
.nav-item.active i,
.nav-item.active:hover i,
.nav-dropdown-toggle.active i,
.nav-dropdown-toggle.active:hover i,
.nav-dropdown-items .nav-item.active i,
.nav-dropdown-items .nav-item.active:hover i,
body.light-theme .nav-item.active svg,
body.light-theme .nav-item.active:hover svg,
body.light-theme .nav-dropdown-toggle.active svg,
body.light-theme .nav-dropdown-toggle.active:hover svg,
body.light-theme .nav-dropdown-items .nav-item.active svg,
body.light-theme .nav-dropdown-items .nav-item.active:hover svg,
body.light-theme .nav-item.active i,
body.light-theme .nav-item.active:hover i,
body.light-theme .nav-dropdown-toggle.active i,
body.light-theme .nav-dropdown-toggle.active:hover i,
body.light-theme .nav-dropdown-items .nav-item.active i,
body.light-theme .nav-dropdown-items .nav-item.active:hover i {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

body.light-theme .stat-card {
  border: 1px solid rgba(15, 23, 42, 0.05);
}

body.light-theme .data-table th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

body.light-theme .data-table td {
  color: #334155;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

body.light-theme .ticker-wrap {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .ticker-title {
  background: #3b82f6;
  color: #fff;
}

body.light-theme .ticker-text {
  color: #1e293b;
}

body.light-theme .live-clock-badge {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
}

body.light-theme select,
body.light-theme input {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

.theme-radio-label {
  color: #f8fafc;
}

body.light-theme .theme-radio-label {
  color: #0f172a !important;
}

/* --- Action Dropdown Theme Styles --- */
.dropdown-menu,
.action-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px !important;
  padding: 6px 0 !important;
}

.dropdown-menu a,
.action-dropdown-menu a {
  color: #1e293b !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.dropdown-menu a:hover,
.action-dropdown-menu a:hover {
  background: #f1f5f9 !important;
  color: #2563eb !important;
}

.dropdown-menu a.dropdown-item-danger,
.action-dropdown-menu a.dropdown-item-danger {
  color: #ef4444 !important;
}

body:not(.light-theme) .dropdown-menu,
body:not(.light-theme) .action-dropdown-menu {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

body:not(.light-theme) .dropdown-menu a,
body:not(.light-theme) .action-dropdown-menu a {
  color: #f8fafc !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body:not(.light-theme) .dropdown-menu a:hover,
body:not(.light-theme) .action-dropdown-menu a:hover {
  background: #334155 !important;
  color: #60a5fa !important;
}

body:not(.light-theme) .dropdown-menu a.dropdown-item-danger,
body:not(.light-theme) .action-dropdown-menu a.dropdown-item-danger {
  color: #f87171 !important;
}



/* ==========================================
   Full-Height Sidebar Layout Overrides
   ========================================== */
@media (min-width: 768px) {
  /* Internal Dashboard Layout: only apply 260px sidebar padding when sidebar is active and NOT in public shell */
  body:not(.public-mode) #app-container:not(.public-shell) {
    padding-left: 260px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 100vh !important;
    position: relative !important;
  }

  /* Public Mode & Login Page: Completely Centered 0px Padding */
  body.public-mode #app-container,
  #app-container.public-shell,
  #app-container:has(#public-workspace) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    height: 100vh !important;
  }
  
  .saas-top-banner, .app-header, .app-body {
    margin-left: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 24px !important;
  }
}

/* Ensure navigation items inside wrapper have standard flex column spacing */
#sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.light-theme .school-name-sidebar {
  color: #0f172a !important;
}
body.light-theme .school-addr-sidebar {
  color: #475569 !important;
}


/* ==========================================
   Header Top Menu Dropdown and Layout Styles
   ========================================== */
.top-nav-menu {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  margin: 0 20px;
  overflow: hidden;
  min-width: 0;
}

.top-menu-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow-x: scroll;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  height: 52px;
}
.top-menu-bar::-webkit-scrollbar {
  height: 16px !important;
  display: block !important;
}
.top-menu-bar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 20px;
}
body.light-theme .top-menu-bar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03) !important;
}
.top-menu-bar::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.6) !important;
  border-radius: 20px;
  border: 3px solid transparent !important;
  background-clip: padding-box !important;
}
.top-menu-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.9) !important;
}

.top-menu-item {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.top-menu-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 2px;
  flex-shrink: 0;
}
.top-menu-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-menu-dropdown-content a svg {
  width: 14px;
  height: 14px;
}
.top-menu-item:hover, .top-menu-item.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
body.light-theme .top-menu-item:hover, body.light-theme .top-menu-item.active {
  background: rgba(15, 23, 42, 0.05);
}

.top-menu-dropdown {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.top-menu-dropdown-content {
  display: none;
  position: fixed;
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  min-width: 220px;
  max-width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 6px 0;
  z-index: 1000;
  flex-direction: column;
  box-sizing: border-box;
}

body.light-theme .top-menu-dropdown-content {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Inline top-menu-dropdown-content inside top-menu-bar should NEVER display directly to prevent 52px height clipping */
.top-menu-bar .top-menu-dropdown-content {
  display: none !important;
}

.top-menu-dropdown-content a {
  color: var(--text-muted);
  padding: 10px 16px;
  text-decoration: none;
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-theme .top-menu-dropdown-content a {
  border-bottom: 1px solid #f1f5f9;
}

.top-menu-dropdown-content a:last-child {
  border-bottom: none;
}

.top-menu-dropdown-content a:hover, .top-menu-dropdown-content a.active {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

body.light-theme .top-menu-dropdown-content a:hover, body.light-theme .top-menu-dropdown-content a.active {
  color: #2563eb !important;
  background: #f0f6ff !important;
}

/* Body Portal Dropdown Styling for Top Menu */
.top-menu-portal-box a {
  color: var(--text-muted, #475569) !important;
  padding: 10px 16px !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  white-space: nowrap !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
  box-sizing: border-box !important;
}

body.dark-theme .top-menu-portal-box a {
  color: #94a3b8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.top-menu-portal-box a:last-child {
  border-bottom: none !important;
}

.top-menu-portal-box a:hover,
.top-menu-portal-box a.active {
  color: #2563eb !important;
  background: #f0f6ff !important;
}

body.dark-theme .top-menu-portal-box a:hover,
body.dark-theme .top-menu-portal-box a.active {
  color: #60a5fa !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Nested Dropdowns inside Body Portal */
.top-menu-portal-box .top-menu-dropdown {
  width: 100% !important;
  display: block !important;
}

.top-menu-portal-box .top-menu-dropdown > .dropdown-toggle {
  padding: 10px 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

body.dark-theme .top-menu-portal-box .top-menu-dropdown > .dropdown-toggle {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.top-menu-portal-box .top-menu-dropdown > .top-menu-dropdown-content {
  position: static !important;
  box-shadow: none !important;
  border: none !important;
  border-left: 3px solid #2563eb !important;
  margin: 4px 8px 6px 16px !important;
  border-radius: 0 0 8px 8px !important;
  background: rgba(37, 99, 235, 0.04) !important;
  padding: 4px 0 !important;
  min-width: 0 !important;
  display: none;
}

@media (max-width: 1024px) {
  .top-nav-menu {
    display: none !important;
  }
}


/* Completely Hide ALL Native Scrollbars & Arrows Everywhere on Top Nav */
#top-nav-menu, .top-nav-menu, .app-header, .header-actions {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
  overflow-y: hidden !important;
}

#top-nav-menu::-webkit-scrollbar,
.top-nav-menu::-webkit-scrollbar,
.app-header::-webkit-scrollbar,
#top-nav-menu::-webkit-scrollbar-button,
.top-nav-menu::-webkit-scrollbar-button,
.app-header::-webkit-scrollbar-button,
#top-nav-menu::-webkit-scrollbar-corner,
.top-nav-menu::-webkit-scrollbar-corner {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}


/* Universal Complete Scrollbar Button Eraser */
*::-webkit-scrollbar-button,
*::-webkit-scrollbar-corner {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}


/* Set Top Navigation Header Height to 70px (100% matched with c.onllar.com/dashboard) */
.app-header {
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.top-menu-bar {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  height: auto !important;
}

.top-nav-menu a, .top-nav-menu .nav-item, .top-nav-menu button {
  padding: 8px 14px !important;
  font-size: 0.88rem !important;
}

/* ==========================================
   Public Portal Universal Centering Rules
   ========================================== */
body.public-mode {
  background-color: #f8fafc !important;
  background-image: none !important;
  color: #0f172a !important;
}

body.public-mode #app-container,
#app-container.public-shell,
#app-container:has(#public-workspace) {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#public-workspace {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

