/* Sikkhalay — Professional Teacher Workspace CSS */

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --accent-teal: #0d9488;
  --dark-navy: #0f172a;
  --slate-dark: #1e293b;
  --slate-medium: #475569;
  --slate-light: #64748b;
  --slate-border: #e2e8f0;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;

  --badge-school-bg: #e0f2fe;
  --badge-school-text: #0369a1;
  --badge-coaching-bg: #fef3c7;
  --badge-coaching-text: #b45309;
  --badge-lms-bg: #f3e8ff;
  --badge-lms-text: #7e22ce;

  --max-width: 1320px;

  --live-red: #ef4444;
  --live-bg: #fef2f2;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --text-lg: 22px;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.12);

  --border-color: #E2E8F0;

  --font-sans: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-surface: #151c2c;
  --bg-muted: #1e293b;
  --dark-navy: #f8fafc;
  --slate-dark: #f1f5f9;
  --slate-medium: #cbd5e1;
  --slate-light: #94a3b8;
  --slate-border: #2d3748;
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--dark-navy);
  line-height: 1.5;
  padding-bottom: 84px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 40px;
  }
}

/* Container constraints */
.app-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 8px;
}

@media (min-width: 768px) {
  .app-container {
    padding: 0 24px;
  }
}

/* Utility Helpers */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-4 {
  gap: 4px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-20 {
  gap: 20px;
}

.gap-24 {
  gap: 24px;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.w-full {
  width: 100%;
}

.text-xs {
  font-size: 12px;
}

.text-sm {
  font-size: 14px;
}

.text-base {
  font-size: 16px;
}

.text-lg {
  font-size: 18px;
  font-weight: 600;
}

.text-xl {
  font-size: 20px;
  font-weight: 700;
}

.text-2xl {
  font-size: 24px;
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-muted {
  color: var(--slate-light);
}

.text-primary {
  color: var(--primary);
}

.text-dark {
  color: var(--dark-navy);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-school {
  background-color: var(--badge-school-bg);
  color: var(--badge-school-text);
}

.badge-coaching {
  background-color: var(--badge-coaching-bg);
  color: var(--badge-coaching-text);
}

.badge-lms {
  background-color: var(--badge-lms-bg);
  color: var(--badge-lms-text);
}

.badge-live {
  background-color: var(--live-bg);
  color: var(--live-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-gray {
  background-color: var(--bg-muted);
  color: var(--slate-medium);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--live-red);
  display: inline-block;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--dark-navy);
  border-color: var(--slate-border);
}

.btn-secondary:hover {
  background-color: var(--bg-muted);
  border-color: var(--slate-light);
}

.btn-live {
  background-color: var(--live-red);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: none;
  color: var(--slate-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background-color: var(--bg-muted);
  color: var(--primary);
}

/* Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--slate-border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand div {
  display: flex;
  flex-direction: column;
  gap: 0px;
  align-items: flex-start;
}

.brand-logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background-color: #ffffff;
  background-image: url('../assets/images/logo.jpeg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  border: none;
  border-radius: var(--radius-pill, 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 10px;
  font-weight: 700;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Mobile Header Back Brand Button */
.phn_back {
  display: none;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--dark-navy);
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
  flex-shrink: 1;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.phn_back:active {
  transform: scale(0.96);
}

.phn_back>i,
.phn_back .phn-back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background-color: var(--bg-muted);
  border: 1px solid var(--slate-border);
  color: var(--dark-navy);
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.phn_back:hover>i,
.phn_back:hover .phn-back-arrow {
  background-color: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: translateX(-2px);
}

.phn_back div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.25;
}

.phn_back .brand-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

[data-theme="dark"] .phn_back {
  color: var(--dark-navy);
}

[data-theme="dark"] .phn_back>i,
[data-theme="dark"] .phn_back .phn-back-arrow {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--slate-border);
  color: var(--dark-navy);
}

[data-theme="dark"] .phn_back:hover>i,
[data-theme="dark"] .phn_back:hover .phn-back-arrow {
  background-color: rgba(5, 150, 105, 0.2);
  border-color: var(--primary);
  color: #34d399;
}

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

.notification-badge {
  position: relative;
  cursor: pointer;
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--live-red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

/* ==========================================================================
   APP LAYOUT SHELL & MODERN LEFT DESKTOP / RESPONSIVE OFF-CANVAS SIDEBAR
   ========================================================================== */
.app-layout-shell {
  display: flex;
  min-height: calc(100vh - 64px);
  position: relative;
  width: 100%;
}

.left-desktop-sidebar {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 256px;
  background: var(--bg-surface);
  border-right: 1px solid var(--slate-border);
  z-index: 850;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-border);
  background: var(--bg-surface);
}

@media (max-width: 1023px) {
  .sidebar-mobile-header {
    display: flex;
  }
}

.sidebar-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--slate-border);
  color: var(--dark-navy);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: var(--live-bg);
  color: var(--live-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.sidebar-scroll-content {
  padding: 14px 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--slate-border) transparent;
}

.sidebar-scroll-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-scroll-content::-webkit-scrollbar-thumb {
  background: var(--slate-border);
  border-radius: 4px;
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-light);
  letter-spacing: 0.6px;
  padding: 4px 12px 6px 12px;
  text-transform: uppercase;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate-medium);
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
}

.sidebar-nav-item .nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: var(--slate-light);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.sidebar-nav-item:hover {
  background: var(--bg-muted);
  color: var(--dark-navy);
}

.sidebar-nav-item:hover .nav-icon {
  color: var(--primary);
}

.sidebar-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

[data-theme="dark"] .sidebar-nav-item.active {
  background: rgba(5, 150, 105, 0.16);
  color: #34d399;
}

