/* ============================================
   Dashboard Modern UI - SANHS MIS
   Soft Glassmorphism Redesign
   Overrides Bootstrap 3 for a modern admin panel
   ============================================ */

/* --- Fonts & Reset --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&display=swap');


:root {
  /* --- Abyssal Reef & Cyan Shallows Palette --- */
  
  /* 1. Base Solid Colors (Extracted from your gradients for text/borders) */
  --color-navy: #1E3566;
  --color-mid-blue: #19679B;
  --color-cyan: #23D2E9;
  --color-mint: #78E3D2;
  --color-pale-mint: #C1EFCB;

  /* 2. Primary & Accent Colors */
  --primary: #19679B; 
  --primary-dark: #1E3566;
  --primary-light: #23D2E9;
  --primary-glow: rgba(35, 210, 233, 0.25);
  /* Sunset Coral: A warm, high-energy pop that contrasts beautifully against cool cyans/mints */
  --accent: #FF7043; 

  /* 3. The Gradients */
  --grad-primary: linear-gradient(135deg, var(--color-mid-blue) 0%, var(--color-cyan) 100%);
  --grad-primary-dark: linear-gradient(135deg, var(--color-navy) 0%, var(--color-mid-blue) 100%);
  --grad-surface: linear-gradient(160deg, var(--color-pale-mint) 0%, #F4F9F9 100%);
  --grad-sidebar: linear-gradient(180deg, var(--color-navy) 0%, #122240 100%);

  /* --- Sidebar (Deep Ocean Gradient) --- */
  --sidebar-bg: var(--grad-sidebar); /* Applies the deep navy gradient */
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-hover-border: rgba(120, 227, 210, 0.4); /* Mint glow */
  --sidebar-active-bg: var(--grad-primary); /* Active item gets the mid-blue to cyan gradient */
  --sidebar-active-text: #FFFFFF;
  --sidebar-active-border: transparent;
  --sidebar-text: #A3B8D8; /* Soft icy blue text */
  --sidebar-text-active: #FFFFFF;
  --sidebar-width: 240px;
  --sidebar-collapsed: 60px;

  /* --- Topbar (Frosted Mint Glass) --- */
  --topbar-height: 56px;
  --topbar-bg: rgba(244, 249, 249, 0.75); /* Frosted pale mint */

  /* --- Content & Cards (Shallow Waters) --- */
  --content-bg: var(--grad-surface); /* Pale mint to white wash */
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-bg-hover: rgba(255, 255, 255, 0.85);
  --card-border: rgba(120, 227, 210, 0.25); /* Subtle mint border */
  --card-border-hover: rgba(35, 210, 233, 0.5); /* Bright cyan border on hover */

  /* --- Text (Deep Trench) --- */
  --text-primary: #0F1A2C; /* Very dark navy, softer than pure black */
  --text-secondary: #3A506B;
  --text-muted: #718096;

  /* --- Borders --- */
  --border-color: rgba(120, 227, 210, 0.3);
  --border-light: rgba(255, 255, 255, 0.8);

  /* --- Status Colors --- */
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.10);
  --warning: #D97706;
  --warning-bg: rgba(217, 119, 6, 0.10);
  --danger: #E11D48;
  --danger-bg: rgba(225, 29, 72, 0.10);
  --info: #0284C7;
  --info-bg: rgba(2, 132, 199, 0.10);

  /* --- Shape & Motion --- */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* Glassmorphism shadows (Tinted with Navy & Mint) */
  --shadow-sm: 0 2px 8px rgba(30, 53, 102, 0.06);
  --shadow: 0 4px 16px rgba(30, 53, 102, 0.08), 0 1px 4px rgba(120, 227, 210, 0.15);
  --shadow-md: 0 8px 24px rgba(30, 53, 102, 0.12), 0 2px 8px rgba(35, 210, 233, 0.10);
  --shadow-lg: 0 16px 40px rgba(30, 53, 102, 0.18), 0 4px 12px rgba(120, 227, 210, 0.12);
  --shadow-glow: 0 0 0 4px var(--primary-glow);

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

/* --- Smooth Rendering --- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

/* ============================================================
   BODY & BACKGROUND
   ============================================================ */
body {
  background-color: var(--content-bg) !important;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(15, 122, 116, 0.12) 0px, transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(10, 28, 32, 0.06) 0px, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(15, 122, 116, 0.10) 0px, transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(10, 28, 32, 0.05) 0px, transparent 50%) !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Global Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 122, 116, 0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 122, 116, 0.45); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary) !important;
  font-weight: 600;
  letter-spacing: -0.2px;
}

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

