/* ==========================================================================
   BatchPe — Enterprise EdTech & Subtle Neon SaaS Design System (v5.0)
   60% Neutral Surfaces • 30% Deep Navy & EdTech Blue • 10% Emerald & Amber
   ========================================================================== */

:root {
  /* 60% Neutral Cognitive-Ease Surfaces */
  --bg: #E8EEF6;
  --surface: #F4F7FB;
  --card-bg: #FFFFFF;
  --input-bg: #FFFFFF;
  --border: #DCE4EE;
  --border-strong: #CBD5E1;

  /* 30% Deep Navy & Friendly EdTech Blue */
  --navy: #0B192C;
  --navy-mid: #132847;
  --navy-light: #1E3A63;
  --blue: #2563EB;
  --blue-soft: #EFF6FF;
  --slate: #475569;
  --muted-text: #64748B;

  /* 10% Subtle Neon Emerald & Sunny Amber Accents */
  --green: #0F9D58;
  --green-bright: #10B981;
  --green-mint: #34D399;
  --green-dark: #0A7B44;
  --sage: #E8F8F0;
  --amber: #F59E0B;
  --yellow-accent: #FACC15;
  --red: #DC2626;
  --red-soft: #FEF2F2;

  /* Shadows, Motion & Layout Tokens */
  --shadow-sm: 0 2px 8px rgba(11, 25, 44, 0.04);
  --shadow-md: 0 10px 26px rgba(11, 25, 44, 0.08);
  --shadow-lg: 0 22px 48px rgba(11, 25, 44, 0.16);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sidebar-w: 260px;
}

/* ==================== DARK SAAS THEME OVERRIDES ==================== */
[data-theme="dark"] {
  --bg: #050B14;
  --surface: #0A1322;
  --card-bg: #101D33;
  --input-bg: #0C1729;
  --border: #1D3152;
  --border-strong: #2A436D;

  --navy: #F1F5F9;
  --slate: #CBD5E1;
  --muted-text: #94A3B8;
  --blue-soft: rgba(37, 99, 235, 0.16);
  --sage: rgba(16, 185, 129, 0.14);
  --red-soft: rgba(220, 38, 38, 0.15);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 24px 54px rgba(0, 0, 0, 0.52);
}