.sidebar-nav-item.active .nav-icon {
  color: var(--primary);
}

[data-theme="dark"] .sidebar-nav-item.active .nav-icon {
  color: #34d399;
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

[data-theme="dark"] .sidebar-nav-item.active::before {
  background: #34d399;
}

.sidebar-pill-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.2px;
}

/* Sidebar Footer User Card */
.sidebar-user-footer {
  padding: 12px;
  border-top: 1px solid var(--slate-border);
  background: var(--bg-surface);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  border: 1px solid var(--slate-border);
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-user-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

.sidebar-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  border: 2px solid var(--bg-surface);
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-id {
  font-size: 11px;
  color: var(--slate-light);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-arrow {
  font-size: 11px;
  color: var(--slate-light);
}

/* Main Viewport Adjustments for Sidebar */
.app-main-viewport {
  flex: 1;
  min-width: 0;
  width: 100%;
}

@media (min-width: 1024px) {
  .left-desktop-sidebar {
    display: flex;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .app-main-viewport {
    margin-left: 256px;
    transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .app-layout-shell.sidebar-collapsed .left-desktop-sidebar {
    transform: translateX(-100%);
  }

  .app-layout-shell.sidebar-collapsed .app-main-viewport {
    margin-left: 0;
  }
}

/* Sidebar Drawer Backdrop for Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 950;
  transition: opacity 0.25s ease;
}

@media (max-width: 1023px) {
  .left-desktop-sidebar {
    display: flex;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .left-desktop-sidebar.drawer-open,
  .left-desktop-sidebar.active {
    transform: translateX(0);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .app-main-viewport {
    margin-left: 0 !important;
  }
}

/* FIXED MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--slate-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 55px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

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

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0px;
  color: var(--slate-light);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  width: 20%;
  height: 100%;
  cursor: pointer;
  transition: color 0.2s;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-icon-wrapper {
  padding: 4px 12px;
  border-radius: 16px;
  transition: background-color 0.2s;
}

.bottom-nav-item.active .bottom-nav-icon-wrapper {
  background-color: var(--primary-light);
}

.bottom-nav-item i {
  font-size: 16px;
}

/* MAIN CONTENT LAYOUT */
.main-content {
  padding-top: 24px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   SMART EDUCATOR COMMAND HERO CENTER (.educator-hero-center)
   ADVANCED INTERACTIVE HOLOGRAPHIC AURORA MESH
   ========================================================================== */
.educator-hero-center,
.greeting-card {
  --mouse-x: 50%;
  --mouse-y: 25%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
  color: #ffffff;

  /* Advanced Living Cosmic Aurora & Interactive Cursor Spotlight */
  background-color: #080c18;
  background-image:
    /* 1. Real-Time Interactive Cursor Spotlight */
    radial-gradient(550px circle at var(--mouse-x) var(--mouse-y), rgba(255, 99, 71, 0.28) 0%, rgba(255, 183, 3, 0.18) 35%, transparent 75%),
    /* 2. Top-Right Neon Sunset & Solar Amber Bloom */
    radial-gradient(ellipse 85% 65% at 90% -5%, rgba(255, 183, 3, 0.55) 0%, rgba(255, 59, 92, 0.38) 42%, transparent 75%),
    /* 3. Top-Left Cyber Violet / Electric Indigo Depth Flare */
    radial-gradient(ellipse 75% 55% at 10% -5%, rgba(99, 102, 241, 0.45) 0%, rgba(139, 92, 246, 0.25) 40%, transparent 70%),
    /* 4. Bottom-Center Fiery Tomato & Crimson Beam */
    radial-gradient(ellipse 95% 70% at 50% 120%, rgba(255, 59, 92, 0.6) 0%, rgba(255, 99, 71, 0.4) 45%, transparent 78%),
    /* 5. Cyber Cyan Accent Glint at Far Right */
    radial-gradient(circle at 98% 60%, rgba(6, 182, 212, 0.25) 0%, transparent 45%),
    /* 6. Deep Obsidian Tech Base Gradient */
    linear-gradient(145deg, #070a14 0%, #0d1222 35%, #141026 70%, #080c18 100%);
  background-attachment: local;

  /* High-Tech Glowing Borders & Multi-Stage Elevation */
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 3px 6px -15px rgba(0, 0, 0, 0.8),
    0 0 5px -10px rgba(255, 59, 92, 0.3),
    0 0 3px -5px rgba(255, 183, 3, 0.22),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease, transform 0.4s ease;
}

.educator-hero-center:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 3px 7px -15px rgba(0, 0, 0, 0.85),
    0 0 5px -8px rgba(255, 59, 92, 0.4),
    0 0 3px -4px rgba(255, 183, 3, 0.3),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {

  .educator-hero-center,
  .greeting-card {
    padding: 28px 32px;
    gap: 22px;
  }
}

/* Subtle futuristic cyber dot-matrix & lighting sweep */
.educator-hero-center::before,
.greeting-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.13) 1.2px, transparent 1.2px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 45%, rgba(255, 255, 255, 0.03) 100%);
  background-size: 24px 24px, 100% 100%;
  pointer-events: none;
  opacity: 0.8;
  z-index: 0;
  mask-image: radial-gradient(ellipse 95% 85% at 50% 50%, black 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 95% 85% at 50% 50%, black 50%, transparent 100%);
}

/* Fluid living aurora mesh layer */
.educator-hero-center::after,
.greeting-card::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 180%;
  background:
    radial-gradient(circle at 75% 25%, rgba(255, 183, 3, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 25% 35%, rgba(99, 102, 241, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 50% 75%, rgba(255, 59, 92, 0.28) 0%, transparent 55%),
    radial-gradient(circle at 85% 70%, rgba(6, 182, 212, 0.18) 0%, transparent 45%);
  filter: blur(65px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  animation: cosmicAuroraMotion 16s ease-in-out infinite alternate;
}

@keyframes cosmicAuroraMotion {
  0% {
    transform: rotate(0deg) scale(1) translate(0, 0);
  }

  50% {
    transform: rotate(180deg) scale(1.12) translate(-20px, 15px);
  }

  100% {
    transform: rotate(360deg) scale(0.96) translate(15px, -15px);
  }
}

/* Layer 1: Top Greeting & Identity Row */
.greeting-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.greeting-user-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.greeting-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
  padding: 3px;
  background: linear-gradient(135deg, #ff4d4d 0%, #f59e0b 50%, #8b5cf6 100%);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(255, 77, 77, 0.5), 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: avatarHaloPulse 5s ease-in-out infinite alternate;
}

@keyframes avatarHaloPulse {
  0% {
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.4), 0 4px 14px rgba(0, 0, 0, 0.4);
  }

  100% {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.6), 0 0 15px rgba(139, 92, 246, 0.4);
  }
}

.greeting-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #080c18;
  object-fit: cover;
  display: block;
}

.greeting-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #10b981;
  border: 2.5px solid #080c18;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
}

.greeting-salutation {
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #ffd166 75%, #ff758c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
}

.greeting-subtext {
  font-size: 12.5px;
  color: #cbd5e1;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-verified-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.teacher-role-badge {
  background: rgba(255, 99, 71, 0.18);
  border: 1px solid rgba(255, 99, 71, 0.4);
  color: #ffb4a2;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.teacher-degree-badge {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde047;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

/* Affiliation & Biometric Chips */
.hero-affiliation-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-chip {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.hero-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.hero-chip.school-chip {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fef08a;
}

.hero-chip.coaching-chip {
  background: rgba(255, 99, 71, 0.18);
  border-color: rgba(255, 99, 71, 0.42);
  color: #ffb4a2;
}

.hero-chip.biometric-chip {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

/* Right: Today's Teaching Pulse Chips (Interactive Glass Cards) */
.greeting-pulse-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pulse-chip {
  background: rgba(15, 23, 42, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse-chip:hover {
  border-color: rgba(255, 183, 3, 0.6);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 183, 3, 0.25);
  transform: translateY(-2px) scale(1.02);
}

.pulse-chip.alert-chip {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fef08a;
}

.pulse-chip.alert-chip:hover {
  border-color: #fbbf24;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45), 0 0 20px rgba(251, 191, 36, 0.35);
}

.pulse-chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.pulse-chip:hover .pulse-chip-icon {
  transform: scale(1.1);
}

.pulse-chip-icon.tomato-icon {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.3) 0%, rgba(244, 63, 94, 0.15) 100%);
  border: 1px solid rgba(255, 77, 77, 0.45);
  color: #ff6b6b;
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.35);
}

.pulse-chip-icon.yellow-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(251, 191, 36, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.pulse-chip-text {
  display: flex;
  flex-direction: column;
}

.pulse-chip-val {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.pulse-chip-label {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Layer 2: Next Upcoming Class Focus HUD (Floating Liquid Glass Cockpit) */
.upcoming-class-hud {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(22, 18, 36, 0.8) 50%, rgba(15, 23, 42, 0.85) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  box-shadow:
    0 18px 45px -8px rgba(0, 0, 0, 0.6),
    0 0 35px -5px rgba(255, 183, 3, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Shimmer beam running across top edge of cockpit */
.upcoming-class-hud::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #fbbf24, #ff4d4d, transparent);
  animation: hudEdgeShimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hudEdgeShimmer {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 150%;
  }
}

.upcoming-class-hud:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 22px 55px -6px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(255, 77, 77, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.upcoming-hud-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 260px;
}

.upcoming-hud-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upcoming-countdown-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(251, 191, 36, 0.15) 100%);
  border: 1.5px solid #fbbf24;
  color: #fef08a;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.upcoming-countdown-pill.standby-pill {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
  box-shadow: none;
}

.upcoming-class-title {
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.upcoming-class-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #cbd5e1;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.upcoming-hud-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-hud-live {
  background: linear-gradient(135deg, #ff1e56 0%, #ff5722 50%, #f43f5e 100%);
  background-size: 200% 200%;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 22px rgba(255, 30, 86, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  animation: liveBtnShimmer 4s ease infinite;
}

@keyframes liveBtnShimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.btn-hud-live:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 30, 86, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #ffffff !important;
}

.btn-hud-attendance {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #0b0f19 !important;
  border: 1px solid #fef08a;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-hud-attendance:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.6);
  color: #0b0f19 !important;
}

.hud-action-btn.standby {
  opacity: 0.65;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.hud-action-btn.standby:hover {
  opacity: 0.85;
}

/* Layer 3: Today's Schedule Peek Ribbon */
.today-classes-peek-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 2;
}

.peek-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.peek-items-list {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex: 1;
  scrollbar-width: none;
}

.peek-items-list::-webkit-scrollbar {
  display: none;
}

.peek-item {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11.5px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.peek-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.peek-item.active {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.3) 0%, rgba(245, 158, 11, 0.25) 100%);
  border: 1.5px solid #fbbf24;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}

.peek-item.active .peek-time {
  color: #fde047;
  font-weight: 800;
}

.peek-time {
  font-weight: 800;
  color: #fde047;
}

/* ==========================================================================
   DEDICATED RESPONSIVE RULES FOR SMALL SCREEN WIDTHS (< 768px & < 420px)
   ========================================================================== */
@media (max-width: 767px) {

  .educator-hero-center,
  .greeting-card {
    padding: 16px 14px;
    gap: 14px;
    border-radius: 16px;
  }

  .greeting-top-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .greeting-user-intro {
    align-items: flex-start;
    gap: 12px;
  }

  .greeting-avatar {
    width: 50px;
    height: 50px;
  }

  .greeting-salutation {
    font-size: 1.25rem;
  }

  .greeting-subtext {
    font-size: 11.5px;
    gap: 5px;
  }

  .hero-affiliation-pills {
    gap: 5px;
  }

  .hero-chip {
    font-size: 10.5px;
    padding: 3px 8px;
    gap: 4px;
  }

  /* Two-column balanced pulse grid on mobile */
  .greeting-pulse-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  .pulse-chip {
    padding: 7px 10px;
    gap: 8px;
    border-radius: 10px;
  }

  .pulse-chip-icon {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .pulse-chip-val {
    font-size: 13px;
  }

  .pulse-chip-label {
    font-size: 9.5px;
  }

  /* Upcoming class HUD stacked on mobile */
  .upcoming-class-hud {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 12px;
    gap: 12px;
  }

  .upcoming-hud-left {
    min-width: 0;
    width: 100%;
  }

  .upcoming-class-title {
    font-size: 1.05rem;
  }

  .upcoming-class-meta-row {
    font-size: 11.5px;
    gap: 8px 12px;
  }

  .upcoming-hud-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  .btn-hud-live,
  .btn-hud-attendance {
    width: 100%;
    justify-content: center;
    padding: 10px 8px;
    font-size: 12px;
    text-align: center;
  }

  .today-classes-peek-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
  }

  .peek-items-list {
    width: 100%;
    gap: 6px;
  }

  .lap_brand {
    display: none !important;
  }

  .phn_back {
    display: inline-flex !important;
  }

  .header-inner {
    height: 58px;
    gap: 10px;
  }

  .header-actions {
    gap: 8px;
    flex-shrink: 0;
  }
}

@media (min-width: 768px) {
  .lap_brand {
    display: inline-flex !important;
  }

  .phn_back {
    display: none !important;
  }
}

@media (max-width: 420px) {

  .phn_back {
    gap: 8px;
  }

  .phn_back>i,
  .phn_back .phn-back-arrow {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 13px;
    border-radius: 8px;
  }

  .phn_back .brand-title {
    font-size: 16px;
    max-width: 140px;
  }

  .header-inner {
    height: 54px;
    gap: 6px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn-icon {
    padding: 7px;
  }

  .educator-hero-center,
  .greeting-card {
    padding: 12px 10px;
    gap: 12px;
    border-radius: 14px;
  }

  .greeting-avatar {
    width: 44px;
    height: 44px;
  }

  .greeting-salutation {
    font-size: 1.15rem;
  }

  .upcoming-hud-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .phn_back {
    gap: 6px;
  }

  .phn_back>i,
  .phn_back .phn-back-arrow {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 12px;
    border-radius: 7px;
  }

  .phn_back .brand-title {
    font-size: 14.5px;
    max-width: 105px;
  }

  .header-actions {
    gap: 4px;
  }
}

/* TIMELINE SECTION */
.timeline-container {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--slate-border);
  margin-top: 16px;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--slate-light);
  border: 3px solid var(--bg-surface);
}

.timeline-item.active-item::before {
  background-color: var(--live-red);
  box-shadow: 0 0 0 4px var(--live-bg);
}

/* QUICK ACTIONS GRID */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .quick-actions-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.quick-action-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-action-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   TUITION MANAGEMENT QUICK ACTIONS GRID
   ========================================================================== */
.tuition-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .tuition-action-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .tuition-action-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.tuition-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.tuition-action-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -5px rgba(16, 185, 129, 0.15), var(--shadow-md);
}

.tuition-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tuition-action-card:hover .tuition-action-icon {
  transform: scale(1.08);
}

.tuition-action-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark-navy, #0f172a);
  line-height: 1.25;
}

.tuition-action-sub {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}

.tuition-action-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

/* CLASS CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.class-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.class-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.class-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 160px;
  background-color: var(--bg-muted);
  overflow: hidden;
}

.class-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.class-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.class-desc {
  font-size: 13px;
  color: var(--slate-medium);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 56px;
}

.class-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--slate-border);
  font-size: 12px;
  color: var(--slate-light);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

/* KPI METRICS GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 4-Column Financial KPI Grid */
.fin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .fin-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 540px) {
  .fin-kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* INSTITUTION CARDS (Coaching & School) */
.inst-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
}

.inst-banner {
  height: 110px;
  background: linear-gradient(135deg, #0f172a 0%, #0d9488 100%);
  position: relative;
}

.inst-content {
  padding: 20px;
  position: relative;
}

.inst-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  border: 3px solid var(--bg-surface);
  position: absolute;
  top: -32px;
  left: 20px;
  background-color: white;
  box-shadow: var(--shadow-md);
  object-fit: cover;
}


/* TABLES */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-border);
  background-color: var(--bg-surface);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.custom-table th {
  background-color: var(--bg-muted);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--slate-light);
  border-bottom: 1px solid var(--slate-border);
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-border);
  color: var(--dark-navy);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background-color: var(--bg-main);
}