/* ============================================================
   LAYOUT
   ============================================================ */
#wrap { min-height: 100%; height: auto; }

/* ============================================================
   SIDEBAR — Deep teal-slate glass
   ============================================================ */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  z-index: 1050;
  overflow-y: auto;
  overflow-x: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 3px 0 20px rgba(0, 0, 0, 0.18), 1px 0 0 rgba(255, 255, 255, 0.04) inset;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar::-webkit-scrollbar { width: 3px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }

/* Sidebar Header */
.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-header img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sidebar-header .sidebar-brand {
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Sidebar Nav */
.sidebar-nav { flex: 1; padding: 10px 0; }
.sidebar-nav > ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav > ul > li { margin: 0; padding: 0; }

.sidebar-nav .nav-item > a,
.sidebar-nav .nav-item > span {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  margin: 2px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border-left: 2px solid transparent;
  gap: 11px;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.1px;
}

.sidebar-nav .nav-item > a:hover,
.sidebar-nav .nav-item > span:hover {
  color: #E0F7F6;
  background: var(--sidebar-hover);
  border-left-color: var(--sidebar-hover-border);
  transform: translateX(2px);
}

.sidebar-nav .nav-item.active > a,
.sidebar-nav .nav-item.active > span {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active-bg);
  border-left-color: var(--sidebar-active-border);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(15, 122, 116, 0.2);
}

.sidebar-nav .nav-item > a i,
.sidebar-nav .nav-item > span i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.sidebar-nav .nav-item > a:hover i { color: var(--primary-light); }
.sidebar-nav .nav-item.active > a i { color: var(--sidebar-active-text); }

.sidebar-nav .nav-item .caret-wrapper {
  margin-left: auto;
  transition: transform 0.25s ease;
  opacity: 0.6;
}
.sidebar-nav .nav-item.open .caret-wrapper { transform: rotate(90deg); }

/* Sidebar Submenu */
.sidebar-nav .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.18);
  border-left: none;
}

.sidebar-nav .nav-item.open .submenu { max-height: 600px; }

.sidebar-nav .submenu li {
  display: block !important;
  width: 100% !important;
  float: none !important;
}

.sidebar-nav .submenu li a {
  display: flex;
  align-items: center;
  padding: 7px 18px 7px 50px;
  color: rgba(143, 173, 176, 0.85);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  border-left: 2px solid transparent;
  margin: 1px 8px;
  border-radius: 6px;
}

.sidebar-nav .submenu li a:hover {
  color: #E0F7F6;
  background: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(75, 191, 185, 0.3);
  padding-left: 54px;
}

.sidebar-nav .submenu li a.active {
  color: var(--primary-light);
  background: rgba(15, 122, 116, 0.12);
  border-left-color: var(--primary-light);
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-footer .sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sidebar-text);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-footer .sidebar-user i { font-size: 18px; flex-shrink: 0; }

/* Sidebar Overlay (mobile) */
#sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1040;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}
#sidebar-overlay.active { display: block; }

/* Submenu Labels */
.sidebar-nav .submenu .dropdown-header {
  padding: 10px 18px 4px 50px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(75, 191, 185, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
}

.sidebar-nav .submenu .divider {
  background-color: rgba(255, 255, 255, 0.06);
  margin: 4px 18px 4px 50px;
  height: 1px;
  overflow: hidden;
  border: none;
}

/* Collapsed Sidebar */
#sidebar.collapsed { width: var(--sidebar-collapsed); }

#sidebar.collapsed .sidebar-brand,
#sidebar.collapsed .nav-item > a span:not(.caret-wrapper):not(:first-child),
#sidebar.collapsed .submenu,
#sidebar.collapsed .sidebar-footer .sidebar-user-text,
#sidebar.collapsed .nav-item .caret-wrapper,
#sidebar.collapsed .submenu .dropdown-header { display: none !important; }

#sidebar.collapsed .sidebar-header { justify-content: center; padding: 0; }

#sidebar.collapsed .nav-item > a,
#sidebar.collapsed .nav-item > span {
  justify-content: center;
  padding: 12px;
  border-left: none;
  margin: 3px 6px;
}

