/* ==========================================================================
   MADAN MOHAN MALVIYA JHS — STUDENT PORTAL MODERN DESIGN SYSTEM
   ========================================================================== */

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Color Palette - Premium Slate & Obsidian Theme */
  --bg-base: #f3f6fa;
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  --bg-surface: #ffffff;
  --bg-surface-solid: #ffffff;
  --bg-surface-elevated: #f8fbff;
  --bg-surface-hover: #eef6ff;
  
  /* Accents */
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.2);
  --primary-light: #059669;
  
  --accent-blue: #2563eb;
  --accent-blue-light: #2563eb;
  --accent-blue-glow: rgba(37, 99, 235, 0.18);
  
  --accent-purple: #7c3aed;
  --accent-purple-light: #7c3aed;
  
  --success: #10b981;
  --success-light: #059669;
  --success-bg: rgba(16, 185, 129, 0.12);
  
  --warning: #f59e0b;
  --warning-light: #d97706;
  --warning-bg: rgba(245, 158, 11, 0.12);
  
  --danger: #f43f5e;
  --danger-light: #e11d48;
  --danger-bg: rgba(244, 63, 94, 0.12);
  
  /* Text */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  /* Borders & Glass */
  --card-border: #e2e8f0;
  --card-border-glow: #cbd5e1;
  --glass-blur: none;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.14);
}

/* BASE RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  font-family: var(--font-main);
  background: var(--bg-base);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  padding-bottom: 70px; /* Space for mobile bottom nav */
}

@media (min-width: 860px) {
  body {
    padding-bottom: 0;
  }
}

/* CUSTOM SCROLLBARS */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* ==========================================================================
   LOGIN & AUTHENTICATION SCREENS
   ========================================================================== */

#login-container {
  max-width: 440px;
  width: 92%;
  margin: auto;
  margin-top: 5vh;
  margin-bottom: 5vh;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  padding: 2.25rem 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(13, 148, 136, 0.1);
  position: relative;
  overflow: hidden;
  animation: fadeInDown 0.35s ease-out;
}

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

#login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #0284c7, #7c3aed);
}

.brand-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.portal-logo-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin: 0 auto 0.75rem auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease;
}

.portal-logo-img:hover {
  transform: scale(1.05);
}

.brand-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-header .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

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

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: #cbd5e1;
}

.form-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary-light);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.5);
  transform: translateY(-1px);
}

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

.btn-outline {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border-glow);
  color: var(--primary-light);
}

.btn-outline:hover {
  background: rgba(13, 148, 136, 0.15);
  border-color: var(--primary-light);
}

.btn-outline-danger {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--danger-light);
}

.btn-outline-danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--danger-light);
}

.btn-sm {
  width: auto;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.alert.error {
  background: var(--danger-bg);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fca5a5;
}

.alert.success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success-light);
}

.footer-note {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-dim);
  margin-top: 1.5rem;
}

/* ==========================================================================
   APP HEADER & NAVIGATION
   ========================================================================== */

.portal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.07);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.header-brand-text {
  display: flex;
  flex-direction: column;
}

.school-tag {
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  text-transform: none;
}

.page-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
}

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

.user-badge {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--card-border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

/* DESKTOP TAB NAVIGATION */
.portal-nav {
  display: none;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  overflow-x: auto;
  white-space: nowrap;
}

@media (min-width: 860px) {
  .portal-nav {
    display: flex;
  }
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.nav-tab.active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

/* MOBILE STICKY BOTTOM NAVIGATION BAR */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--card-border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.10);
}

@media (min-width: 860px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
}

.mobile-nav-btn i {
  font-size: 1.15rem;
  transition: transform 0.15s ease;
}

.mobile-nav-btn.active {
  color: #2563eb;
}

.mobile-nav-btn.active i {
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 8px var(--primary-glow));
}

/* MOBILE "MORE" DRAWER / SHEET */
#mobile-more-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}

#mobile-more-sheet.active {
  display: flex;
}

