/* ==========================================================================
   SIKKHALAY COACHING OS — MASTER ENTERPRISE DESIGN SYSTEM & TOKENS
   Tailored for Bangladesh Coaching Ecosystem (Academic, Admission, Model Tests)
   Includes Native-App Mobile Bottom Navigation, Off-Canvas Drawer & Action Sheets
   ========================================================================== */

:root {
  /* Brand Palette — Amber / Rose / Emerald Theme */
  --brand-primary: #D97706;      /* Vibrant Coaching Amber */
  --brand-hover: #B45309;
  --brand-light: rgba(217, 119, 6, 0.12);
  --brand-glow: rgba(217, 119, 6, 0.35);

  --accent-rose: #E11D48;
  --accent-rose-light: rgba(225, 29, 72, 0.12);
  --accent-emerald: #059669;
  --accent-emerald-light: rgba(5, 150, 105, 0.12);
  --accent-blue: #0284C7;
  --accent-blue-light: rgba(2, 132, 199, 0.12);
  --accent-purple: #7C3AED;
  --accent-purple-light: rgba(124, 58, 237, 0.12);

  /* Light Theme Surfaces & Backgrounds */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-subtle: #F8FAFC;
  --bg-hover: #E2E8F0;
  --bg-glass: rgba(255, 255, 255, 0.92);

  /* Typography */
  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Borders & Dividers */
  --border-light: #E2E8F0;
  --border-subtle: #CBD5E1;
  --border-focus: #D97706;

  /* Status Colors */
  --status-success: #10B981;
  --status-info: #0284C7;
  --status-warning: #F59E0B;
  --status-danger: #EF4444;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 32px -8px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 25px rgba(217, 119, 6, 0.25);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Layout Dimensions */
  --header-height: 64px;
  --sidebar-width: 260px;
  --bottom-nav-height: 64px;

  /* Typography Stack */
  --font-main: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --bg-page: #090D16;
  --bg-surface: #0F172A;
  --bg-elevated: #1E293B;
  --bg-subtle: #162032;
  --bg-hover: #27354A;
  --bg-glass: rgba(15, 23, 42, 0.92);

  --text-main: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --text-inverse: #0F172A;

  --border-light: #1E293B;
  --border-subtle: #334155;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 20px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 32px -8px rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

button:active {
  transform: scale(0.97);
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ==========================================================================
   APP SHELL LAYOUT (HEADER + SIDEBAR + WORKSPACE)
   ========================================================================== */
#app-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-main);
}

.brand-badge-icon {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.brand-badge-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  background: var(--brand-light);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-finance-btn {
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.app-body {
  display: flex;
  flex: 1;
}

/* Sidebar Navigation */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.75rem;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  margin-bottom: 0.2rem;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--brand-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--brand-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Main Workspace */
.main-workspace {
  flex: 1;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ==========================================================================
   PAGE HEADERS & BUTTONS
   ========================================================================== */
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 4px 14px var(--brand-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

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

/* ==========================================================================
   KPI CARDS & METRIC WIDGETS
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

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

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

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  font-feature-settings: "tnum";
}

.kpi-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trend-up {
  color: var(--status-success);
  font-weight: 700;
}

.trend-down {
  color: var(--status-danger);
  font-weight: 700;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.25rem;
}

/* Table Styles */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--bg-elevated);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.badge-success { background: var(--accent-emerald-light); color: var(--status-success); }
.badge-warning { background: var(--brand-light); color: var(--brand-primary); }
.badge-danger  { background: var(--accent-rose-light); color: var(--status-danger); }
.badge-info    { background: var(--accent-blue-light); color: var(--accent-blue); }

.days-tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--brand-primary);
}

/* Batch Occupancy Bar */
.seat-bar-wrap {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  height: 7px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.seat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-primary), var(--accent-rose));
  transition: width 0.3s ease;
}