/* ==================== RESET & BASE TYPOGRAPHY ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--navy);
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  line-height: 1.45;
  transition: background-color 0.22s ease, color 0.22s ease;
}

.mono-text {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.3px;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--surface);
  position: relative;
}

/* ==================== KEYFRAME ANIMATIONS ==================== */
@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================== AUTHENTICATION & ONBOARDING SCREEN ==================== */
.auth-screen {
  min-height: 100vh;
  background: radial-gradient(circle at top right, #17345E 0%, #0B192C 54%, #060D18 100%);
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  width: 100%;
  max-width: 1060px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

.auth-showcase {
  display: none;
  color: #F8FAFC;
  padding-right: 12px;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34D399;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 13px;
  border-radius: 99px;
  letter-spacing: 0.6px;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  animation: pulseDot 2s infinite;
  flex-shrink: 0;
}

.showcase-heading {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.7px;
  margin-bottom: 14px;
  color: #FFFFFF;
}

.showcase-sub {
  font-size: 0.96rem;
  color: #CBD5E1;
  line-height: 1.58;
  margin-bottom: 24px;
}

.showcase-features {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.showcase-feat {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 14px 16px;
  border-radius: 15px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.showcase-feat:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(52, 211, 153, 0.35);
}

.feat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(52, 211, 153, 0.16);
  color: #34D399;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.showcase-feat strong {
  display: block;
  font-size: 0.92rem;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.showcase-feat span {
  font-size: 0.8rem;
  color: #94A3B8;
  line-height: 1.42;
}

.auth-panel {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-hero {
  text-align: center;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.logo-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
  border-radius: 20px;
  overflow: hidden;
  background: #0B192C;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(52, 211, 153, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gentleFloat 4s ease-in-out infinite;
}

.auth-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #34D399;
}

.auth-title {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: #FFFFFF;
}

.auth-title span {
  color: #34D399;
}

.auth-tagline {
  font-size: 0.82rem;
  color: #CBD5E1;
  margin-top: 3px;
}

.role-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(255, 255, 255, 0.09);
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.role-pill {
  border: none;
  background: transparent;
  color: #CBD5E1;
  padding: 9px 6px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
}

.role-pill.active {
  background: #34D399;
  color: #06281E;
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.35);
}

.auth-card {
  background: #FFFFFF;
  color: #0B192C;
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.auth-card .field-label {
  color: #475569;
}

.auth-card input {
  background: #FFFFFF;
  color: #0B192C;
  border-color: #DCE4EE;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #EEF2F6;
  padding: 4px;
  border-radius: 13px;
  margin-bottom: 12px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 9px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.83rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: #FFFFFF;
  color: #0B192C;
  box-shadow: 0 3px 10px rgba(11, 25, 44, 0.1);
}

.role-hint {
  font-size: 0.77rem;
  color: #475569;
  background: #F1F5F9;
  padding: 8px 11px;
  border-radius: 9px;
  margin-bottom: 6px;
  line-height: 1.42;
}

/* ==================== WORKSPACE FRAME: DESKTOP SIDEBAR + MAIN ==================== */
.workspace-frame {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.desktop-sidebar {
  display: none;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #081220 0%, #0B192C 58%, #102440 100%);
  color: #F8FAFC;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 12px;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
  transition: width 0.25s var(--ease-spring);
  z-index: 35;
}

.desktop-sidebar.collapsed {
  width: 76px;
}

.desktop-sidebar.collapsed .sidebar-brand-text,
.desktop-sidebar.collapsed .sidebar-section-label,
.desktop-sidebar.collapsed .nav-text,
.desktop-sidebar.collapsed .tool-label,
.desktop-sidebar.collapsed .ws-switcher-label,
.desktop-sidebar.collapsed .ws-name-truncate,
.desktop-sidebar.collapsed .ws-swap-badge {
  display: none;
}

.desktop-sidebar.collapsed .sidebar-nav-btn,
.desktop-sidebar.collapsed .sidebar-tool-btn,
.desktop-sidebar.collapsed .ws-switch-btn {
  justify-content: center;
  padding: 11px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-role-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #34D399;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-collapse-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.sidebar-collapse-btn:hover {
  background: rgba(52, 211, 153, 0.18);
  color: #34D399;
}

/* Phase 2: 1-Phone Dual-Workspace Switcher Card */
.workspace-switcher-card {
  margin-top: 12px;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 12px;
  padding: 8px;
}

.ws-switcher-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #93C5FD;
  margin-bottom: 5px;
  padding-left: 2px;
}

.ws-switch-btn {
  width: 100%;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(11, 25, 44, 0.85);
  color: #FFFFFF;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ws-switch-btn:hover {
  border-color: #34D399;
  background: rgba(16, 185, 129, 0.16);
}

.ws-name-truncate {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-swap-badge {
  background: #34D399;
  color: #06281E;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

.ws-mobile-pill {
  background: rgba(52, 211, 153, 0.16);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: #64748B;
  margin: 16px 8px 6px;
}

.sidebar-nav,
.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-btn,
.sidebar-tool-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #CBD5E1;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.sidebar-nav-btn:hover,
.sidebar-tool-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
}

.sidebar-nav-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(37, 99, 235, 0.22));
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.34);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.14);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.danger-tool:hover {
  background: rgba(220, 38, 38, 0.16);
  color: #FCA5A5;
}

.workspace-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 84px;
}

/* ==================== STICKY TOPBAR ==================== */
.topbar {
  background: #0B192C;
  color: #FFFFFF;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 25;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-page-title {
  display: none;
  font-size: 1.12rem;
  font-weight: 800;
  color: #FFFFFF;
}

.header-logo {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(52, 211, 153, 0.35);
  flex-shrink: 0;
}

.brand {
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.brand-batch {
  color: #FFFFFF;
}

.brand-pe {
  color: #34D399;
}

.brand-sub {
  font-size: 0.73rem;
  color: #94A3B8;
  margin-top: 2px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.badge-sync {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.71rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2E8F0;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-sync::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  animation: pulseDot 2s infinite;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 33px;
  height: 33px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s var(--ease-bounce), background 0.2s ease;
}

.icon-btn:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.4);
}

.icon-btn:active {
  transform: scale(0.88);
}

.dark-icon {
  background: #E2E8F0;
  color: #0B192C;
  border: none;
}

/* ==================== MAIN CONTAINER, KPI GRIDS & ANALYTICS ==================== */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: floatUp 0.26s var(--ease-spring) both;
}

.welcome-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.welcome-title {
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--navy);
}

.quick-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 4-Card Enterprise KPI Strip */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease;
}

.kpi-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.kpi-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--muted-text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kpi-value {
  font-size: 1.48rem;
  font-weight: 800;
  color: var(--navy);
  margin: 4px 0 2px;
  letter-spacing: -0.4px;
}

.kpi-foot {
  font-size: 0.73rem;
  color: var(--slate);
  font-weight: 600;
}

.text-green {
  color: var(--green-bright) !important;
}

.text-red {
  color: var(--red) !important;
}

.text-blue {
  color: var(--blue) !important;
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--green-bright));
  border-radius: 10px;
  transition: width 0.5s var(--ease-spring);
}

.analytics-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.analytics-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--navy);
}

