/* ==========================================================================
   SPARK PWA - Design System & Styles
   Student Performance, Attendance & Record Keeper
   Color Palette: Warm Golden Yellow, Soft Amber, Luminous Ivory, Slate
   ========================================================================== */

:root {
  /* Brand Color Palette */
  --primary-blue: #0F4C81;
  --primary-blue-hover: #0C3C67;
  --accent-blue: #2563EB;
  --light-blue: #EBF3FA;
  --sky-blue: #38BDF8;

  --accent-green: #10B981;
  --accent-green-hover: #059669;
  --light-green: #ECFDF5;

  --spark-gold: #FFC700;
  --spark-gold-hover: #FFA500;
  --spark-amber: #D97706;

  --bg-gradient: linear-gradient(135deg, #0F4C81 0%, #1E40AF 100%);
  --bg-app: #FFFDF7;
  --bg-app-gradient: linear-gradient(180deg, #FFFDF2 0%, #FFFBE6 180px, #F8FAFC 420px, #F1F5F9 100%);
  --card-bg: #FFFFFF;
  
  /* Text Colors */
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-white: #FFFFFF;

  /* UI Elements */
  --border-color: #E2E8F0;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 10px 30px -4px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.02);
  --shadow-card-hover: 0 14px 34px -4px rgba(15, 23, 42, 0.09), 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);

  /* Dimensions */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --nav-height: 78px;
  --header-height: 64px;

  /* Font */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===================================================================
   SPARK v3.0 FROZEN AREA — DO NOT MODIFY WITHOUT EXPLICIT REQUEST
   Root Document Scrolling & Native Mobile Pull-to-Refresh Architecture
   =================================================================== */

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  min-height: 100%;
  overscroll-behavior-y: auto;
}

body {
  font-family: var(--font-family);
  background-color: #E2E8F0;
  background-image: 
    radial-gradient(at 0% 0%, rgba(255, 220, 100, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(200, 225, 255, 0.2) 0px, transparent 50%);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overscroll-behavior-y: auto;
  -webkit-font-smoothing: antialiased;
}

/* Application Container */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 480px; /* Mobile first optimization boundary */
  margin: 0 auto;
  position: relative;
  background: var(--bg-app-gradient);
  box-shadow: var(--shadow-lg);
  overflow-x: clip;
}

/* Views Management */
.view {
  display: none;
  flex-direction: column;
  flex: 1;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

.view.active {
  display: flex;
}

/* Shared Application Shell Architecture */
.app-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  position: relative;
}

.app-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.app-content-area::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

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

/* Header Component (Mobile Optimized Two-Row Layout with Ambient Frosted Glow) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(254, 240, 138, 0.6);
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.75rem 0.45rem;
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.4rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.brand-icon.yellow-spark-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #FFD000 0%, #FFA800 100%);
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(255, 199, 0, 0.42);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #0F172A;
  line-height: 1;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0F172A;
  background: linear-gradient(135deg, #FFFDEB 0%, #FEF08A 100%);
  border: 1.5px solid #FDE047;
  padding: 0.28rem 0.5rem 0.28rem 0.55rem;
  border-radius: var(--radius-full);
  min-width: 0;
  flex: 1;
  max-width: 100%;
  cursor: default;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.18);
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}

.header-status.is-admin-switcher {
  cursor: pointer;
  pointer-events: auto;
}

.header-status.is-admin-switcher:hover {
  background: #FDE047;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.28);
}

.header-status::after {
  content: '';
  position: absolute;
  top: -6px;
  right: -8px;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cline x1='8' y1='2' x2='8' y2='6' stroke='%23EAB308' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='13' y1='4' x2='10' y2='7' stroke='%23EAB308' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='15' y1='9' x2='11' y2='9' stroke='%23EAB308' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.header-centre-caret {
  color: #78350F;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  margin-left: 0.1rem;
}

.header-status.is-admin-switcher:hover .header-centre-caret {
  transform: translateY(1px);
}

.status-centre-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
  flex: 1;
  font-size: 0.65rem;
  letter-spacing: -0.15px;
  line-height: 1.2;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #EAB308;
  box-shadow: 0 0 8px #EAB308;
  flex-shrink: 0;
}

.header-right-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
}

.header-refresh-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFFDEB 0%, #FEF08A 100%);
  border: 1.5px solid #FDE047;
  color: #78350F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.18);
  transition: all 0.2s ease;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.header-refresh-btn:hover {
  background: #FDE047;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.28);
}

.header-refresh-btn:active {
  transform: scale(0.92);
}

.header-refresh-btn svg.is-spinning {
  animation: headerRefreshSpin 0.65s linear infinite;
}

@keyframes headerRefreshSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.header-subtitle-bar {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: #78350F;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Login Screen Styles (Matching Reference Image) */
.login-view-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #090A0E 0%, #171821 42%, #C49400 82%, #FFC700 100%);
  color: var(--text-white);
  padding: 2rem 1.35rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.login-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Radial Glow Behind Logo */
.logo-radial-glow {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 199, 0, 0.45) 0%, rgba(255, 199, 0, 0) 70%);
  filter: blur(20px);
}

/* Vector Lightning Graphics (Top Left & Top Right) */
.lightning-graphic {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.lightning-top-left {
  top: 30px;
  left: -20px;
  width: 120px;
  height: 180px;
  transform: rotate(-10deg);
}

.lightning-top-right {
  top: 20px;
  right: -25px;
  width: 140px;
  height: 200px;
  transform: rotate(12deg);
}

/* Bottom Corner Rays & Ambient Light */
.bottom-light-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: radial-gradient(ellipse at bottom center, rgba(255, 230, 0, 0.4) 0%, rgba(255, 199, 0, 0) 75%);
}

.bottom-ray-left {
  position: absolute;
  bottom: -30px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: linear-gradient(45deg, rgba(255, 230, 0, 0.35), transparent 70%);
  transform: rotate(25deg);
  filter: blur(15px);
}

.bottom-ray-right {
  position: absolute;
  bottom: -30px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: linear-gradient(-45deg, rgba(255, 230, 0, 0.35), transparent 70%);
  transform: rotate(-25deg);
  filter: blur(15px);
}

/* Floating Golden Particles */
.golden-particle {
  position: absolute;
  border-radius: 50%;
  background: #FFE500;
  box-shadow: 0 0 8px #FFC700;
  opacity: 0.7;
}

.golden-particle.p1 { top: 18%; left: 12%; width: 4px; height: 4px; }
.golden-particle.p2 { top: 28%; right: 15%; width: 5px; height: 5px; opacity: 0.9; }
.golden-particle.p3 { top: 42%; left: 8%; width: 3px; height: 3px; }
.golden-particle.p4 { bottom: 35%; right: 10%; width: 6px; height: 6px; }
.golden-particle.p5 { bottom: 20%; left: 18%; width: 4px; height: 4px; }
.golden-particle.p6 { top: 10%; right: 25%; width: 3px; height: 3px; }

/* Logo Section */
.login-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 0.5rem;
}

.spark-squircle-logo-wrap {
  display: inline-block;
  position: relative;
  margin-bottom: 0.875rem;
}

