/* ==========================================================================
   SKULORA DESIGN SYSTEM & RESPONSIVE BREAKPOINT ENGINE
   Apple-level Simplicity | Stripe-level Professionalism | Notion-level Clarity
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* 8px Grid Spacing Tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Typography Scale Tokens */
  --font-xs: 12px;
  --font-sm: 13px;
  --font-base: 14px;
  --font-md: 15px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 30px;
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Premium Education Operating System Tokens */
  --color-brand-primary: #6B5CE7;
  --color-brand-primary-hover: #5547D2;
  --color-brand-primary-pressed: #4537B8;
  --color-brand-light: #F0EDFF;
  
  --color-obsidian-950: #17151F;
  --color-obsidian-900: #17151F;
  --color-obsidian-800: #25203D;
  --color-obsidian-700: #383158;
  
  --color-slate-900: #17171A;
  --color-slate-800: #27272A;
  --color-slate-700: #3F3F46;
  --color-slate-600: #52525B;
  --color-slate-500: #71717A;
  --color-slate-400: #A1A1AA;
  --color-slate-300: #D4D4D8;
  --color-slate-200: #E5E2DB;
  --color-slate-100: #F7F5F0;
  --color-slate-50: #F7F5F0;
  
  /* Semantic Surfaces */
  --color-lavender-bg: #F0EDFF;
  --color-blue-bg: #EAF2FF;
  --color-mint-bg: #E8F6EF;
  --color-coral-bg: #FFF0EC;
  --color-amber-bg: #FFF5DE;
  
  --color-success: #16A34A;
  --color-success-bg: #E8F6EF;
  --color-warning: #D97706;
  --color-warning-bg: #FFF5DE;
  --color-danger: #DC2626;
  --color-danger-bg: #FFF0EC;
  --color-info: #2563EB;
  --color-info-bg: #EAF2FF;
  
  --color-surface: #FFFFFF;
  --color-body-bg: #F7F5F0;
  
  /* Component Standard Tokens */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-xs: 0 1px 3px rgba(23, 21, 31, 0.04);
  --shadow-sm: 0 2px 6px rgba(23, 21, 31, 0.06);
  --shadow-md: 0 6px 16px rgba(23, 21, 31, 0.08);
  --shadow-lg: 0 14px 28px -4px rgba(23, 21, 31, 0.12);
  
  --btn-height-desktop: 40px;
  --btn-height-mobile: 44px;
  --card-padding: 24px;
  
  /* Layout Spacing */
  --sidebar-width: 250px;
  --topbar-height: 64px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--color-body-bg);
  color: var(--color-slate-900);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-brand-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-brand-primary-hover);
}

/* ==========================================================================
   AUTHENTICATION 2-COLUMN SPLIT LAYOUT (DESKTOP & MOBILE)
   ========================================================================== */

.auth-split-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.auth-hero-panel {
  flex: 1;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-hero-panel::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.auth-hero-content h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #ffffff;
}

.auth-hero-content p {
  font-size: 16px;
  color: var(--color-slate-400);
  line-height: 1.6;
  max-width: 480px;
}

.auth-form-panel {
  width: 540px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

/* Input Icon Group Wrapper */
.input-icon-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-group .input-icon {
  position: absolute;
  left: 14px;
  font-size: 18px;
  color: var(--color-slate-400);
  pointer-events: none;
}

.input-icon-group .form-control {
  padding-left: 44px;
  height: 48px;
  font-size: 15px;
}

@media (max-width: 1023px) {
  .auth-hero-panel {
    display: none !important;
  }
  .auth-form-panel {
    width: 100%;
    min-height: 100vh;
    padding: 24px;
  }
}

/* FLOATING SMART ASSISTANT FAB PILL BUTTON STYLES */
.assistant-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 30px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  z-index: 1050;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  white-space: nowrap;
}

.assistant-fab .fab-label {
  display: inline-block;
  font-weight: 700;
}

.assistant-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

/* Smart Action Card System & Tinted Icon Containers */
.card-action {
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  cursor: pointer;
  position: relative;
}

.card-action:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: #D4D4D8;
}

.card-action .action-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
  background: var(--color-brand-light);
  color: var(--color-brand-primary);
}

