/* ===================================================================
   GLOBAL STYLES - Include this file in ALL HTML pages
   Purpose: Natural scrolling behavior for all pages
   Usage: <link rel="stylesheet" href="css/global.css">
   =================================================================== */

/* NATURAL SCROLL BEHAVIOR - Let browser handle scrolling naturally */
/* These rules ensure page scrolls normally regardless of other CSS */
html {
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  height: auto !important;
}

body {
  overflow-y: visible !important;
  overflow-x: hidden !important;
  height: auto !important;
  position: static !important;
  width: 100%;
  max-width: 100vw;
}

/* .main-content should NOT capture scroll - let body scroll */
.main-content {
  position: static !important;
  overflow: visible !important;
  height: auto !important;
}

/* Prevent layout shift when sidebar/menu toggles or modal is open */
body.menu-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100%;
  height: 100%;
}

/* Main content area - use transform for sidebar animation instead of margin */
.main-content,
.main-area,
.page-content {
  transition: transform 0.3s ease, opacity 0.2s ease;
  will-change: transform;
}

/* Universal box-sizing for consistent layout */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Ensure all text elements wrap properly and never cause horizontal overflow */
h1, h2, h3, h4, h5, h6, 
p, span, div, a, button, 
input, textarea, label, select,
li, ul, ol,
td, th, table,
pre, code {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Prevent images and media from overflowing */
img, video, iframe, svg {
  max-width: 100%;
  height: auto;
}

/* Tables should be responsive */
table {
  table-layout: fixed;
  width: 100%;
}

/* Long URLs or unbreakable strings should break */
a {
  word-break: break-word;
}

/* Container elements should constrain their children */
.container, .wrapper, .content, main, section, article {
  max-width: 100%;
  overflow-x: hidden;
}

/* ===================================================================
   DESIGN SYSTEM - Shared Variables and Utilities
   =================================================================== */

/* Shared semantic colors (can be overridden per-page for role theming) */
:root {
  /* ==================== 8-POINT SPACING SCALE ==================== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 64px;
  
  /* ==================== PRIMARY & SEMANTIC COLORS ==================== */
  --color-primary: #4f6df5;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-neutral: #374151;
  --color-bg: #f7f8fb;
  
  /* ==================== CARD SHADOW ==================== */
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.05);
  
  /* Base colors - consistent across all pages */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #0ea5e9;
  --info-light: #e0f2fe;
  
  /* Neutral palette - MUST be consistent everywhere */
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg: #f1f5f9;
  --bg-secondary: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Spacing scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* Typography scale */
  --font-xs: 0.6875rem;
  --font-sm: 0.75rem;
  --font-base: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-3xl: 1.875rem;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  /* Transitions */
  --transition: all 0.2s ease;
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.3s ease;
}

/* ==================== DARK THEME VARIABLES ==================== */
[data-theme="dark"] {
  /* Base colors - inverted for dark mode */
  --color-primary: #3b82f6;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-neutral: #6b7280;
  --color-bg: #0f172a;
  
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --info: #06b6d4;
  --info-light: rgba(6, 182, 212, 0.15);
  
  /* Dark mode typography - inverted hierarchy */
  --text: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  /* Dark surface colors */
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --surface: #1e293b;
  --border: #334155;
  --border-light: #475569;
  
  /* Adjusted shadows for dark mode */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 1px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ===================================================================
   TYPOGRAPHY - Consistent font sizes
   =================================================================== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--font-base);
  line-height: 1.6;
}

h1 { font-size: var(--font-2xl); font-weight: 700; }
h2 { font-size: var(--font-xl); font-weight: 600; }
h3 { font-size: var(--font-lg); font-weight: 600; }
h4 { font-size: var(--font-md); font-weight: 600; }
h5, h6 { font-size: var(--font-base); font-weight: 600; }

/* ===================================================================
   TYPOGRAPHY SCALE - Standardized text sizes for UI components
   =================================================================== */

/* Page-level title (24px) - Use for main page headings */
.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
}

/* Section title (18px) - Use for section headings within pages */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