.bar-track {
  width: 100%;
  height: 7px;
  background: var(--surface);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green-bright));
  border-radius: 99px;
  transition: width 0.45s var(--ease-spring);
}

/* ==================== TOOLBARS, FILTERS, PAGINATION & CARDS ==================== */
.toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar-inputs {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 240px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.compact-search {
  max-width: 220px;
  padding: 8px 11px;
  font-size: 0.82rem;
}

.compact-select {
  width: auto;
  min-width: 135px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.filter-row {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--slate);
  padding: 7px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.79rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.chip.active {
  background: #0B192C;
  color: #34D399;
  border-color: #0B192C;
  box-shadow: 0 4px 12px rgba(11, 25, 44, 0.16);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  background: var(--card-bg);
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.35);
  }
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.item-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--navy);
}

.item-sub {
  font-size: 0.79rem;
  color: var(--muted-text);
  margin-top: 2px;
  font-weight: 500;
}

.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pagination-bar:empty {
  display: none;
}

.page-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--navy);
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.page-btn.active {
  background: var(--blue);
  color: #FFFFFF;
  border-color: var(--blue);
}

/* ==================== DESKTOP SAAS TABLES ==================== */
.table-wrap {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.saas-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--slate);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.saas-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--navy);
  vertical-align: middle;
}

.saas-table tbody tr:last-child td {
  border-bottom: none;
}

.saas-table tbody tr:hover {
  background: var(--blue-soft);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

/* ==================== AVATARS, 360° DRAWER, QR & RECEIPT (PHASE 1) ==================== */
.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stu-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #0B192C;
  color: #34D399;
  font-weight: 800;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.stu-avatar-lg {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: #0B192C;
  color: #34D399;
  font-weight: 800;
  font-size: 1.12rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--green-bright);
}

.tap-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.tap-zone:hover .item-title {
  color: var(--blue);
  text-decoration: underline;
}

.qr-frame {
  display: inline-flex;
  padding: 14px;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(11, 25, 44, 0.08);
}

.receipt-paper {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #FFFFFF;
  color: #0B192C;
}

.receipt-head {
  background: linear-gradient(135deg, #0B192C, #1E3A63);
  color: #FFFFFF;
  padding: 14px 16px;
  text-align: center;
}

.receipt-body {
  padding: 15px 16px;
  position: relative;
}

.paid-stamp {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border: 2px solid #0F9D58;
  color: #0F9D58;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 1px;
  border-radius: 8px;
  transform: rotate(-3deg);
}

.partial-stamp {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border: 2px solid #D97706;
  color: #D97706;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 1px;
  border-radius: 8px;
  transform: rotate(-3deg);
}

/* ==================== PRINCIPAL CLASS GRID & TEACHER REMINDERS ==================== */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.class-tile {
  background: var(--card-bg);
  padding: 15px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s var(--ease-bounce), border-color 0.2s ease, box-shadow 0.2s ease;
}

.class-tile:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.inspect-drawer {
  border: 1.5px solid var(--blue);
}

.pro-tag {
  background: #0B192C;
  color: #34D399;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.circular-banner {
  background: var(--blue-soft);
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  padding: 13px 15px;
  border-radius: 15px;
  margin-bottom: 12px;
}

.reminder-box {
  background: rgba(250, 204, 21, 0.12);
  border: 1.5px solid rgba(245, 158, 11, 0.42);
  padding: 12px 14px;
  border-radius: 15px;
  margin-bottom: 14px;
}

.reminder-input-grid {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 8px;
}

.reminder-input-grid input {
  padding: 8px 10px;
  font-size: 0.82rem;
}

.reminder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.reminder-list:empty {
  display: none;
}

.reminder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.81rem;
}

.reminder-item.done span {
  text-decoration: line-through;
  opacity: 0.55;
}

/* ==================== BUTTONS, FORMS & INPUTS ==================== */
.actions {
  display: flex;
  gap: 7px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.btn-wa {
  flex: 1;
  background: linear-gradient(135deg, var(--green), var(--green-bright));
  color: #FFFFFF;
  text-decoration: none;
  text-align: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(15, 157, 88, 0.2);
}

.btn-call {
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid rgba(37, 99, 235, 0.25);
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-toggle {
  background: var(--sage);
  color: var(--green-dark);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 8px 11px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-del {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.25);
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline-sm {
  background: var(--sage);
  color: var(--green-dark);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-outline-sm:hover {
  background: rgba(16, 185, 129, 0.2);
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-pending {
  background: var(--red-soft);
  color: var(--red);
}

.status-paid {
  background: var(--sage);
  color: var(--green-bright);
}

.status-partial,
.status-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #D97706;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 14px;
}

.form-card h3 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--navy);
}

.warn-surface {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

.success-surface {
  background: var(--sage);
  border-color: rgba(16, 185, 129, 0.35);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate);
  margin: 8px 0 4px;
}

input,
select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--input-bg);
  color: var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stack-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-bright));
  color: #FFFFFF;
  border: none;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(15, 157, 88, 0.25);
  transition: transform 0.16s var(--ease-bounce), box-shadow 0.2s ease;
}