.spark-squircle-logo {
  width: 88px;
  height: 88px;
  background: linear-gradient(145deg, #FFDF00 0%, #FFB000 100%);
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 0 36px rgba(255, 204, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: transform 0.25s ease;
}

.spark-squircle-logo:hover {
  transform: scale(1.03);
}

.spark-bolt-icon {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.spark-brand-title {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #FFFFFF;
  line-height: 1;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
  margin-top: 0.25rem;
}

.spark-brand-subtitle {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 0.5rem;
  font-weight: 500;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.35;
}

/* White Rounded Login Card */
.login-card {
  position: relative;
  z-index: 1;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 1.625rem 1.35rem 1.35rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  color: var(--text-main);
  margin: 1rem 0 0.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.84375rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 0.9375rem;
  color: #64748B;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.form-control {
  width: 100%;
  padding: 0.8125rem 2.625rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
  background: #FAFAFA;
  color: #0F172A;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #FFC700;
  background: #FFFFFF;
  box-shadow: 0 0 0 3.5px rgba(255, 199, 0, 0.22);
}

.form-control::placeholder {
  color: #94A3B8;
}

/* Eye Password Toggle Button */
.password-toggle-btn {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
  z-index: 2;
  height: auto;
  box-shadow: none !important;
}

.password-toggle-btn:hover {
  color: #0F172A;
}

.hidden-icon {
  display: none;
}

/* Authentication Error Alert Box */
.login-error-alert {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #DC2626;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-top: 0.875rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
  animation: fadeIn 0.2s ease-out;
}

/* Golden Yellow Button with Black Text */
.btn-yellow-spark {
  width: 100%;
  padding: 0.9375rem 1.25rem;
  background: linear-gradient(135deg, #FFC700 0%, #FFA500 100%) !important;
  color: #0F172A !important;
  border: none !important;
  border-radius: 14px !important;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 175, 0, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  box-sizing: border-box;
  text-decoration: none;
}

.btn-yellow-spark:hover, .btn-yellow-spark:active {
  background: linear-gradient(135deg, #FFD600 0%, #FF9000 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 175, 0, 0.55);
}

.btn-yellow-spark:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.spinner-icon {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15, 23, 42, 0.25);
  border-top-color: #0F172A;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-yellow-spark svg {
  stroke: #0F172A;
}

/* Info Note Below Sign In Button */
.login-info-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.info-circle-icon {
  color: #EAB308;
  display: flex;
  align-items: center;
}

/* Footer Line Divider */
.footer-divider {
  width: 85%;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
  margin: 1.5rem auto 0.75rem;
  position: relative;
  z-index: 1;
}

/* Login Footer Black Typography on Golden Yellow Bottom Background */
.login-footer-dark {
  background: transparent;
  border-top: none;
  padding: 0.5rem 0 1.25rem;
  position: relative;
  z-index: 1;
  color: #000000 !important;
}

.login-footer-dark .footer-brand {
  color: #000000 !important;
  font-weight: 800;
  font-size: 0.9375rem;
}

.login-footer-dark .footer-copyright {
  color: #000000 !important;
  font-weight: 600;
  font-size: 0.78125rem;
}

.login-footer-dark .footer-initiative {
  color: #000000 !important;
  font-weight: 500;
  font-size: 0.75rem;
}

.login-footer-dark .footer-initiative strong {
  color: #000000 !important;
  font-weight: 800;
}

/* ==========================================================================
   STUDENTS MODULE STYLES
   ========================================================================== */
.students-content {
  flex: 1;
  padding: 1.15rem 1rem calc(var(--nav-height) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.students-action-bar {
  margin-bottom: 0.25rem;
}

.students-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.students-search-wrap svg {
  position: absolute;
  left: 0.95rem;
  color: #94A3B8;
  pointer-events: none;
}

.students-search-wrap input {
  width: 100%;
  padding: 0.8rem 0.95rem 0.8rem 2.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.students-search-wrap input:focus {
  border-color: #FFC700;
  background: #FFFFFF;
  box-shadow: 0 0 0 3.5px rgba(255, 199, 0, 0.22);
}

.students-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

/* Export Student Data Button Bar */
.students-export-bar {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.export-students-btn {
  margin-top: 0 !important;
  width: 100%;
}

/* Student Card - Modern Layered Squircle with Warm Ivory Atmosphere */
.student-card {
  background-color: #FFFFFF;
  background-image: 
    radial-gradient(circle at 92% 16%, rgba(254, 240, 138, 0.25) 0%, rgba(254, 240, 138, 0) 48%),
    linear-gradient(160deg, #FFFFFF 0%, #FFFDF8 55%, #FEFBF0 100%);
  border-radius: 20px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(245, 158, 11, 0.03);
  border: 1.5px solid rgba(254, 240, 138, 0.65);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s ease;
  position: relative;
}

.student-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(245, 158, 11, 0.06);
  border-color: rgba(250, 204, 21, 0.85);
}

.student-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.student-info-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.student-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFDF00 0%, #F59E0B 100%);
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid #FFFFFF;
}

.student-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-title-wrap h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
}

.student-meta-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

.status-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-tag.active {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.status-tag.inactive {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
}

.student-card-details {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(226, 232, 240, 0.9);
}

.detail-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  background: rgba(248, 250, 252, 0.95);
  padding: 0.28rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.detail-pill.group-pill {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
}

.student-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.35rem;
}

.action-btn {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:active {
  transform: scale(0.92);
}

.action-btn.view-student-btn:hover {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #BFDBFE;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.action-btn.edit-student-btn:hover {
  background: #FEF3C7;
  color: #D97706;
  border-color: #FDE68A;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
}

.action-btn.delete-btn:hover,
.action-btn.delete-student-btn:hover {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FCA5A5;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.12);
}

/* Empty State Box - Modern Soft Card */
.empty-state-box {
  background: linear-gradient(155deg, #FFFFFF 0%, #FAFCFF 60%, #F8FAFC 100%);
  border: 2px dashed #CBD5E1;
  border-radius: 22px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #64748B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
}

.empty-state-icon {
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.empty-state-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
}

.empty-state-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748B;
  margin-bottom: 0.75rem;
}

.empty-state-add-btn {
  margin-top: 0.25rem;
  font-weight: 800 !important;
  padding: 0.85rem 1.75rem !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 18px rgba(255, 199, 0, 0.45) !important;
}

/* Floating Action Button (FAB) anchored to Bottom-Left of Mobile App Container */
.fab-btn {
  position: fixed;
  bottom: calc(var(--nav-height) + 20px);
  left: calc(50vw - 240px + 20px);
  right: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFC700 0%, #FFA500 100%);
  color: #0F172A;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(255, 175, 0, 0.45);
  cursor: pointer;
  z-index: 99;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 480px) {
  .fab-btn {
    left: 20px;
    right: auto;
  }
}

.fab-btn:hover, .fab-btn:active {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(255, 175, 0, 0.6);
}

/* Modal Overlay & Modal Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  color: #0F172A;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.daily-time-status-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

#daily-time {
  padding: 0.8125rem 0.875rem;
}

#daily-status {
  padding: 0.8125rem 2rem 0.8125rem 0.875rem;
  font-size: 0.9375rem;
}

.required {
  color: #EF4444;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.btn-secondary {
  padding: 0.75rem 1.25rem;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #E2E8F0;
}

.inline-btn {
  width: auto !important;
  margin-top: 0 !important;
  padding: 0.75rem 1.5rem !important;
}

.student-detail-body {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  font-size: 0.875rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid #F1F5F9;
}

.detail-label {
  font-weight: 600;
  color: #64748B;
}

.detail-val {
  font-weight: 700;
  color: #0F172A;
}

/* Dashboard View & Cards */
.dashboard-content {
  flex: 1;
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: linear-gradient(165deg, #FFFFFF 0%, #FAFCFF 100%);
  border-radius: 22px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 10px 28px -6px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.02);
  border: 1.5px solid rgba(226, 232, 240, 0.85);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 14px 34px -6px rgba(15, 23, 42, 0.09), 0 4px 12px rgba(15, 23, 42, 0.03);
}

.card-header-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.card-title-group > div:not(.card-icon-wrap) {
  min-width: 0;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
  line-height: 1.25;
  margin: 0;
}

.card-subtitle-caption {
  font-size: 0.71875rem;
  font-weight: 600;
  color: #64748B;
  margin-top: 0.15rem;
  line-height: 1.3;
}

.card-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E0F2FE;
  color: #0284C7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
  flex-shrink: 0;
}

.card-icon-wrap.blue {
  background: #E0F2FE;
  color: #0284C7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

.card-icon-wrap.green {
  background: #DCFCE7;
  color: #16A34A;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.card-icon-wrap.yellow {
  background: #FEF3C7;
  color: #D97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.18);
}

.card-icon-wrap.purple {
  background: #F3E8FF;
  color: #7E22CE;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.15);
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-badge.blue {
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.card-badge.green {
  background: #D1FAE5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.card-badge.yellow {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.card-badge.purple {
  background: #F3E8FF;
  color: #7E22CE;
  border: 1px solid #E9D5FF;
}

.card-badge.gray {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

/* Placeholder Box Inside Cards */
.placeholder-box {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.placeholder-box svg {
  color: var(--text-light);
}

.placeholder-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.placeholder-subtext {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Welcome Hero Card Special Styling (Yellow & Black SPARK Theme with Environmental Scenery) */
.welcome-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 1.25rem 1.35rem;
  background: #0f172a;
  color: #FFFFFF;
  border: 1.5px solid rgba(250, 204, 21, 0.38);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.32), 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Theme State Card Borders & Subtle Atmosphere Highlights */
.welcome-hero-card.theme-morning {
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35), 0 0 24px rgba(234, 179, 8, 0.15);
}

.welcome-hero-card.theme-afternoon {
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35), 0 0 24px rgba(14, 116, 144, 0.18);
}

.welcome-hero-card.theme-evening {
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35), 0 0 24px rgba(234, 88, 12, 0.18);
}

.welcome-hero-card.theme-night {
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.4), 0 0 24px rgba(2, 6, 23, 0.35);
}

/* Environmental Background Container */
.welcome-env-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.welcome-env-bg .env-scenery {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* Active Theme Display Logic */
.welcome-hero-card.theme-morning .env-scenery-morning,
.welcome-hero-card.theme-afternoon .env-scenery-afternoon,
.welcome-hero-card.theme-evening .env-scenery-evening,
.welcome-hero-card.theme-night .env-scenery-night {
  opacity: 1;
  visibility: visible;
}

/* Fallback: If no theme class yet, show morning scenery */
.welcome-hero-card:not(.theme-morning):not(.theme-afternoon):not(.theme-evening):not(.theme-night) .env-scenery-morning {
  opacity: 1;
  visibility: visible;
}

/* High-Contrast Left Scrim to Guarantee 100% Text Readability */
.welcome-env-scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, rgba(8, 14, 28, 0.95) 0%, rgba(8, 14, 28, 0.78) 38%, rgba(8, 14, 28, 0.22) 65%, rgba(8, 14, 28, 0) 100%);
}

.welcome-card-body {
  position: relative;
  z-index: 2;
}

.welcome-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.welcome-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFD000 0%, #FFA800 100%);
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 199, 0, 0.45);
}

.yellow-spark-badge {
  background: rgba(255, 199, 0, 0.15);
  color: #FFD000;
  border: 1.5px solid rgba(255, 199, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.welcome-greeting-wrap {
  margin-bottom: 0.35rem;
}

.time-greeting-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.user-display-name {
  font-size: 1.95rem;
  font-weight: 900;
  color: #FFC700;
  letter-spacing: 1.5px;
  line-height: 1.15;
  text-shadow: 0 0 18px rgba(255, 199, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.7);
  margin-top: 0.15rem;
}

.welcome-submessage {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Bottom Navigation (Global Fixed Shell Bar) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.25rem;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

/* Hide Bottom Navigation on Login Screen */
#login-view.active ~ .bottom-nav {
  display: none !important;
}

/* Global Content Padding to prevent content occlusion by fixed bottom nav & FAB */
.dashboard-content {
  padding-bottom: calc(var(--nav-height) + 24px) !important;
}

.students-content {
  padding-bottom: calc(var(--nav-height) + 90px) !important;
}

.settings-content {
  padding-bottom: calc(var(--nav-height) + 30px) !important;
}

.groups-content {
  padding-bottom: calc(var(--nav-height) + 90px) !important;
}

.groups-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

/* Group Card - Modern Squircle with Subtle Group Color Accent */
.group-card {
  background: linear-gradient(160deg, #FFFFFF 0%, #FAFCFF 60%, #F8FAFC 100%);
  border-radius: 20px !important;
  padding: 1.15rem 1.25rem !important;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.85) !important;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
}

.group-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.09), 0 4px 10px rgba(0, 0, 0, 0.03) !important;
}

.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.group-card .student-detail-body {
  gap: 0.45rem;
}

.group-card .detail-row {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.group-color-indicator {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  display: inline-block;
  margin-right: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.color-palette-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.color-option-radio {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem !important;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  padding: 0.4rem 0.7rem !important;
  border-radius: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.group-students-header {
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.group-students-header h4 {
  font-size: 1rem !important;
  font-weight: 800;
  color: #0F172A;
}

.group-assigned-students-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-right: 0.25rem;
  padding-bottom: 0.35rem;
}

/* Targeted Android WebView Touch-Scroll Optimization for Group View Modal */
#group-view-modal {
  touch-action: auto;
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
}

#group-view-modal .modal-card {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
}

#group-view-modal .student-detail-body {
  flex-shrink: 0;
}

#group-view-modal .group-students-header {
  flex-shrink: 0;
}

#group-view-modal .group-assigned-students-wrap {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 260px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
  padding-right: 0.25rem;
  padding-bottom: 0.5rem;
}

#group-view-modal .modal-actions {
  flex-shrink: 0;
  margin-top: 0.75rem;
}