/* ==========================================================================
   NATIVE-APP MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.coach-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  z-index: 1500;
  padding: 0 0.5rem env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.coach-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.coach-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.2rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.15s ease;
  position: relative;
  gap: 0.2rem;
}

.coach-bottom-nav-item i {
  font-size: 1.25rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.coach-bottom-nav-item:hover,
.coach-bottom-nav-item.active {
  color: var(--brand-primary);
}

.coach-bottom-nav-item.active i {
  transform: translateY(-2px);
  color: var(--brand-primary);
}

.coach-bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 20px;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
}

/* Center Floating Action Button (FAB) in Bottom Nav */
.coach-bottom-nav-fab {
  position: relative;
  top: -16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-rose));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px var(--brand-glow);
  font-size: 1.35rem;
  border: 3px solid var(--bg-surface);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.coach-bottom-nav-fab:active {
  transform: scale(0.92);
}

/* ==========================================================================
   MOBILE OFF-CANVAS DRAWER MENU
   ========================================================================== */
.coach-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.coach-drawer-overlay.active {
  display: block;
  opacity: 1;
}

.coach-drawer-card {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  z-index: 2600;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.coach-drawer-overlay.active .coach-drawer-card {
  transform: translateX(0);
}

.coach-drawer-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elevated);
}

.coach-drawer-links {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.coach-drawer-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --- THEME TOGGLE COMPONENTS (DRAWER & SIDEBAR) --- */
.sidebar-theme-card,
.drawer-theme-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  margin-bottom: 0.35rem;
}

.sidebar-theme-card:hover,
.drawer-theme-card:hover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
}

.sidebar-theme-info,
.drawer-theme-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.sidebar-theme-info i,
.drawer-theme-info i {
  font-size: 0.95rem;
  color: var(--brand-primary);
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease, color 0.2s ease;
}

.sidebar-theme-card:hover .sidebar-theme-info i,
.drawer-theme-card:hover .drawer-theme-info i {
  transform: rotate(20deg);
}

.theme-switch-track {
  width: 38px;
  height: 20px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .theme-switch-track {
  background: var(--brand-primary);
}

.theme-switch-thumb {
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-switch-thumb {
  transform: translateX(18px);
}

.theme-toggle-btn {
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--brand-primary);
  background: var(--brand-light);
}

/* ==========================================================================
   QUICK ACTION BOTTOM SHEET MODAL
   ========================================================================== */
.quick-action-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.quick-action-sheet-overlay.active {
  display: flex;
}

.quick-action-sheet {
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 500px;
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0));
  box-shadow: var(--shadow-lg);
  animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  margin: 0 auto 1.25rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.quick-action-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.quick-action-card:hover, .quick-action-card:active {
  background: var(--brand-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

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

/* ==========================================================================
   MODALS SYSTEM
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 15px);
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-left: 4px solid var(--brand-primary);
  animation: slideInRight 0.25s ease;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (900px & below)
   ========================================================================== */
@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .coach-bottom-nav {
    display: block;
  }
  .main-workspace {
    padding: 1rem 1rem calc(var(--bottom-nav-height) + 1.5rem);
  }
  .toast-container {
    left: 15px;
    right: 15px;
    bottom: calc(var(--bottom-nav-height) + 10px);
  }
}

/* Medium Mobile Devices (600px and below) */
@media (max-width: 600px) {
  .app-header {
    padding: 0 0.85rem;
  }
  .header-right {
    gap: 0.45rem;
  }
}

/* Compact Mobile Screens (400px and below) */
@media (max-width: 400px) {
  .app-header {
    padding: 0 0.5rem;
    height: 56px;
  }
  
  .header-left {
    gap: 0.5rem;
  }
  
  .brand-badge {
    gap: 0.45rem;
    font-size: 0.95rem;
  }
  
  .brand-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
  }
  
  .portal-pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
  }
  
  .header-right {
    gap: 0.35rem;
  }
  
  .header-right .btn-icon {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
  
  .header-finance-btn,
  .header-right .btn-primary {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--radius-md) !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
  }

  .header-finance-btn span,
  .header-right .btn-primary span {
    display: none !important;
  }

  .header-finance-btn i,
  .header-right .btn-primary i {
    font-size: 0.92rem !important;
    margin: 0 !important;
  }
  
  .header-right .btn-secondary {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
  }
  
  .mobile-nav-toggle {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }
}

/* Ultra-Narrow Screens (340px and below) */
@media (max-width: 340px) {
  .brand-badge div span:first-child {
    font-size: 0.82rem;
  }
  .portal-pill {
    display: none;
  }
}