#sidebar.collapsed .sidebar-footer .sidebar-user { justify-content: center; }
#sidebar.collapsed ~ #topbar { left: var(--sidebar-collapsed); }
#sidebar.collapsed ~ #main-content { margin-left: var(--sidebar-collapsed); }
#sidebar.collapsed ~ #wrap #footer,
#sidebar.collapsed ~ #footer { margin-left: var(--sidebar-collapsed) !important; }

/* Disabled nav items */
.sidebar-nav .nav-item.disabled > a,
.sidebar-nav .submenu li.disabled > a,
.sidebar-nav .nav-item.disabled > span {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ============================================================
   TOPBAR — Frosted glass
   ============================================================ */
#topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(15, 122, 116, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1040;
  transition: var(--transition);
  box-shadow: 0 1px 0 rgba(15, 122, 116, 0.06), 0 4px 16px rgba(10, 28, 32, 0.05);
}

#sidebar-toggle {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

#sidebar-toggle:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

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

.topbar-sy {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: rgba(15, 122, 116, 0.08);
  border: 1px solid rgba(15, 122, 116, 0.15);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.topbar-sy a { color: var(--primary); text-decoration: none; }
.topbar-sy a:hover { text-decoration: underline; }

.topbar-user { position: relative; }

.topbar-user .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary) !important;
  text-decoration: none !important;
  transition: var(--transition);
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.topbar-user .dropdown-toggle:hover {
  background: rgba(15, 122, 116, 0.08) !important;
  color: var(--primary) !important;
}

.topbar-user .dropdown-menu {
  left: auto;
  right: 0;
  margin-top: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 210px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-user .dropdown-menu > li > a {
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.topbar-user .dropdown-menu > li > a:hover {
  background: var(--primary-glow);
  color: var(--primary-dark);
}

.topbar-user .dropdown-header {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 4px 16px;
}

.topbar-user .dropdown-menu .divider {
  margin: 4px 8px;
  border-color: var(--border-color);
}

.topbar-signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--danger) !important;
  text-decoration: none !important;
  transition: var(--transition);
  border: 1px solid rgba(185, 28, 28, 0.18);
  background: transparent;
}

.topbar-signout:hover {
  background: var(--danger-bg) !important;
  color: var(--danger) !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.12);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  margin-left: var(--sidebar-width);
  padding-top: calc(var(--topbar-height) + 24px);
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 40px;
  min-height: calc(100vh - 60px);
  transition: var(--transition);
}

/* Hide old navbar */
.navbar-fixed-top.navbar-default { display: none !important; }
body > br { display: none !important; }

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
}

.content-wrapper .pagecontent.container {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  border: none !important;
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
}

.page-header h1 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page-header .small,
.page-header small {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 16px;
  border-radius: 0;
  font-size: 13px;
}

.breadcrumb > li { color: var(--text-secondary); }

.breadcrumb > li a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb > li a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumb > li + li::before {
  content: "\203A" !important;
  color: var(--text-secondary);
}

.breadcrumb > .active {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================================
   PANELS → GLASS CARDS
   ============================================================ */

/*
  STACKING CONTEXT FIX:
  backdrop-filter creates a new compositing layer/stacking context.
  This traps dropdown z-index inside the card and makes it appear
  behind sibling cards. Solution: move the blur to a ::before pseudo-
  element so the panel itself has no stacking context of its own.
*/
.panel {
  position: relative;
  z-index: 1;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  background: var(--card-bg) !important;
  margin-bottom: 24px;
  overflow: visible;
  transition: var(--transition);
}

/* Glass blur on a pseudo-element — does NOT create parent stacking context */
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: -1;
  pointer-events: none;
}