/* MODAL OVERLAY & DRAWER */
.modal-overlay,
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active,
.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card,
.modal.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--slate-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-muted);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

/* DRAWER */
.drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 320px;
  height: 100%;
  background-color: var(--bg-surface);
  z-index: 250;
  box-shadow: var(--shadow-lg);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.drawer.active {
  right: 0;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--slate-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

/* STEPPERS */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--slate-border);
  z-index: 1;
  transform: translateY(-50%);
}

.step-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 2px solid var(--slate-border);
  color: var(--slate-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  position: relative;
  z-index: 2;
  transition: all 0.2s;
}

.step-item.active {
  border-color: var(--primary);
  background-color: var(--primary);
  color: white;
}

.step-item.completed {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
}

/* FORMS */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-navy);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-border);
  background-color: var(--bg-surface);
  color: var(--dark-navy);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.upload-dropzone {
  border: 2px dashed var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  background-color: var(--bg-muted);
  transition: all 0.2s;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

/* CHART SIMULATION */
.chart-container {
  width: 100%;
  height: 220px;
  position: relative;
}

/* TOAST NOTIFICATION */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--dark-navy);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   PROFILE PAGE ENHANCEMENT STYLES & MOBILE RESPONSIVENESS
   ========================================================================== */

/* Profile Hero Card */
.profile-hero-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.profile-cover-banner {
  height: 160px;
  background: linear-gradient(135deg, #059669 0%, #0d9488 40%, #0f172a 100%);
  position: relative;
}

.profile-cover-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
}

