/**
 * Student Class Manager - Modern Dark Glassmorphism Theme
 * Matches the deep blue translucent glass aesthetic.
 */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Deep Blue Atmospheric Palette */
  --bg-gradient: radial-gradient(circle at 50% 15%, #183c66 0%, #0d223d 45%, #050e1a 100%);
  --bg-color: #081424;
  --glass-card-bg: rgba(18, 42, 75, 0.45);
  --glass-card-border: rgba(130, 195, 255, 0.3);
  --glass-card-glow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 0 30px rgba(37, 99, 235, 0.2);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Accents */
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --primary-glow: rgba(56, 189, 248, 0.4);
  --btn-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #1e40af 100%);
  --btn-hover-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #1d4ed8 100%);

  /* Status Colors with vibrant glow */
  --status-planned-color: #38bdf8;
  --status-planned-bg: rgba(56, 189, 248, 0.15);
  --status-completed-color: #34d399;
  --status-completed-bg: rgba(52, 211, 153, 0.15);
  --status-cancelled-color: #f87171;
  --status-cancelled-bg: rgba(248, 113, 113, 0.15);
  --status-makeup-color: #fbbf24;
  --status-makeup-bg: rgba(251, 191, 36, 0.15);
  --status-exam-color: #c084fc;
  --status-exam-bg: rgba(192, 132, 252, 0.18);

  --header-height: 64px;
  --bottom-nav-height: 68px;
  --border-radius: 18px;
  --border-radius-sm: 10px;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Helpers */
.hidden { display: none !important; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }

/* Glass Card */
.card, .glass-panel {
  background: var(--glass-card-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--glass-card-glow);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Ambient glow edge on cards */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
  pointer-events: none;
}

/* Header */
.app-header {
  height: var(--header-height);
  background: rgba(8, 20, 36, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(147, 197, 253, 0.2);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon { font-size: 1.6rem; }
.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}
.header-user-actions {
  display: flex;
  align-items: center;
}

/* Main Container */
.app-main {
  flex: 1;
  padding-bottom: calc(var(--bottom-nav-height) + 24px);
}
@media (min-width: 768px) {
  .app-main { padding-bottom: 40px; }
}
.dashboard-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ===============================================================
   LOGIN VIEW (Exact match to user's glass reference image)
   =============================================================== */
.auth-card-wrapper {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(135deg, rgba(22, 54, 94, 0.5) 0%, rgba(12, 30, 56, 0.65) 100%);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1.5px solid rgba(135, 200, 255, 0.4);
  border-radius: 28px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.7),
    inset 0 1px 3px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(37, 99, 235, 0.3),
    inset 0 0 20px rgba(56, 189, 248, 0.15);
  padding: 40px 32px;
  position: relative;
}

/* Vertical glowing border aura from reference image */
.auth-card::after {
  content: "";
  position: absolute;
  top: 15%;
  bottom: 15%;
  left: -2px;
  width: 3px;
  background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.8), transparent);
  border-radius: 4px;
  filter: blur(1px);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 30px;
}
.auth-icon-circle {
  font-size: 2rem;
  margin-bottom: 10px;
  display: inline-block;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 5px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 0.8rem;
  color: #93c5fd;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Forms & Inputs */
.standard-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(147, 197, 253, 0.25);
  background: rgba(12, 28, 52, 0.65);
  color: #ffffff;
  transition: all 0.2s ease;
}
.input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(15, 35, 65, 0.85);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4), inset 0 0 8px rgba(56, 189, 248, 0.15);
}
.input::placeholder { color: #64748b; }
.input-sm { padding: 6px 10px; font-size: 0.85rem; }
.textarea { resize: vertical; min-height: 80px; }

/* Password visibility toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrapper .input {
  width: 100%;
  padding-right: 44px;
}
.btn-toggle-pw {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  padding: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-toggle-pw:hover { opacity: 1; filter: drop-shadow(0 0 6px #38bdf8); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--btn-gradient);
  color: #ffffff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid rgba(147, 197, 253, 0.3);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}
.btn-primary:hover {
  background: var(--btn-hover-gradient);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(30, 58, 95, 0.5);
  color: #e2e8f0;
  border: 1px solid rgba(147, 197, 253, 0.2);
}
.btn-secondary:hover {
  background: rgba(40, 75, 120, 0.7);
  border-color: rgba(147, 197, 253, 0.4);
}
.btn-outline-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}
.btn-outline-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.btn-outline-success:hover {
  background: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}
.btn-block { width: 100%; padding: 12px; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.auth-footer-notes {
  margin-top: 22px;
  text-align: center;
}

/* Alert */
.alert {
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.alert-error {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fecaca;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.25);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(5, 1fr); }
}
.stat-card {
  background: var(--glass-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: var(--glass-card-glow);
  position: relative;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 4px;
  color: #ffffff;
}
.stat-card-planned .stat-value { color: var(--status-planned-color); text-shadow: 0 0 12px rgba(56, 189, 248, 0.5); }
.stat-card-completed .stat-value { color: var(--status-completed-color); text-shadow: 0 0 12px rgba(52, 211, 153, 0.5); }
.stat-card-cancelled .stat-value { color: var(--status-cancelled-color); text-shadow: 0 0 12px rgba(248, 113, 113, 0.5); }
.stat-card-makeup .stat-value { color: var(--status-makeup-color); text-shadow: 0 0 12px rgba(251, 191, 36, 0.5); }

/* Dashboard Header & Tabs */
.teacher-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.dashboard-greeting {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.header-action-buttons {
  display: flex;
  gap: 10px;
}

.dashboard-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid rgba(147, 197, 253, 0.2);
  margin-bottom: 20px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.tab-btn:hover { color: #ffffff; }
.tab-btn.active {
  color: var(--primary);
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}
.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

/* Toolbar & Filters */
.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 20px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* Upcoming Classes Preview */
.upcoming-card { margin-bottom: 20px; }
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.upcoming-classes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upcoming-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 32, 58, 0.5);
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(147, 197, 253, 0.2);
  font-size: 0.85rem;
}
.upcoming-title { font-weight: 700; color: #ffffff; }
.upcoming-student { color: var(--text-muted); margin-left: 8px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  line-height: 1;
}
.badge-primary {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.badge-success {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.badge-neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.badge-warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: capitalize;
}
.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-planned {
  background: var(--status-planned-bg);
  color: var(--status-planned-color);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}
.status-planned .status-indicator { background: var(--status-planned-color); box-shadow: 0 0 6px var(--status-planned-color); }

.status-completed {
  background: var(--status-completed-bg);
  color: var(--status-completed-color);
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}
.status-completed .status-indicator { background: var(--status-completed-color); box-shadow: 0 0 6px var(--status-completed-color); }

.status-cancelled {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-color);
  border: 1px solid rgba(248, 113, 113, 0.4);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.2);
}
.status-cancelled .status-indicator { background: var(--status-cancelled-color); box-shadow: 0 0 6px var(--status-cancelled-color); }

.status-makeup {
  background: var(--status-makeup-bg);
  color: var(--status-makeup-color);
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}
.status-makeup .status-indicator { background: var(--status-makeup-color); box-shadow: 0 0 6px var(--status-makeup-color); }

.status-exam {
  background: var(--status-exam-bg);
  color: var(--status-exam-color);
  border: 1px solid rgba(192, 132, 252, 0.4);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.2);
}
.status-exam .status-indicator { background: var(--status-exam-color); box-shadow: 0 0 6px var(--status-exam-color); }