.assigned-student-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 0.8125rem;
}

.assigned-student-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.assigned-roll-badge {
  font-weight: 800;
  background: #FFC700;
  color: #0F172A;
  font-size: 0.71875rem;
  padding: 0.18rem 0.48rem;
  border-radius: 6px;
}

.assigned-student-name {
  font-weight: 700;
  color: #0F172A;
  font-size: 0.875rem;
}

.assigned-student-meta {
  font-size: 0.8125rem;
  color: #64748B;
  font-weight: 500;
}

/* Groups Module Readability & Font Size Enhancements */
.group-card .card-title {
  font-size: 1.0625rem !important;
}

.group-card .detail-label,
#group-view-modal .detail-label,
#group-modal label {
  font-size: 0.9375rem !important;
}

.group-card .detail-val,
#group-view-modal .detail-val,
#group-modal input,
#group-modal select {
  font-size: 0.9375rem !important;
}

/* Group Card Action Bar & Rounded Icon Buttons */
.group-card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.group-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.group-icon-btn:active {
  transform: scale(0.92);
}

/* View Button - Light Blue */
.group-icon-btn.view-group-btn {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #BFDBFE;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.group-icon-btn.view-group-btn:hover {
  background: #DBEAFE;
  color: #1D4ED8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.16);
}

/* Edit Button - Soft Amber */
.group-icon-btn.edit-group-btn {
  background: #FEF3C7;
  color: #D97706;
  border-color: #FDE68A;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.08);
}

.group-icon-btn.edit-group-btn:hover {
  background: #FDE68A;
  color: #B45309;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.16);
}

/* Delete Button - Soft Red */
.group-icon-btn.delete-group-btn {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FCA5A5;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.08);
}

.group-icon-btn.delete-group-btn:hover {
  background: #FEE2E2;
  color: #B91C1C;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.16);
}

/* Settings Module Component Styling */
.card-icon-wrap.yellow {
  background: #FEF3C7;
  color: #D97706;
}

/* Attendance Module Component Styling */
.attendance-content {
  padding-bottom: calc(var(--nav-height) + 100px) !important;
}