.btn-primary:hover {
  box-shadow: 0 7px 18px rgba(16, 185, 129, 0.35);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 11px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 11px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

.full-btn {
  width: 100%;
  margin-top: 8px;
}

.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.search-row .search-box {
  flex: 1;
  min-width: 180px;
}

.count-pill {
  background: #0B192C;
  color: #34D399;
  padding: 9px 13px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  gap: 10px;
  flex-wrap: wrap;
}

.sub-caption {
  font-size: 0.77rem;
  color: var(--muted-text);
  margin-top: 2px;
  font-weight: 500;
}

.section-header select {
  width: auto;
  min-width: 150px;
  font-weight: 600;
}

.att-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.att-counter {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
}

.link-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.81rem;
  cursor: pointer;
}

.att-row {
  cursor: pointer;
  user-select: none;
}

.att-check {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
  pointer-events: none;
}

.absent-box {
  margin-top: 15px;
  background: var(--red-soft);
  border: 1px solid rgba(220, 38, 38, 0.25);
  padding: 14px;
  border-radius: 16px;
}

.absent-box h4 {
  color: var(--red);
  font-size: 0.92rem;
  font-weight: 800;
}

.empty-state {
  text-align: center;
  color: var(--muted-text);
  padding: 28px 16px;
  font-size: 0.86rem;
  line-height: 1.45;
  background: var(--card-bg);
  border-radius: 15px;
  border: 1px dashed var(--border);
}

.notice-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

/* ==================== EXAM MARKS & RANK ENTRY (PHASE 2) ==================== */
.exam-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.marks-input {
  width: 82px !important;
  text-align: center;
  font-weight: 800;
  padding: 7px 8px;
}

.rank-badge {
  background: #0B192C;
  color: #FACC15;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ==================== BULK EXCEL & 75% ATTENDANCE REPORT ==================== */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 12px;
  background: var(--surface);
  border: 2px dashed var(--muted-text);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-zone:hover {
  border-color: var(--green);
  background: var(--sage);
}

.preview-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  text-align: left;
}

.preview-table th {
  background: var(--surface);
  color: var(--navy);
  font-weight: 800;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
}

.preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--slate);
  white-space: nowrap;
}

.att-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.att-stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 6px;
  text-align: center;
}

.att-stat-box strong {
  display: block;
  font-size: 1.05rem;
  color: var(--navy);
  margin-top: 2px;
}

.low-att-card {
  border-left: 4px solid var(--red);
  background: var(--red-soft);
}

/* ==================== MODALS, TOAST & 5-TAB MOBILE BOTTOM NAV ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 20, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--card-bg);
  color: var(--navy);
  width: 100%;
  max-width: 440px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.96);
  transition: transform 0.26s var(--ease-spring);
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0 6px;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  margin-top: 10px;
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: #0B192C;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.83rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease-bounce);
  z-index: 70;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 5-Tab Responsive Bottom Navigation for Mobile PWA */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 64px;
  z-index: 30;
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 20%;
  height: 3.5px;
  background: linear-gradient(90deg, var(--green), var(--green-mint));
  border-radius: 0 0 6px 6px;
  transition: transform 0.3s var(--ease-spring);
}

.nav-btn {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 700;
  font-size: 0.69rem;
  color: var(--muted-text);
  cursor: pointer;
}

.nav-icon {
  font-size: 1.02rem;
}

.nav-btn.active {
  color: var(--green-bright);
}

/* ==================== RESPONSIVE BREAKPOINTS (TABLET, LAPTOP & DESKTOP) ==================== */
@media (min-width: 640px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .dashboard-hero-grid {
    grid-template-columns: 1.15fr 1fr;
  }

  #attendanceList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (min-width: 900px) {
  .auth-container {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .auth-showcase {
    display: block;
  }

  .desktop-sidebar {
    display: flex;
  }

  .bottom-nav,
  .mobile-only-logo,
  .mobile-only-brand,
  .ws-mobile-pill {
    display: none !important;
  }

  .desktop-page-title {
    display: inline-block;
  }

  .workspace-main {
    padding-bottom: 32px;
  }

  .topbar {
    padding: 14px 24px;
  }

  .container {
    padding: 22px 24px;
  }

  .toast {
    bottom: 24px;
  }

  .desktop-split-2 {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
  }

  .desktop-split-students {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
  }

  #attendanceList {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1360px) {
  .class-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* ==================== SOLO TUTOR BATCH SELECTOR ==================== */
.solo-batch-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.batch-select-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.batch-select-row select {
  flex: 1;
}