/* Clip only the heading so top border-radius is clean */
.panel > .panel-heading {
  overflow: hidden;
}

.panel:hover {
  border-color: var(--card-border-hover) !important;
  box-shadow: var(--shadow-md) !important;
  background: var(--card-bg-hover) !important;
}

/* Elevate the card that has an open dropdown above all siblings */
.panel:has(.open),
.panel:has(.dropdown.open) {
  z-index: 100 !important;
}


.panel-default > .panel-heading {
  background: rgba(15, 122, 116, 0.04) !important;
  border-bottom: 1px solid rgba(15, 122, 116, 0.08) !important;
  border-top: none !important;
  padding: 16px 22px !important;
  border-radius: 0 !important;
}

.panel-heading {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.2px;
}

.panel-body { padding: 22px !important; }

.panel-heading .btn-toolbar { margin-top: -2px; }

/* Panel Variants */
.panel-info > .panel-heading {
  background: rgba(3, 105, 161, 0.06) !important;
  border-bottom-color: rgba(3, 105, 161, 0.12) !important;
  color: var(--info) !important;
}

.panel-warning > .panel-heading {
  background: rgba(180, 83, 9, 0.06) !important;
  border-bottom-color: rgba(180, 83, 9, 0.12) !important;
  color: var(--warning) !important;
}

.panel-success > .panel-heading {
  background: rgba(4, 120, 87, 0.06) !important;
  border-bottom-color: rgba(4, 120, 87, 0.12) !important;
  color: var(--success) !important;
}

.panel-danger > .panel-heading {
  background: rgba(185, 28, 28, 0.06) !important;
  border-bottom-color: rgba(185, 28, 28, 0.12) !important;
  color: var(--danger) !important;
}

/* ============================================================
   TABLES
   ============================================================ */
.table {
  font-size: 13.5px;
  color: var(--text-primary);
  margin-bottom: 0;
}

.table > thead > tr > th {
  background: rgba(15, 122, 116, 0.04) !important;
  border-bottom: 2px solid rgba(15, 122, 116, 0.10) !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px !important;
  white-space: nowrap;
}

.table > tbody > tr > td {
  padding: 12px 16px !important;
  border-bottom: 1px solid rgba(15, 122, 116, 0.05) !important;
  vertical-align: middle;
}

.table > tbody > tr:hover > td {
  background-color: rgba(15, 122, 116, 0.04) !important;
}

.table > tbody > tr:last-child > td {
  border-bottom: none !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > td { background-color: transparent !important; }
.table-striped > tbody > tr:nth-of-type(even) > td { background-color: rgba(15, 122, 116, 0.025) !important; }

.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td {
  border: 1px solid rgba(15, 122, 116, 0.08) !important;
  border-width: 0 0 1px 0 !important;
}

.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td {
  padding: 9px 12px !important;
}

.table-condensed th {
  font-size: 12px !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.table-condensed td { font-size: 12.5px !important; }
.table-condensed td a { color: var(--primary); font-weight: 500; }
.table-condensed td a:hover { color: var(--primary-dark); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  border-radius: var(--radius-sm) !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  padding: 8px 16px !important;
  transition: var(--transition) !important;
  border: 1px solid transparent !important;
  box-shadow: var(--shadow-sm) !important;
  letter-spacing: 0.1px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

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

.btn-default {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(15, 122, 116, 0.18) !important;
  color: var(--text-primary) !important;
  backdrop-filter: blur(8px);
}

.btn-default:hover,
.btn-default:focus {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(15, 122, 116, 0.35) !important;
  color: var(--primary-dark) !important;
}

.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(15, 122, 116, 0.30) !important;
}

.btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  box-shadow: 0 6px 16px rgba(15, 122, 116, 0.35) !important;
}

.btn-success {
  background: var(--success) !important;
  border-color: var(--success) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.25) !important;
}

.btn-success:hover {
  background: #036644 !important;
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.30) !important;
}

.btn-danger {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.25) !important;
}

.btn-danger:hover {
  background: #991B1B !important;
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.30) !important;
}

.btn-warning {
  background: var(--warning) !important;
  border-color: var(--warning) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25) !important;
}