.attendance-controls-card {
  margin-bottom: 0.875rem;
  background: linear-gradient(155deg, #FFFFFF 0%, #F8FAFC 60%, #F1F5F9 100%) !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05) !important;
}

.attendance-summary-card {
  background: linear-gradient(145deg, #0B132B 0%, #162544 50%, #1E293B 100%) !important;
  color: #FFFFFF !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  padding: 0.95rem 1rem !important;
  margin-bottom: 0.875rem !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25) !important;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.summary-item.total {
  border-color: rgba(255, 199, 0, 0.28);
  background: rgba(255, 199, 0, 0.08);
}

.summary-item.present {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}

.summary-item.absent {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.08);
}

.summary-item.leave {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.summary-val {
  font-size: 1.3rem;
  font-weight: 900;
  color: #FFC700;
}

.summary-lbl {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #CBD5E1;
}

.attendance-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.quick-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 0.85rem;
  font-size: 0.84375rem;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-btn:active {
  transform: scale(0.96);
}

.present-all-btn {
  background: linear-gradient(135deg, #ECFDF5 0%, #DCFCE7 100%);
  color: #047857;
  border-color: #86EFAC;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.present-all-btn:hover {
  background: #DCFCE7;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.reset-btn {
  background: #FFFFFF;
  color: #475569;
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.reset-btn:hover {
  background: #F8FAFC;
  color: #0F172A;
  border-color: #94A3B8;
}

.export-attendance-btn {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  color: #15803D;
  border-color: #86EFAC;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
}

.export-attendance-btn:hover {
  background: #DCFCE7;
  color: #166534;
  border-color: #4ADE80;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.export-attendance-full-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  box-sizing: border-box;
}

#export-month-select,
#export-year-select {
  padding: 0.75rem 0.85rem;
  font-size: 0.875rem;
}

.attendance-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

/* Attendance Card - Modern Layered Register Row */
.attendance-card {
  background: linear-gradient(160deg, #FFFFFF 0%, #FAFCFF 70%, #F8FAFC 100%);
  border-radius: 20px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
  border: 1.5px solid rgba(226, 232, 240, 0.85);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.attendance-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.08);
}

.attendance-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.status-pill-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.status-pill-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 0.45rem;
  border-radius: 12px;
  font-size: 0.84375rem;
  font-weight: 800;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-pill-opt:active:not(:disabled) {
  transform: scale(0.94);
}

.status-pill-opt.selected-present {
  background: linear-gradient(135deg, #DCFCE7 0%, #BBF7D0 100%);
  color: #14532D;
  border-color: #22C55E;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.25);
}

.status-pill-opt.selected-absent {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  color: #7F1D1D;
  border-color: #EF4444;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
}

.status-pill-opt.selected-leave {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #78350F;
  border-color: #F59E0B;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}

.save-attendance-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 440px;
  z-index: 95;
}

@media (max-width: 480px) {
  .save-attendance-bar {
    width: calc(100% - 1.5rem);
  }
}

.save-attendance-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem;
  font-size: 1.05rem;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(255, 199, 0, 0.5) !important;
}

/* Attendance Status Badge & Multi-State Action Buttons */
.attendance-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 14px;
  font-size: 0.78125rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.attendance-badge-wrap.badge-unsaved {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.attendance-badge-wrap.badge-saved {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.attendance-badge-wrap.badge-editing {
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #7DD3FC;
}

.btn-blue-spark {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
}

.btn-green-spark {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

.edit-attendance-btn,
.update-attendance-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem;
  font-size: 1.05rem;
  border-radius: 14px !important;
}

/* Activities Module Component Styling */
.activities-content {
  padding-bottom: calc(var(--nav-height) + 80px) !important;
}

.activities-tab-card {
  margin-bottom: 0.875rem;
  background: linear-gradient(160deg, #FFFFFF 0%, #F8FAFC 100%) !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05) !important;
  padding: 1.15rem 1.25rem !important;
}

.activities-tab-switcher {
  display: flex;
  background: #F1F5F9;
  padding: 0.35rem;
  border-radius: 16px;
  gap: 0.25rem;
}

.activities-tab-btn {
  flex: 1;
  padding: 0.7rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 800;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activities-tab-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.date-controls-card {
  background: linear-gradient(160deg, #FFFFFF 0%, #F8FAFC 100%) !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(226, 232, 240, 0.85) !important;
  padding: 1.15rem 1.25rem !important;
  margin-bottom: 0.875rem !important;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05) !important;
}

.activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.activity-card {
  background: linear-gradient(160deg, #FFFFFF 0%, #FAFCFF 60%, #F8FAFC 100%);
  border-radius: 20px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
  border: 1.5px solid rgba(226, 232, 240, 0.85);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.08);
}

.activity-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.status-badge-scheduled {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
}

.status-badge-completed {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
}

.status-badge-cancelled {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
}

.full-width-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}

/* Group Multi-Select Chips Picker */
.group-chips-picker-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.group-chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.group-chip-toggle:active {
  transform: scale(0.95);
}

.group-chip-toggle.active {
  background: #FEF3C7;
  color: #92400E;
  border-color: #F59E0B;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.group-chip-toggle.active-all {
  background: #E0F2FE;
  color: #0369A1;
  border-color: #0284C7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

/* ==========================================================================
   DASHBOARD / HOME MODULE ENHANCED CARDS (Matching Reference Design Language)
   ========================================================================== */

/* 1. Today's Inspiration & Special Day Card (Soft Mint / Emerald with Leaf Watermark) */
.inspiration-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 130' fill='none'%3E%3Cpath d='M120 20 C105 32 100 55 110 75 C120 95 145 105 155 102 C155 85 148 65 138 48 C132 38 126 28 120 20 Z' fill='%2386EFAC' opacity='0.55'/%3E%3Cpath d='M120 20 C130 45 135 75 155 102' stroke='%234ADE80' stroke-width='2' stroke-linecap='round' fill='none' opacity='0.7'/%3E%3Cpath d='M100 65 C85 68 72 82 78 98 C92 98 102 90 108 80 C110 74 105 68 100 65 Z' fill='%23BBF7D0' opacity='0.65'/%3E%3Cpath d='M100 65 C98 80 92 92 78 98' stroke='%234ADE80' stroke-width='1.8' stroke-linecap='round' fill='none' opacity='0.65'/%3E%3Cpath d='M140 70 C146 62 158 60 162 68 C160 76 150 82 142 80 Z' fill='%2386EFAC' opacity='0.5'/%3E%3Ccircle cx='45' cy='35' r='3' fill='%23FDE047' opacity='0.75'/%3E%3Cpath d='M45 22 L45 28' stroke='%23FACC15' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3Cpath d='M45 42 L45 48' stroke='%23FACC15' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3Cpath d='M32 35 L38 35' stroke='%23FACC15' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3Cpath d='M52 35 L58 35' stroke='%23FACC15' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3C/svg%3E"),
    linear-gradient(150deg, #F0FDF4 0%, #DCFCE7 40%, #FFFFFF 100%) !important;
  background-repeat: no-repeat;
  background-position: right -6px bottom -6px, 0 0;
  background-size: 155px auto, 100% 100%;
  border: 1.5px solid rgba(167, 243, 208, 0.85) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.08) !important;
}

.inspiration-card-body {
  padding: 0.5rem 0.15rem 0.15rem 0.15rem;
}

.special-days-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.special-day-item {
  background: rgba(255, 251, 235, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(253, 230, 138, 0.8);
  border-left: 4px solid #F59E0B;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.06);
}

.special-day-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 0.35rem;
}

.special-day-desc {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.45;
}

.inspiration-quote-wrap {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(167, 243, 208, 0.75);
  border-left: 4px solid #10B981;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.06);
}

.inspiration-quote-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.inspiration-author {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #059669;
  text-align: right;
}

/* 2. Today's Attendance Card (Soft Sky-Blue with Clipboard, Cloud & Sun Watermark) */
.dashboard-attendance-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 140' fill='none'%3E%3Cpath d='M130 18 C135 18 140 23 140 28 C140 33 135 38 130 38 C125 38 120 33 120 28 C120 23 125 18 130 18 Z' fill='%23FDE047' opacity='0.75'/%3E%3Cpath d='M140 38 C146 38 155 42 155 48 C155 54 146 58 140 58 C135 58 130 54 130 48 C130 42 135 38 140 38 Z' fill='%23BAE6FD' opacity='0.7'/%3E%3Crect x='88' y='42' width='58' height='74' rx='8' fill='%23FFFFFF' stroke='%23BAE6FD' stroke-width='2' opacity='0.9'/%3E%3Crect x='104' y='36' width='26' height='12' rx='4' fill='%2338BDF8' opacity='0.9'/%3E%3Cpath d='M98 62 L105 69 L120 54' stroke='%2310B981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='0.9'/%3E%3Cline x1='98' y1='80' x2='134' y2='80' stroke='%23E2E8F0' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='98' y1='94' x2='126' y2='94' stroke='%23E2E8F0' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M65 125 C55 125 48 112 58 102 C68 92 84 102 84 112 C84 122 75 125 65 125 Z' fill='%2386EFAC' opacity='0.75'/%3E%3Cpath d='M150 128 C140 128 135 115 145 105 C155 95 168 105 168 115 C168 125 160 128 150 128 Z' fill='%234ADE80' opacity='0.7'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #F0F9FF 0%, #E0F2FE 45%, #FFFFFF 100%) !important;
  background-repeat: no-repeat;
  background-position: right -4px bottom -4px, 0 0;
  background-size: 160px auto, 100% 100%;
  border: 1.5px solid rgba(186, 230, 253, 0.85) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.08) !important;
}

/* 3. Top 3 Groups Card (Warm Amber Cream with Golden Trophy & Stars Watermark) */
.dashboard-groups-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 165 135' fill='none'%3E%3Cpath d='M22 35 Q 55 16 90 38 T 155 26' stroke='%23FDE047' stroke-width='2.5' stroke-dasharray='4 4' fill='none' opacity='0.75'/%3E%3Cpath d='M38 22 L41 30 L50 30 L43 35 L46 43 L38 38 L30 43 L33 35 L26 30 L35 30 Z' fill='%23FACC15' opacity='0.85'/%3E%3Cpath d='M102 46 L146 46 C146 69 135 84 124 88 L124 99 L135 102 L135 109 L113 109 L113 102 L124 99 C113 84 102 69 102 46 Z' fill='%23FDE047' opacity='0.95'/%3E%3Cpath d='M102 52 C89 52 83 61 89 69 C95 75 104 73 107 69' stroke='%23FACC15' stroke-width='3.5' fill='none' stroke-linecap='round' opacity='0.85'/%3E%3Cpath d='M146 52 C159 52 165 61 159 69 C153 75 144 73 141 69' stroke='%23FACC15' stroke-width='3.5' fill='none' stroke-linecap='round' opacity='0.85'/%3E%3Cpath d='M124 54 L126 60 L133 60 L128 64 L130 71 L124 67 L118 71 L120 64 L115 60 L122 60 Z' fill='%23FFFFFF' opacity='0.95'/%3E%3Cpath d='M96 114 C84 102 91 86 104 94 C107 102 101 114 96 114 Z' fill='%2386EFAC' opacity='0.8'/%3E%3Cpath d='M152 114 C164 102 157 86 144 94 C141 102 147 114 152 114 Z' fill='%234ADE80' opacity='0.8'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #FFFDF2 0%, #FEF3C7 45%, #FFFFFF 100%) !important;
  background-repeat: no-repeat;
  background-position: right -4px bottom -4px, 0 0;
  background-size: 155px auto, 100% 100%;
  border: 1.5px solid rgba(253, 230, 138, 0.85) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.09) !important;
}

/* 4. Top 3 Students Card (Soft Purple Lilac with Star Performer Medal & Constellation Watermark) */
.dashboard-students-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 130' fill='none'%3E%3Ccircle cx='115' cy='52' r='28' fill='%23DDD6FE' opacity='0.85'/%3E%3Ccircle cx='115' cy='52' r='21' fill='%23C4B5FD' opacity='0.9'/%3E%3Cpath d='M115 37 L119 46 L129 47 L121 54 L123 64 L115 59 L107 64 L109 54 L101 47 L111 46 Z' fill='%23FEF08A' opacity='0.95'/%3E%3Cpath d='M104 74 L96 112 L112 102 L116 112 L112 76' fill='%23A78BFA' opacity='0.85'/%3E%3Cpath d='M126 74 L134 112 L118 102 L114 112 L118 76' fill='%238B5CF6' opacity='0.75'/%3E%3Cpath d='M35 25 L38 33 L46 35 L40 40 L42 48 L35 44 L28 48 L30 40 L24 35 L32 33 Z' fill='%23FACC15' opacity='0.8'/%3E%3Ccircle cx='60' cy='20' r='2.5' fill='%23C084FC' opacity='0.7'/%3E%3Ccircle cx='25' cy='55' r='2' fill='%23A855F7' opacity='0.6'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #FAF5FF 0%, #F3E8FF 45%, #FFFFFF 100%) !important;
  background-repeat: no-repeat;
  background-position: right -4px bottom -4px, 0 0;
  background-size: 150px auto, 100% 100%;
  border: 1.5px solid rgba(221, 214, 254, 0.85) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.08) !important;
}