.card-action.tint-lavender .action-icon-wrapper { background: #F0EDFF; color: #6B5CE7; }
.card-action.tint-blue .action-icon-wrapper { background: #EAF2FF; color: #2563EB; }
.card-action.tint-mint .action-icon-wrapper { background: #E8F6EF; color: #16A34A; }
.card-action.tint-amber .action-icon-wrapper { background: #FFF5DE; color: #D97706; }
.card-action.tint-coral .action-icon-wrapper { background: #FFF0EC; color: #DC2626; }

.card-action:active {
  transform: translateY(0);
}

.card-action .action-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--color-brand-primary);
  font-weight: 700;
}

.card-action:hover .action-arrow {
  transform: translateX(4px);
}

.assistant-modal-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.assistant-modal-backdrop.active {
  display: flex !important;
}

.assistant-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-slate-200);
  overflow: hidden;
}

@media (max-width: 576px) {
  .assistant-modal-backdrop {
    padding: 12px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .assistant-modal-card {
    max-width: 94vw !important;
    width: 100% !important;
    margin: auto !important;
    max-height: 85vh !important;
    border-radius: var(--radius-lg) !important;
  }
}

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

/* ==========================================================================
   LAYOUT ENGINE
   ========================================================================== */

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background-color: #15131C;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--color-slate-800);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.brand-badge {
  background: var(--color-brand-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mobile-sidebar-close {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 45;
}

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

.sidebar-nav {
  padding: 24px 16px;
  flex: 1;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-slate-500);
  letter-spacing: 0.8px;
  margin: 16px 12px 8px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  min-height: 40px;
  color: var(--color-slate-400);
  font-weight: 500;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  transition: all 0.15s ease;
}

.nav-item:hover {
  color: #ffffff;
  background-color: var(--color-slate-800);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(107, 92, 231, 0.18);
  border-left: 3px solid #7C5CFC;
  font-weight: 700;
  box-shadow: none;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--color-slate-800);
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--color-slate-800);
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-align: left;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-brand-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.user-meta {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--color-slate-400);
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  height: var(--topbar-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-slate-800);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.school-selector-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-slate-100);
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-slate-800);
  border: 1px solid var(--color-slate-200);
  white-space: nowrap;
}

.session-term-pill {
  background: var(--color-brand-light);
  color: var(--color-brand-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 767px) {
  #skuloraSyncChip {
    display: none !important;
  }
}

.app-content {
  padding: 32px;
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* UI COMPONENTS & DESIGN SYSTEM */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 32px;
  font-weight: 750;
  color: #12111A;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 6px 0;
}

.page-description, .page-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-slate-500);
  margin: 0;
}

.section-title {
  font-size: 20px;
  font-weight: 650;
  color: #12111A;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-slate-200);
  box-shadow: var(--shadow-xs);
  padding: 24px;
  margin-bottom: 24px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #12111A;
}

.card-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-slate-500);
  margin-top: 2px;
}

/* Grid & Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.stat-val {
  font-size: 32px;
  font-weight: 700;
  color: #12111A;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-slate-500);
  margin-top: 3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 38px;
  height: 38px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-primary {
  background-color: var(--color-brand-primary);
  color: #ffffff;
  border-color: var(--color-brand-primary);
}

.btn-primary:hover {
  background-color: var(--color-brand-primary-hover);
  border-color: var(--color-brand-primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--color-surface);
  border-color: var(--color-slate-200);
  color: var(--color-slate-700);
}

.btn-secondary:hover {
  background-color: var(--color-slate-100);
  border-color: var(--color-slate-300);
  color: var(--color-slate-900);
}

.btn-danger {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.btn-success {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #059669;
  border-color: #059669;
  color: #ffffff;
}

.btn-sm {
  padding: 4px 10px;
  min-height: 32px;
  height: 32px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 10px 20px;
  min-height: 44px;
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-slate-700);
  margin-bottom: 6px;
}

.form-control, .form-select {
  width: 100%;
  padding: 8px 12px;
  min-height: 40px;
  height: 40px;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  color: var(--color-slate-900);
  background-color: var(--color-surface);
  border: 1px solid var(--color-slate-300);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.form-control {
  min-height: 80px;
  height: auto;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-control.is-invalid {
  border-color: var(--color-danger);
}

.invalid-feedback {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 4px;
  font-weight: 500;
}

/* Alert Banners */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success {
  background-color: var(--color-success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background-color: var(--color-danger-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background: var(--color-slate-50);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-slate-500);
  border-bottom: 1px solid var(--color-slate-200);
  letter-spacing: 0.5px;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-slate-200);
  font-size: 13.5px;
  color: var(--color-slate-800);
}