.btn-warning:hover {
  background: #923E0C !important;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.30) !important;
}

.btn-info {
  background: var(--info) !important;
  border-color: var(--info) !important;
  color: #FFFFFF !important;
}

.btn-info:hover {
  background: #025B88 !important;
}

.btn-xs {
  padding: 4px 8px !important;
  font-size: 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  min-width: 28px;
}

.btn-xs .bx { font-size: 1.35em; line-height: 1; }

.btn-sm {
  padding: 5px 12px !important;
  font-size: 12.5px !important;
}

.btn-group .btn { border-radius: 0 !important; }
.btn-group .btn:first-child { border-radius: 6px 0 0 6px !important; }
.btn-group .btn:last-child { border-radius: 0 6px 6px 0 !important; }

/* Icon color fix inside colored buttons */
.btn:not(.btn-default) .text-danger,
.btn:not(.btn-default) .text-info,
.btn:not(.btn-default) .text-success,
.btn:not(.btn-default) .text-warning,
.btn:not(.btn-default) .text-primary { color: inherit !important; }

.btn-default .text-danger  { color: var(--danger) !important; }
.btn-default .text-info    { color: var(--info) !important; }
.btn-default .text-success { color: var(--success) !important; }
.btn-default .text-warning { color: var(--warning) !important; }
.btn-default .text-primary { color: var(--primary) !important; }

/* ============================================================
   LABELS / BADGES
   ============================================================ */
.label {
  border-radius: 20px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  padding: 3px 9px !important;
  letter-spacing: 0.2px;
}

.label-default {
  background: rgba(15, 122, 116, 0.08) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color) !important;
}

.label-primary {
  background: rgb(131 180 255 / 19%) !important;
  color: #ffffff !important;
}

.label-success {
  background: var(--success-bg) !important;
  color: var(--success) !important;
}

.label-warning {
  background: var(--warning-bg) !important;
  color: var(--warning) !important;
}

.label-danger {
  background: var(--danger-bg) !important;
  color: var(--danger) !important;
}

.label-info {
  background: var(--info-bg) !important;
  color: var(--info) !important;
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-control {
  border: 1px solid rgba(15, 122, 116, 0.20) !important;
  background-color: rgba(255, 255, 255, 0.85) !important;
  border-radius: var(--radius-xs) !important;
  box-shadow: 0 1px 3px rgba(10, 28, 32, 0.05) !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  color: var(--text-primary) !important;
  transition: var(--transition) !important;
  height: auto !important;
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  background-color: rgba(255, 255, 255, 0.45) !important;
  opacity: 0.8 !important;
  color: var(--text-secondary) !important;
}

.form-control:focus {
  border-color: var(--primary) !important;
  background-color: #FFFFFF !important;
  box-shadow: var(--shadow-glow) !important;
  outline: none !important;
}

.input-group .input-group-btn .btn {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

.input-group .input-group-btn .btn:hover {
  background: var(--primary-dark) !important;
}

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */
.dropdown-menu {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dropdown-menu > li > a {
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
}

.dropdown-menu > li > a .bx,
.dropdown-menu > li > a .glyphicon {
  margin-right: 6px;
  font-size: 15px;
}

.dropdown-menu > li > a .pull-right {
  margin-left: auto;
  float: none !important;
  margin-top: 0 !important;
}

.dropdown-menu > li > a:hover {
  background: var(--primary-glow);
  color: var(--primary-dark);
}

.dropdown-menu .divider {
  margin: 4px 6px;
  border-color: var(--border-color);
}

.dropdown-menu .dropdown-header {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 6px 14px 4px;
}

/* ============================================================
   LIST GROUPS
   ============================================================ */
.list-group-item {
  border: none !important;
  border-bottom: 1px solid rgba(15, 122, 116, 0.07) !important;
  padding: 10px 16px !important;
  background: transparent !important;
  transition: var(--transition-fast);
}

.list-group-item:last-child { border-bottom: none !important; }

a.list-group-item:hover {
  background: rgba(15, 122, 116, 0.05) !important;
  color: var(--primary-dark) !important;
}

.list-group-item-heading { font-size: 14px; font-weight: 600; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: var(--transition);
  border: 1px solid var(--card-border);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--card-border-hover);
  background: var(--card-bg-hover);
}

.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-card .stat-icon.icon-primary  { background: rgba(15, 122, 116, 0.12); color: var(--primary); }
.stat-card .stat-icon.icon-success  { background: var(--success-bg); color: var(--success); }
.stat-card .stat-icon.icon-warning  { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-icon.icon-danger   { background: var(--danger-bg); color: var(--danger); }
.stat-card .stat-icon.icon-info     { background: var(--info-bg); color: var(--info); }

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ============================================================
   GRADE LEVEL CARDS
   ============================================================ */
.grade-card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  transition: var(--transition);
  margin-top: 16px;
  margin-bottom: 16px;
  overflow: visible;
}

/* Glass blur on pseudo-element to avoid stacking context */
.grade-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: -1;
  pointer-events: none;
}

.grade-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--card-border-hover);
  z-index: 10;
}