.sheet-content {
  width: 100%;
  background: var(--bg-surface-solid);
  border-top: 1px solid var(--card-border-glow);
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.sheet-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem 0.5rem;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sheet-item:hover, .sheet-item:active {
  background: rgba(13, 148, 136, 0.2);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.sheet-item i {
  font-size: 1.4rem;
  color: var(--primary-light);
}

/* ==========================================================================
   MAIN PORTAL CONTENT & CARDS
   ========================================================================== */

.portal-content {
  padding: 1.25rem 1rem;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .portal-content {
    padding: 2rem 1.5rem;
  }
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

/* STUDENT HERO CARD */
.welcome-card {
  background: linear-gradient(135deg, #e9f3ff 0%, #ffffff 100%);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.student-hero-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.student-hero-avatar {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 2px solid var(--primary-light);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.student-hero-info h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.student-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-chip {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
}

/* REFERENCE-STYLE QUICK ACTION ROW */
.portal-action-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 1.1rem;
}

.portal-action-button {
  min-height: 78px;
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-action-button:hover,
.portal-action-button:active {
  transform: translateY(-2px);
  box-shadow: 0 11px 20px rgba(15, 23, 42, 0.15);
}

.portal-action-button i { font-size: 1.45rem; }
.action-admit { background: linear-gradient(135deg, #4f8ff5, #2563eb); }
.action-report { background: linear-gradient(135deg, #b15cf1, #9333ea); }
.action-fees { background: linear-gradient(135deg, #34d399, #10b981); }

.quick-action-card {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  padding: 1rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.quick-action-card:hover, .quick-action-card:active {
  background: var(--bg-surface-elevated);
  border-color: var(--card-border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.quick-action-icon.gate { background: rgba(16, 185, 129, 0.15); color: var(--success-light); }
.quick-action-icon.fees { background: rgba(245, 158, 11, 0.15); color: var(--warning-light); }
.quick-action-icon.exams { background: rgba(2, 132, 199, 0.15); color: var(--accent-blue-light); }
.quick-action-icon.time { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple-light); }

.quick-action-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.quick-action-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* SECTION TITLES */
.section-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CARDS & CONTAINERS */
.cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

.card {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--card-border-glow);
}

.card-header {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  font-weight: 750;
  font-size: 0.95rem;
  color: #0f172a;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 1.25rem;
}

/* NOTICE FEED CARDS */
.notice-card {
  background: var(--bg-surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 0.85rem;
  position: relative;
  transition: all 0.2s ease;
}

.notice-card:hover {
  border-color: rgba(13, 148, 136, 0.3);
  transform: translateY(-1px);
}

.notice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
  gap: 10px;
}

.notice-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.notice-tag.fee { background: rgba(245, 158, 11, 0.15); color: var(--warning-light); border: 1px solid rgba(245, 158, 11, 0.3); }
.notice-tag.exam { background: rgba(2, 132, 199, 0.15); color: var(--accent-blue-light); border: 1px solid rgba(2, 132, 199, 0.3); }
.notice-tag.general { background: rgba(13, 148, 136, 0.15); color: var(--primary-light); border: 1px solid rgba(13, 148, 136, 0.3); }

.notice-date {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.notice-title {
  font-size: 1rem;
  font-weight: 750;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.notice-content {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
  white-space: pre-line;
}

.notice-footer {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   TABLES & RESPONSIVE DATA LISTS
   ========================================================================== */

.data-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th, .data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table th {
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* STAT CARDS */
.summary-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .summary-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.stat-card {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

.text-danger { color: var(--danger-light); }
.text-success { color: var(--success-light); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 750;
}

.badge-success { background: var(--success-bg); color: var(--success-light); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-danger { background: var(--danger-bg); color: var(--danger-light); border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-purple { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple-light); border: 1px solid rgba(124, 58, 237, 0.3); }
.badge-info { background: rgba(2, 132, 199, 0.15); color: var(--accent-blue-light); border: 1px solid rgba(2, 132, 199, 0.3); }

/* DAY PILLS (TIMETABLE) */
#timetable-day-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}

.day-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.day-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.day-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   ADMIT CARD & HALL TICKET STYLING
   ========================================================================== */

.admit-card-view {
  border: 2px solid #0284c7;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.15);
}

.admit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1.5px dashed rgba(56, 189, 248, 0.4);
  padding-bottom: 1rem;
}

/* PROVISIONAL REPORT CARD WATERMARK */
.student-report-card-container {
  position: relative;
  overflow: hidden;
}

.provisional-header-banner {
  background: var(--warning-bg);
  border: 1px dashed var(--warning);
  color: var(--warning-light);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.watermark-overlay {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 1.8rem;
  font-weight: 800;
  color: rgba(239, 68, 68, 0.15);
  pointer-events: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 10;
  user-select: none;
}

.verification-qr-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.text-muted { color: var(--text-muted); }
.loading-spinner { color: var(--text-muted); font-size: 0.85rem; padding: 1rem 0; text-align: center; }

/* LIGHT PORTAL POLISH */
.form-group input,
.form-group textarea,
.form-group select {
  background: #ffffff;
  color: #0f172a;
  border-color: #dbe3ed;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  background: #ffffff;
  border-color: #60a5fa;
}

.btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #2563eb;
}

.attendance-progress-box {
  width: 145px;
  min-width: 120px;
}

.attendance-percent {
  color: #0f766e;
  font-size: 1.55rem;
  font-weight: 800;
  text-align: right;
  margin-bottom: 8px;
}

.attendance-progress-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.attendance-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #10b981);
  border-radius: inherit;
  transition: width 0.35s ease;
}

#push-prompt-box {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

#push-prompt-box strong { color: #047857 !important; }
#push-prompt-box span { color: #475569 !important; }

@media (max-width: 560px) {
  .portal-header { padding: 0.7rem 0.85rem; }
  .header-logo-img { width: 42px; height: 42px; }
  .school-tag { max-width: 190px; line-height: 1.15; }
  .user-badge { max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .portal-content { padding: 1rem 0.8rem 1.25rem; }
  .welcome-card { padding: 1rem; }
  .student-hero-info h3 { font-size: 1.15rem; }
  .portal-action-row { gap: 10px; }
  .portal-action-button { min-height: 76px; border-radius: 15px; font-size: 0.76rem; }
  .portal-action-button i { font-size: 1.25rem; }
  .stat-card { padding: 1rem; }
  .attendance-progress-box { width: 120px; }
}

/* ========================================================================== 
   PRINT MEDIA STYLES
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }
  .portal-header, .portal-nav, .mobile-bottom-nav, #push-prompt-box, .btn {
    display: none !important;
  }
  .card, .admit-card-view {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
}


@keyframes ring {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-10deg); }
  30% { transform: rotate(5deg); }
  40% { transform: rotate(-5deg); }
  50% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}