.table tbody tr:hover td {
  background-color: var(--color-slate-50);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #ffe4e6; color: #be123c; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ==========================================================================
   STRICT MULTI-BREAKPOINT RESPONSIVE ENGINE
   ========================================================================== */

/* 1. DESKTOP VIEWPORT (>= 1024px) */
@media (min-width: 1024px) {
  .app-sidebar {
    transform: none !important;
    width: var(--sidebar-width);
  }
  .app-main {
    margin-left: var(--sidebar-width);
  }
  .mobile-bottom-nav {
    display: none !important;
  }
  .fab-btn {
    display: none !important;
  }
  .mobile-nav-toggle {
    display: none !important;
  }
  .mobile-sidebar-close {
    display: none !important;
  }
  .desktop-only {
    display: block !important;
  }
}

/* 2. TABLET VIEWPORT (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .mobile-sidebar-close {
    display: block;
  }
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .app-main {
    margin-left: 0;
  }
  .app-topbar {
    padding: 0 20px;
  }
  .app-content {
    padding: 24px;
  }
  .mobile-bottom-nav {
    display: none !important;
  }
  .fab-btn {
    display: none !important;
  }
}

/* 3. MOBILE ANDROID & TABLET VIEWPORT ENGINE (< 768px) */
@media (max-width: 767px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .app-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* 1. Mobile Sidebar Overlay Drawer (75-85% Viewport Width) */
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 80vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1050 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35) !important;
    background-color: var(--color-slate-900) !important;
  }

  .app-sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px !important;
    flex-shrink: 0 !important;
    border-bottom: 1px solid var(--color-slate-800) !important;
  }

  .sidebar-nav {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px !important;
  }

  .sidebar-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    padding: 16px !important;
    border-top: 1px solid var(--color-slate-800) !important;
    background: var(--color-slate-900) !important;
  }

  .mobile-sidebar-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 22px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
  }

  /* 2. Semi-Transparent Dark Overlay Backdrop */
  .sidebar-backdrop {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 1040 !important;
    opacity: 0;
    transition: opacity 0.25s ease !important;
  }

  .sidebar-backdrop.active {
    display: block !important;
    opacity: 1 !important;
  }

  /* 3. Main Workspace 100% Mobile Viewport Width */
  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    min-height: 100vh !important;
  }

  /* 4. Compact Mobile Topbar */
  .app-topbar {
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .mobile-nav-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    background: var(--color-slate-100) !important;
    color: var(--color-slate-800) !important;
  }

  .school-selector-chip {
    padding: 4px 10px !important;
    font-size: 12px !important;
    max-width: 140px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .school-name-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    max-width: 95px !important;
  }

  .session-term-pill {
    padding: 4px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .topbar-right form, .topbar-right .desktop-only {
    display: none !important;
  }

  .app-content {
    padding: 14px 12px !important;
    padding-bottom: 30px !important; /* Full height, no bottom nav space */
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 5. Completely Remove Mobile Bottom Navigation */
  .mobile-bottom-nav {
    display: none !important;
  }

  /* 6. Floating Assistant FAB (Position Fixed, Right: 16px, Bottom: 20px) */
  .assistant-fab {
    position: fixed !important;
    bottom: 20px !important;
    right: 16px !important;
    height: 44px !important;
    width: auto !important;
    min-width: 44px !important;
    padding: 0 16px !important;
    border-radius: 22px !important;
    font-size: 13px !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45) !important;
    z-index: 9999 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .assistant-fab .fab-label {
    display: inline-block !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }

  /* 7. Floating Quick Create FAB */
  .quick-create-fab {
    position: fixed !important;
    bottom: 25px !important;
    left: 20px !important;
    right: auto !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    border-radius: 26px !important;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45) !important;
    z-index: 9998 !important;
    background: #059669 !important;
    color: #ffffff !important;
    border: none !important;
  }

  /* 8. Mobile Responsive Forms & Multi-Column Grid Stacking */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .form-control, .form-select, select, textarea, input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="date"], input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .card, .stat-card, .auth-card {
    padding: 14px 14px !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    display: block !important;
    border-radius: var(--radius-md) !important;
  }

  h1 { font-size: 20px !important; }
  h2 { font-size: 17px !important; }
  h3 { font-size: 15px !important; }

  .btn {
    min-height: 44px !important;
    font-size: 14px !important;
  }
}

/* ==========================================================================
   SKULORA HIGH-CONVERTING LANDING PAGE MOTION & INTERACTION ENGINE
   ========================================================================== */