/* 5. Today's Activities Card (Soft Indigo Lavender with Calendar & Schedule Sparkles Watermark) */
.dashboard-activities-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 130' fill='none'%3E%3Crect x='85' y='32' width='62' height='68' rx='10' fill='%23E0E7FF' stroke='%23C7D2FE' stroke-width='2' opacity='0.9'/%3E%3Cpath d='M85 46 L147 46' stroke='%23818CF8' stroke-width='3' stroke-linecap='round' opacity='0.9'/%3E%3Cline x1='100' y1='25' x2='100' y2='35' stroke='%236366F1' stroke-width='3' stroke-linecap='round'/%3E%3Cline x1='132' y1='25' x2='132' y2='35' stroke='%236366F1' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='116' cy='72' r='14' fill='%23FFFFFF' stroke='%23818CF8' stroke-width='2' opacity='0.95'/%3E%3Cpolyline points='116 63 116 72 122 75' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M35 40 L37 46 L43 47 L38 51 L40 57 L35 54 L30 57 L32 51 L27 47 L33 46 Z' fill='%23FDE047' opacity='0.85'/%3E%3Ccircle cx='60' cy='30' r='2.5' fill='%23A5B4FC' opacity='0.75'/%3E%3Cpath d='M65 115 C55 115 48 102 58 92 C68 82 84 92 84 102 C84 112 75 115 65 115 Z' fill='%2386EFAC' opacity='0.7'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #F5F3FF 0%, #EDE9FE 45%, #FFFFFF 100%) !important;
  background-repeat: no-repeat;
  background-position: right -4px bottom -4px, 0 0;
  background-size: 155px auto, 100% 100%;
  border: 1.5px solid rgba(221, 214, 254, 0.85) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.08) !important;
}

/* Scoped Inner Item Styling for Dashboard */
#dashboard-view .leaderboard-item {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 14px !important;
  padding: 0.65rem 0.85rem !important;
  margin-bottom: 0.45rem;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  transition: transform 0.18s ease, background 0.18s ease;
}

#dashboard-view .leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.98) !important;
  transform: translateY(-1px);
}

#dashboard-view .dashboard-activity-item {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 14px !important;
  border: 1px solid rgba(221, 214, 254, 0.75) !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.04);
}

#dashboard-view .empty-state-box,
#dashboard-view .placeholder-box {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 18px !important;
  border: 1.5px dashed rgba(203, 213, 225, 0.85) !important;
}

#dashboard-view .card-icon-wrap {
  border-radius: 12px;
}

/* Points Management System Styles */
.point-rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.point-rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}

.point-rule-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.point-rule-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0F172A;
}

.point-rule-category {
  font-size: 0.75rem;
  color: #64748B;
}

.point-rule-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.point-rule-pts-badge {
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  border: 1px solid #FCD34D;
}

.completion-group-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.4rem 0 0.6rem;
}

.completion-group-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 18px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.completion-group-chip:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.completion-group-chip.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.completion-students-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0.5rem 0.25rem;
}

.completion-student-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  gap: 0.75rem;
}

.completion-student-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.completion-student-name {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0F172A;
}