/* Elevate when a dropdown is open inside */
.grade-card:has(.open),
.grade-card:has(.dropdown.open) {
  z-index: 200 !important;
}

.grade-card .grade-header {
  background: linear-gradient(135deg, #111f3a 0%,  #274279 100%);
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grade-card .grade-header strong {
  font-size: 14px !important;
  color: #ffffff !important;
}

.grade-card .grade-header a {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

.grade-card .grade-header a:hover { text-decoration: underline; }

.grade-card .section-list { padding: 8px; }

.grade-card .section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
  margin-bottom: 1px;
}

.grade-card .section-item:hover {
  background: rgba(15, 122, 116, 0.06);
}


.grade-card .section-item a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

.grade-card .section-item a:hover { color: var(--primary); }

/* ============================================================
   ROW TOOLBAR
   ============================================================ */
.row-toolbar {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

/* ============================================================
   PAGER
   ============================================================ */
.pager li > a {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs) !important;
  color: var(--text-primary) !important;
  font-weight: 500 !important;
  padding: 8px 20px !important;
  background: var(--primary) !important;
  transition: var(--transition) !important;
  backdrop-filter: blur(8px)!important;
  color: #FFFFFF !important;
  margin-left: 20px;
  margin-right: 20px;
}

.pager li > a:hover {
  background: var(--card-bg) !important;
  border-color: var(--primary) !important;
  color: #1d1d1d !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 122, 116, 0.30);
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: rgba(255, 255, 255, 0.50) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color) !important;
  padding: 16px 24px !important;
  margin-top: 40px !important;
  margin-bottom: 0px !important;
  margin-left: var(--sidebar-width) !important;
  margin-right: 0 !important;
}

#footer p {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}

#footer a { color: var(--primary) !important; text-decoration: none !important; }
#footer a:hover { text-decoration: underline !important; }

/* ============================================================
   SECTION DIVIDERS
   ============================================================ */
.content-section-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

/* ============================================================
   MISC OVERRIDES
   ============================================================ */
.pagecontent {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.well {
  border-radius: var(--radius) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow) !important;
  background: var(--card-bg) !important;
  backdrop-filter: blur(16px) !important;
}

section {
  border-radius: var(--radius) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow) !important;
}

.figure1 { font-size: 32px; font-weight: 700; color: var(--primary); }

.jumbotron {
  border-radius: var(--radius);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  padding: 24px !important;
}

.offcanvas-drawer { display: none !important; }

/* ============================================================
   NAV FLAT TABS
   ============================================================ */
.nav-flat > li > a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-flat > li > a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary) !important;
}

.nav-flat > li.active > a,
.nav-flat > li.active > a:hover,
.nav-flat > li.active > a:focus {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
  font-weight: 600;
}

/* ============================================================
   BOXICONS
   ============================================================ */
.bx { font-size: 1.15em; vertical-align: middle; }

.input-group-addon .bx { font-size: 1.2em; }

/* ============================================================
   MODALS
   ============================================================ */
.modal { z-index: 1060 !important; }
.modal-backdrop { z-index: 1055 !important; }