.profile-body-container {
  padding: 0 20px 20px 20px;
  position: relative;
}

.profile-header-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: -50px;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .profile-header-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -60px;
  }
}

.profile-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .profile-avatar-wrapper {
    width: 110px;
    height: 110px;
  }
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--bg-surface);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.avatar-online-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid var(--bg-surface);
}

.avatar-edit-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  border: 2px solid var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.avatar-edit-btn:hover {
  transform: scale(1.1);
}

.profile-identity-info {
  flex: 1;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .profile-identity-info {
    margin-top: 0;
    padding-bottom: 4px;
  }
}

.profile-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

@media (min-width: 768px) {
  .profile-action-buttons {
    width: auto;
  }
}

/* Stats Overview Bar */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .profile-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.profile-stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
}

.stat-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sub-Tabbed Navigation Bar */
.profile-tabs-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.profile-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.profile-nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
}

.profile-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-medium);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.profile-tab-btn:hover {
  color: var(--primary);
  background-color: var(--bg-muted);
}

.profile-tab-btn.active {
  color: #ffffff;
  background-color: var(--primary);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toggle Switches */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--slate-border);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background-color: var(--primary);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* Tag Pills */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background-color: var(--bg-muted);
  color: var(--dark-navy);
  border: 1px solid var(--slate-border);
  cursor: pointer;
  transition: all 0.2s;
}