.completion-student-meta {
  font-size: 0.75rem;
  color: #64748B;
}

.completion-student-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.completion-pts-input {
  width: 75px !important;
  text-align: center;
  font-weight: 800;
  font-size: 0.9375rem;
  padding: 0.35rem 0.5rem;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 8px;
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  pointer-events: auto !important;
  user-select: auto !important;
  cursor: text !important;
}

.group-pts-input {
  width: 78px !important;
  text-align: center !important;
  font-weight: 800 !important;
  font-size: 0.9375rem !important;
  padding: 0.35rem 0.5rem !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  pointer-events: auto !important;
  user-select: auto !important;
  cursor: text !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.group-pts-input:focus {
  border-color: #FFC700 !important;
  box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.25) !important;
  background-color: #FFFFFF !important;
}

.card-icon-wrap.purple {
  background: #F3E8FF;
  color: #7E22CE;
}

.card-badge.purple {
  background: #F3E8FF;
  color: #7E22CE;
}

/* ==========================================================================
   SETTINGS MODULE ENHANCED CARDS (Matching Reference Design Language)
   ========================================================================== */

.settings-content {
  flex: 1;
  padding: 1.25rem 1rem calc(var(--nav-height) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* 1. My Profile Card */
.settings-profile-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' fill='none'%3E%3Cpath d='M35 15 L38 25 L48 28 L38 31 L35 41 L32 31 L22 28 L32 25 Z' fill='%23FACC15' opacity='0.85'/%3E%3Cpath d='M58 35 L60 42 L67 44 L60 46 L58 53 L56 46 L49 44 L56 42 Z' fill='%23FDE047' opacity='0.75'/%3E%3Ccircle cx='20' cy='50' r='3' fill='%23FBBF24' opacity='0.6'/%3E%3Ccircle cx='65' cy='20' r='2' fill='%23F59E0B' opacity='0.7'/%3E%3C/svg%3E"),
    linear-gradient(150deg, #FFFDF5 0%, #FFFBEA 45%, #FFFFFF 100%);
  background-repeat: no-repeat;
  background-position: 135px 8px, 0 0;
  background-size: 65px auto, 100% 100%;
  border: 1.5px solid rgba(254, 240, 138, 0.75);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.08);
}

.settings-profile-card #settings-role-badge {
  background: #F3E8FF !important;
  color: #7E22CE !important;
  border: 1.5px solid #DDD6FE !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  padding: 0.35rem 0.85rem !important;
  border-radius: 20px !important;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.12) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* 2. Centre Information Card */
.settings-centre-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 130' fill='none'%3E%3Cpath d='M130 15 C135 15 140 20 140 25 C140 30 135 35 130 35 C125 35 120 30 120 25 C120 20 125 15 130 15 Z' fill='%23FDE047' opacity='0.7'/%3E%3Cpath d='M145 28 C150 28 160 32 160 38 C160 44 150 48 145 48 C140 48 135 44 135 38 C135 32 140 28 145 28 Z' fill='%23BAE6FD' opacity='0.7'/%3E%3Cpath d='M115 48 L152 75 L78 75 Z' fill='%237DD3FC' opacity='0.95'/%3E%3Crect x='88' y='75' width='54' height='50' rx='6' fill='%23FEF08A' opacity='0.85'/%3E%3Ctext x='115' y='92' font-family='sans-serif' font-size='8' font-weight='800' fill='%230284C7' text-anchor='middle'%3ELearning%3C/text%3E%3Ctext x='115' y='102' font-family='sans-serif' font-size='8' font-weight='800' fill='%230284C7' text-anchor='middle'%3EBrighter%3C/text%3E%3Ctext x='115' y='112' font-family='sans-serif' font-size='8' font-weight='800' fill='%230284C7' text-anchor='middle'%3EFutures%3C/text%3E%3Cpath d='M70 125 C58 125 50 108 62 96 C74 84 92 96 92 108 C92 120 80 125 70 125 Z' fill='%2386EFAC' opacity='0.8'/%3E%3Cpath d='M155 125 C142 125 136 108 148 96 C160 84 176 96 176 108 C176 120 165 125 155 125 Z' fill='%234ADE80' opacity='0.75'/%3E%3Cpath d='M88 48 L88 32 L104 40 Z' fill='%2338BDF8' opacity='0.95'/%3E%3Cline x1='88' y1='48' x2='88' y2='30' stroke='%230284C7' stroke-width='2'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #F0F9FF 0%, #E0F2FE 40%, #FFFFFF 100%);
  background-repeat: no-repeat;
  background-position: right -6px bottom -6px, 0 0;
  background-size: 155px auto, 100% 100%;
  border: 1.5px solid rgba(186, 230, 253, 0.85);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.08);
}

/* 3. Points Management Card */
.settings-points-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 130' fill='none'%3E%3Cpath d='M25 35 Q 55 18 88 40 T 150 28' stroke='%23FDE047' stroke-width='2.5' stroke-dasharray='4 4' fill='none' opacity='0.75'/%3E%3Cpath d='M42 22 L45 30 L54 30 L47 35 L50 43 L42 38 L34 43 L37 35 L30 30 L39 30 Z' fill='%23FACC15' opacity='0.85'/%3E%3Cpath d='M100 48 L142 48 C142 70 132 84 121 88 L121 98 L132 101 L132 108 L110 108 L110 101 L121 98 C110 84 100 70 100 48 Z' fill='%23FDE047' opacity='0.95'/%3E%3Cpath d='M100 54 C88 54 82 62 88 70 C94 76 102 74 105 70' stroke='%23FACC15' stroke-width='3.5' fill='none' stroke-linecap='round' opacity='0.85'/%3E%3Cpath d='M142 54 C154 54 160 62 154 70 C148 76 140 74 137 70' stroke='%23FACC15' stroke-width='3.5' fill='none' stroke-linecap='round' opacity='0.85'/%3E%3Cpath d='M121 55 L123 61 L130 61 L125 65 L127 72 L121 68 L115 72 L117 65 L112 61 L119 61 Z' fill='%23FFFFFF' opacity='0.95'/%3E%3Cpath d='M95 112 C84 101 90 86 103 93 C106 101 100 112 95 112 Z' fill='%2386EFAC' opacity='0.8'/%3E%3Cpath d='M148 112 C159 101 153 86 140 93 C137 101 143 112 148 112 Z' fill='%234ADE80' opacity='0.8'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #FFFDF2 0%, #FEF3C7 45%, #FFFFFF 100%);
  background-repeat: no-repeat;
  background-position: right -4px bottom -4px, 0 0;
  background-size: 150px auto, 100% 100%;
  border: 1.5px solid rgba(253, 230, 138, 0.85);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.09);
}

.points-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.card-title-text-wrap {
  min-width: 0;
  flex: 1;
}

.points-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.settings-points-card #open-add-point-rule-btn {
  font-size: 0.8125rem;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.points-toggle-btn {
  padding: 0.45rem 0.7rem;
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #475569;
  cursor: pointer;
  line-height: 1;
  min-height: 34px;
  min-width: 34px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.points-toggle-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

/* 4. Account Security Card */
.settings-security-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 130' fill='none'%3E%3Cpath d='M100 24 L138 37 C138 78 119 100 100 110 C81 100 62 78 62 37 L100 24 Z' fill='%2386EFAC' opacity='0.55'/%3E%3Cpath d='M100 32 L131 43 C131 72 116 90 100 99 C84 90 69 72 69 43 L100 32 Z' fill='%23BBF7D0' opacity='0.85'/%3E%3Cpath d='M86 63 L96 73 L115 52' stroke='%23FFFFFF' stroke-width='5.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.95'/%3E%3Cpath d='M50 102 C42 93 47 79 58 85 C61 93 56 102 50 102 Z' fill='%2386EFAC' opacity='0.7'/%3E%3Cpath d='M138 104 C146 95 141 81 130 87 C127 95 132 104 138 104 Z' fill='%234ADE80' opacity='0.7'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #F0FDF4 0%, #DCFCE7 45%, #FFFFFF 100%);
  background-repeat: no-repeat;
  background-position: right -6px bottom -6px, 0 0;
  background-size: 145px auto, 100% 100%;
  border: 1.5px solid rgba(187, 247, 208, 0.85);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.08);
}