.modal-content {
  border-radius: var(--radius) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.modal-header {
  border-bottom-color: var(--border-color) !important;
  border-top-left-radius: var(--radius) !important;
  border-top-right-radius: var(--radius) !important;
}

.modal-footer { border-top-color: var(--border-color) !important; }

/* ============================================================
   SELECT2 OVERRIDES
   ============================================================ */
.select2-container .select2-choice,
.select2-container .select2-choices {
  border: 1px solid rgba(15, 122, 116, 0.20) !important;
  border-radius: var(--radius-xs) !important;
  background: rgba(255, 255, 255, 0.85) !important;
}

.select2-container-active .select2-choice,
.select2-container-active .select2-choices {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-glow) !important;
}

/* ============================================================
   MISCELLANEOUS UTILITIES
   ============================================================ */
.chromeframe { display: none !important; }

.navbar-form {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Student role nav link */
#sidebar .nav-item > a.nav-link-single { padding: 10px 20px; }

/* Tab content inside panels */
.panel > .tab-content { padding: 0 20px 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  #sidebar { width: var(--sidebar-collapsed); }

  #sidebar .sidebar-brand,
  #sidebar .nav-item > a span:not(.caret-wrapper):not(:first-child),
  #sidebar .submenu,
  #sidebar .sidebar-footer .sidebar-user-text,
  #sidebar .nav-item .caret-wrapper,
  #sidebar .submenu .dropdown-header { display: none !important; }

  #sidebar .sidebar-header { justify-content: center; padding: 0; }

  #sidebar .nav-item > a,
  #sidebar .nav-item > span {
    justify-content: center;
    padding: 12px;
    border-left: none;
  }

  #sidebar .sidebar-footer .sidebar-user { justify-content: center; }

  #topbar { left: var(--sidebar-collapsed); }

  #main-content {
    margin-left: var(--sidebar-collapsed);
    padding-left: 16px;
    padding-right: 16px;
  }

  #footer { margin-left: var(--sidebar-collapsed) !important; }
}

@media (max-width: 767px) {
  #sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

  #sidebar .sidebar-brand,
  #sidebar .nav-item > a span:not(.caret-wrapper):not(:first-child),
  #sidebar .sidebar-footer .sidebar-user-text,
  #sidebar .nav-item .caret-wrapper { display: flex !important; }

  #sidebar .submenu { display: block !important; }
  #sidebar .submenu .dropdown-header { display: block !important; }

  #sidebar .sidebar-header { justify-content: flex-start; padding: 0 16px; }

  #sidebar .nav-item > a,
  #sidebar .nav-item > span {
    justify-content: flex-start;
    padding: 10px 20px;
    border-left: 2px solid transparent;
  }

  #sidebar .sidebar-footer .sidebar-user { justify-content: flex-start; }

  #sidebar.open { transform: translateX(0); }

  #topbar { left: 0; }

  #main-content {
    margin-left: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  #footer { margin-left: 0 !important; }

  .topbar-sy { display: none; }
}

/* ============================================================
   ████  LOGIN PAGE — SOFT GLASSMORPHISM  ████
   ============================================================ */

.login-page-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'Inter', sans-serif !important;

  /* Rich dual-tone gradient background */
  background:
    radial-gradient(ellipse at 15% 30%, rgba(15, 122, 116, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(10, 92, 87, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(75, 191, 185, 0.12) 0%, transparent 60%),
    linear-gradient(145deg, #0D2426 0%, #123237 40%, #1A4040 70%, #0A2828 100%) !important;
  background-attachment: fixed !important;
}

/* Animated orbs behind the login card */
.login-page-body::before,
.login-page-body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: orb-drift 14s ease-in-out infinite alternate;
}

.login-page-body::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(15, 122, 116, 0.18) 0%, transparent 70%);
  top: -120px; left: -100px;
}

.login-page-body::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(75, 191, 185, 0.12) 0%, transparent 70%);
  bottom: -100px; right: -80px;
  animation-delay: -7s;
}

@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, 20px) scale(1.05); }
  100% { transform: translate(-20px, 30px) scale(0.97); }
}

/* Override old Bootstrap layout on login page */
.login-page-body #wrap { margin: 0; padding: 0; min-height: auto; position: relative; z-index: 1; }
.login-page-body .navbar-fixed-top.navbar-default { display: none !important; }
.login-page-body > br { display: none !important; }