.tag-pill:hover,
.tag-pill.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Payment Method Cards */
.payment-card {
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  padding: 16px;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s;
}

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

/* Document Cards */
.doc-card {
  border: 1px dashed var(--slate-border);
  border-radius: var(--radius-md);
  padding: 16px;
  background-color: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s;
}

.doc-card:hover {
  background-color: var(--bg-surface);
  border-color: var(--primary);
}

/* Form Layout Grid Helpers */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* CAMPUS AUTO-SWIPING PHOTO CAROUSEL (FULL BLEED - BREAKS OUT OF APP-CONTAINER) */
.campus-swiper-wrapper {
  width: calc(100% + 32px);
  margin-left: -16px;
  margin-top: -24px;
  position: relative;
  overflow: hidden;
  background-color: #0F172A;
  border-radius: 0;
}

@media (min-width: 768px) {
  .campus-swiper-wrapper {
    width: calc(100% + 48px);
    margin-left: -24px;
    margin-top: -24px;
  }
}

/* TEACHER HERO GREETING CARD (FULL BLEED, FLUSH WITH SWIPER) */
.greeting-card-school {
  width: calc(100% + 32px);
  margin-left: -16px;
  margin-bottom: 28px;
  padding: 8px 8px;
  background: linear-gradient(135deg, #0f172a 0%, #0369a1 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 !important;
  box-shadow: 0 4px 24px rgba(3, 105, 161, 0.25);
  overflow: visible;
  color: #fff;
  position: relative;
}

@media (min-width: 768px) {
  .greeting-card-school {
    width: calc(100% + 48px);
    margin-left: -24px;
    padding: 10px 12px;
  }
}


.campus-swiper-container {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .campus-swiper-container {
    height: 240px;
  }
}

.campus-swiper-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.campus-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

.campus-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.campus-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 32px;
  color: #ffffff;
}

.campus-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(5, 150, 105, 0.9);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  width: fit-content;
  backdrop-filter: blur(4px);
}

.campus-slide-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
  .campus-slide-title {
    font-size: 28px;
  }
}

.campus-slide-subtitle {
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 500;
}

/* Swiper Controls */
.campus-swiper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.campus-swiper-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.08);
}

.campus-swiper-btn.prev-btn {
  left: 16px;
}

.campus-swiper-btn.next-btn {
  right: 16px;
}

/* Swiper Dots */
.campus-swiper-dots {
  position: absolute;
  bottom: 16px;
  right: 28px;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.campus-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.campus-dot.active {
  width: 28px;
  border-radius: 6px;
  background: var(--primary);
}

/* ==========================================
   STUDENT ATTENDANCE MODULE STYLES
   ========================================== */
.attendance-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--slate-border);
}

.att-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .att-stats-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

.att-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.att-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.att-stat-label {
  font-size: 12px;
  color: var(--slate-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.att-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark-navy);
}

.att-segment {
  display: inline-flex;
  background: var(--bg-muted);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--slate-border);
  gap: 3px;
}

.att-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-medium);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.att-btn:hover {
  color: var(--dark-navy);
  background: rgba(0, 0, 0, 0.04);
}

.att-btn.present.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.att-btn.absent.active {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.att-btn.late.active {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.student-att-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.student-att-row:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

[data-theme="dark"] .student-att-row:hover {
  background: rgba(5, 150, 105, 0.12);
}

.roll-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--dark-navy);
  font-weight: 800;
  font-size: 13px;
  border: 1px solid var(--slate-border);
}