/* 5. Push Notifications Card */
.settings-push-card {
  background-color: #FFFFFF;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 120' fill='none'%3E%3Cpath d='M88 34 C88 22 98 22 98 34 C112 37 120 50 120 70 L128 78 L70 78 L78 70 C78 50 86 37 88 34 Z' fill='%23DDD6FE' opacity='0.8'/%3E%3Cpath d='M92 81 C92 86 96 90 100 90 C104 90 108 86 108 81' fill='%23C4B5FD' opacity='0.9'/%3E%3Cpath d='M126 44 C134 52 134 64 126 72' stroke='%23A78BFA' stroke-width='3.5' stroke-linecap='round' fill='none' opacity='0.7'/%3E%3Cpath d='M70 44 C62 52 62 64 70 72' stroke='%23A78BFA' stroke-width='3.5' stroke-linecap='round' fill='none' opacity='0.7'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #F5F3FF 0%, #EDE9FE 45%, #FFFFFF 100%);
  background-repeat: no-repeat;
  background-position: right -6px bottom -6px, 0 0;
  background-size: 135px auto, 100% 100%;
  border: 1.5px solid rgba(221, 214, 254, 0.85);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.08);
}

/* Settings Detail Rows (Layered Rounded Capsules) */
.settings-content .detail-row {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 14px;
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  min-height: 44px;
}

.settings-content .detail-row:last-child {
  margin-bottom: 0;
}

.settings-content .detail-row:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #CBD5E1;
}

.detail-row-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex-shrink: 0;
}

.detail-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-icon-wrap.user-icon {
  background: #EFF6FF;
  color: #2563EB;
}

.detail-icon-wrap.shield-icon {
  background: #ECFDF5;
  color: #059669;
}

.detail-icon-wrap.mail-icon {
  background: #FFF7ED;
  color: #EA580C;
}

.detail-icon-wrap.centre-icon {
  background: #F5F3FF;
  color: #7C3AED;
}

.detail-icon-wrap.spark-icon {
  background: #FEF9C3;
  color: #CA8A04;
}

.detail-icon-wrap.version-icon {
  background: #ECFDF5;
  color: #0D9488;
}

.settings-content .detail-label {
  font-size: 0.84375rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  line-height: 1.2;
}

.settings-content .detail-val {
  background: #FFFFFF;
  padding: 0.3rem 0.75rem;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.7);
  font-size: 0.84375rem;
  font-weight: 800;
  color: #0F172A;
  text-align: right;
  max-width: 58%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  line-height: 1.2;
  box-sizing: border-box;
}

.settings-action-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.settings-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border: 1.5px solid #FCA5A5 !important;
  border-radius: 14px !important;
  padding: 0.8rem 1.25rem !important;
  font-size: 0.9375rem !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08) !important;
  transition: all 0.2s ease;
}

.settings-logout-btn:hover {
  background: #FEE2E2 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.15) !important;
}

.settings-section-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0.5rem 0;
  color: #94A3B8;
  font-size: 0.71875rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.settings-section-divider::before,
.settings-section-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px dashed #CBD5E1;
}

.settings-section-divider span {
  padding: 0 0.75rem;
}

.admin-settings-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* About SPARK Card */
.about-spark-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  text-align: center;
}

.about-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0;
}

.about-logo-badge {
  width: 48px;
  height: 48px;
  background: #FFC700;
  color: #0F172A;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(255, 199, 0, 0.4);
}

.about-app-name {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.about-app-sub {
  font-size: 0.78125rem;
  color: #94A3B8;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.about-version-pill {
  font-size: 0.6875rem;
  font-weight: 800;
  background: rgba(255, 199, 0, 0.15);
  color: #FFC700;
  border: 1px solid rgba(255, 199, 0, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

.about-divider {
  width: 70%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 1rem 0;
}

.about-college {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 0.5rem;
}

.about-ssg {
  font-size: 0.75rem;
  color: #CBD5E1;
  line-height: 1.45;
}

.about-ssg strong {
  color: #FFC700;
}

/* Logout Modal Styling */
.logout-modal-card {
  max-width: 360px !important;
  text-align: center;
}

.logout-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  gap: 0.75rem;
}

.logout-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FEF2F2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-confirm-text {
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
}

.logout-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  border-top: none !important;
  padding-top: 0.5rem !important;
}

.logout-modal-actions button {
  flex: 1;
}

.logout-danger-btn {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
}

/* Modern Floating Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 456px;
  height: 64px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  z-index: 100;
}

/* Fluid Water-Flow Active Navigation Indicator Pill */
.nav-active-pill {
  position: absolute;
  top: 7px;
  left: 0;
  height: 50px;
  background: linear-gradient(135deg, #FFD000 0%, #FFA800 100%);
  box-shadow: 0 4px 14px rgba(255, 175, 0, 0.45);
  border-radius: 20px;
  z-index: 0;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.34, 1.45, 0.64, 1), width 0.38s cubic-bezier(0.34, 1.45, 0.64, 1);
  will-change: transform, width;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex: 1;
  height: 50px;
  color: #64748B;
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 700;
  transition: color 0.22s ease;
  background: transparent !important;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1;
}

.nav-item span {
  line-height: 1;
  display: block;
  margin-top: -1px;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: stroke 0.2s ease, transform 0.2s ease;
  stroke: #64748B;
  stroke-width: 2px;
}

/* Active Navigation Item Content Highlight */
.nav-item.active {
  background: transparent !important;
  box-shadow: none !important;
  color: #0F172A !important;
  font-weight: 800 !important;
}

.nav-item.active svg {
  stroke: #0F172A !important;
  stroke-width: 2.3px !important;
  transform: none !important;
}

.nav-indicator {
  display: none !important;
}

/* Footer Component */
.app-footer {
  margin-top: auto;
  padding: 1.5rem 1.25rem 1.5rem;
  text-align: center;
  background: #EEF2F6;
  border-top: 1px solid var(--border-color);
}

.login-view-container .app-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem 0 0.5rem;
  margin-top: 1rem;
}

.footer-brand {
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 1px;
  color: var(--primary-blue);
  margin-bottom: 0.35rem;
}

