:root {
  /* School Colors - Modern Enterprise Palette */
  --shcs-navy: #173065;
  --shcs-navy-light: #23468b;
  --shcs-navy-dark: #0e1d3d;
  --shcs-gold: #fbc02d;
  --shcs-gold-light: #fff2cc;
  --shcs-sky: #e0f2fe;
  --shcs-red: #d32f2f;
  
  /* Neutrals & UI */
  --bg-color: #f1f5f9;
  --surface-color: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  /* Effects & Glassmorphism */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: 20px;
  
  /* Module Accents - Section Based */
  --accent-admin: #173065;    /* Dark Navy for Administration */
  --accent-finance: #059669;  /* Emerald for Financials */
  --accent-personal: #0ea5e9; /* Sky Blue for Personal/Staff view */
  --accent-primary: var(--shcs-navy); /* Base Brand */
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Global Glass Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #e5e9f0;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(5, 150, 105, 0.05) 0px, transparent 50%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: var(--shcs-navy);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--shcs-red);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--shcs-navy);
  letter-spacing: -0.5px;
}

.brand-text span {
  color: var(--shcs-red);
}

/* Modern Button styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 9999px; /* Pill shape */
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  gap: 0.4rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--shcs-navy) 0%, var(--shcs-navy-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(43, 48, 124, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 48, 124, 0.23);
  color: white;
}

.btn-accent {
  background: var(--shcs-red);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(211, 47, 47, 0.39);
}

.btn-accent:hover {
  background: var(--shcs-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.23);
  color: white;
}

.btn-secondary {
  background: #eef2f7;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  flex-grow: 1;
  display: flex;
  align-items: center;
  margin-top: 5rem; /* offset for fixed navbar */
  min-height: calc(100vh - 5rem);
  position: relative;
  overflow: hidden;
}

/* Subtle background gradient for hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 100% 0%, var(--shcs-gold-light) 0%, transparent 40%),
              radial-gradient(circle at 0% 100%, rgba(43, 48, 124, 0.05) 0%, transparent 40%);
  z-index: -1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}

.hero-text h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--shcs-navy);
}

.hero-text h1 span {
  color: var(--shcs-red);
  position: relative;
  display: inline-block;
}

.hero-text h1 span::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: var(--shcs-gold);
  z-index: -1;
  border-radius: 4px;
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 90%;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Abstract Graphic Placeholder for Hero */
.hero-graphic {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

/* Authentication / Login Module */
.auth-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 1rem 2rem; /* space for navbar */
  background: radial-gradient(circle at top right, var(--shcs-gold-light) 0%, transparent 40%),
              radial-gradient(circle at bottom left, rgba(43, 48, 124, 0.08) 0%, transparent 40%);
}

.auth-card {
  background: var(--surface-color);
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

/* The colorful top border stripe for the card */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--shcs-navy) 0%, var(--shcs-red) 50%, var(--shcs-gold) 100%);
}

.auth-header {
  text-align: center;
  padding: 2.5rem 2.5rem 1rem;
}

.auth-header h2 {
  font-size: 2rem;
  color: var(--shcs-navy);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted);
}

/* Login Tabs */
.auth-tabs {
  display: flex;
  margin: 0 2.5rem 2rem;
  background: var(--bg-color);
  border-radius: 12px;
  padding: 0.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem 0;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--surface-color);
  color: var(--shcs-navy);
  box-shadow: var(--shadow-sm);
}

/* Login Form */
.auth-form {
  padding: 0 2.5rem 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  background-color: var(--surface-color);
  border-color: var(--shcs-navy);
  box-shadow: 0 0 0 4px rgba(43, 48, 124, 0.1);
}

select.form-control,
textarea.form-control,
input.form-control {
  min-height: 44px;
}

.auth-form .btn-primary {
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
  margin-top: 1rem;
}