/* Top Scroll Progress Indicator */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Hero Sequential Entrance Keyframes */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroMockupScale {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-animate-1 { animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards; opacity: 0; }
.hero-animate-2 { animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards; opacity: 0; }
.hero-animate-3 { animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards; opacity: 0; }
.hero-animate-4 { animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards; opacity: 0; }
.hero-animate-5 { animation: heroMockupScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards; opacity: 0; }

/* Scroll Reveal Observer Base State */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays for Group Grid Children */
.reveal-stagger-1 { transition-delay: 0.08s; }
.reveal-stagger-2 { transition-delay: 0.16s; }
.reveal-stagger-3 { transition-delay: 0.24s; }
.reveal-stagger-4 { transition-delay: 0.32s; }
.reveal-stagger-5 { transition-delay: 0.40s; }

/* Polished Micro-Interactions */
.hover-lift {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1 !important;
}

.hover-lift .card-icon {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.hover-lift:hover .card-icon {
  transform: scale(1.12);
}

.btn-arrow-icon {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover .btn-arrow-icon {
  transform: translateX(4px);
}

/* FAQ Accordion Motion */
.faq-accordion-item {
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-accordion-item.open {
  border-color: #bfdbfe;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.faq-header-btn {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--color-slate-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-chevron {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  color: var(--color-slate-400);
}

.faq-accordion-item.open .faq-chevron {
  transform: rotate(180deg);
  color: #2563eb;
}

.faq-body-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.25s ease;
  padding: 0 24px;
  font-size: 14px;
  color: var(--color-slate-600);
  line-height: 1.6;
}

.faq-accordion-item.open .faq-body-content {
  max-height: 300px;
  opacity: 1;
  padding: 0 24px 20px 24px;
}

/* Accessibility: Respect Reduced Motion Preference */
@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;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-animate-1, .hero-animate-2, .hero-animate-3, .hero-animate-4, .hero-animate-5 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   SKULORA CARD HOVER & INTERACTION POLISH ENGINE
   ========================================================================== */

/* Navigation Link Underline Hover */
.public-nav-link {
  position: relative;
}

.public-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-brand-primary);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}

.public-nav-link:hover::after {
  width: 100%;
}

/* Primary CTA Button Hover Feedback */
.btn-primary {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45);
  }
  .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  }
}

/* 1. Feature Cards Hover */
.hover-feature-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .hover-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12);
    border-color: #93c5fd !important;
  }
  .hover-feature-card:hover .card-icon {
    transform: scale(1.12) translateY(-2px);
  }
}

/* 2. Role Cards Hover */
.hover-role-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .hover-role-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.1);
    border-color: #a5b4fc !important;
  }
}

/* 3. How It Works Cards Hover */
.hover-step-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.step-number-badge {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .hover-step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.1);
    border-color: #93c5fd !important;
  }
  .hover-step-card:hover .step-number-badge {
    transform: scale(1.15);
    background-color: #dbeafe !important;
  }
}

/* 4. Before / After Cards Hover */
.hover-before-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .hover-before-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(220, 38, 38, 0.1);
  }
}

.hover-after-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .hover-after-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px -8px rgba(5, 150, 105, 0.18);
    border-color: #34d399 !important;
  }
}

/* 5. Product / Dashboard Cards Hover */
.hover-dashboard-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  will-change: transform, box-shadow;
}

@media (hover: hover) and (pointer: fine) {
  .hover-dashboard-card:hover {
    transform: translateY(-4px) scale(1.008);
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.16);
    border-color: #94a3b8 !important;
  }
}

/* 6. FAQ Cards Hover */
.faq-accordion-item:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

/* MOBILE-FIRST TOUCH TARGETS AND TABLE CARD RESPONSIVENESS (< 768px) */
@media (max-width: 768px) {
  .btn-sm, .btn-xs {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .assistant-modal-card {
    width: 94% !important;
    max-width: 100% !important;
    margin: 10px auto !important;
  }
}

/* REUSABLE MOBILE DATA CARD SYSTEM (< 576px) */
@media (max-width: 576px) {
  .mobile-hide-table {
    display: none !important;
  }
  .mobile-show-cards {
    display: block !important;
  }
  .mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .mobile-data-card {
    background: #ffffff;
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
  }
  .mobile-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-slate-900);
    margin: 0;
  }
  .mobile-card-subtitle {
    font-size: 12.5px;
    color: var(--color-slate-500);
    margin-top: 2px;
  }
  .mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--color-slate-100);
  }
  .mobile-card-row:last-of-type {
    border-bottom: none;
  }
  .mobile-card-label {
    color: var(--color-slate-500);
    font-weight: 500;
  }
  .mobile-card-value {
    color: var(--color-slate-900);
    font-weight: 600;
    text-align: right;
  }
  .mobile-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--color-slate-100);
    flex-wrap: wrap;
  }
  .mobile-card-actions .btn {
    flex: 1;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 577px) {
  .mobile-show-cards {
    display: none !important;
  }
}