/* Weekly Tracker Summary Bar */
.weekly-tracker-card {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--glass-card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--glass-card-glow);
}
.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.tracker-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.tracker-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.tracker-badge {
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tracker-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.tracker-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.tracker-lbl {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.95;
}
.badge-green {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.1);
}
.badge-red {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.1);
}
.badge-blue {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.1);
}
.badge-purple {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.35);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.1);
}

/* Calendar Wrapper */
.calendar-wrapper {
  background: var(--glass-card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-card-border);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--glass-card-glow);
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.calendar-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-month-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}
.calendar-nav-controls {
  display: flex;
  gap: 8px;
}

/* Calendar Grid (Always visible & responsive) */
.calendar-grid-container {
  display: block;
}
.calendar-day-headers {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.2);
  width: 100% !important;
  box-sizing: border-box !important;
}
.calendar-days-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 2px;
  background: rgba(147, 197, 253, 0.15);
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
  width: 100% !important;
  box-sizing: border-box !important;
}
.calendar-cell {
  background: rgba(12, 28, 52, 0.8);
  min-height: 96px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.calendar-cell:hover:not(.empty) {
  background: rgba(22, 54, 98, 0.9);
}
.calendar-cell.empty {
  background: rgba(8, 20, 38, 0.9);
  opacity: 0.4;
  cursor: default;
}
.calendar-cell.is-today {
  background: rgba(20, 50, 90, 0.85);
  border: 1px solid #38bdf8;
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.3);
}
.calendar-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cell-day-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}
.is-today .cell-day-number {
  color: #38bdf8;
  font-weight: 900;
}
.cell-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 80px;
}
.cell-quick-icons {
  display: flex;
  gap: 2px;
  align-items: center;
}
.quick-status-icon {
  font-size: 0.85rem;
}
.cal-event-pill {
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.1s, opacity 0.1s;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.cal-event-pill:hover {
  transform: scale(1.02);
  opacity: 0.95;
}
.cal-event-time { font-weight: 700; font-size: 0.65rem; }
.cal-event-status { font-size: 0.65rem; opacity: 0.85; }

/* Mobile Calendar Adaptations */
@media (max-width: 768px) {
  .calendar-wrapper { padding: 12px; }
  .calendar-cell {
    min-height: 62px;
    padding: 4px 3px;
  }
  .cell-day-number { font-size: 0.72rem; }
  .cal-event-pill {
    padding: 2px 3px;
    font-size: 0.62rem;
  }
  .cal-event-title-text { display: none; }
  .tracker-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Quick Action Status Selector Chips */
.quick-status-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0 18px 0;
}
@media (min-width: 500px) {
  .quick-status-chips { grid-template-columns: repeat(5, 1fr); }
}
.status-chip {
  padding: 10px 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
}
.status-chip-icon { font-size: 1.3rem; }
.status-chip:hover {
  transform: translateY(-2px);
}
.status-chip.selected {
  border-color: #fff;
  box-shadow: 0 0 15px currentColor;
  transform: scale(1.03);
}
.chip-completed { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.chip-completed.selected { border-color: #34d399; }
.chip-off { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.chip-off.selected { border-color: #f87171; }
.chip-pending { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.chip-pending.selected { border-color: #38bdf8; }
.chip-exam { background: rgba(192, 132, 252, 0.2); color: #c084fc; }
.chip-exam.selected { border-color: #c084fc; }
.chip-makeup { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.chip-makeup.selected { border-color: #f59e0b; }

/* Weekend Header & Cell Tint */
.header-weekend {
  color: #f59e0b !important;
}
.calendar-cell.is-weekend {
  background: rgba(10, 22, 40, 0.55);
}
.calendar-cell.is-weekend .cell-day-number {
  color: #f59e0b;
}

/* Makeup Tracker Badge */
.tracker-badge.badge-makeup {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
}
.tracker-badge.badge-makeup .tracker-num { color: #f59e0b; }
.tracker-badge.badge-makeup .tracker-lbl { color: #fbbf24; }

/* Calendar & WhatsApp Action Buttons */
.calendar-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-gcal {
  background: rgba(66, 133, 244, 0.2) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(66, 133, 244, 0.4) !important;
}
.btn-gcal:hover {
  background: rgba(66, 133, 244, 0.35) !important;
}
.btn-whatsapp {
  background: rgba(37, 211, 102, 0.2) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(37, 211, 102, 0.4) !important;
}
.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.35) !important;
}
.cal-event-pill {
  border: none;
  font-family: inherit;
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.1s;
}
.cal-event-pill:hover { opacity: 0.85; }
.cal-event-time { font-weight: 700; font-size: 0.65rem; }
.cal-event-status { font-size: 0.65rem; opacity: 0.85; }

/* Agenda View */
.calendar-agenda-view { margin-top: 20px; }
.agenda-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #ffffff;
}
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agenda-item {
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.agenda-item-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
}
.agenda-date-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  text-align: center;
  min-width: 52px;
}
.agenda-date-day {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
}
.agenda-date-month {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.agenda-info { flex: 1; }
.agenda-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.agenda-class-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}
.agenda-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 4px;
}
.agenda-note {
  font-size: 0.85rem;
  color: #e2e8f0;
  background: rgba(15, 32, 58, 0.5);
  border: 1px solid rgba(147, 197, 253, 0.15);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  margin-top: 8px;
}
.agenda-teacher-note {
  font-size: 0.85rem;
  color: #93c5fd;
  background: rgba(30, 58, 95, 0.4);
  border: 1px solid rgba(147, 197, 253, 0.3);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  margin-top: 6px;
}
.agenda-actions {
  display: flex;
  gap: 8px;
  align-self: center;
}

/* Students List */
.students-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (min-width: 700px) {
  .students-grid { grid-template-columns: repeat(2, 1fr); }
}
.student-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.student-card.is-inactive { opacity: 0.6; }
.student-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}
.student-stats-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 4px;
}
.student-private-note {
  font-size: 0.85rem;
  color: #93c5fd;
  background: rgba(20, 45, 80, 0.4);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
}
.student-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Student Banner */
.student-profile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.student-profile-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.student-avatar-badge {
  font-size: 2.2rem;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.student-banner-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-state-text {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

/* Modal Dialog */
.modal-dialog {
  border: none;
  border-radius: var(--border-radius);
  padding: 0;
  max-width: 520px;
  width: 90vw;
  background: transparent;
  margin: auto;
}
.modal-dialog::backdrop {
  background: rgba(3, 10, 20, 0.8);
  backdrop-filter: blur(8px);
}
.modal-dialog-content {
  background: linear-gradient(135deg, rgba(20, 48, 85, 0.95) 0%, rgba(10, 25, 48, 0.98) 100%);
  border: 1px solid rgba(130, 195, 255, 0.35);
  border-radius: var(--border-radius);
  padding: 28px;
  color: #ffffff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}
.modal-dialog-content h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff;
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(147, 197, 253, 0.15);
}
.detail-label {
  font-weight: 700;
  color: #94a3b8;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  background: rgba(12, 30, 56, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.2s ease-out;
  transition: opacity 0.3s;
}
.toast.fade-out { opacity: 0; }
.toast-success { border-color: rgba(52, 211, 153, 0.6); }
.toast-error { border-color: rgba(248, 113, 113, 0.6); }
.toast-info { border-color: rgba(56, 189, 248, 0.6); }
@keyframes toastIn {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mobile Bottom Nav (Visible ONLY when logged in) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(8, 20, 36, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(147, 197, 253, 0.2);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 40;
}
@media (min-width: 768px) {
  .mobile-bottom-nav { display: none !important; }
}
.mobile-nav-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
  padding: 8px 16px;
  transition: color 0.15s;
}
.mobile-nav-btn.active {
  color: #38bdf8;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.nav-icon { font-size: 1.3rem; }

/* Spinners */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   ENHANCED MOBILE & MULTI-STUDENT WORKFLOW STYLES
   ========================================================================== */

/* Student Multi-Select Checkbox Chips in Modal */
.student-chips-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.student-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(15, 28, 48, 0.7);
  border: 1px solid rgba(147, 197, 253, 0.25);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  min-height: 38px;
}
.student-chip:hover {
  background: rgba(25, 45, 75, 0.85);
  border-color: rgba(56, 189, 248, 0.5);
}
.student-chip.active {
  background: rgba(14, 116, 144, 0.35);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}
.chip-check-icon {
  font-weight: 800;
  font-size: 0.85rem;
  color: #38bdf8;
}
.btn-select-all-toggle {
  background: rgba(30, 58, 100, 0.5);
  border: 1px solid rgba(147, 197, 253, 0.3);
  color: #93c5fd;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-select-all-toggle:hover {
  background: rgba(37, 99, 235, 0.4);
  color: #fff;
  border-color: #38bdf8;
}

/* Existing Day Entries Preview */
.existing-day-entries {
  background: rgba(8, 20, 38, 0.85);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.existing-entries-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
}
.existing-entries-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.existing-entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.existing-entry-badge.status-completed { border-color: rgba(52, 211, 153, 0.4); color: #34d399; }
.existing-entry-badge.status-cancelled { border-color: rgba(248, 113, 113, 0.4); color: #f87171; }
.existing-entry-badge.status-planned { border-color: rgba(56, 189, 248, 0.4); color: #38bdf8; }
.existing-entry-badge.status-exam { border-color: rgba(192, 132, 252, 0.4); color: #c084fc; }
.btn-remove-entry {
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 4px;
  opacity: 0.8;
}
.btn-remove-entry:hover { opacity: 1; transform: scale(1.2); }

/* Student Attendance Carousel / Counter Section */
.student-attendance-carousel-section {
  margin: 16px 0;
}
.student-attendance-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .student-attendance-carousel {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
}
.student-counter-card {
  background: linear-gradient(135deg, rgba(16, 36, 68, 0.7) 0%, rgba(10, 24, 46, 0.8) 100%);
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 170px;
  scroll-snap-align: start;
}
.student-counter-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.student-counter-card.active {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(20, 50, 95, 0.9) 0%, rgba(14, 35, 68, 0.95) 100%);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}
.scc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.scc-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
}
.scc-total {
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.15);
  padding: 2px 6px;
  border-radius: 10px;
}
.scc-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scc-badge {
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.scc-badge.bg-green { color: #34d399; }
.scc-badge.bg-red { color: #f87171; }
.scc-badge.bg-purple { color: #c084fc; }

/* Quick Filter Pills Bar */
.quick-filter-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 14px 0;
  -webkit-overflow-scrolling: touch;
}
.quick-filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(147, 197, 253, 0.25);
  background: rgba(15, 28, 50, 0.6);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.quick-filter-pill:hover {
  background: rgba(25, 48, 85, 0.85);
  color: #fff;
}
.quick-filter-pill.active {
  background: #2563eb;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

/* Student Announcement / Exam Alert Card */
.student-announcement-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(79, 70, 229, 0.2) 100%);
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #ffffff;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.student-announcement-card.hidden { display: none; }
.announcement-icon { font-size: 1.5rem; }
.announcement-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.announcement-desc { font-size: 0.82rem; color: #e2e8f0; line-height: 1.4; }

/* Bottom Sheet on Mobile */
.bottom-sheet-handle { display: none; }
@media (max-width: 640px) {
  .bottom-sheet-handle {
    display: block;
    width: 44px;
    height: 5px;
    background: rgba(148, 163, 184, 0.4);
    border-radius: 3px;
    margin: 0 auto 12px auto;
  }
  .modal-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: auto 0 0 0 !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  .modal-dialog-content {
    border-radius: 20px 20px 0 0 !important;
    padding: 18px 16px 28px 16px !important;
    border-bottom: none !important;
  }
}

/* ==========================================================================
   MASTER ATTENDANCE REPORT & YEARLY 12-MONTH CALENDAR OVERVIEW
   ========================================================================== */

/* Master Attendance Report Board */
.master-attendance-report-section {
  margin: 16px 0;
}
.master-report-card {
  background: linear-gradient(135deg, rgba(15, 30, 56, 0.85) 0%, rgba(9, 20, 38, 0.95) 100%);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.mrc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.15);
}
.mrc-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mrc-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .mrc-columns-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.mrc-col {
  background: rgba(12, 25, 48, 0.7);
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 10px;
  padding: 14px;
}
.mrc-col-header {
  font-weight: 700;
  font-size: 0.85rem;
  color: #38bdf8;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mrc-stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mrc-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.mrc-stat-label { color: #cbd5e1; display: flex; align-items: center; gap: 6px; }
.mrc-stat-val { font-weight: 700; }
.val-green { color: #34d399; }
.val-red { color: #f87171; }
.val-amber { color: #fbbf24; }
.val-blue { color: #38bdf8; }

/* Calendar View Switcher Controls */
.calendar-view-switcher {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 20px;
  padding: 3px;
  gap: 4px;
  margin-bottom: 12px;
}
.view-switch-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.view-switch-btn:hover { color: #fff; }
.view-switch-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* Yearly 12-Month Calendar Overview Grid */
.yearly-overview-container {
  margin-top: 10px;
}
.yearly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: rgba(15, 28, 50, 0.6);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(147, 197, 253, 0.2);
}
.yearly-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}
.yearly-months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.yearly-month-card {
  background: linear-gradient(135deg, rgba(16, 36, 68, 0.75) 0%, rgba(10, 22, 44, 0.85) 100%);
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.yearly-month-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.ymc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.15);
}
.ymc-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
}
.ymc-count {
  font-size: 0.72rem;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.2);
  padding: 2px 6px;
  border-radius: 8px;
}
.ymc-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
}
.ymc-btn-open {
  margin-top: 10px;
  width: 100%;
  padding: 6px 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  transition: all 0.15s ease;
}
.yearly-month-card:hover .ymc-btn-open {
  background: #38bdf8;
  color: #030a14;
}


/* ==========================================================================
   V17 Multi-Tab, Compact Mini-Badge, Time Chips & Confirm Dialog Enhancements
   ========================================================================== */

/* Multi-Tab Navigation Styles */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.15);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.dashboard-tabs::-webkit-scrollbar {
  height: 4px;
}
.dashboard-tabs::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.2);
  border-radius: 4px;
}
.dashboard-tabs .tab-btn {
  background: rgba(15, 35, 65, 0.6);
  border: 1px solid rgba(147, 197, 253, 0.15);
  color: #94a3b8;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.dashboard-tabs .tab-btn:hover {
  color: #ffffff;
  background: rgba(22, 54, 98, 0.8);
  border-color: rgba(56, 189, 248, 0.4);
}
.dashboard-tabs .tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

/* Dedicated Tab Content Transition */
.teacher-tab-content,
.student-tab-content {
  animation: fadeInTab 0.2s ease-out;
}
@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Compact Calendar Mini-Badge (Zero clutter, clean single-card size) */
.cal-mini-badge {
  background: rgba(15, 35, 65, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  padding: 4px 6px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.cal-mini-badge:hover {
  transform: translateY(-1px);
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}
.cal-mini-badge.status-completed {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(16, 46, 32, 0.92);
}
.cal-mini-badge.status-cancelled {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(56, 20, 24, 0.92);
}
.cal-mini-badge.status-planned {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(16, 36, 68, 0.92);
}
.cal-mini-badge.status-makeup {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(58, 38, 14, 0.92);
}
.cal-mini-badge.status-exam {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(45, 22, 65, 0.92);
}
.mini-badge-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-badge-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Quick Time Chips in Modal */
.quick-time-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.time-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(147, 197, 253, 0.2);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.time-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}
.time-chip.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* Student Selection Actions (Select All & Deselect All) */
.select-actions-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-select-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(147, 197, 253, 0.25);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-select-action:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}
.btn-select-action.btn-deselect {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-select-action.btn-deselect:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Custom Glassmorphic Confirmation Popup Modal */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInOverlay 0.2s ease-out;
}
.confirm-modal-box {
  background: linear-gradient(145deg, #0b1a30 0%, #061122 100%);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 24px rgba(239, 68, 68, 0.25);
  animation: scaleUpBox 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.confirm-icon-pulse {
  font-size: 2.6rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: pulseIcon 1.5s infinite ease-in-out;
}
.confirm-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f87171;
  margin-bottom: 8px;
}
.confirm-message {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 22px;
}
.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.confirm-actions .btn {
  flex: 1;
  padding: 10px 16px;
  font-weight: 700;
  border-radius: 8px;
  font-size: 0.88rem;
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleUpBox {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Visible Danger Action Button */
.btn-danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #ef4444 !important;
}
.btn-danger:hover {
  background: #b91c1c !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}