.att-sticky-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--slate-border);
  padding: 12px 24px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-present {
  background: #dcfce7;
  color: #15803d;
}

.badge-absent {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-late {
  background: #fef3c7;
  color: #b45309;
}

.badge-leave {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-unrecorded {
  background: #f1f5f9;
  color: #64748b;
  border: 1px dashed #cbd5e1;
}

/* Quick Reason Preset Buttons */
.quick-reason-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  animation: fadeIn 0.2s ease-in-out;
}

.quick-reason-pill {
  border: 1px solid var(--slate-border);
  background: var(--bg-muted);
  color: var(--slate-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.quick-reason-pill:hover {
  background: var(--slate-border);
  color: var(--dark-navy);
  transform: translateY(-1px);
}

.quick-reason-pill.active-absent {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
  font-weight: 700;
}

.quick-reason-pill.active-late {
  background: #fef3c7;
  color: #d97706;
  border-color: #fcd34d;
  font-weight: 700;
}

/* Enhanced Desktop Responsiveness */
@media (min-width: 1024px) {
  .student-att-row {
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
  }

  .student-att-row .att-segment {
    justify-self: end;
  }
}



/* ==========================================================================
   ADVANCED ATTENDANCE SYSTEM: WORKPLACE SELECTOR, DUTY CARD & MONTHLY MATRIX
   ========================================================================== */

/* Workplace Switcher Grid */
.workplace-switcher-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
}

.workplace-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1.5px solid var(--slate-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 260px;
  flex: 1;
  user-select: none;
}

.workplace-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.workplace-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(13, 148, 136, 0.04) 100%);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.15);
}

.workplace-icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  color: var(--slate-dark);
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.workplace-card.active .workplace-icon-bubble {
  background: var(--primary);
  color: #ffffff;
}

/* Scheduled Duty Routine Highlight Banner */
.duty-highlight-card {
  background: linear-gradient(135deg, #065f46 0%, #047857 50%, #0d9488 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.2);
  }

  100% {
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
  }
}

.duty-highlight-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 260px;
}

.duty-badge-glow {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.duty-details h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.2px;
}

.duty-meta-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.duty-meta-tag {
  background: rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Mode Segmented Switcher */
.mode-segmented-control {
  display: inline-flex;
  background: var(--bg-muted);
  border: 1px solid var(--slate-border);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  user-select: none;
}

.mode-segment-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--slate-medium);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.mode-segment-btn:hover {
  color: var(--dark-navy);
}

.mode-segment-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-border);
}

/* 4-State Attendance Button Set (Present, Absent, Late, Excused Leave) */
.att-btn.leave.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* Monthly Matrix Container */
.monthly-matrix-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  position: relative;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  min-width: 1180px;
}

.matrix-table th,
.matrix-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--slate-border);
  border-right: 1px solid var(--slate-border);
  text-align: center;
  vertical-align: middle;
}

.matrix-table thead th {
  background: var(--bg-muted);
  color: var(--dark-navy);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
}

.matrix-sticky-student {
  position: sticky;
  left: 0;
  background: var(--bg-surface);
  z-index: 5;
  text-align: left !important;
  min-width: 220px;
  max-width: 240px;
  box-shadow: 3px 0 8px rgba(0, 0, 0, 0.04);
}

.matrix-table thead th.matrix-sticky-student {
  z-index: 15;
  background: var(--bg-muted);
}

.matrix-sticky-rate {
  position: sticky;
  right: 0;
  background: var(--bg-surface);
  z-index: 5;
  min-width: 90px;
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.04);
}

.matrix-table thead th.matrix-sticky-rate {
  z-index: 15;
  background: var(--bg-muted);
}

.matrix-th-day {
  min-width: 38px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.matrix-th-day:hover {
  background: rgba(5, 150, 105, 0.1);
}

.matrix-th-today {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.15) 0%, rgba(5, 150, 105, 0.05) 100%) !important;
  border-left: 2px solid var(--primary) !important;
  border-right: 2px solid var(--primary) !important;
  color: var(--primary) !important;
}

.matrix-weekend {
  background: rgba(100, 116, 139, 0.06);
}

/* Interactive Matrix Cell Button */
.matrix-cell-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  color: var(--slate-medium);
  user-select: none;
}

.matrix-cell-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.matrix-cell-btn.status-p {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

.matrix-cell-btn.status-a {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3);
}

.matrix-cell-btn.status-l {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.matrix-cell-btn.status-lv {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

.matrix-cell-btn.status-empty {
  border: 1px dashed var(--slate-border);
  color: var(--slate-light);
  background: rgba(0, 0, 0, 0.01);
}

.matrix-cell-btn.saving {
  animation: cellPulse 0.4s ease-in-out infinite alternate;
}

@keyframes cellPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.matrix-summary-row td {
  background: var(--bg-muted);
  font-weight: 800;
  font-size: 11px;
}

/* ==========================================================================
   SMART SHEET IMPORT WORKBENCH & DEMO SAMPLE SHEET MODAL
   ========================================================================== */

/* Drag & Drop File Zone */
.sheet-dropzone {
  border: 2px dashed var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  background: var(--bg-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.sheet-dropzone:hover,
.sheet-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(5, 150, 105, 0.05);
  transform: scale(1.01);
}

.sheet-dropzone-icon {
  font-size: 44px;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

/* Workbench Metrics Bar */
.workbench-metrics-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-muted);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.metric-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  color: var(--dark-navy);
}

.metric-pill.success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.metric-pill.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.3);
}

.metric-pill.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Staging Table & Inputs */
.staging-table-wrapper {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.staging-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.staging-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-muted);
  color: var(--dark-navy);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid var(--slate-border);
  text-align: left;
  z-index: 2;
}