.login-page-body .container { padding: 0; position: relative; z-index: 1; }

/* THE GLASS CARD */
.login-page-body .account-wall {
  background: rgba(255, 255, 255, 0.09) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 20px !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.15) inset !important;
  padding: 44px 40px 32px 40px !important;
  max-width: 420px;
  margin: 0 auto;
  margin-top: 0 !important;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer at the top of the card */
.login-page-body .account-wall::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(75, 191, 185, 0.6) 50%, transparent 100%);
}

/* School Logo */
.login-page-body .profile-img {
  width: 80px !important;
  height: 80px !important;
  border-radius: 18px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(15, 122, 116, 0.25) !important;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 2px 8px rgba(15, 122, 116, 0.4));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-page-body .profile-img:hover {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(15, 122, 116, 0.35) !important;
}

/* Form heading and text */
.login-page-body .form-signin h4 {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  text-align: center;
  margin-bottom: 4px !important;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.login-page-body .form-signin p {
  font-size: 13px !important;
  color: rgba(180, 230, 228, 0.75) !important;
  text-align: center;
  margin-bottom: 28px !important;
}

/* Input fields on login */
.login-page-body .form-signin .form-control {
  border-radius: 10px !important;
  padding: 13px 16px !important;
  font-size: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.10) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease !important;
}

.login-page-body .form-signin .form-control::placeholder {
  color: rgba(180, 220, 218, 0.6) !important;
}

.login-page-body .form-signin .form-control:focus {
  border-color: rgba(75, 191, 185, 0.60) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 0 3px rgba(75, 191, 185, 0.22), 0 2px 8px rgba(0, 0, 0, 0.20) !important;
  outline: none !important;
}

.login-page-body .form-signin input[type="text"] {
  margin-bottom: -1px;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.login-page-body .form-signin input[type="password"] {
  margin-bottom: 20px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Sign In Button */
.login-page-body .btn-lg.btn-block {
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0F7A74 0%, #0A5C57 100%) !important;
  border: 1px solid rgba(75, 191, 185, 0.30) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  padding: 13px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 14px rgba(15, 122, 116, 0.45), 0 1px 0 rgba(255,255,255,0.1) inset !important;
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on the button */
.login-page-body .btn-lg.btn-block::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}

.login-page-body .btn-lg.btn-block:hover {
  background: linear-gradient(135deg, #12918A 0%, #0D6E69 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 122, 116, 0.55), 0 1px 0 rgba(255,255,255,0.12) inset !important;
}

.login-page-body .btn-lg.btn-block:hover::after { left: 150%; }

.login-page-body .btn-lg.btn-block:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(15, 122, 116, 0.4) !important;
}

/* Divider on login form */
.login-page-body .form-signin hr {
  border-color: rgba(255, 255, 255, 0.12);
  margin: 20px 0;
}

/* Footer on login page */
.login-page-body #footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: transparent !important;
  border-top: none !important;
  padding: 16px 24px !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  text-align: center;
  z-index: 10;
}

.login-page-body #footer p { color: rgba(140, 190, 188, 0.65) !important; }
.login-page-body #footer a { color: rgba(75, 191, 185, 0.85) !important; }
.login-page-body #footer a:hover { color: rgba(75, 191, 185, 1) !important; }

/* Modal on login page */
.login-page-body .modal-content {
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* ============================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ============================================================ */
@media (max-width: 768px) {
  /* Sidebar handling */
  #sidebar {
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
  }
  #sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
    backdrop-filter: blur(2px);
  }
  #sidebar-overlay.active {
    display: block;
  }
  
  /* Topbar handling */
  #topbar {
    left: 0;
    padding: 0 15px;
  }
  
  .topbar-sy {
    display: none; /* Hide School Year badge on small screens to save space */
  }

  /* Main content */
  #main-content {
    margin-left: 0 !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Footer */
  #footer, #wrap #footer {
    margin-left: 0 !important;
  }
  
  /* Prevent horizontal scroll on small devices */
  body {
    overflow-x: hidden;
  }
}