.login-view-container .footer-brand {
  color: var(--text-white);
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.login-view-container .footer-copyright {
  color: rgba(255, 255, 255, 0.8);
}

.footer-initiative {
  font-size: 0.71875rem;
  color: var(--text-light);
  line-height: 1.35;
  font-weight: 500;
}

.login-view-container .footer-initiative {
  color: rgba(255, 255, 255, 0.65);
}

.footer-initiative strong {
  color: var(--accent-green-hover);
  font-weight: 700;
}

.login-view-container .footer-initiative strong {
  color: var(--accent-green);
}

/* Modern In-App Toast Notification */
.spark-toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: #0F172A;
  color: #FFFFFF;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 199, 0, 0.35);
  z-index: 300;
  pointer-events: none;
  animation: toastSlideUp 0.3s ease-out;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ==========================================================================
   REAL-TIME IN-APP NOTIFICATION BANNER
   ========================================================================== */
.live-notif-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 440px;
  z-index: 10000;
  animation: notifSlideDownIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes notifSlideDownIn {
  from {
    opacity: 0;
    transform: translate(-50%, -24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.live-notif-card {
  background: #0F172A;
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 199, 0, 0.4);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  display: flex;
  gap: 0.85rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.live-notif-icon-col {
  flex-shrink: 0;
}

.live-notif-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFC700 0%, #FFA500 100%);
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 199, 0, 0.4);
}

.live-notif-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid #FFC700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.live-notif-content-col {
  flex: 1;
  min-width: 0;
}

.live-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.live-notif-badge-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.live-notif-source-badge {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #FFC700;
  background: rgba(255, 199, 0, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.live-notif-time {
  font-size: 0.6875rem;
  color: #94A3B8;
}

.live-notif-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.15s ease;
}

.live-notif-close:hover {
  color: #FFFFFF;
}

.live-notif-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.live-notif-message {
  font-size: 0.8125rem;
  color: #CBD5E1;
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

.live-notif-link-wrap {
  margin-top: 0.6rem;
}

.live-notif-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #FFC700;
  color: #0F172A;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.live-notif-btn:hover {
  background: #FBBF24;
  transform: translateY(-1px);
}

/* ==========================================================================
   ADMIN ACTIVE SESSIONS SECURITY MONITORING
   ========================================================================== */
.session-live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: sessionPulse 1.8s infinite;
}

@keyframes sessionPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.session-card-item {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.session-card-item.is-live {
  border-color: #A7F3D0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.session-card-item:hover {
  border-color: #CBD5E1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.session-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.session-user-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}

.session-username {
  font-weight: 800;
  color: #0F172A;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.session-role-badge {
  font-size: 0.65625rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.session-role-badge.admin {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

.session-role-badge.teacher {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.session-status-pill {
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.session-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78125rem;
  color: #64748B;
}

.session-meta-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-device-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.71875rem;
  font-weight: 700;
  color: #334155;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}

.session-device-badge.android {
  background: #ECFDF5;
  color: #065F46;
  border-color: #A7F3D0;
}

.session-device-badge.browser {
  background: #F8FAFC;
  color: #475569;
  border-color: #E2E8F0;
}

.session-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px solid #EEF2F6;
  font-size: 0.71875rem;
  gap: 0.5rem;
}

.btn-force-logout-session {
  padding: 0.28rem 0.6rem;
  font-size: 0.71875rem;
  border-radius: 7px;
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-force-logout-session:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-force-logout-session:active {
  transform: scale(0.97);
}

.session-revoked-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ==========================================================================
   ACTIVE SESSIONS ACCORDION GROUPS & TOGGLES
   ========================================================================== */

.session-group-container {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.session-group-header {
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  user-select: none;
  background: #FFFFFF;
  transition: background 0.15s ease;
}

.session-group-header:hover {
  background: #F8FAFC;
}

.session-group-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  transition: all 0.2s ease;
}

.btn-toggle-session-group {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #0F172A;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1;
}

.btn-toggle-session-group:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
}

.btn-toggle-session-group:active {
  transform: scale(0.95);
}

/* ==========================================================================
   SETTINGS MODULE & APP-WIDE MOBILE RESPONSIVE ENHANCEMENTS
   ========================================================================== */

@media (max-width: 520px) {
  .points-card-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .points-card-header .card-title-group {
    width: 100%;
    justify-content: flex-start;
  }

  .points-header-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .settings-points-card #open-add-point-rule-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .settings-content {
    padding: 1rem 0.85rem calc(var(--nav-height) + 1.5rem);
    gap: 0.95rem;
  }

  .card {
    padding: 1.1rem 1rem;
    border-radius: 18px;
  }

  .card-icon-wrap {
    width: 36px;
    height: 36px;
  }

  .card-icon-wrap svg {
    width: 18px;
    height: 18px;
  }

  .card-title {
    font-size: 0.95rem;
  }

  .card-subtitle-caption {
    font-size: 0.6875rem;
  }

  .card-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.55rem;
  }

  .settings-profile-card #settings-role-badge {
    font-size: 0.6875rem !important;
    padding: 0.25rem 0.65rem !important;
  }

  .settings-logout-btn {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
  }

  .settings-content .detail-row {
    padding: 0.5rem 0.65rem;
  }

  .settings-content .detail-label {
    font-size: 0.8125rem;
  }

  .settings-content .detail-val {
    font-size: 0.8125rem;
    padding: 0.28rem 0.65rem;
  }

  /* Schedule Activity Modal - Time & Status Row mobile layout */
  .daily-time-status-row {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 0.625rem;
  }

  #daily-status {
    padding: 0.75rem 1.85rem 0.75rem 0.625rem;
    font-size: 0.875rem;
  }

  #daily-time {
    padding: 0.75rem 0.625rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 380px) {
  .app-header {
    padding: 0.5rem 0.5rem 0.4rem;
  }

  .header-top-row {
    gap: 0.3rem;
  }

  .header-right-controls {
    gap: 0.25rem;
  }

  .header-status {
    font-size: 0.62rem;
    padding: 0.22rem 0.4rem;
    gap: 0.22rem;
    max-width: 100%;
  }

  .status-centre-name {
    font-size: 0.61rem;
    letter-spacing: -0.2px;
  }

  .brand-badge {
    gap: 0.3rem;
  }

  .brand-text h1 {
    font-size: 1.1rem;
    letter-spacing: 0.8px;
  }

  .brand-icon.yellow-spark-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .brand-icon.yellow-spark-icon svg {
    width: 15px;
    height: 15px;
  }

  .header-refresh-btn {
    width: 26px;
    height: 26px;
  }

  .header-refresh-btn svg {
    width: 13px;
    height: 13px;
  }

  .settings-content {
    padding: 0.75rem 0.6rem calc(var(--nav-height) + 1.25rem);
    gap: 0.75rem;
  }

  .card {
    padding: 0.95rem 0.75rem;
    border-radius: 16px;
  }

  .settings-content .detail-row {
    padding: 0.45rem 0.55rem;
    gap: 0.35rem;
    min-height: 40px;
  }

  .detail-row-left {
    gap: 0.4rem;
  }

  .detail-icon-wrap {
    width: 24px;
    height: 24px;
  }

  .detail-icon-wrap svg {
    width: 13px;
    height: 13px;
  }

  .settings-content .detail-label {
    font-size: 0.75rem;
  }

  .settings-content .detail-val {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    max-width: 52%;
  }

  .card-title {
    font-size: 0.875rem;
  }

  .card-subtitle-caption {
    font-size: 0.65625rem;
  }

  .settings-points-card #open-add-point-rule-btn {
    font-size: 0.75rem;
    padding: 0.45rem 0.65rem;
  }
}

/* ==========================================================================
   ADMIN CENTRE SWITCHER MODAL STYLES
   ========================================================================== */
.centre-switcher-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.centre-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.95rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  gap: 0.75rem;
}

.centre-switcher-item:hover {
  background: #FFFDF0;
  border-color: #FDE047;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.12);
}

.centre-switcher-item.is-active {
  background: linear-gradient(135deg, #FFFDEB 0%, #FEF3C7 100%);
  border-color: #F59E0B;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.centre-switcher-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.centre-switcher-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.centre-switcher-address {
  font-size: 0.75rem;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.centre-switcher-check {
  font-size: 0.6875rem;
  font-weight: 800;
  color: #92400E;
  background: #FDE68A;
  border: 1px solid #FCD34D;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   SPARK OFFLINE / NO INTERNET CONNECTION SCREEN (ISOLATED)
   ========================================================================== */

.offline-screen-container {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  padding: 1.25rem;
  overflow: hidden;
  box-sizing: border-box;
}

.offline-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 360px;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

.offline-illustration-wrap {
  width: 100%;
  max-width: 240px;
  max-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.offline-illustration {
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.offline-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.offline-message {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748B;
  margin: 0 0 1.5rem 0;
  line-height: 1.45;
  max-width: 280px;
}

.offline-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 140px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0F172A;
  background-color: #F59E0B;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  transition: transform 0.15s ease, background-color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.offline-retry-btn:hover {
  background-color: #D97706;
}

.offline-retry-btn:active {
  transform: scale(0.97);
}

@media (max-height: 600px) {
  .offline-illustration-wrap {
    max-width: 170px;
    max-height: 170px;
    margin-bottom: 0.75rem;
  }
  .offline-illustration {
    max-width: 170px;
  }
  .offline-title {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
  }
  .offline-message {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
  }
  .offline-retry-btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
  }
}