.staging-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--slate-border);
  vertical-align: middle;
}

.staging-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .staging-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.staging-select-status {
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 6px;
  border: 1.5px solid var(--slate-border);
  background: var(--bg-surface);
  color: var(--dark-navy);
  cursor: pointer;
  outline: none;
}

.staging-select-status.status-P {
  border-color: #10b981;
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
}

.staging-select-status.status-A {
  border-color: #ef4444;
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
}

.staging-select-status.status-L {
  border-color: #f59e0b;
  color: #d97706;
  background: rgba(245, 158, 11, 0.08);
}

.staging-select-status.status-LV {
  border-color: #3b82f6;
  color: #2563eb;
  background: rgba(59, 130, 246, 0.08);
}

.staging-input {
  width: 100%;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--slate-border);
  background: var(--bg-surface);
  color: var(--dark-navy);
  outline: none;
}

.staging-input:focus {
  border-color: var(--primary);
}

/* Validation Alert Box */
.validation-alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.validation-alert-box.valid {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
}

.validation-alert-box.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
}

/* Demo Sample Preview Table */
.demo-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0;
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.demo-preview-table th {
  background: var(--bg-muted);
  padding: 8px 12px;
  font-weight: 700;
  border: 1px solid var(--slate-border);
}

.demo-preview-table td {
  padding: 8px 12px;
  border: 1px solid var(--slate-border);
}

/* WORKBENCH TARGET CONTEXT BAR */
.workbench-context-bar {
  background: var(--bg-muted);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.wb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 170px;
}

.wb-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--slate-light);
  margin: 0;
}

.wb-select,
.wb-input {
  font-weight: 600;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--slate-border);
  background: var(--bg-surface);
  color: var(--dark-navy);
  transition: all 0.2s ease;
}

.wb-select:focus,
.wb-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.wb-day-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--primary);
  white-space: nowrap;
}

.wb-duty-mini-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
  animation: pulseGlow 2s infinite ease-in-out;
}

/* SMART ONE-CLICK IN-ROW STATUS SEGMENTED PILLS */
.staging-status-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: 20px;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.status-pill-btn {
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--slate-light);
  line-height: 1.2;
}

.status-pill-btn:hover {
  transform: translateY(-1px);
}

.status-pill-btn.pill-p:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.status-pill-btn.pill-p.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.45);
  transform: scale(1.04);
}

.status-pill-btn.pill-a:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.status-pill-btn.pill-a.active {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
  transform: scale(1.04);
}

.status-pill-btn.pill-l:hover {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.status-pill-btn.pill-l.active {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
  transform: scale(1.04);
}

.status-pill-btn.pill-lv:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.status-pill-btn.pill-lv.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.45);
  transform: scale(1.04);
}

/* SMART ONE-CLICK BATCH COMMAND TOOLBAR */
.workbench-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.cyber-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--slate-border);
  background: var(--bg-surface);
  color: var(--dark-navy);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cyber-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-muted);
  transform: translateY(-1px);
}

.cyber-btn.btn-p {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.cyber-btn.btn-p:hover {
  background: #10b981;
  color: #ffffff;
}

.cyber-btn.btn-a {
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.cyber-btn.btn-a:hover {
  background: #ef4444;
  color: #ffffff;
}

.cyber-btn.btn-invert {
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.05);
}

.cyber-btn.btn-invert:hover {
  background: #7c3aed;
  color: #ffffff;
}

.cyber-btn.btn-time {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.05);
}

.cyber-btn.btn-time:hover {
  background: #2563eb;
  color: #ffffff;
}

.cyber-btn.btn-match {
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.05);
}

.cyber-btn.btn-match:hover {
  background: #0d9488;
  color: #ffffff;
}

/* SMART DAILY FILTER TOOLBAR & QUICK BUTTONS */
.daily-smart-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.daily-filter-pill {
  border: 1px solid var(--slate-border);
  background: var(--bg-surface);
  color: var(--slate-dark);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.daily-filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.daily-filter-pill.active {
  background: var(--dark-navy);
  color: #ffffff;
  border-color: var(--dark-navy);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.daily-filter-pill .filter-count {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

.daily-filter-pill.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.daily-filter-pill.pill-unrecorded.active {
  background: #64748b;
  border-color: #64748b;
}

.daily-filter-pill.pill-present.active {
  background: #10b981;
  border-color: #10b981;
}

.daily-filter-pill.pill-absent.active {
  background: #ef4444;
  border-color: #ef4444;
}

.daily-filter-pill.pill-late.active {
  background: #f59e0b;
  border-color: #f59e0b;
}

.daily-filter-pill.pill-leave.active {
  background: #3b82f6;
  border-color: #3b82f6;
}

/* Focused student row during keyboard roll call */
.student-att-row.keyboard-active {
  outline: 2px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
  background: rgba(5, 150, 105, 0.03);
}

/* ==========================================================================
   SMART TEACHING SCHEDULE & LIVE ROUTINE COCKPIT
   ========================================================================== */
.smart-schedule-cockpit-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--slate-border, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.schedule-cockpit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.schedule-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 99, 71, 0.15) 0%, rgba(255, 99, 71, 0.05) 100%);
  color: #ff6347;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid rgba(255, 99, 71, 0.25);
  flex-shrink: 0;
}

.schedule-heading-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-main-heading {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  margin: 0;
}

.schedule-today-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  font-weight: 700;
  border-radius: 14px;
}

.live-active-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 14px;
}

.live-active-counter-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.schedule-subheading {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  margin-top: 1px;
  margin-bottom: 0;
}

.schedule-cockpit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-filter-pills {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-muted, #f1f5f9);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--slate-border, #e2e8f0);
}