/* Footer */
footer {
  background: var(--surface-color);
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .navbar {
    padding: 0.75rem 0;
  }

  .brand {
    font-size: 1.25rem;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-links > span {
    display: none;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .auth-card {
    border-radius: 18px;
  }

  .auth-header {
    padding: 2rem 1.25rem 1rem;
  }

  .auth-tabs {
    margin: 0 1.25rem 1.5rem;
  }

  .auth-form {
    padding: 0 1.25rem 2rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text h1 {
    font-size: 3rem;
  }
  
  .hero-text p {
    margin: 0 auto 2.5rem;
  }
  
  .hero-actions {
    justify-content: center;
  }

  footer {
    padding: 1.25rem 1rem;
    font-size: 0.85rem;
  }
}

/* Base Utility Classes (For Portability from Bootstrap) */
/* Track/Department Badges - Premium Glassmorphism */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.badge-science { 
    background: #E1F5FE; 
    color: #01579B; 
    border: none;
    box-shadow: none;
}

.badge-arts, .badge-art { 
    background: #FFF8E1; 
    color: #8D6E63; 
    border: none;
    box-shadow: none;
}

.badge-comm, .badge-commercial { 
    background: #EDE7F6; 
    color: #512DA8; 
    border: none;
    box-shadow: none;
}

.badge-general { 
    background: #F5F5F5; 
    color: #616161; 
    border: none;
    box-shadow: none;
}

/* Interactive Hover Effect for Badges */
.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.btn-sm, .btn-group-sm > .btn { padding: 0.25rem 0.5rem; font-size: 0.875rem; line-height: 1.5; border-radius: 0.2rem; }
.btn-outline-primary { color: var(--shcs-navy); border-color: var(--shcs-navy); background: transparent; border: 1px solid var(--shcs-navy); }
.btn-outline-primary:hover { color: #fff; background-color: var(--shcs-navy); }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; background: transparent; border: 1px solid #6c757d; }
.btn-outline-secondary:hover { color: #fff; background-color: #6c757d; }
.btn-outline-dark { color: #343a40; border-color: #343a40; background: transparent; border: 1px solid #343a40; }
.btn-outline-dark:hover { color: #fff; background-color: #343a40; }

.align-middle { vertical-align: middle !important; }
.text-right { text-align: right !important; }
.fst-italic { font-style: italic !important; }
.text-uppercase { text-transform: uppercase !important; }
.font-weight-bold { font-weight: bold !important; }
.font-weight-normal { font-weight: normal !important; }
.bg-light { background-color: #f8f9fa !important; }

/* Foundation: Responsive Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}
.justify-content-center {
    justify-content: center !important;
}
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 15px; }
.col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; padding: 0 15px; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 15px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; padding: 0 15px; }

@media (min-width: 992px) {
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; padding: 0 15px; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 15px; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }
}

/* Layout Centering Containers */
.portal-centered-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.portal-standard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

@media (max-width: 768px) {
    .portal-centered-container,
    .portal-standard-container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .col-md-8, .col-md-6, .col-md-4, .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

.g-4 { gap: 1.5rem; }

/* Dashboard Grids & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.card-stat-modern {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 150px;
    background: linear-gradient(145deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
}

.card-stat-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.stat-bg-icon {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    opacity: 0.05;
    z-index: 0;
    transition: transform 0.3s ease;
}

.card-stat-modern:hover .stat-bg-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stat-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-ring-success {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Activity Feed Styles */
.activity-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background 0.2s ease;
}
.activity-item:hover { background: rgba(0,0,0,0.02); }
.activity-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Notice Cards */
.notice-card {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--shcs-navy);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}
.notice-card:hover { transform: translateX(5px); }
.notice-card.warning { border-left-color: #f59e0b; }
.notice-card.danger { border-left-color: #ef4444; }

/* Utilities for Template Compatibility */
.btn-block { display: flex; width: 100%; }
.me-auto, .mr-auto { margin-right: auto !important; }
.ms-auto, .ml-auto { margin-left: auto !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-grow-1 { flex-grow: 1 !important; }

/* Floating WhatsApp Support Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #25d366;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999;
}
.whatsapp-float:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
  color: white;
}
.whatsapp-float i {
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .whatsapp-float span { display: none; }
  .whatsapp-float { padding: 15px; border-radius: 50%; bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .auth-wrapper {
    padding: 5.5rem 0.5rem 1.5rem;
  }
  .auth-card {
    border-radius: 16px;
  }
  .auth-header h2 {
    font-size: 1.5rem;
  }
  .auth-header p {
    font-size: 0.875rem;
  }
  .notice-card {
    padding: 0.85rem !important;
    font-size: 0.8rem !important;
  }
  .form-control {
    padding: 0.75rem 0.875rem;
    font-size: 0.95rem;
  }
}

/* Responsive display utilities */
.d-none {
    display: none !important;
}
.d-block {
    display: block !important;
}
@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }
    .d-md-block {
        display: block !important;
    }
}

/* Notices layout customization */
.notices-grid-active, .notices-grid-compose, .notices-grid-past {
    width: 100%;
}