/* Card title (14px) - Use for card headers, labels */
.card-title,
.ui-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  margin: 0;
}

/* Meta text (12px) - Use for timestamps, secondary info, hints */
.meta-text {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.4;
}

/* Additional text utilities */
.text-sm {
  font-size: 13px;
}

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

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

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

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

.font-medium {
  font-weight: 500;
}

/* ===================================================================
   BUTTON SYSTEM - Consistent button styles
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: var(--font-sm);
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: var(--font-xs);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark, var(--primary-hover));
  border-color: var(--primary-dark, var(--primary-hover));
}

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

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

.btn-warning {
  background: var(--warning);
  color: white;
  border-color: var(--warning);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--text-muted);
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border-color: #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
  border-color: #d1d5db;
}

/* ===================================================================
   BTN-UI SYSTEM - Enhanced button component with lift effect
   =================================================================== */
.btn-ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-ui:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-ui:active:not(:disabled) {
  transform: translateY(0);
}

.btn-ui:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Primary variant */
.btn-ui.btn-primary,
.btn-ui-primary {
  background: var(--color-primary);
  color: white;
}

.btn-ui.btn-primary:hover:not(:disabled),
.btn-ui-primary:hover:not(:disabled) {
  background: #3d5bd9;
  box-shadow: 0 4px 12px rgba(79, 109, 245, 0.3);
}

/* Secondary variant */
.btn-ui.btn-secondary,
.btn-ui-secondary {
  background: #f3f4f6;
  color: #111827;
}

.btn-ui.btn-secondary:hover:not(:disabled),
.btn-ui-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

/* Success variant */
.btn-ui.btn-success,
.btn-ui-success {
  background: var(--color-success);
  color: white;
}