.sched-pill {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.sched-pill:hover {
  color: var(--text-dark, #0f172a);
  background: rgba(255, 255, 255, 0.6);
}

.sched-pill.active {
  background: #ffffff;
  color: var(--text-dark, #0f172a);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sched-pill-count {
  font-size: 9.5px;
  padding: 0 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

.sched-pill.active .sched-pill-count {
  background: rgba(255, 99, 71, 0.15);
  color: #ff6347;
}

.btn-see-full-routine {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff6347 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 99, 71, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-see-full-routine:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(255, 99, 71, 0.4);
}

.btn-see-full-routine .btn-arrow-badge {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  margin-left: 2px;
}

/* SPOTLIGHT BANNER */
.upcoming-spotlight-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.02) 0%, rgba(255, 99, 71, 0.04) 100%);
  border: 1px solid rgba(255, 99, 71, 0.2);
  border-left: 4px solid #ff6347;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.upcoming-spotlight-card.is-empty {
  border-left-color: #94a3b8;
  border-color: #e2e8f0;
  background: var(--bg-muted, #f8fafc);
}

.spotlight-left {
  flex: 1;
  min-width: 260px;
}

.spotlight-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.spotlight-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.spotlight-status-badge.upcoming {
  background: #fef3c7;
  color: #b45309;
}

.spotlight-status-badge.live-pulse {
  background: #fee2e2;
  color: #dc2626;
}

.spotlight-time-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface, #ffffff);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--slate-border, #e2e8f0);
}

.spotlight-class-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.spotlight-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.spotlight-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spotlight-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-spotlight-live {
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-spotlight-sec {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* SHARED SCHEDULE UTILITIES */
.sched-pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-red 1.5s infinite;
}

/* SCHEDULE COCKPIT FOOTER */
.schedule-cockpit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--slate-border, #f1f5f9);
}

.schedule-footer-stats {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.btn-open-full-routine-link {
  background: none;
  border: none;
  color: #ff6347;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-open-full-routine-link:hover {
  background: #fff1f0;
}

/* ==========================================================================
   FULL WEEKLY MASTER ROUTINE MODAL POPUP
   ========================================================================== */
.full-routine-modal-card {
  max-width: 960px !important;
  width: 95% !important;
  max-height: 88vh !important;
  display: flex;
  flex-direction: column;
  border-radius: 18px !important;
  overflow: hidden;
  padding: 0 !important;
}

.full-routine-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.full-routine-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.full-routine-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.full-routine-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.full-routine-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.full-routine-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-routine-action {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-routine-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-routine-close {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s ease;
}

.btn-routine-close:hover {
  background: rgba(239, 68, 68, 0.8);
}

.full-routine-toolbar {
  padding: 14px 24px;
  background: var(--bg-surface, #ffffff);
  border-bottom: 1px solid var(--slate-border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.full-routine-day-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.modal-day-tab {
  border: 1px solid var(--slate-border, #e2e8f0);
  background: var(--bg-muted, #f8fafc);
  color: var(--text-muted, #64748b);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.modal-day-tab:hover {
  background: #ffffff;
  color: var(--text-dark, #0f172a);
}

.modal-day-tab.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 700;
}

.modal-tab-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

.modal-day-tab.active .modal-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.full-routine-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-context-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-muted, #f1f5f9);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--slate-border, #e2e8f0);
}

.modal-ctx-pill {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-ctx-pill:hover {
  color: var(--text-dark, #0f172a);
}

.modal-ctx-pill.active {
  background: #ffffff;
  color: var(--text-dark, #0f172a);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.modal-routine-search-box {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 360px;
}

.modal-routine-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
}

.modal-routine-search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  font-size: 12px;
  border: 1px solid var(--slate-border, #cbd5e1);
  border-radius: 8px;
  background: var(--bg-surface, #ffffff);
  color: var(--text-dark, #0f172a);
  outline: none;
  transition: border-color 0.15s ease;
}

.modal-routine-search-box input:focus {
  border-color: #ff6347;
  box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.15);
}

.full-routine-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  background: var(--bg-muted, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-routine-day-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-routine-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--slate-border, #e2e8f0);
}

.modal-routine-day-header.is-today-header {
  border-left: 4px solid #ff6347;
  background: linear-gradient(135deg, rgba(255, 99, 71, 0.05) 0%, #ffffff 100%);
}

.modal-day-icon {
  color: #ff6347;
  font-size: 14px;
}

.modal-day-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
}

.modal-day-count-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  background: var(--bg-muted, #f1f5f9);
  padding: 2px 8px;
  border-radius: 12px;
}

.modal-routine-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 12px;
}

.modal-day-empty-row {
  grid-column: 1 / -1;
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.modal-timetable-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--slate-border, #e2e8f0);
  border-radius: 12px;
  gap: 10px;
  transition: all 0.15s ease;
}

.modal-timetable-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.modal-timetable-card.is-live-card {
  border-left: 4px solid var(--live-red, #ef4444);
}

.modal-time-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.m-time-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.m-period-tag {
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-muted, #f1f5f9);
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
}

.m-live-tag {
  font-size: 10px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modal-card-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.modal-card-inst {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modal-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  margin: 0;
}

.modal-card-desc {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  margin: 2px 0 0 0;
}

.modal-card-meta-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.m-chip {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modal-card-action {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--slate-border, #f1f5f9);
}

.full-routine-modal-footer {
  padding: 14px 24px;
  background: var(--bg-surface, #ffffff);
  border-top: 1px solid var(--slate-border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.modal-footer-stats-left {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 860px) {
  .modal-routine-cards-list {
    grid-template-columns: 1fr;
  }

  .full-routine-toolbar {
    padding: 12px 16px;
  }

  .full-routine-modal-body {
    padding: 14px 16px;
  }
}