.btn-ui.btn-success:hover:not(:disabled),
.btn-ui-success:hover:not(:disabled) {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Danger variant */
.btn-ui.btn-danger,
.btn-ui-danger {
  background: var(--color-danger);
  color: white;
}

.btn-ui.btn-danger:hover:not(:disabled),
.btn-ui-danger:hover:not(:disabled) {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Warning variant */
.btn-ui.btn-warning,
.btn-ui-warning {
  background: var(--color-warning);
  color: white;
}

.btn-ui.btn-warning:hover:not(:disabled),
.btn-ui-warning:hover:not(:disabled) {
  background: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Outline variant */
.btn-ui.btn-outline,
.btn-ui-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ui.btn-outline:hover:not(:disabled),
.btn-ui-outline:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--text-muted);
}

/* Ghost variant (no background) */
.btn-ui-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ui-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

/* Size variants */
.btn-ui-sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-ui-xs {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-ui-lg {
  padding: 14px 20px;
  font-size: 15px;
  border-radius: 12px;
}

/* Icon-only button */
.btn-ui-icon {
  padding: 10px;
  border-radius: 10px;
}

.btn-ui-icon.btn-ui-sm {
  padding: 8px;
  border-radius: 8px;
}

/* ===================================================================   BUTTON COMPATIBILITY - Enhance existing button classes with design tokens
   Apply btn-ui alongside existing classes for consistent styling
   =================================================================== */

/* Common action button patterns - ensure flex alignment for icons */
.booking-btn,
.action-btn,
.quick-action,
.patient-action-btn,
.date-range-btn,
.slot-btn,
.upload-btn,
.profile-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

/* Enhance existing .btn when combined with .btn-ui */
.btn.btn-ui {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  transition: var(--transition-fast);
}

.btn.btn-ui:hover:not(:disabled) {
  transform: translateY(-1px);
}

/* Action buttons within containers */
.action-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.action-buttons .btn,
.action-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

/* Date range button enhancements */
.date-range-btn.btn-ui {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.date-range-btn.btn-ui:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.date-range-btn.btn-ui.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Booking buttons with gradient - preserve gradients, add transitions */
.booking-btn.btn-ui {
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.booking-btn.btn-ui:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Patient action button */
.patient-action-btn.btn-ui {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.patient-action-btn.btn-ui:hover:not(:disabled) {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ===================================================================   BADGE SYSTEM - Consistent status badges
   =================================================================== */
.badge, .status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: var(--font-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.badge-success, .status-success, .status-completed, .status-seen {
  background: var(--success-light);
  color: #059669;
}

.badge-warning, .status-warning, .status-pending, .status-not_seen {
  background: var(--warning-light);
  color: #b45309;
}

.badge-danger, .status-danger, .status-cancelled {
  background: var(--danger-light);
  color: #dc2626;
}

.badge-info, .status-info, .status-in_progress {
  background: var(--info-light);
  color: #0284c7;
}

/* ===================================================================
   FORM ELEMENTS - Consistent inputs
   =================================================================== */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: var(--font-base);
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}

/* ===================================================================
   CARD SYSTEM - Consistent card styles
   =================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.card-body {
  padding: 1rem 1.25rem;
}

/* ===================================================================
   CARD-UI SYSTEM - Reusable card component for KPI, analytics, alerts
   =================================================================== */
.card-ui {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
}

.card-ui:hover {
  transform: translateY(-2px);
}

/* Card content typography - inherits from .card-title in typography scale */
.card-ui .card-title {
  margin-bottom: var(--space-2);
}

.card-value {
  font-size: 22px;
  font-weight: 600;
}

/* Card variants */
.card-ui.card-success {
  border-left: 3px solid var(--color-success);
}

.card-ui.card-warning {
  border-left: 3px solid var(--color-warning);
}

.card-ui.card-danger {
  border-left: 3px solid var(--color-danger);
}

.card-ui.card-primary {
  border-left: 3px solid var(--color-primary);
}

/* No hover effect variant */
.card-ui.card-static:hover {
  transform: none;
}

/* ===================================================================   CARD-UI COMPATIBILITY - Apply design tokens to existing card classes
   When .card-ui is added alongside existing classes, tokens take effect
   =================================================================== */

/* KPI Cards - clinic/doctor dashboards */
.kpi-card.card-ui {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

/* Stat Cards - staff dashboard */
.stat-card.card-ui {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

/* Analytics Cards - clinic analytics */
.analytics-card.card-ui {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

/* Doctor Status Cards */
.doctor-status-card.card-ui {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

/* Alert Cards */
.alert-card.card-ui,
.care-alert-card.card-ui {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

/* ==================== GLOBAL CARD TEXT OVERRIDES ==================== */
/* Ensure all card headers and subheaders are dark and visible */

/* KPI Card Text - All variations */
.kpi-card .kpi-title,
.kpi-title,
kpi-card .kpi-title {
  color: #111827 !important;
  font-weight: 700 !important;
}

.kpi-card .kpi-subtitle,
.kpi-subtitle,
kpi-card .kpi-subtitle {
  color: #374151 !important;
}

/* Stat Card Text */
.stat-card .stat-title,
.stat-title,
.stat-label {
  color: #111827 !important;
  font-weight: 600 !important;
}

.stat-card .stat-subtitle,
.stat-subtitle {
  color: #374151 !important;
}

/* Analytics Card Text */
.analytics-card .analytics-title,
.analytics-title {
  color: #111827 !important;
  font-weight: 600 !important;
}

.analytics-card .analytics-subtitle,
.analytics-subtitle {
  color: #374151 !important;
}

/* General Card Headers */
.card-header,
.card-title,
.ui-card-title {
  color: #111827 !important;
  font-weight: 600 !important;
}

.card-subtitle,
.card-description {
  color: #374151 !important;
}

/* Section Cards */
.section-card.card-ui {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

/* ===================================================================   DASHBOARD LAYOUT SYSTEM - 8-point spacing for clinic dashboards
   =================================================================== */

/* Section spacing */
.dashboard-section {
  margin-bottom: var(--space-5);
}

.dashboard-section-sm {
  margin-bottom: var(--space-4);
}

.dashboard-section-lg {
  margin-bottom: var(--space-6);
}

/* Header spacing */
.dashboard-header {
  margin-bottom: var(--space-5);
}

/* Grid layouts */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3);
}

.dashboard-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.dashboard-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

/* KPI section specific */
.kpi-section {
  margin-bottom: var(--space-4);
}

/* Card grid gaps */
.card-grid {
  display: grid;
  gap: var(--space-3);
}

/* Section title with consistent spacing */
.section-header {
  margin-bottom: var(--space-3);
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
  .dashboard-grid-4,
  .dashboard-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dashboard-grid,
  .dashboard-grid-2,
  .dashboard-grid-4,
  .dashboard-grid-5 {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  
  .dashboard-section {
    margin-bottom: var(--space-4);
  }
  
  .dashboard-header {
    margin-bottom: var(--space-4);
  }
}

/* ===================================================================
   ICON SYSTEM - Standardized icon sizes
   =================================================================== */

/* Icon size utilities */
.icon-xs {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.icon-sm {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

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

.icon-lg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon-xl {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* Icon SVG sizing (ensures SVG inherits size) */
.icon-xs svg,
.icon-sm svg,
.icon-md svg,
.icon-lg svg,
.icon-xl svg {
  width: 100%;
  height: 100%;
}

/* Icon alignment with text */
.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* Context-specific icon sizes */
.sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.card-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

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

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

/* Icon with text alignment */
.icon-text {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.icon-text svg {
  flex-shrink: 0;
}

/* ===================================================================
   ICON COMPATIBILITY - Apply sizing to existing icon classes
   =================================================================== */

/* Sidebar navigation icons → icon-sm (18px) */
.sidebar-nav .icon,
.sidebar-nav .nav-item .icon,
.nav-item .icon.icon-sm,
.more-drawer-icon.icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Bottom nav / header icons → icon-md (20px) */
.nav-icon.icon-md,
.header-icon.icon-md,
.bottom-nav-item .nav-icon.icon-md {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Card / KPI icons → icon-lg (24px) */
.kpi-icon.icon-lg,
.stat-icon.icon-lg,
.card-icon.icon-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

/* KPI icon container with icon-lg */
.kpi-icon.icon-lg svg,
.stat-icon.icon-lg svg,
.card-icon.icon-lg svg {
  width: 20px;
  height: 20px;
}

/* Quick action icons → icon-lg (24px) */
.quick-action-icon.icon-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

/* ===================================================================
   TABLE SYSTEM - Consistent table styles
   =================================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 0.75rem 1rem;
  font-size: var(--font-base);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
  background: var(--bg-secondary, #f8fafc);
}

/* ===================================================================
   MOBILE RESPONSIVE TABLE
   =================================================================== */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }
  
  .data-table {
    min-width: 500px;
  }
  
  .data-table th, .data-table td {
    padding: 0.5rem 0.625rem;
    font-size: var(--font-sm);
  }
}

@media (max-width: 480px) {
  .data-table {
    min-width: 400px;
    font-size: var(--font-xs);
  }
  
  .data-table th, .data-table td {
    padding: 0.375rem 0.5rem;
    font-size: var(--font-xs);
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-sm);
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-xs);
  }
}

/* ===================================================================
   UTILITY CLASSES
   =================================================================== */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }

.bg-success { background: var(--success-light); }
.bg-danger { background: var(--danger-light); }
.bg-warning { background: var(--warning-light); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ===================================================================
   BILLING PAGE HEADER - Modern SaaS Dashboard Style
   =================================================================== */

.billing-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: 12px 14px;
  background: white;
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  width: 100%;
  border-bottom: 1px solid #e5e7eb;
}

.billing-header-left h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.billing-header-left p {
  font-size: 14px;
  color: #64748b;
  margin: 4px 0 0 0;
}

/* Inline Stats - Compact display below title */
.billing-inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.inline-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
}

.inline-stat strong {
  font-weight: 700;
  font-size: 13px;
}

.inline-stat.revenue {
  background: #ecfdf5;
  color: #047857;
}

.inline-stat.revenue strong {
  color: #047857;
}

.inline-stat.pending {
  background: #fff7ed;
  color: #c2410c;
}

.inline-stat.pending strong {
  color: #c2410c;
}

.inline-stat.paid {
  background: #eef2ff;
  color: #4338ca;
}

.inline-stat.paid strong {
  color: #4338ca;
}

.inline-stat.overdue {
  background: #fef2f2;
  color: #dc2626;
}

.inline-stat.overdue strong {
  color: #dc2626;
}

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

.billing-header-actions .btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.billing-header-actions .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.25);
}

.billing-header-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.35);
}

.billing-header-actions .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.billing-header-actions .btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.35);
}

.billing-header-actions .btn-outline {
  background: white;
  border: 1.5px solid #e2e8f0;
  color: #475569;
}

.billing-header-actions .btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* Billing Header Responsive */
@media (max-width: 768px) {
  .billing-page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 18px;
    margin-bottom: 0;
  }
  
  .billing-header-left h1 {
    font-size: 20px;
  }
  
  .billing-inline-stats {
    gap: 8px;
  }
  
  .inline-stat {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .inline-stat strong {
    font-size: 12px;
  }
  
  .billing-header-actions {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 8px;
  }
  
  .billing-header-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .billing-page-header {
    padding: 14px 14px;
    margin-bottom: 0;
    border-radius: 0;
    gap: 10px;
  }
  
  .billing-header-left h1 {
    font-size: 18px;
  }
  
  .billing-inline-stats {
    gap: 6px;
  }
  
  .inline-stat {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .inline-stat strong {
    font-size: 11px;
  }
  
  .billing-header-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
  }
  
  .billing-header-actions .btn {
    flex: 1;
    padding: 8px 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  
  .billing-header-actions .btn svg {
    display: none;
  }
}

/* ===================================================================
   BILLING STATS GRID - KPI Cards
   =================================================================== */

.billing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.billing-stat-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.billing-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.billing-stat-card span {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.billing-stat-card h2 {
  font-size: 22px;
  margin: 6px 0 0 0;
  font-weight: 700;
  color: var(--text);
}

/* Color variants for KPI cards */
.billing-stat-card.revenue h2 {
  color: #10b981;
}

.billing-stat-card.pending h2 {
  color: #f59e0b;
}

.billing-stat-card.paid h2 {
  color: #6366f1;
}

.billing-stat-card.overdue h2 {
  color: #ef4444;
}

/* Billing Stats Grid Responsive */
@media (max-width: 1024px) {
  .billing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .billing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .billing-stat-card {
    padding: 14px;
    border-radius: 10px;
  }
  
  .billing-stat-card span {
    font-size: 12px;
  }
  
  .billing-stat-card h2 {
    font-size: 18px;
    margin-top: 4px;
  }
}

@media (max-width: 400px) {
  .billing-stats-grid {
    gap: 8px;
  }
  
  .billing-stat-card {
    padding: 12px;
  }
  
  .billing-stat-card span {
    font-size: 11px;
  }
  
  .billing-stat-card h2 {
    font-size: 16px;
  }
}

/* ===================================================================
   BILLING TABLE - Modern SaaS Invoice Table Styles
   =================================================================== */

.billing-table-wrapper,
.invoice-table-wrapper {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
}

.billing-table-wrapper > div,
.invoice-table-wrapper > div {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.billing-table-wrapper table,
.invoice-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.billing-table-wrapper thead,
.invoice-table-wrapper thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.billing-table-wrapper thead tr,
.invoice-table-wrapper thead tr {
  border-bottom: 2px solid #e2e8f0 !important;
}

.billing-table-wrapper th,
.invoice-table-wrapper th {
  text-align: left;
  padding: 14px 16px !important;
  font-size: 13px !important;
  color: #475569 !important;
  font-weight: 600 !important;
  white-space: nowrap;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.billing-table-wrapper td,
.invoice-table-wrapper td {
  padding: 14px 16px !important;
  font-size: 14px !important;
  border-top: 1px solid #f1f5f9 !important;
  border-bottom: none !important;
  color: #1e293b;
  vertical-align: middle;
}

.billing-table-wrapper tbody tr,
.invoice-table-wrapper tbody tr {
  transition: background 0.15s ease;
  border-bottom: none !important;
}

.billing-table-wrapper tbody tr:hover,
.invoice-table-wrapper tbody tr:hover {
  background: #f8fafc !important;
}

.billing-table-wrapper tbody tr:first-child td,
.invoice-table-wrapper tbody tr:first-child td {
  border-top: none !important;
}

/* Billing table action buttons */
.billing-table-wrapper .btn,
.invoice-table-wrapper .btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* Responsive billing tables */
@media (max-width: 768px) {
  .billing-table-wrapper,
  .invoice-table-wrapper {
    border-radius: 10px;
  }
  
  .billing-table-wrapper th,
  .invoice-table-wrapper th {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
  
  .billing-table-wrapper td,
  .invoice-table-wrapper td {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
}

/* ===================================================================
   INVOICE STATUS BADGES - Colored pill badges for payment status
   =================================================================== */

.status-paid {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-pending,
.status-unpaid {
  display: inline-block;
  background: #fff7ed;
  color: #c2410c;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-overdue {
  display: inline-block;
  background: #fef2f2;
  color: #dc2626;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-partial {
  display: inline-block;
  background: #fefce8;
  color: #a16207;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-cancelled,
.status-refunded {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Status badge responsive */
@media (max-width: 480px) {
  .status-paid,
  .status-pending,
  .status-unpaid,
  .status-overdue,
  .status-partial,
  .status-cancelled,
  .status-refunded {
    padding: 3px 8px;
    font-size: 10px;
  }
}

/* ===================================================================
   BILLING PAGE CONTAINER - Page layout wrapper
   =================================================================== */

.billing-page-container {
  padding: 12px;
  background: #f6f8fb;
  min-height: 100vh;
}

.billing-page-container.billing-fullwidth {
  padding: 0;
  background: #fff;
}

@media (max-width: 768px) {
  .billing-page-container {
    padding: 10px;
    padding-bottom: 100px;
  }
}

@media (max-width: 480px) {
  .billing-page-container {
    padding: 8px;
    padding-bottom: 100px;
  }
}

/* ===================================================================
   BILLING FILTER TABS - Invoice status filter tabs
   =================================================================== */

.billing-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.billing-filter-tab {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.billing-filter-tab:hover {
  background: #f1f5f9;
}

.billing-filter-tab.active {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #e0e7ff;
  font-weight: 600;
}

.billing-filter-tab .tab-count {
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.billing-filter-tab.active .tab-count {
  background: #c7d2fe;
  color: #4338ca;
}

/* Responsive filter tabs */
@media (max-width: 640px) {
  .billing-filter-tabs {
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .billing-filter-tab {
    padding: 8px 12px;
    font-size: 13px;
    flex: 1;
    justify-content: center;
    min-width: calc(50% - 6px);
  }
  
  .billing-filter-tab .tab-count {
    font-size: 11px;
    padding: 2px 6px;
  }
}

@media (max-width: 400px) {
  .billing-filter-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ===================================================================
   ORIENTATION LOCK - Prevent landscape on mobile
   =================================================================== */

/* Show rotate message when in landscape on mobile devices */
@media screen and (orientation: landscape) and (max-height: 500px) {
  body::before {
    content: '📱 Please rotate your phone back to portrait mode for the best experience';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    z-index: 999999;
    text-align: center;
    padding: 2rem;
    line-height: 1.6;
  }
  
  /* Hide page content in landscape */
  body > *:not(style):not(script):not(link) {
    visibility: hidden !important;
  }
}

/* ===================================================================
   SCHEDULE PAGE HEADER - Modern SaaS Dashboard Style (Like Billing)
   =================================================================== */

.schedule-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: 12px 16px;
  background: white;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  border-bottom: 1px solid #e5e7eb;
}

.schedule-header-left h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.schedule-header-left p {
  font-size: 14px;
  color: #64748b;
  margin: 4px 0 0 0;
}

/* Schedule Header Stats - KPI Pills */
.schedule-header-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.schedule-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.schedule-stat-pill .stat-value {
  font-weight: 700;
  font-size: 14px;
}

.schedule-stat-pill.green {
  background: #dcfce7;
  color: #15803d;
}

.schedule-stat-pill.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.schedule-stat-pill.orange {
  background: #ffedd5;
  color: #c2410c;
}

.schedule-stat-pill.red {
  background: #fee2e2;
  color: #dc2626;
}

.schedule-stat-pill.purple {
  background: #f3e8ff;
  color: #7c3aed;
}

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

.schedule-header-actions .btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.schedule-header-actions .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.25);
}

/* Schedule Section Tabs */
.schedule-section-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.schedule-section-tabs::-webkit-scrollbar {
  display: none;
}

.schedule-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.schedule-tab:hover {
  color: #1e293b;
  background: rgba(99, 102, 241, 0.05);
}
.schedule-tab.active {
  color: #4f46e5;
  font-weight: 600;
  background: white;
  border-bottom-color: #4f46e5;
}

/* Schedule Section Content */
.schedule-section {
  display: none;
  background: #fff;
  border-radius: 0 0 12px 12px;
  margin-bottom: 0;
}
.schedule-section.active,
.schedule-section[style*="display: block"] {
  display: block !important;
}

.schedule-section-header {
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #e2e8f0;
}
.schedule-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.schedule-section-title-row h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}
.schedule-section-stats {
  display: flex;
  gap: 0.5rem;
}
.schedule-section-stats .stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
}
.schedule-section-stats .stat-pill.green { background: #dcfce7; color: #15803d; }
.schedule-section-stats .stat-pill.blue { background: #dbeafe; color: #1d4ed8; }
.schedule-section-stats .stat-pill.orange { background: #ffedd5; color: #c2410c; }
.schedule-section-stats .stat-pill.red { background: #fee2e2; color: #b91c1c; }
.schedule-section-stats .stat-pill.purple { background: #f3e8ff; color: #7c3aed; }

.schedule-section-body {
  padding: 0;
}

/* Schedule Mode Sub-tabs (Clinic | Video) */
.schedule-mode-tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.schedule-mode-tab:hover {
  color: #1e293b;
  background: #f1f5f9;
}
.schedule-mode-tab.active {
  color: #4f46e5;
  background: white;
}
.schedule-mode-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 2px 2px 0 0;
}

/* Schedule Page Responsive */
@media (max-width: 768px) {
  .schedule-page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .schedule-header-stats {
    justify-content: flex-start;
    margin-top: 8px;
  }
  
  .schedule-header-actions {
    flex-direction: row;
    gap: 8px;
  }
  
  .schedule-header-actions .btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .schedule-page-header {
    padding: 10px 12px;
  }
  
  .schedule-header-left h1 {
    font-size: 16px;
  }
  
  .schedule-stat-pill {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .schedule-stat-pill .stat-value {
    font-size: 12px;
  }
}

/* Schedule Mode Tabs Container */
.schedule-mode-tabs {
  display: flex;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.schedule-mode-tabs .schedule-mode-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.schedule-mode-tabs .schedule-mode-tab:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.schedule-mode-tabs .schedule-mode-tab.active {
  color: #4f46e5;
  background: white;
  border-bottom: 2px solid #4f46e5;
}
/* Schedule Page Table Wrapper - Full width like billing */
.schedule-table-wrapper {
  margin: 0;
  padding: 0;
  background: white;
  overflow-x: auto;
}

.schedule-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 14px;
  table-layout: auto;
}

.schedule-table-wrapper th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.schedule-table-wrapper td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.schedule-table-wrapper tbody tr:hover {
  background: #f8fafc;
}

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

/* Schedule Section Body - No extra margins */
.schedule-section .schedule-section-body {
  padding: 0;
}

.schedule-section .section-filter-bar {
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
}

.schedule-section .section-content-wrapper {
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  border-top: 1px solid #e2e8f0 !important;
}