/*
Purpose: Shared responsive visual system for landing, admin, guru, and auth pages.
Caller: EJS views rendered by HomeController, AuthController, AdminController, and GuruController.
Deps: Bootstrap 5 class contracts, Bootstrap Icons, CSS custom properties defined in this file.
MainFuncs: Theme variables, layout shells, navigation, cards, tables, forms, modals, landing sections.
SideEffects: Changes browser presentation only.
*/

/* ============================================
   Clean SaaS / Performance First Design
   Lightweight, High-Contrast, Professional
   ============================================ */

/* @import rules must be at the top of the stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Uptime Kuma Status Page Styles */
.monitor-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.monitor-list .item {
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  background: var(--bg-card);
  border: none;
  border-left: 4px solid transparent;
  border-radius: 0;
  transition: all 0.2s ease;
}

.monitor-list .item:first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.monitor-list .item:last-child {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  margin-bottom: 0;
}

.monitor-list .item:hover {
  background: var(--slate-50);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .monitor-list .item:hover {
    background: var(--bg-card-hover);
  }
}

[data-bs-theme="dark"] .monitor-list .item:hover {
  background: var(--bg-card-hover);
}

.monitor-list .item-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-heading);
  margin: 0;
  line-height: 1.5;
}

.monitor-list .small-padding {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.group-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.shadow-box {
  background: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.shadow-box.monitor-list {
  padding: 1rem;
}

.monitor-list .wrap {
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.monitor-list .item .row {
  align-items: center;
}

.monitor-list .item .info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .monitor-list .item {
    padding: 0.75rem;
  }
  
  .group-title {
    font-size: 1.25rem;
  }
  
  .shadow-box {
    padding: 1rem;
  }
}

/* ============================================================================
   EXPLICIT DARK MODE OVERRIDES - Force all text to use CSS variables
   ============================================================================ */

/* Force all text elements to inherit from CSS variables - Maximum specificity */
* {
  color: inherit;
}

/* Explicit overrides for all text elements - No inheritance assumptions */
body,
p,
span,
div,
section,
article,
aside,
main,
header,
footer,
nav {
  color: var(--text-body) !important;
}

/* Force all headings to use heading color */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  color: var(--text-heading) !important;
}

/* Force muted text */
.text-muted,
small,
.small {
  color: var(--text-muted) !important;
}

/* Override Bootstrap text utilities that might conflict */
.text-dark {
  color: var(--text-heading) !important;
}

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

/* Force all card content to use proper colors */
.card,
.card-body,
.card-header,
.card-footer {
  color: var(--text-body) !important;
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card-body h1, .card-body h2, .card-body h3, .card-body h4, .card-body h5, .card-body h6,
.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6 {
  color: var(--text-heading) !important;
}

.card p,
.card-body p,
.card span,
.card-body span,
.card div,
.card-body div {
  color: var(--text-body) !important;
}

.card .text-muted,
.card-body .text-muted {
  color: var(--text-muted) !important;
}

/* Force news card content */
.news-card {
  overflow: hidden !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.news-card .card-body {
  overflow: hidden !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-body) !important;
}

.news-card h1, .news-card h2, .news-card h3, .news-card h4, .news-card h5, .news-card h6 {
  color: var(--text-heading) !important;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Explicit override for news card titles */
.news-card h4.fw-bold {
  color: var(--text-heading) !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  flex: 1 1 auto;
  min-width: 0;
}

.news-card p,
.news-card span,
.news-card div {
  color: var(--text-body) !important;
  word-break: break-word;
  overflow-wrap: break-word;
}

.news-card .text-muted,
.news-card p.text-muted {
  color: var(--text-muted) !important;
}

/* News card badge container - prevent overflow */
.news-card .d-flex.justify-content-between {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-card .badge {
  flex-shrink: 0;
  white-space: nowrap;
}

/* News card metadata container */
.news-card .d-flex.flex-wrap {
  flex-wrap: wrap !important;
  gap: 1rem;
}

/* Force stat card content */
.stat-card,
.stat-card .card-body {
  color: var(--text-body) !important;
}

.stat-card h1, .stat-card h2, .stat-card h3, .stat-card h4, .stat-card h5, .stat-card h6 {
  color: var(--text-heading) !important;
  font-size: 2rem;
  font-weight: 700;
}

.stat-card p,
.stat-card span,
.stat-card div {
  color: var(--text-body) !important;
}

.stat-card .text-muted,
.stat-card p.text-muted,
.stat-card span.text-muted {
  color: var(--text-muted) !important;
}

/* Ensure stat numbers are always visible */
.stat-card h3.fw-bold {
  color: var(--text-heading) !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
}

/* Force footer content */
.footer-section,
.footer-section p,
.footer-section span,
.footer-section div,
.footer-section a,
.footer-section h1, .footer-section h2, .footer-section h3,
.footer-section h4, .footer-section h5, .footer-section h6 {
  color: var(--text-body) !important;
}

.footer-section h1, .footer-section h2, .footer-section h3,
.footer-section h4, .footer-section h5, .footer-section h6 {
  color: var(--text-heading) !important;
}

.footer-section .text-muted,
.footer-section a.text-muted {
  color: var(--text-muted) !important;
}

/* Proxy/Iframe Container - Force text colors for embedded content */
.uptime-kuma-container,
#proxy-wrapper {
  color: var(--text-body) !important;
  background-color: var(--bg-card) !important;
}

.uptime-kuma-container *,
#proxy-wrapper * {
  color: inherit !important;
}

/* Force iframe content to inherit (if possible via CSS) */
.uptime-kuma-container iframe {
  color-scheme: light dark;
  background-color: var(--bg-card) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .uptime-kuma-container iframe {
    color-scheme: dark;
    background-color: var(--bg-card) !important;
  }
}

/* Mobile-specific dark mode fix for proxy content */
@media (prefers-color-scheme: dark) and (max-width: 640px) {
  html[data-bs-theme="auto"] #proxy-wrapper * {
    color: var(--text-body) !important;
  }
  
  html[data-bs-theme="auto"] .uptime-kuma-container iframe {
    background-color: var(--bg-card) !important;
  }
}

[data-bs-theme="dark"] .uptime-kuma-container iframe {
  color-scheme: dark;
  background-color: var(--bg-card) !important;
}

/* Mobile-specific dark mode fix for proxy content with data-bs-theme */
@media (max-width: 640px) {
  [data-bs-theme="dark"] #proxy-wrapper * {
    color: var(--text-body) !important;
  }
  
  [data-bs-theme="dark"] .uptime-kuma-container iframe {
    background-color: var(--bg-card) !important;
  }
}

/* Additional explicit overrides for Bootstrap classes */
.badge {
  color: inherit !important;
}

.badge.text-primary,
.badge.text-info,
.badge.text-success,
.badge.text-warning {
  color: inherit !important;
}

/* Ensure all list items use proper colors */
li,
ul li,
ol li {
  color: var(--text-body) !important;
}

/* Ensure all links use proper colors (except buttons) - Already defined above, but ensure it's here too */
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.text-muted) {
  color: var(--primary-600) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.text-muted) {
    color: var(--primary-500) !important;
  }
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.text-muted) {
  color: var(--primary-500) !important;
}

:root {
  /* ============================================
     Brand Palette - "Smart Campus" (Light Mode)
     Primary: vivid blue -> indigo. Accent: violet.
     ============================================ */
  --primary-50: #eff5ff;
  --primary-100: #dbe8fe;
  --primary-200: #bfd6fe;
  --primary-300: #93b8fd;
  --primary-400: #5b8def;
  --primary-500: #3b6fe0;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* Slate Colors (cool neutral) */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Accent Colors (violet) for landing highlights */
  --accent-400: #a78bfa;
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;
  --accent-700: #6d28d9;

  /* Success Colors */
  --success-50: #f0fdf4;
  --success-100: #dcfce7;
  --success-200: #bbf7d0;
  --success-400: #4ade80;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;

  /* Danger Colors */
  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-200: #fecaca;
  --danger-400: #f87171;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;

  /* Warning Colors */
  --warning-500: #f59e0b;
  --warning-600: #d97706;

  /* Background & Text (Light Mode) - Darker for better readability */
  --bg-app: #f4f7fb;
  --bg-card: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f8fafc;
  --text-heading: var(--slate-900);
  --text-body: var(--slate-700);
  --text-muted: var(--slate-500);
  --border-color: var(--slate-200);
  --border-strong: var(--slate-300);
  --ring: rgba(37, 99, 235, 0.35);

  /* Glass surfaces (translucent navbar / cards) */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(15, 23, 42, 0.08);

  /* Radius scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* Card Clean */
  --card-border: 1px solid var(--border-color);
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --card-radius: 16px;

  /* Elevation scale (soft, layered) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.10), 0 6px 12px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.14), 0 12px 24px rgba(15, 23, 42, 0.08);
  --shadow-primary: 0 8px 22px rgba(37, 99, 235, 0.30);

  /* ============================================
     Landing Page Modern Component Variables
     Requirements: 8.5
     ============================================ */

  /* Gradient Variables */
  --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  --hero-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #6d28d9 100%);
  --icon-gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --icon-gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --icon-gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --icon-gradient-orange: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --icon-gradient-red: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --icon-gradient-indigo: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);

  /* Animation Timing Variables */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  --animation-float-duration: 20s;
  --animation-fade-duration: 0.15s;
  --animation-spin-duration: 0.8s;

  /* Spacing Scale Variables */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Component-specific Variables */
  --hero-min-height: 70vh;
  --card-hover-transform: translateY(-4px);
  --card-hover-shadow: var(--shadow-lg);
  --touch-target-min: 44px;
}

/* Dark Mode Variables - Auto-detect from device preference.
   IMPORTANT: scope to html[data-bs-theme="auto"] ONLY (not bare :root). A bare :root here
   forces dark tokens whenever the *device* is dark, overriding a manual light choice — so
   the toggle couldn't switch back to light on a dark-mode device. Manual dark is handled by
   the [data-bs-theme="dark"] block below; this block is just the no-JS / auto fallback. */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] {
    /* Background - deep slate canvas */
    --bg-app: #0b1220;
    --bg-card: #131c2e; /* elevated surface */
    --bg-card-hover: #1c2740;
    --surface-1: #131c2e;
    --surface-2: #0f1726;

    /* Text - Higher contrast for clarity */
    --text-heading: #f8fafc; /* slate-50 - pure white for headings */
    --text-body: #dbe3ef;
    --text-muted: #94a3b8; /* slate-400 - clearer muted text */

    /* Borders - More visible */
    --border-color: #2b3a55;
    --border-color-subtle: #1e293b;
    --border-strong: #3a4c6b;
    --ring: rgba(91, 141, 239, 0.45);

    /* Glass surfaces */
    --glass-bg: rgba(19, 28, 46, 0.72);
    --glass-border: rgba(148, 163, 184, 0.14);

    /* Primary colors - Lighter for dark mode visibility */
    --primary-400: #93b8fd;
    --primary-500: #5b8def;
    --primary-600: #3b82f6;
    --primary-700: #2563eb;

    /* Shadows - Enhanced for depth */
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.45);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.55);
    --shadow-primary: 0 8px 22px rgba(37, 99, 235, 0.45);

    /* Landing Page Dark Mode Gradient Variables */
    --hero-gradient: linear-gradient(135deg, #16265a 0%, #1d3a8f 45%, #4c1d95 100%);
    --card-hover-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    
    /* Dark Mode Icon Gradient Variables - Enhanced for visibility */
    --icon-gradient-blue: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(29, 78, 216, 0.35) 100%);
    --icon-gradient-green: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
    --icon-gradient-purple: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(124, 58, 237, 0.35) 100%);
    --icon-gradient-orange: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
    --icon-gradient-red: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.35) 100%);
    --icon-gradient-indigo: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(67, 56, 202, 0.35) 100%);
    
    /* Dark Mode Card Background Gradients */
    --stat-card-gradient: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
    --feedback-header-gradient: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, var(--bg-card) 100%);
  }
}

/* Dark Mode Variables - Manual override via data-bs-theme */
[data-bs-theme="dark"] {
  /* Background - deep slate canvas */
  --bg-app: #0b1220;
  --bg-card: #131c2e;
  --bg-card-hover: #1c2740;
  --surface-1: #131c2e;
  --surface-2: #0f1726;

  /* Text - Higher contrast for clarity */
  --text-heading: #f8fafc;
  --text-body: #dbe3ef;
  --text-muted: #94a3b8;

  /* Borders - More visible */
  --border-color: #2b3a55;
  --border-color-subtle: #1e293b;
  --border-strong: #3a4c6b;
  --ring: rgba(91, 141, 239, 0.45);

  /* Glass surfaces */
  --glass-bg: rgba(19, 28, 46, 0.72);
  --glass-border: rgba(148, 163, 184, 0.14);

  /* Primary colors - Lighter for dark mode visibility */
  --primary-400: #93b8fd;
  --primary-500: #5b8def;
  --primary-600: #3b82f6;
  --primary-700: #2563eb;

  /* Shadows - Enhanced for depth */
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.45);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.55);
  --shadow-primary: 0 8px 22px rgba(37, 99, 235, 0.45);

  /* Landing Page Dark Mode Gradient Variables */
  --hero-gradient: linear-gradient(135deg, #16265a 0%, #1d3a8f 45%, #4c1d95 100%);
  --card-hover-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  
  /* Dark Mode Icon Gradient Variables - Enhanced for visibility */
  --icon-gradient-blue: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(29, 78, 216, 0.35) 100%);
  --icon-gradient-green: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
  --icon-gradient-purple: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(124, 58, 237, 0.35) 100%);
  --icon-gradient-orange: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  --icon-gradient-red: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.35) 100%);
  --icon-gradient-indigo: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(67, 56, 202, 0.35) 100%);
  
  /* Dark Mode Card Background Gradients */
  --stat-card-gradient: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
  --feedback-header-gradient: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, var(--bg-card) 100%);
}

/* Auto dark mode detection via prefers-color-scheme for data-bs-theme="auto" */
/* Bootstrap 5.3+ automatically handles data-bs-theme="auto" with prefers-color-scheme */
/* Set color-scheme for proper browser rendering */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] {
    color-scheme: dark;
  }
}

@media (prefers-color-scheme: light) {
  html[data-bs-theme="auto"] {
    color-scheme: light;
  }
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background-color: var(--bg-app);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading) !important;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.2s ease;
}

/* Ensure headings inside cards use proper colors - Very specific selectors */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6,
.stat-card h1,
.stat-card h2,
.stat-card h3,
.stat-card h4,
.stat-card h5,
.stat-card h6,
.stat-card .card-body h1,
.stat-card .card-body h2,
.stat-card .card-body h3,
.stat-card .card-body h4,
.stat-card .card-body h5,
.stat-card .card-body h6,
.news-card h1,
.news-card h2,
.news-card h3,
.news-card h4,
.news-card h5,
.news-card h6,
.news-card .card-body h1,
.news-card .card-body h2,
.news-card .card-body h3,
.news-card .card-body h4,
.news-card .card-body h5,
.news-card .card-body h6 {
  color: var(--text-heading) !important;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.75rem;
  font-weight: 600;
}

h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

h5 {
  font-size: 1.25rem;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  color: var(--text-body);
}

/* Ensure Bootstrap text utilities use our CSS variables */
.text-muted {
  color: var(--text-muted) !important;
}

/* Ensure all headings use proper text color - Already defined above with !important */

/* Ensure links are visible in dark mode */
a:not(.btn):not(.nav-link):not(.dropdown-item) {
  color: var(--primary-600);
  transition: color 0.2s ease;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
  color: var(--primary-700);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: var(--primary-500);
  }
  
  html[data-bs-theme="auto"] a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: var(--primary-400);
  }
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item) {
  color: var(--primary-500);
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
  color: var(--primary-400);
}

/* Ensure Bootstrap text utilities use our CSS variables */
.text-muted {
  color: var(--text-muted) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .text-muted {
    color: var(--text-muted) !important;
  }
}

[data-bs-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

/* Card Clean Utility Class */
.card-clean {
  background-color: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.15s ease;
}

.card-clean:hover {
  box-shadow: var(--card-shadow-hover, 0 1px 3px 0 rgba(0, 0, 0, 0.1));
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .card-clean:hover {
    box-shadow: var(--card-shadow-hover);
  }
}

[data-bs-theme="dark"] .card-clean:hover {
  box-shadow: var(--card-shadow-hover);
}

/* Standard Bootstrap Cards */
.card {
  background-color: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.card-header {
  background-color: var(--bg-card);
  border-bottom: var(--card-border);
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
}

.card-body {
  padding: 1.5rem;
  color: var(--text-body);
}

/* Ensure all text inside card-body uses proper colors */
.card-body p,
.card-body span,
.card-body div {
  color: var(--text-body);
}

.card-body .text-muted {
  color: var(--text-muted) !important;
}

/* Buttons */
.btn {
  min-height: 38px;
  touch-action: manipulation;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.15s ease;
}

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

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

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

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .btn-primary {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
    color: #ffffff;
  }
  
  html[data-bs-theme="auto"] .btn-primary:hover {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
  }
}

[data-bs-theme="dark"] .btn-primary {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  color: #ffffff;
}

[data-bs-theme="dark"] .btn-primary:hover {
  background-color: var(--primary-500);
  border-color: var(--primary-500);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

/* Form Controls */
.form-control,
.form-select {
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-body);
  transition: all 0.15s ease;
  padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  outline: none;
  background-color: var(--bg-card);
  color: var(--text-body);
}

.form-label {
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

/* Navbar - Standard Bootstrap */
.navbar {
  border-bottom: var(--card-border);
  box-shadow: var(--card-shadow);
  background-color: var(--bg-card) !important;
}

[data-bs-theme="dark"] .navbar {
  background-color: var(--bg-card) !important;
}

.navbar-brand,
.navbar-text,
.nav-link {
  font-weight: 500;
  color: var(--text-heading) !important;
}

/* Active Device Count Link Hover Effect */
.activeDeviceCountLink:hover {
  opacity: 0.8;
  text-decoration: underline !important;
  transition: opacity 0.2s ease;
}

.navbar-light .navbar-brand,
.navbar-light .navbar-text {
  color: var(--text-heading) !important;
}

.navbar-light .navbar-text {
  color: var(--text-body) !important;
}

/* Navbar Toggler - Mobile Menu Button */
.navbar-toggler {
  border-color: var(--border-color) !important;
  background-color: transparent !important;
  color: var(--text-heading) !important;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
  outline: none;
}

.navbar-toggler:hover {
  background-color: var(--bg-card-hover, var(--slate-100)) !important;
  border-color: var(--border-color) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .navbar-toggler:hover {
    background-color: var(--bg-card-hover) !important;
  }
}

[data-bs-theme="dark"] .navbar-toggler:hover {
  background-color: var(--bg-card-hover) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15, 23, 42, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  transition: background-image 0.2s ease;
  width: 1.5em;
  height: 1.5em;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(248, 250, 252, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
}

[data-bs-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(248, 250, 252, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar Collapse - Mobile Menu */
.navbar-collapse {
  background-color: var(--bg-card) !important;
}

/* Mobile menu styling - only on small screens */
@media (max-width: 991.98px) {
  .navbar-collapse {
    border-top: 1px solid var(--border-color) !important;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

/* Force all nav links in mobile menu to use proper colors */
.navbar-collapse .nav-link {
  color: var(--text-heading) !important;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.navbar-collapse .nav-link:hover,
.navbar-collapse .nav-link:focus {
  color: var(--text-heading) !important;
  background-color: var(--bg-card-hover, var(--slate-100)) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .navbar-collapse .nav-link:hover,
  html[data-bs-theme="auto"] .navbar-collapse .nav-link:focus {
    background-color: var(--bg-card-hover) !important;
  }
}

[data-bs-theme="dark"] .navbar-collapse .nav-link:hover,
[data-bs-theme="dark"] .navbar-collapse .nav-link:focus {
  background-color: var(--bg-card-hover) !important;
}

.navbar-collapse .nav-link.active {
  color: var(--primary-600) !important;
  background-color: var(--bg-card-hover, var(--slate-100)) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .navbar-collapse .nav-link.active {
    color: var(--primary-500) !important;
    background-color: var(--bg-card-hover) !important;
  }
}

[data-bs-theme="dark"] .navbar-collapse .nav-link.active {
  color: var(--primary-500) !important;
  background-color: var(--bg-card-hover) !important;
}

/* Ensure navbar brand is visible */
.navbar-brand {
  color: var(--text-heading) !important;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.navbar-brand:hover {
  color: var(--primary-600) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .navbar-brand:hover {
    color: var(--primary-500) !important;
  }
}

[data-bs-theme="dark"] .navbar-brand:hover {
  color: var(--primary-500) !important;
}

@media (min-width: 992px) {
  .navbar-collapse {
    border-top: none !important;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  
  .navbar-collapse .nav-link {
    padding: 0.5rem 1rem;
  }
}

/* ============================================
   Navbar Mobile Responsive Fix
   ============================================ */

/* Mobile navbar user section - stack vertically when collapsed */
@media (max-width: 991.98px) {
  .navbar-collapse .d-flex.align-items-center {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
  }
  
  .navbar-collapse .navbar-text {
    text-align: center;
    max-width: none !important;
    padding: 0.5rem 0;
  }
  
  .navbar-collapse .navbar-text .d-none.d-md-inline {
    display: inline !important;
  }
  
  .navbar-collapse form.d-inline {
    width: 100%;
  }
  
  .navbar-collapse form.d-inline .btn {
    width: 100%;
    justify-content: center;
  }
  
  .navbar-collapse form.d-inline .btn .d-none.d-md-inline {
    display: inline !important;
  }
  
  /* Guru dashboard dropdown fix */
  .navbar-collapse .dropdown {
    width: 100%;
  }
  
  .navbar-collapse .dropdown .dropdown-toggle {
    width: 100%;
    justify-content: center;
  }
  
  .navbar-collapse .dropdown-menu {
    width: 100%;
    text-align: center;
  }
  
  /* Ensure navbar-nav takes full width on mobile */
  .navbar-collapse .navbar-nav {
    width: 100%;
  }
  
  .navbar-collapse .navbar-nav .nav-item {
    width: 100%;
  }
  
  .navbar-collapse .navbar-nav .nav-link {
    text-align: left;
    padding: 0.75rem 1rem;
  }
  
  /* ms-auto fix for mobile - remove margin and use full width */
  .navbar-collapse .ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }
}

/* ============================================
   Desktop Navbar - Force Horizontal Layout
   Override any conflicting styles
   ============================================ */
@media (min-width: 992px) {
  /* Reset navbar container to row */
  .navbar .container,
  .navbar .container-fluid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  /* Reset navbar-collapse to inline */
  .navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
    flex-grow: 1 !important;
    position: static !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Reset navbar-nav to horizontal */
  .navbar-collapse .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    gap: 0 !important;
  }

  .navbar-collapse .navbar-nav .nav-item {
    width: auto !important;
  }

  .navbar-collapse .navbar-nav .nav-link {
    padding: 0.5rem 0.75rem !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  /* Reset ms-auto for desktop */
  .navbar-collapse .ms-auto {
    margin-left: auto !important;
    width: auto !important;
  }

  /* Reset d-flex container in navbar */
  .navbar-collapse .d-flex.align-items-center {
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    gap: 0.5rem !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
  }
}

/* ============================================
   Navbar Admin - Specific styles for admin/guru pages
   Uses Bootstrap standard navbar-expand-lg
   ============================================ */

/* Desktop: Force standard Bootstrap horizontal navbar */
@media (min-width: 992px) {
  .navbar-admin .navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
    flex-grow: 1 !important;
    align-items: center !important;
    position: static !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .navbar-admin .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .navbar-admin .navbar-nav .nav-item {
    display: inline-block !important;
  }

  .navbar-admin .navbar-nav .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.5rem 0.75rem !important;
    white-space: nowrap !important;
  }

  .navbar-admin .ms-auto {
    margin-left: auto !important;
  }

  .navbar-admin .d-flex.align-items-center {
    flex-direction: row !important;
    align-items: center !important;
  }
}

/* Mobile: Dropdown menu style */
@media (max-width: 991.98px) {
  .navbar-admin .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 1rem;
    z-index: 1000;
  }

  .navbar-admin .navbar-nav {
    flex-direction: column;
  }

  .navbar-admin .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }

  .navbar-admin .ms-auto {
    margin-left: 0 !important;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
  }

  .navbar-admin .d-flex.align-items-center {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.5rem;
  }
}

/* ============================================
   Navbar Guru - Simple navbar for guru pages
   No collapse needed, just brand + dropdown
   ============================================ */
.navbar-guru {
  overflow: visible !important;
}

.navbar-guru .container-fluid {
  overflow: visible !important;
}

.navbar-guru .dropdown {
  position: relative;
}

.navbar-guru .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  z-index: 1050 !important;
  min-width: 200px;
}

/* Tables */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  border-radius: var(--card-radius);
  overflow-x: auto;
  overflow-y: visible;
}

.table {
  margin-bottom: 0;
  background-color: var(--bg-card);
}

.table thead th {
  background-color: var(--slate-50);
  color: var(--text-heading);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  padding: 1rem;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .table thead th {
    background-color: var(--slate-700);
    color: var(--text-heading);
    border-bottom-color: var(--border-color);
  }
}

[data-bs-theme="dark"] .table thead th {
  background-color: var(--slate-700);
  color: var(--text-heading);
  border-bottom-color: var(--border-color);
}

.table tbody td {
  padding: 1rem;
  border-color: var(--border-color);
  vertical-align: middle;
}

.table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

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

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .table tbody tr:hover {
    background-color: var(--bg-card-hover);
  }
}

[data-bs-theme="dark"] .table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

/* Badges - Bootstrap Subtle */
.badge {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .badge.bg-light,
  html[data-bs-theme="auto"] .badge[style*="background-color: var(--slate-100)"] {
    background-color: var(--slate-700) !important;
    color: var(--text-heading) !important;
  }
}

[data-bs-theme="dark"] .badge.bg-light,
[data-bs-theme="dark"] .badge[style*="background-color: var(--slate-100)"] {
  background-color: var(--slate-700) !important;
  color: var(--text-heading) !important;
}

/* Alerts */
.alert {
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  word-wrap: break-word;
}

.alert-danger {
  background-color: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .alert-danger {
    background-color: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
    color: #fca5a5;
  }
}

[data-bs-theme="dark"] .alert-danger {
  background-color: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  color: #fca5a5;
}

.alert-success {
  background-color: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
  }
}

[data-bs-theme="dark"] .alert-success {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.alert-warning {
  background-color: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
  }
}

[data-bs-theme="dark"] .alert-warning {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  background-color: var(--bg-app);
  transition: background-color 0.2s ease;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0;
}

/* Modals */
.modal-content {
  background-color: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-header {
  border-bottom: var(--card-border);
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: var(--card-border);
  padding: 1.5rem;
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
  }
}

[data-bs-theme="dark"] .modal-backdrop {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Code Blocks */
code {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background-color: var(--slate-100);
  font-size: 0.875rem;
  color: var(--text-body);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] code {
    background-color: var(--slate-700);
    color: var(--text-body);
    border: 1px solid var(--border-color-subtle);
  }
  
  html[data-bs-theme="auto"] code[style*="background-color: var(--slate-100)"] {
    background-color: var(--slate-700) !important;
    color: var(--text-body) !important;
  }
}

[data-bs-theme="dark"] code {
  background-color: var(--slate-700);
  color: var(--text-body);
  border: 1px solid var(--border-color-subtle);
}

[data-bs-theme="dark"] code[style*="background-color: var(--slate-100)"] {
  background-color: var(--slate-700) !important;
  color: var(--text-body) !important;
}

/* Dropdown */
.dropdown-menu {
  background-color: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 4px;
  padding: 0.5rem 1rem;
  transition: background-color 0.15s ease;
}

.dropdown-item {
  color: var(--text-body);
}

.dropdown-item:hover {
  background-color: var(--slate-100);
  color: var(--text-heading);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .dropdown-item {
    color: var(--text-body);
  }
  
  html[data-bs-theme="auto"] .dropdown-item:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-heading);
  }
}

[data-bs-theme="dark"] .dropdown-item {
  color: var(--text-body);
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-heading);
}

/* Status Tabs Wrapper - Horizontal Scroll on Mobile */
.status-tabs-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.status-tabs-wrapper::-webkit-scrollbar {
  height: 6px;
}

.status-tabs-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.status-tabs-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 3px;
}

.status-tabs-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}

/* Uptime Kuma Container */
.uptime-kuma-container {
  background-color: var(--bg-card);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .table-responsive {
    font-size: 0.875rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  
  /* Status tabs - ensure horizontal scroll on mobile */
  .status-tabs-wrapper {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .status-tabs-wrapper .nav-tabs {
    border-bottom: 2px solid var(--border-color);
  }
  
  .status-tabs-wrapper .nav-tabs .nav-link {
    white-space: nowrap;
    padding: 0.75rem 1rem;
  }
  
  /* Navbar mobile alignment fixes */
  .navbar .container {
    display: flex;
    flex-direction: column;
  }
  
  .navbar .d-flex.align-items-center.justify-content-between {
    width: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  
  .navbar-brand {
    margin-right: auto;
  }
  
  .navbar-toggler {
    margin-left: auto;
  }
  
  /* Ensure mobile menu text is visible */
  .navbar-collapse .nav-link,
  .navbar-collapse .nav-link span,
  .navbar-collapse .nav-link i {
    color: var(--text-heading) !important;
  }
  
  .navbar-collapse .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: 1.5rem 1rem;
  }

  .card-header {
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  /* Extra small screens - additional optimizations */
  .navbar-brand {
    font-size: 0.875rem;
    max-width: 150px;
  }
  
  .navbar-text {
    font-size: 0.75rem;
    max-width: 100px;
  }
  
  .btn-sm {
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }
}

/* Toast Clean Styling */
.toast-clean {
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.toast-progress-clean {
  background: var(--primary-600) !important;
}

/* Feedback Toast Modal - Floating Top-Right Notification */
.feedback-toast {
  pointer-events: none;
}

.feedback-toast .modal-dialog {
  position: fixed;
  top: 20px;
  right: 20px;
  margin: 0;
  max-width: 400px;
  width: auto;
  z-index: 1090;
  pointer-events: auto;
}

.feedback-toast .modal-content {
  border-radius: var(--card-radius);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
  border: var(--card-border);
  background: var(--bg-card);
  animation: slideInRight 0.3s ease-out;
}

.feedback-toast-content {
  border-left-width: 4px !important;
  border-left-style: solid !important;
}

.feedback-toast .modal-body {
  padding: 1rem;
}

.feedback-toast .btn-close {
  opacity: 0.6;
  padding: 0.5rem;
}

.feedback-toast .btn-close:hover {
  opacity: 1;
}

/* Animation for toast entry */
/* Loading Spinner Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   Landing Page Keyframe Animations
   Requirements: 1.6, 7.4
   ============================================ */

/* Float animation for hero decorative elements */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(-10px) rotate(-5deg);
  }
  75% {
    transform: translateY(-30px) rotate(3deg);
  }
}

/* FadeIn animation for tab content */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FadeInUp animation for staggered content */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for badges and indicators */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Scale animation for hover effects */
@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Shimmer animation for loading states */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Landing Page Animation Utility Classes */
.animate-float {
  animation: float var(--animation-float-duration) ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn var(--animation-fade-duration) ease;
}

.animate-fade-in-up {
  animation: fadeInUp var(--transition-slow) ease;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-scale-in {
  animation: scaleIn var(--transition-normal) ease;
}

/* Tab content animation */
.tab-content-modern {
  animation: fadeIn var(--animation-fade-duration) ease;
}

/* Hero decorative elements animation */
.hero-decoration {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float var(--animation-float-duration) ease-in-out infinite;
  pointer-events: none;
}

.hero-decoration-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.hero-decoration-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: -50px;
  animation-delay: -5s;
}

.hero-decoration-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 10%;
  animation-delay: -10s;
}

/* ============================================
   Hero Section Modern Styles
   Requirements: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 7.2
   ============================================ */

/* Hero Section Container */
.hero-modern {
  background: var(--hero-gradient);
  position: relative;
  overflow: hidden;
  min-height: var(--hero-min-height);
  display: flex;
  align-items: center;
  padding: var(--space-3xl) 0;
}

/* Hero Content Container */
.hero-modern .hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0;
}

/* Hero Badge - Glassmorphism effect */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
}

/* Backdrop-filter with fallback */
@supports (backdrop-filter: blur(10px)) {
  .hero-badge {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* Hero Title - Responsive typography with clamp() */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: white !important;
  margin-bottom: var(--space-lg);
}

.hero-title-highlight {
  color: #fbbf24; /* Amber/warning color for highlight */
}

/* Hero Description */
.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9) !important;
  max-width: 600px;
  margin-bottom: var(--space-xl);
}

/* Hero CTA Button Group */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* Hero Buttons */
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all var(--transition-slow);
  min-height: var(--touch-target-min);
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

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

.btn-hero-primary:hover {
  background-color: var(--slate-100);
  color: var(--primary-700);
}

.btn-hero-outline {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-hero-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

/* Hero Features List */
.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7) !important;
}

.hero-feature-item i {
  color: #10b981; /* Success green */
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
}

.hero-visual-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: var(--space-2xl);
  text-align: center;
}

@supports (backdrop-filter: blur(10px)) {
  .hero-visual-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.hero-visual-icon {
  font-size: 5rem;
  color: white;
  opacity: 0.9;
  display: block;
  margin-bottom: var(--space-lg);
}

.hero-visual-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.hero-visual-icon-circle {
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.hero-visual-motto {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.875rem;
  margin: 0;
}

/* Hero Section Dark Mode */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .hero-modern {
    background: var(--hero-gradient);
  }
  
  html[data-bs-theme="auto"] .hero-visual-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  html[data-bs-theme="auto"] .hero-visual-icon-circle {
    background: rgba(255, 255, 255, 0.15);
  }
  
  html[data-bs-theme="auto"] .hero-badge {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

[data-bs-theme="dark"] .hero-modern {
  background: var(--hero-gradient);
}

[data-bs-theme="dark"] .hero-badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .hero-visual-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .hero-visual-icon-circle {
  background: rgba(255, 255, 255, 0.15);
}

/* Hero Section Responsive */
@media (max-width: 768px) {
  .hero-modern {
    min-height: auto;
    padding: var(--space-2xl) 0;
  }
  
  .hero-modern .hero-content {
    padding: var(--space-md) 0;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-cta-group {
    flex-direction: column;
  }
  
  .btn-hero {
    width: 100%;
    justify-content: center;
  }
  
  .hero-features {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .hero-decoration {
    display: none; /* Hide decorations on mobile for performance */
  }
}

/* ============================================
   Landing Page Component Styles (moved from inline)
   Requirements: 7.2
   ============================================ */

/* Stat Card Styles */
.stat-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border: none;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .stat-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  }
}

[data-bs-theme="dark"] .stat-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-slow);
}

.stat-card:hover {
  transform: var(--card-hover-transform);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

.stat-icon.primary {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
  color: #667eea;
}

.stat-icon.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
  color: #10b981;
}

.stat-icon.info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  color: #3b82f6;
}

.stat-icon.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
  color: #f59e0b;
}

/* ============================================
   Stat Card Modern Styles
   Requirements: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
   ============================================ */

/* Stat Card Modern - Elevated Design with Hover Effects */
.stat-card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Stat Card Modern - Dark Mode Background Gradient */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .stat-card-modern {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-color: var(--border-color);
  }
}

[data-bs-theme="dark"] .stat-card-modern {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: var(--border-color);
}

/* Top border accent animation */
.stat-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

/* Hover elevation effect with transform */
.stat-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.stat-card-modern:hover::before {
  transform: scaleX(1);
}

/* Dark mode hover shadow */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .stat-card-modern:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }
}

[data-bs-theme="dark"] .stat-card-modern:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Stat Icon Modern - Gradient backgrounds */
.stat-icon-modern {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  transition: transform 0.2s ease;
}

.stat-card-modern:hover .stat-icon-modern {
  transform: scale(1.05);
}

/* Icon gradient backgrounds per category */
.stat-icon-primary {
  background: var(--icon-gradient-purple);
  color: #667eea;
}

.stat-icon-success {
  background: var(--icon-gradient-green);
  color: #10b981;
}

.stat-icon-info {
  background: var(--icon-gradient-blue);
  color: #3b82f6;
}

.stat-icon-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
  color: #f59e0b;
}

/* Stat Icon Modern - Dark Mode Enhanced Colors */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .stat-icon-primary {
    background: var(--icon-gradient-purple);
    color: #a78bfa;
  }
  
  html[data-bs-theme="auto"] .stat-icon-success {
    background: var(--icon-gradient-green);
    color: #34d399;
  }
  
  html[data-bs-theme="auto"] .stat-icon-info {
    background: var(--icon-gradient-blue);
    color: #60a5fa;
  }
  
  html[data-bs-theme="auto"] .stat-icon-warning {
    background: var(--icon-gradient-orange);
    color: #fbbf24;
  }
}

[data-bs-theme="dark"] .stat-icon-primary {
  background: var(--icon-gradient-purple);
  color: #a78bfa;
}

[data-bs-theme="dark"] .stat-icon-success {
  background: var(--icon-gradient-green);
  color: #34d399;
}

[data-bs-theme="dark"] .stat-icon-info {
  background: var(--icon-gradient-blue);
  color: #60a5fa;
}

[data-bs-theme="dark"] .stat-icon-warning {
  background: var(--icon-gradient-orange);
  color: #fbbf24;
}

/* Stat Value */
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

/* Stat Label */
.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

/* Stat Sublabel */
.stat-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0;
  opacity: 0.8;
}

/* Responsive adjustments for stat cards */
@media (max-width: 767.98px) {
  .stat-card-modern {
    padding: 0.875rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.75rem;
  }
  
  .stat-icon-modern {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    margin: 0;
    flex-shrink: 0;
  }
  
  .stat-content {
    flex: 1;
    min-width: 0;
  }
  
  .stat-value {
    font-size: 1.125rem;
    margin-bottom: 0;
  }
  
  .stat-label {
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  
  .stat-sublabel {
    font-size: 0.6875rem;
    display: none;
  }
}

/* Stats section mobile padding */
.stats-section-mobile {
  padding: 1.25rem 0;
}

@media (min-width: 768px) {
  .stats-section-mobile {
    padding: 2.5rem 0;
  }
}

/* CSS Grid/Flexbox layout - only for desktop */
@media (min-width: 768px) {
  @supports (display: grid) {
    .stat-card-modern {
      display: grid;
      grid-template-rows: auto auto auto auto;
      place-items: center;
    }
  }
}

/* News Card Styles */
.news-card {
  transition: all var(--transition-slow);
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.news-card:hover {
  border-left-color: var(--primary-600);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateX(4px);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .news-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

[data-bs-theme="dark"] .news-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ============================================
   News Card Modern Styles
   Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
   ============================================ */

/* News Card Modern - Clean Design with Accent Border */
.news-card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid transparent;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* News Card Modern - Dark Mode Background */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .news-card-modern {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.03) 100%);
  }
}

[data-bs-theme="dark"] .news-card-modern {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.news-card-modern:hover {
  border-left-color: var(--primary-600);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateX(4px);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .news-card-modern:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-left-color: var(--primary-500);
  }
}

[data-bs-theme="dark"] .news-card-modern:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-left-color: var(--primary-500);
}

/* News Card Content Container */
.news-content {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
}

/* News Card Header - Title and Badge */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* News Card Title */
.news-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1 1 auto;
  min-width: 0;
}

/* News Card Badge Styles */
.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-badge-primary {
  background-color: var(--primary-100, rgba(99, 102, 241, 0.1));
  color: var(--primary-600);
}

.news-badge-info {
  background-color: var(--info-100, rgba(6, 182, 212, 0.1));
  color: var(--info-600, #0891b2);
}

.news-badge-success {
  background-color: var(--success-100, rgba(16, 185, 129, 0.1));
  color: var(--success-600, #059669);
}

.news-badge-warning {
  background-color: var(--warning-100, rgba(245, 158, 11, 0.1));
  color: var(--warning-600, #d97706);
}

.news-badge-danger {
  background-color: var(--danger-100, rgba(239, 68, 68, 0.1));
  color: var(--danger-600, #dc2626);
}

/* News Card Description with CSS Text Truncation */
.news-description {
  font-size: 0.9375rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* News Card Metadata */
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.news-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.news-meta-item i {
  font-size: 0.875rem;
}

.news-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* News Icon Wrapper - Dark Mode Enhanced Colors */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .news-icon-wrapper.bg-primary-subtle {
    background-color: rgba(99, 102, 241, 0.2) !important;
  }
  
  html[data-bs-theme="auto"] .news-icon-wrapper.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.2) !important;
  }
  
  html[data-bs-theme="auto"] .news-icon-wrapper.bg-success-subtle {
    background-color: rgba(34, 197, 94, 0.2) !important;
  }
  
  html[data-bs-theme="auto"] .news-icon-wrapper.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.2) !important;
  }
  
  html[data-bs-theme="auto"] .news-icon-wrapper.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.2) !important;
  }
}

[data-bs-theme="dark"] .news-icon-wrapper.bg-primary-subtle {
  background-color: rgba(99, 102, 241, 0.2) !important;
}

[data-bs-theme="dark"] .news-icon-wrapper.bg-info-subtle {
  background-color: rgba(6, 182, 212, 0.2) !important;
}

[data-bs-theme="dark"] .news-icon-wrapper.bg-success-subtle {
  background-color: rgba(34, 197, 94, 0.2) !important;
}

[data-bs-theme="dark"] .news-icon-wrapper.bg-warning-subtle {
  background-color: rgba(245, 158, 11, 0.2) !important;
}

[data-bs-theme="dark"] .news-icon-wrapper.bg-danger-subtle {
  background-color: rgba(239, 68, 68, 0.2) !important;
}

/* Network Status Compact */
.network-status-compact {
  border-left: 4px solid;
  transition: all var(--transition-normal);
}

.network-status-compact:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.network-status-compact.status-up {
  border-left-color: #10b981;
}

.network-status-compact.status-down {
  border-left-color: #ef4444;
}

.network-status-compact.status-unknown {
  border-left-color: #f59e0b;
}

/* Tab Navigation Styles - Legacy (kept for backward compatibility) */
.nav-tabs {
  border-bottom: 2px solid var(--border-color);
  transition: border-color var(--transition-normal);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  padding: 1rem 1.5rem;
  font-weight: 600;
  transition: all var(--transition-normal);
  position: relative;
}

.nav-tabs .nav-link:hover {
  border-bottom-color: var(--border-color);
  color: var(--text-heading);
  background-color: var(--bg-card-hover, var(--slate-50));
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .nav-tabs .nav-link:hover {
    background-color: var(--bg-card-hover);
  }
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
  background-color: var(--bg-card-hover);
}

.nav-tabs .nav-link.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
  background-color: transparent;
}

.nav-tabs .nav-link i {
  margin-right: 0.5rem;
}

/* ============================================
   Tab Navigation Modern - Redesigned Component
   Requirements: 4.1, 4.2, 4.3, 4.4, 4.5, 4.6
   ============================================ */

/* Tab Section Container */
.tab-section-modern {
  background-color: var(--bg-app);
  transition: background-color var(--transition-normal);
}

/* Tab Navigation Container */
.tab-nav-modern {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.tab-nav-modern::-webkit-scrollbar {
  height: 4px;
}

.tab-nav-modern::-webkit-scrollbar-track {
  background: transparent;
}

.tab-nav-modern::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.tab-nav-modern::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Tab Navigation List */
.tab-nav-list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 2px solid var(--border-color);
  min-width: max-content;
  transition: border-color var(--transition-normal);
}

/* Tab Navigation Item */
.tab-nav-item {
  flex-shrink: 0;
}

/* Tab Button Modern */
.tab-btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
  margin-bottom: -2px;
}

.tab-btn-modern i {
  font-size: 1.125rem;
  transition: transform 0.15s ease;
}

.tab-btn-modern span {
  transition: color 0.15s ease;
}

/* Tab Button Hover State */
.tab-btn-modern:hover {
  color: var(--text-heading);
  background-color: var(--bg-card-hover, rgba(0, 0, 0, 0.02));
}

.tab-btn-modern:hover i {
  transform: scale(1.1);
}

/* Tab Button Focus State (Accessibility) */
.tab-btn-modern:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--primary-500);
  border-radius: 0.25rem 0.25rem 0 0;
}

.tab-btn-modern:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: -2px;
  border-radius: 0.25rem 0.25rem 0 0;
}

/* Tab Button Active State */
.tab-btn-modern.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
  background-color: transparent;
}

.tab-btn-modern.active i {
  color: var(--primary-600);
}

/* Active Indicator Animation */
.tab-btn-modern::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary-gradient, linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%));
  border-radius: 3px 3px 0 0;
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.tab-btn-modern.active::after {
  width: 100%;
  left: 0;
  transform: translateX(0);
}

/* Tab Content Modern */
.tab-content-modern {
  transition: opacity var(--transition-normal);
}

.tab-pane-modern {
  animation: tabFadeIn 0.15s ease;
}

.tab-pane-modern.fade:not(.show) {
  opacity: 0;
}

.tab-pane-modern.fade.show {
  opacity: 1;
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .tab-btn-modern:hover {
    background-color: var(--bg-card-hover, rgba(255, 255, 255, 0.05));
  }
  
  html[data-bs-theme="auto"] .tab-btn-modern:focus {
    box-shadow: inset 0 0 0 2px var(--primary-400);
  }
}

[data-bs-theme="dark"] .tab-btn-modern:hover {
  background-color: var(--bg-card-hover, rgba(255, 255, 255, 0.05));
}

[data-bs-theme="dark"] .tab-btn-modern:focus {
  box-shadow: inset 0 0 0 2px var(--primary-400);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .tab-btn-modern {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .tab-btn-modern i {
    font-size: 1rem;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .tab-nav-modern {
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
  }
  
  .tab-btn-modern {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    min-height: 44px; /* Touch target minimum */
    min-width: 44px;
  }
  
  .tab-btn-modern i {
    font-size: 1rem;
  }
  
  .tab-btn-modern span {
    display: inline; /* Keep text visible on mobile */
  }
}

/* Very Small Screens */
@media (max-width: 480px) {
  .tab-btn-modern {
    padding: 0.625rem 0.75rem;
    gap: 0.375rem;
  }
  
  .tab-btn-modern i {
    font-size: 0.9375rem;
  }
}

/* ============================================
   Feature Card Modern Styles
   Requirements: 5.1, 5.2, 5.3, 5.4, 5.5, 5.6
   ============================================ */

/* Legacy Feature Card Styles (for backward compatibility) */
.feature-card {
  height: 100%;
  transition: all var(--transition-slow);
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--primary-600);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .feature-card:hover {
    box-shadow: var(--card-hover-shadow);
  }
}

[data-bs-theme="dark"] .feature-card:hover {
  box-shadow: var(--card-hover-shadow);
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

/* Feature Card Modern - Base Styles */
.feature-card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

/* Feature Card Modern - Hover Effects (Req 5.2) */
.feature-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
}

/* Feature Card Modern - Border Color Change on Hover per Category */
.feature-card-modern.feature-card-primary:hover {
  border-color: var(--primary-500);
}

.feature-card-modern.feature-card-success:hover {
  border-color: var(--success-500, #22c55e);
}

.feature-card-modern.feature-card-info:hover {
  border-color: var(--info-500, #06b6d4);
}

.feature-card-modern.feature-card-warning:hover {
  border-color: var(--warning-500, #f59e0b);
}

.feature-card-modern.feature-card-danger:hover {
  border-color: var(--danger-500, #ef4444);
}

.feature-card-modern.feature-card-secondary:hover {
  border-color: var(--secondary-500, #6b7280);
}

/* Feature Icon Modern - Base Styles (Req 5.5) */
.feature-icon-modern {
  width: 5rem;
  height: 5rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  transition: transform var(--transition-normal);
}

/* Feature Icon Modern - Gradient Backgrounds per Category (Req 5.5) */
.feature-icon-modern.feature-icon-primary {
  background: linear-gradient(135deg, var(--primary-100, #e0e7ff) 0%, var(--primary-200, #c7d2fe) 100%);
  color: var(--primary-600);
}

.feature-icon-modern.feature-icon-success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: var(--success-600, #16a34a);
}

.feature-icon-modern.feature-icon-info {
  background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
  color: var(--info-600, #0891b2);
}

.feature-icon-modern.feature-icon-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: var(--warning-600, #d97706);
}

.feature-icon-modern.feature-icon-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: var(--danger-600, #dc2626);
}

.feature-icon-modern.feature-icon-secondary {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: var(--secondary-600, #4b5563);
}

/* Feature Card Modern - Icon Hover Effect */
.feature-card-modern:hover .feature-icon-modern {
  transform: scale(1.05);
}

/* Feature Title Styles (Req 5.3) */
.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
  transition: color var(--transition-normal);
}

/* Feature Description Styles (Req 5.3) */
.feature-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Feature Button Styles (Req 5.6) */
.feature-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  margin-top: auto;
  min-width: 160px;
}

/* Feature Button - Hover and Focus States (Req 5.6) */
.feature-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.feature-btn:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Feature Button - Color Variants */
.feature-btn-primary {
  background: var(--primary-600);
  color: white;
}

.feature-btn-primary:hover {
  background: var(--primary-700);
  color: white;
}

.feature-btn-success {
  background: var(--success-600, #16a34a);
  color: white;
}

.feature-btn-success:hover {
  background: var(--success-700, #15803d);
  color: white;
}

.feature-btn-info {
  background: var(--info-600, #0891b2);
  color: white;
}

.feature-btn-info:hover {
  background: var(--info-700, #0e7490);
  color: white;
}

.feature-btn-warning {
  background: var(--warning-600, #d97706);
  color: white;
}

.feature-btn-warning:hover {
  background: var(--warning-700, #b45309);
  color: white;
}

.feature-btn-danger {
  background: var(--danger-600, #dc2626);
  color: white;
}

.feature-btn-danger:hover {
  background: var(--danger-700, #b91c1c);
  color: white;
}

.feature-btn-secondary {
  background: var(--secondary-600, #4b5563);
  color: white;
}

.feature-btn-secondary:hover {
  background: var(--secondary-700, #374151);
  color: white;
}

/* Feature Card Modern - Dark Mode Support */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .feature-card-modern {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.04) 100%);
    border-color: var(--border-color);
  }
  
  html[data-bs-theme="auto"] .feature-card-modern:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  }
  
  /* Dark mode gradient backgrounds for icons */
  html[data-bs-theme="auto"] .feature-icon-modern.feature-icon-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.3) 100%);
  }
  
  html[data-bs-theme="auto"] .feature-icon-modern.feature-icon-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.3) 100%);
  }
  
  html[data-bs-theme="auto"] .feature-icon-modern.feature-icon-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0.3) 100%);
  }
  
  html[data-bs-theme="auto"] .feature-icon-modern.feature-icon-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.3) 100%);
  }
  
  html[data-bs-theme="auto"] .feature-icon-modern.feature-icon-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.3) 100%);
  }
  
  html[data-bs-theme="auto"] .feature-icon-modern.feature-icon-secondary {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(107, 114, 128, 0.3) 100%);
  }
}

[data-bs-theme="dark"] .feature-card-modern {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.04) 100%);
  border-color: var(--border-color);
}

[data-bs-theme="dark"] .feature-card-modern:hover {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .feature-icon-modern.feature-icon-primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.3) 100%);
}

[data-bs-theme="dark"] .feature-icon-modern.feature-icon-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.3) 100%);
}

[data-bs-theme="dark"] .feature-icon-modern.feature-icon-info {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0.3) 100%);
}

[data-bs-theme="dark"] .feature-icon-modern.feature-icon-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.3) 100%);
}

[data-bs-theme="dark"] .feature-icon-modern.feature-icon-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.3) 100%);
}

[data-bs-theme="dark"] .feature-icon-modern.feature-icon-secondary {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(107, 114, 128, 0.3) 100%);
}

/* Feature Card Modern - Responsive Styles (Req 5.4) */
@media (max-width: 767.98px) {
  .feature-card-modern {
    padding: 1.25rem;
    text-align: left;
  }
  
  .feature-icon-modern {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
  }
  
  .feature-title {
    font-size: 1.0625rem;
  }
  
  .feature-description {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  
  .feature-btn {
    width: 100%;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    min-height: var(--touch-target-min, 44px);
  }
}

/* Footer Section Styles */
.footer-section {
  background-color: var(--bg-app);
  border-top: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Footer Modern - Clean Multi-Column Layout (Requirements 6.1, 6.2, 6.3, 6.4) */
.footer-modern {
  background-color: var(--bg-app);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Footer Brand */
.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  transition: color var(--transition-normal);
}

.footer-brand i {
  font-size: 1.5rem;
}

.footer-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 400px;
  margin-bottom: 1.5rem;
  transition: color var(--transition-normal);
}

/* Footer Social Links */
.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.footer-social-link i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.footer-social-link:hover {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  color: white;
  transform: translateY(-2px);
}

/* Footer Title */
.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 1rem;
  transition: color var(--transition-normal);
}

/* Footer Links - Enhanced with hover animations (Requirements 6.3) */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--primary-600);
  transform: translateX(4px);
}

.footer-links a i {
  font-size: 0.875rem;
  transition: transform var(--transition-normal);
}

.footer-links a:hover i {
  transform: scale(1.1);
}

/* Footer Contact List */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-style: normal;
  transition: color var(--transition-normal);
}

.footer-contact-item i {
  color: var(--primary-600);
  font-size: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.footer-contact-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-normal);
}

.footer-contact-link:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

/* Footer Bottom (Requirements 6.5) */
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  margin-top: 3rem;
  transition: border-color var(--transition-normal);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
  transition: color var(--transition-normal);
}

.footer-powered {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
  transition: color var(--transition-normal);
}

.footer-powered-brand {
  color: var(--text-heading);
  font-weight: 600;
  transition: color var(--transition-normal);
}

/* Footer Dark Mode Support (Requirements 6.4) */
[data-bs-theme="dark"] .footer-modern {
  background-color: var(--bg-app);
  border-top-color: var(--border-color);
}

[data-bs-theme="dark"] .footer-brand {
  color: var(--text-heading);
}

[data-bs-theme="dark"] .footer-description,
[data-bs-theme="dark"] .footer-links a,
[data-bs-theme="dark"] .footer-contact-item,
[data-bs-theme="dark"] .footer-contact-link,
[data-bs-theme="dark"] .footer-copyright,
[data-bs-theme="dark"] .footer-powered {
  color: var(--text-muted);
}

[data-bs-theme="dark"] .footer-title,
[data-bs-theme="dark"] .footer-powered-brand {
  color: var(--text-heading);
}

[data-bs-theme="dark"] .footer-social-link {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-muted);
}

[data-bs-theme="dark"] .footer-social-link:hover {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  color: white;
}

[data-bs-theme="dark"] .footer-links a:hover,
[data-bs-theme="dark"] .footer-contact-link:hover {
  color: var(--primary-500);
}

/* Footer Responsive - Mobile stacking (Requirements 6.2) */
@media (max-width: 768px) {
  .footer-modern {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-brand {
    font-size: 1.125rem;
  }
  
  .footer-description {
    font-size: 0.875rem;
    max-width: 100%;
  }
  
  .footer-title {
    font-size: 0.9375rem;
    margin-top: 1rem;
  }
  
  .footer-links a,
  .footer-contact-item {
    font-size: 0.875rem;
  }
  
  .footer-bottom {
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
  }
  
  .footer-bottom .text-md-end {
    text-align: center !important;
  }
  
  .footer-copyright,
  .footer-powered {
    font-size: 0.8125rem;
  }
}

/* Section Title Styles */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  transition: color var(--transition-normal);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: 2rem;
  transition: color var(--transition-normal);
}

/* Landing Page Mobile Responsive */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  }
  
  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .stat-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }
  
  /* News Card Modern Mobile Styles - Requirements 3.4 */
  .news-card-modern {
    padding: 1rem;
  }
  
  .news-card-modern .d-flex.align-items-start {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .news-icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .news-title {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .news-description {
    font-size: 0.875rem;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    line-height: 1.6;
  }
  
  .news-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
  }
  
  .news-badge {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.5rem;
  }
}

/* Spin animation - CRITICAL: Must override ALL performance rules */
.spin,
i.spin,
.bi.spin,
i.bi.spin,
.bi-arrow-clockwise.spin,
[class*="spin"] {
  animation: spin 1s linear infinite !important;
  display: inline-block !important;
  will-change: transform !important;
  transform-origin: center !important;
  animation-duration: 1s !important;
  animation-iteration-count: infinite !important;
  animation-timing-function: linear !important;
  animation-play-state: running !important;
}

/* 
 * Performance optimization for reduced motion preference
 * Only apply to users who prefer reduced motion
 */
@media (prefers-reduced-motion: reduce) {
  *:not(.spin):not([class*="spin"]):not(.spinner-border):not(.spinner-grow):not(.spinner-border-sm) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile Touch Targets & Responsiveness */
@media (max-width: 768px) {
  /* Ensure table cells have adequate padding for touch */
  .table td,
  .table th {
    padding: 0.75rem 0.5rem;
    min-height: 44px;
  }

  .table thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }

  /* Touch-friendly buttons */
  .btn-sm {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
  }

  /* Modal table optimization for mobile */
  #liveMonitoringModal .table-responsive {
    -webkit-overflow-scrolling: touch;
    max-height: 70vh;
    overflow-x: auto;
    overflow-y: auto;
  }

  #liveMonitoringModal .table {
    font-size: 0.875rem;
  }

  #liveMonitoringModal .table td {
    white-space: nowrap;
    padding: 0.75rem 0.5rem;
  }

  /* Ensure code blocks don't break on mobile */
  code {
    word-break: keep-all;
    white-space: nowrap;
    font-size: 0.8rem;
  }
  
  /* Navbar mobile improvements */
  .navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
  }
  
  .navbar-nav .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
  }
  
  .navbar-text {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }
  
  .navbar-brand {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }
  
  /* Button mobile improvements - ensure touch-friendly */
  .btn {
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  .btn-sm {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  /* Dropdown mobile improvements */
  .dropdown-toggle {
    min-height: 44px;
    touch-action: manipulation;
  }
  
  .dropdown-item {
    min-height: 44px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    touch-action: manipulation;
  }
  
  /* Form controls mobile improvements - prevent iOS zoom */
  .form-control,
  .form-select {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    touch-action: manipulation;
  }
  
  /* Badge mobile improvements */
  .badge {
    min-height: 24px;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  /* Navbar collapse mobile spacing */
  .navbar-collapse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
  }
  
  /* Container mobile padding */
  .container,
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Card mobile improvements */
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  /* Table mobile improvements */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--card-radius);
  }
  
  /* Gap utilities mobile */
  .gap-2 {
    gap: 0.5rem !important;
  }
  
  /* Navbar user section mobile */
  .navbar .d-flex.align-items-center {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  /* Modal mobile improvements */
  .modal-dialog {
    margin: 1rem;
  }
  
  .modal-content {
    border-radius: var(--card-radius);
  }
  
  /* Tab navigation mobile */
  .nav-tabs .nav-link {
    min-height: 44px;
    padding: 0.75rem 1rem;
    touch-action: manipulation;
  }
}

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

/* Ensure backdrop is completely transparent */
.feedback-toast.show .modal-backdrop {
  background-color: transparent;
  opacity: 0;
}

.feedback-toast .modal-backdrop {
  display: none;
}

/* User Type Card Selection */
#userTypeExistingCard,
#userTypeNewCard {
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

#userTypeExistingCard:hover,
#userTypeNewCard:hover {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.card.border-primary {
  border-color: var(--primary-600) !important;
  background-color: var(--primary-50);
  transition: all 0.15s ease;
}

[data-bs-theme="dark"] .card.border-primary {
  background-color: rgba(99, 102, 241, 0.1);
}

/* ============================================
   Feedback Form - Modern Redesign
   Requirements: 10.1, 10.2, 10.3, 10.4, 10.5, 10.6
   ============================================ */

/* Section Container */
.feedback-section-modern {
  padding: 5rem 0;
  background-color: var(--bg-app);
}

/* Card Container */
.feedback-card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.3s ease;
}

.feedback-card-modern:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Header */
.feedback-header {
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .feedback-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, var(--bg-card) 100%);
}

.feedback-icon-wrapper {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.feedback-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}

.feedback-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* Form Container */
.feedback-form-modern {
  padding: 2rem;
}

/* Form Group */
.feedback-form-group {
  margin-bottom: 1.5rem;
}

/* Form Label */
.feedback-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
}

.feedback-form-label i {
  color: var(--primary-500);
  font-size: 1rem;
}

.feedback-required {
  color: var(--danger-500);
  font-weight: 700;
}

/* Form Controls */
.feedback-form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-body);
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.feedback-form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Focus States - Requirements 10.2, 10.3 */
.feedback-form-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  background-color: var(--bg-card);
}

[data-bs-theme="dark"] .feedback-form-control:focus {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

/* Textarea specific */
.feedback-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Form Hint */
.feedback-form-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Form Footer (for textarea) */
.feedback-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

/* Character Counter */
.feedback-char-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.feedback-char-count.feedback-char-warning {
  color: var(--warning-600);
  font-weight: 600;
}

/* Form Actions */
.feedback-form-actions {
  margin-top: 2rem;
}

/* Submit Button - Requirements 10.4 */
.feedback-submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--primary-gradient);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feedback-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

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

.feedback-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

.feedback-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Button Text States */
.feedback-btn-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.feedback-btn-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Loading State - Requirements 10.4 */
.feedback-submit-btn.loading .feedback-btn-text {
  display: none;
}

.feedback-submit-btn.loading .feedback-btn-loading {
  display: flex;
}

/* Spinner Animation */
.feedback-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: feedbackSpin 0.8s linear infinite;
}

@keyframes feedbackSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Alert Messages - Requirements 10.5 */
.feedback-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  animation: feedbackAlertSlide 0.3s ease;
}

@keyframes feedbackAlertSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-alert i {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* Success Alert */
.feedback-alert-success {
  background-color: var(--success-50);
  border: 1px solid var(--success-200);
  color: var(--success-700);
}

.feedback-alert-success i {
  color: var(--success-500);
}

[data-bs-theme="dark"] .feedback-alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--success-400);
}

/* Error Alert */
.feedback-alert-error {
  background-color: var(--danger-50);
  border: 1px solid var(--danger-200);
  color: var(--danger-700);
}

.feedback-alert-error i {
  color: var(--danger-500);
}

[data-bs-theme="dark"] .feedback-alert-error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger-400);
}

/* Dark Mode Support - Requirements 10.6 */
[data-bs-theme="dark"] .feedback-card-modern {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-bs-theme="dark"] .feedback-form-control {
  background-color: var(--bg-app);
  border-color: var(--border-color);
  color: var(--text-body);
}

[data-bs-theme="dark"] .feedback-form-control::placeholder {
  color: var(--text-muted);
}

[data-bs-theme="dark"] .feedback-submit-btn {
  background: var(--primary-gradient);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .feedback-section-modern {
    padding: 3rem 0;
  }
  
  .feedback-header {
    padding: 2rem 1.5rem 1.25rem;
  }
  
  .feedback-icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }
  
  .feedback-title {
    font-size: 1.5rem;
  }
  
  .feedback-subtitle {
    font-size: 0.9375rem;
  }
  
  .feedback-form-modern {
    padding: 1.5rem;
  }
  
  .feedback-form-control {
    padding: 0.75rem 0.875rem;
    font-size: 16px; /* Prevent iOS zoom */
  }
  
  .feedback-submit-btn {
    padding: 0.875rem 1.5rem;
    min-height: 48px; /* Touch target */
  }
}

/* Validation States */
.feedback-form-control:invalid:not(:placeholder-shown) {
  border-color: var(--danger-400);
}

.feedback-form-control:valid:not(:placeholder-shown) {
  border-color: var(--success-400);
}

/* Focus-visible for keyboard navigation */
.feedback-submit-btn:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.feedback-form-control:focus-visible {
  outline: none;
}


/* ============================================
   Performance Optimization - Utility Classes
   Requirements: 7.2, 7.3, 7.4, 7.5
   Task 9.1: Move inline styles to global stylesheet
   ============================================ */

/* Body Background - Replaces inline style on body */
body.landing-page {
  background-color: var(--bg-app);
}

/* Navbar Landing - Replaces inline styles on nav */
.navbar-landing {
  background-color: var(--bg-card) !important;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

/* Desktop navbar layout */
.navbar-mobile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-landing .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-heading) !important;
  text-decoration: none;
}

.navbar-landing .navbar-brand i {
  font-size: 1.25rem;
  color: var(--primary-600);
}

/* Hamburger button - visible on all screen sizes */
.navbar-toggler-custom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.navbar-toggler-custom:hover,
.navbar-toggler-custom:focus {
  background: var(--slate-100);
  border-color: var(--primary-500);
  outline: none;
}

.navbar-toggler-custom span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 1px;
  transition: all 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .navbar-toggler-custom:hover,
  html[data-bs-theme="auto"] .navbar-toggler-custom:focus {
    background: var(--bg-card-hover);
  }
}

[data-bs-theme="dark"] .navbar-toggler-custom:hover,
[data-bs-theme="dark"] .navbar-toggler-custom:focus {
  background: var(--bg-card-hover);
}

/* Navbar collapse dropdown menu - ONLY for mobile */
@media (max-width: 991.98px) {
  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 1rem;
    z-index: 1000;
  }

  .navbar-collapse .navbar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .navbar-collapse .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-body);
    border-radius: 0.375rem;
    transition: all 0.15s ease;
  }

  .navbar-collapse .nav-link:hover,
  .navbar-collapse .nav-link.active {
    background: var(--slate-100);
    color: var(--primary-600);
  }

  .navbar-collapse .nav-link i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
  }
}

@media (max-width: 991.98px) and (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .navbar-collapse .nav-link:hover,
  html[data-bs-theme="auto"] .navbar-collapse .nav-link.active {
    background: var(--bg-card-hover);
    color: var(--primary-500);
  }
}

@media (max-width: 991.98px) {
  [data-bs-theme="dark"] .navbar-collapse .nav-link:hover,
  [data-bs-theme="dark"] .navbar-collapse .nav-link.active {
    background: var(--bg-card-hover);
    color: var(--primary-500);
  }
}

/* Desktop navbar - ensure horizontal layout */
@media (min-width: 992px) {
  .navbar-collapse {
    position: static !important;
    display: flex !important;
    flex-basis: auto;
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .navbar-collapse .navbar-nav {
    flex-direction: row !important;
    gap: 0;
  }

  .navbar-collapse .nav-link {
    padding: 0.5rem 1rem;
  }
}

.navbar-landing .navbar-toggler {
  border-color: var(--border-color);
  color: var(--text-heading);
}

/* Section Background - Replaces inline style on sections */
.section-bg-app {
  background-color: var(--bg-app);
}

/* Info Icon Box - Replaces inline style="width: 64px; height: 64px;" */
.info-icon-box {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Info Icon Box - Dark Mode Enhanced Colors */
@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .info-icon-box.bg-primary-subtle {
    background-color: rgba(99, 102, 241, 0.2) !important;
  }
  
  html[data-bs-theme="auto"] .info-icon-box.bg-success-subtle {
    background-color: rgba(34, 197, 94, 0.2) !important;
  }
  
  html[data-bs-theme="auto"] .info-icon-box.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.2) !important;
  }
  
  html[data-bs-theme="auto"] .info-icon-box.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.2) !important;
  }
}

[data-bs-theme="dark"] .info-icon-box.bg-primary-subtle {
  background-color: rgba(99, 102, 241, 0.2) !important;
}

[data-bs-theme="dark"] .info-icon-box.bg-success-subtle {
  background-color: rgba(34, 197, 94, 0.2) !important;
}

[data-bs-theme="dark"] .info-icon-box.bg-info-subtle {
  background-color: rgba(6, 182, 212, 0.2) !important;
}

[data-bs-theme="dark"] .info-icon-box.bg-warning-subtle {
  background-color: rgba(245, 158, 11, 0.2) !important;
}

/* Code Block Styling - Replaces inline style on code elements */
.code-highlight {
  background-color: var(--slate-100);
  color: var(--text-body);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .code-highlight {
    background-color: var(--slate-700);
  }
}

[data-bs-theme="dark"] .code-highlight {
  background-color: var(--slate-700);
}

/* Status Tabs Wrapper - Replaces inline styles */
.status-tabs-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.status-tabs-list {
  min-width: max-content;
}

/* Uptime Kuma Container - Replaces inline styles on proxy wrapper */
.uptime-kuma-container {
  width: 100%;
  min-height: 600px;
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
  background-color: var(--bg-card);
}

/* Uptime Kuma Iframe - Replaces inline styles on iframe */
.uptime-kuma-iframe {
  width: 100%;
  height: 800px;
  border: none;
  display: block;
  background-color: var(--bg-card);
}

/* Text Line Height Utilities - Replaces inline line-height styles */
.line-height-relaxed {
  line-height: 1.8;
}

.line-height-loose {
  line-height: 2;
}

/* Text Size Utilities - Replaces inline font-size styles */
.text-lg {
  font-size: 1.125rem;
}

/* Contact Link Styling - Replaces inline styles on contact links */
.contact-link-muted {
  color: var(--text-muted) !important;
  text-decoration: none;
}

.contact-link-muted:hover {
  color: var(--primary-600) !important;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .contact-link-muted:hover {
    color: var(--primary-500) !important;
  }
}

[data-bs-theme="dark"] .contact-link-muted:hover {
  color: var(--primary-500) !important;
}

/* ============================================
   Task 9.2: CSS Animation Optimization
   Requirements: 7.3, 7.4, 7.5
   Using transform and opacity only for animations
   Implementing will-change appropriately
   ============================================ */

/* Optimized Animation Classes - Use transform and opacity only */
.animate-optimized {
  will-change: transform, opacity;
}

/* Remove will-change after animation completes (via JS or animation-fill-mode) */
.animate-complete {
  will-change: auto;
}

/* Hero decorations - Optimized with will-change */
.hero-decoration {
  will-change: transform;
}

/* Card hover animations - Optimized */
.stat-card-modern,
.news-card-modern,
.feature-card-modern {
  will-change: transform, box-shadow;
}

/* Remove will-change when not hovering (performance optimization) */
@media (hover: hover) {
  .stat-card-modern:not(:hover),
  .news-card-modern:not(:hover),
  .feature-card-modern:not(:hover) {
    will-change: auto;
  }
}

/* Tab content animation - Optimized */
.tab-pane-modern {
  will-change: opacity, transform;
}

.tab-pane-modern.show {
  will-change: auto;
}

/* Button hover animations - Optimized */
.btn-hero,
.feature-btn,
.footer-social-link {
  will-change: transform;
}

@media (hover: hover) {
  .btn-hero:not(:hover),
  .feature-btn:not(:hover),
  .footer-social-link:not(:hover) {
    will-change: auto;
  }
}

/* Feedback spinner - Optimized */
.feedback-spinner {
  will-change: transform;
}

/* Loading spinner - Optimized */
.spin {
  will-change: transform;
}

/* ============================================
   Reduced Motion Support
   For users who prefer reduced motion
   ============================================ */

@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;
  }
  
  .hero-decoration {
    animation: none !important;
    display: none;
  }
  
  .animate-float,
  .animate-fade-in,
  .animate-fade-in-up,
  .animate-pulse,
  .animate-scale-in {
    animation: none !important;
  }
  
  .tab-pane-modern {
    animation: none !important;
  }
  
  .stat-card-modern:hover,
  .news-card-modern:hover,
  .feature-card-modern:hover {
    transform: none !important;
  }
}


/* Monitor Status Wrap - For dynamic status colors in JavaScript */
.monitor-status-wrap {
  height: 100%;
  min-height: 40px;
  border-radius: 4px;
  opacity: 0.15;
}


/* ============================================
   RESPONSIVE DESIGN FINALIZATION
   Task 10: Comprehensive Responsive Breakpoints
   Requirements: 9.1, 9.2, 9.3, 9.4, 9.5, 9.6
   ============================================ */

/* ============================================
   Task 10.1: Responsive Breakpoints
   Mobile (< 768px), Tablet (768px - 1024px), Desktop (> 1024px)
   Requirements: 9.1, 9.2
   ============================================ */

/* --- Desktop (> 1024px) - Default styles above --- */

/* --- Tablet (768px - 1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Container adjustments for tablet */
  .container {
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  /* Hero section tablet adjustments */
  .hero-modern {
    min-height: 60vh;
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
  
  .hero-description {
    font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
    max-width: 100%;
  }
  
  .hero-cta-group {
    flex-direction: row;
    gap: 1rem;
  }
  
  .hero-features {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  /* Stat cards tablet - 2 column grid */
  .stat-card-modern {
    padding: 1.25rem;
  }
  
  .stat-value {
    font-size: 1.75rem;
  }
  
  .stat-icon-modern {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
  }
  
  /* News cards tablet adjustments */
  .news-card-modern {
    padding: 1.25rem;
  }
  
  .news-icon-wrapper {
    width: 3rem;
    height: 3rem;
    font-size: 1.125rem;
  }
  
  .news-title {
    font-size: 1.0625rem;
  }
  
  .news-description {
    font-size: 0.9375rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  
  /* Feature cards tablet - 2 column grid */
  .feature-card-modern {
    padding: 1.5rem;
  }
  
  .feature-icon-modern {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
  }
  
  .feature-title {
    font-size: 1.125rem;
  }
  
  .feature-description {
    font-size: 0.875rem;
  }
  
  /* Tab navigation tablet */
  .tab-btn-modern {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
  }
  
  /* Footer tablet - 2 column layout */
  .footer-modern {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-brand {
    font-size: 1.125rem;
  }
  
  .footer-description {
    font-size: 0.9375rem;
  }
  
  /* Section titles tablet */
  .section-title {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  }
  
  .section-subtitle {
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  }
  
  /* Feedback form tablet */
  .feedback-section-modern {
    padding: 3.5rem 0;
  }
  
  .feedback-card-modern {
    max-width: 100%;
  }
}

/* --- Mobile (< 768px) - Enhanced mobile styles --- */
@media (max-width: 767.98px) {
  /* Container mobile padding */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* ========== NAVBAR MOBILE - SINGLE ROW ========== */
  .navbar-landing {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
  }
  
  .navbar-mobile-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }
  
  .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    text-decoration: none;
  }
  
  .navbar-brand i {
    font-size: 1.125rem;
    color: var(--primary-600);
  }
  
  /* Hamburger button smaller on mobile */
  .navbar-toggler-custom {
    width: 36px;
    height: 36px;
  }
  
  /* Nav link smaller font on mobile */
  .navbar-collapse .nav-link {
    font-size: 0.875rem;
  }
  
  /* ========== HERO SECTION MOBILE - NORMAL SIZE ========== */
  .hero-modern {
    min-height: auto;
    padding: 2.5rem 0 3rem;
  }
  
  .hero-content {
    padding: 0;
  }
  
  .hero-badge {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1.25rem !important;
  }
  
  .hero-title {
    font-size: 1.875rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
  }
  
  .hero-title br {
    display: none;
  }
  
  .hero-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* Hero CTA Buttons - Side by side, proper size */
  .hero-cta-group {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1.75rem;
  }
  
  .btn-hero {
    flex: 1;
    justify-content: center;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    min-height: 48px;
    white-space: nowrap;
    border-radius: 0.5rem;
  }
  
  .btn-hero i {
    display: none; /* Hide icons on mobile for cleaner look */
  }
  
  /* Hero Features - horizontal with proper spacing */
  .hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem 1.5rem;
    margin-top: 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .hero-feature-item {
    font-size: 0.875rem;
  }
  
  /* Hide hero visual on mobile */
  .hero-visual {
    display: none !important;
  }
  
  /* ========== STATS SECTION MOBILE ========== */
  .stats-section-mobile {
    padding: 2rem 0;
  }
  
  /* Stat cards - 2x2 grid, centered */
  .stat-card-modern {
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
  }
  
  .stat-icon-modern {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    margin: 0;
  }
  
  .stat-value {
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  
  .stat-label {
    font-size: 0.875rem;
    margin-bottom: 0;
  }
  
  .stat-sublabel {
    font-size: 0.75rem;
    display: block;
  }
  
  /* ========== TAB SECTION MOBILE ========== */
  .tab-section-modern {
    padding: 1.25rem 0;
  }
  
  .tab-nav-modern {
    margin: 0 -1rem;
    padding: 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .tab-nav-modern::-webkit-scrollbar {
    display: none;
  }
  
  .tab-nav-list {
    gap: 0.5rem;
  }
  
  .tab-btn-modern {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    white-space: nowrap;
    min-height: 48px;
  }
  
  /* ========== TAB CONTENT MOBILE ========== */
  .container.my-5 {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
  }
  
  /* Section titles */
  .section-title {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
  }
  
  .section-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
  }
  
  /* ========== NEWS CARDS MOBILE ========== */
  .news-card-modern {
    padding: 1.25rem;
  }
  
  .news-card-modern .d-flex.align-items-start {
    gap: 1rem;
  }
  
  .news-icon-wrapper {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
    flex-shrink: 0;
  }
  
  .news-content {
    flex: 1;
    min-width: 0;
  }
  
  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
  }
  
  .news-title {
    font-size: 1.0625rem;
    line-height: 1.4;
    margin: 0;
  }
  
  .news-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }
  
  .news-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    margin-bottom: 0.625rem;
  }
  
  .news-meta {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
  
  /* Row gap adjustment for news cards */
  #announcementsList.row.g-4 {
    --bs-gutter-y: 1rem;
  }
  
  /* ========== INFO CARDS MOBILE ========== */
  .card-clean .card-body {
    padding: 1.25rem !important;
  }
  
  .info-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }
  
  .info-icon-box i {
    font-size: 1.375rem !important;
  }
  
  .card-clean h5 {
    font-size: 1.0625rem;
  }
  
  .card-clean .text-muted {
    font-size: 0.9375rem;
  }
  
  /* ========== QUICK LINKS MOBILE ========== */
  .col-lg-4 .d-grid.gap-2 {
    gap: 0.75rem !important;
  }
  
  .btn-outline-primary.text-start {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    min-height: 48px;
  }
  
  .btn-outline-primary.text-start i {
    font-size: 1rem;
    margin-right: 0.625rem !important;
  }
  
  /* Features list mobile */
  .list-group-item {
    padding: 0.75rem 0;
  }
  
  .list-group-item .fs-5 {
    font-size: 1.125rem !important;
  }
  
  .list-group-item strong.small {
    font-size: 0.9375rem;
  }
  
  .list-group-item .text-muted.small {
    font-size: 0.8125rem;
  }
  
  /* Sidebar sections mobile */
  .col-lg-4 section h3.h5 {
    font-size: 1.0625rem;
    margin-bottom: 0.875rem;
  }
  
  .col-lg-4 section.mb-4 {
    margin-bottom: 1.25rem !important;
  }
  
  /* Row gaps mobile */
  .row.g-4 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }
  
  .row.g-3 {
    --bs-gutter-x: 0.625rem;
    --bs-gutter-y: 0.625rem;
  }
  
  /* Section margins mobile */
  section.mb-5 {
    margin-bottom: 1.75rem !important;
  }
  
  /* ========== FEATURE CARDS MOBILE - FIXED ========== */
  .feature-card-modern {
    padding: 1.25rem;
    text-align: center;
  }
  
  .feature-icon-modern {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.375rem;
    margin: 0 auto 1rem;
  }
  
  .feature-title {
    font-size: 1.0625rem;
    margin-bottom: 0.625rem;
  }
  
  .feature-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* Feature buttons - FIXED: Symmetric */
  .feature-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    min-height: 44px;
  }
  
  .feature-btn i {
    font-size: 0.9375rem;
  }
  
  /* ========== FOOTER MOBILE - FIXED ========== */
  .footer-modern {
    padding: 2rem 0 1.25rem;
  }
  
  .footer-brand {
    font-size: 1rem;
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .footer-brand i {
    font-size: 1.125rem;
  }
  
  .footer-description {
    font-size: 0.9375rem;
    max-width: 100%;
    margin-bottom: 1rem;
    line-height: 1.6;
  }
  
  /* Footer Social Links - FIXED: Centered icons */
  .footer-social {
    display: flex;
    gap: 0.625rem;
    margin-top: 1rem;
  }
  
  .footer-social-link {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    text-align: center;
  }
  
  .footer-social-link i {
    margin: 0;
    padding: 0;
    line-height: 1;
  }
  
  .footer-title {
    font-size: 0.9375rem;
    margin-top: 1.25rem;
    margin-bottom: 0.625rem;
  }
  
  .footer-links a,
  .footer-contact-item {
    font-size: 0.875rem;
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  
  .footer-links a i,
  .footer-contact-item i {
    font-size: 0.875rem;
    margin-right: 0.5rem;
  }
  
  .footer-bottom {
    padding-top: 1rem;
    margin-top: 1.25rem;
    text-align: center;
  }
  
  .footer-copyright,
  .footer-powered {
    font-size: 0.8125rem;
  }
  
  /* ========== FEEDBACK FORM MOBILE ========== */
  .feedback-section-modern {
    padding: 2rem 0;
  }
  
  .feedback-header {
    padding: 1.25rem 1rem 0.75rem;
  }
  
  .feedback-icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .feedback-title {
    font-size: 1.125rem;
  }
  
  .feedback-subtitle {
    font-size: 0.875rem;
  }
  
  .feedback-form-modern {
    padding: 1rem;
  }
  
  .feedback-form-group {
    margin-bottom: 1rem;
  }
  
  .feedback-form-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  .feedback-form-control {
    padding: 0.625rem 0.75rem;
    font-size: 16px; /* Prevent iOS zoom */
    min-height: 44px;
  }
  
  .feedback-textarea {
    min-height: 100px;
  }
  
  .feedback-form-hint {
    font-size: 0.75rem;
  }
  
  .feedback-submit-btn {
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }
  
  /* ========== TENTANG TAB MOBILE ========== */
  .tab-pane .card-body.p-5 {
    padding: 1.25rem !important;
  }
  
  .tab-pane .card-body.p-4 {
    padding: 1rem !important;
  }
  
  .tab-pane .text-lg {
    font-size: 0.9375rem !important;
  }
  
  .tab-pane .line-height-relaxed {
    line-height: 1.7;
  }
  
  .tab-pane ul.line-height-loose {
    padding-left: 1.5rem;
    font-size: 0.875rem;
  }
  
  .tab-pane ul.line-height-loose li {
    margin-bottom: 0.375rem;
  }
}

/* --- Very Small Screens (< 480px) --- */
@media (max-width: 479.98px) {
  /* Container tighter padding */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Navbar extra small - still elegant */
  .navbar-collapse {
    left: 0.75rem;
    right: 0.75rem;
  }
  
  /* Hero extra small - still readable */
  .hero-modern {
    padding: 1.5rem 0 2rem;
  }
  
  .hero-badge {
    font-size: 0.6875rem;
    padding: 0.375rem 0.75rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
  }
  
  .hero-description {
    font-size: 0.875rem;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    margin-bottom: 1.25rem;
  }
  
  /* Hero CTA - still side by side but compact */
  .hero-cta-group {
    gap: 0.5rem;
  }
  
  .btn-hero {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 44px;
  }
  
  .hero-features {
    gap: 0.375rem 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
  }
  
  .hero-feature-item {
    font-size: 0.75rem;
  }
  
  /* Stat cards extra small */
  .stats-section-mobile {
    padding: 1.25rem 0;
  }
  
  .stat-card-modern {
    padding: 0.875rem;
    gap: 0.375rem;
  }
  
  .stat-icon-modern {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .stat-sublabel {
    font-size: 0.6875rem;
  }
  
  /* Tab section extra small */
  .tab-section-modern {
    padding: 0.875rem 0;
  }
  
  .tab-btn-modern {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    min-height: 44px;
    gap: 0.375rem;
  }
  
  .tab-btn-modern i {
    font-size: 0.875rem;
  }
  
  /* Section titles extra small */
  .section-title {
    font-size: 1.125rem;
  }
  
  .section-title i {
    font-size: 1rem;
  }
  
  .section-subtitle {
    font-size: 0.8125rem;
    margin-bottom: 0.875rem;
  }
  
  /* News cards extra small */
  .news-card-modern {
    padding: 1rem;
  }
  
  .news-card-modern .d-flex.align-items-start {
    gap: 0.75rem;
  }
  
  .news-icon-wrapper {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9375rem;
  }
  
  .news-title {
    font-size: 0.9375rem;
  }
  
  .news-description {
    font-size: 0.8125rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  
  .news-meta {
    font-size: 0.6875rem;
    gap: 0.25rem 0.625rem;
  }
  
  .news-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }
  
  /* Feature cards extra small */
  .feature-card-modern {
    padding: 1rem;
  }
  
  .feature-icon-modern {
    width: 3rem;
    height: 3rem;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  
  .feature-title {
    font-size: 0.9375rem;
  }
  
  .feature-description {
    font-size: 0.8125rem;
    margin-bottom: 0.875rem;
  }
  
  .feature-btn {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    min-height: 40px;
  }
  
  /* Quick links extra small */
  .btn-outline-primary.text-start {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    min-height: 44px;
  }
  
  /* Footer extra small */
  .footer-modern {
    padding: 1.5rem 0 1rem;
  }
  
  .footer-brand {
    font-size: 0.9375rem;
  }
  
  .footer-brand i {
    font-size: 1rem;
  }
  
  .footer-description {
    font-size: 0.8125rem;
  }
  
  .footer-social-link {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    font-size: 0.9375rem;
  }
  
  .footer-title {
    font-size: 0.875rem;
    margin-top: 1rem;
  }
  
  .footer-links a,
  .footer-contact-item {
    font-size: 0.8125rem;
    min-height: 36px;
  }
  
  .footer-copyright,
  .footer-powered {
    font-size: 0.75rem;
  }
  
  /* Feedback extra small */
  .feedback-section-modern {
    padding: 1.5rem 0;
  }
  
  .feedback-header {
    padding: 1rem 0.875rem 0.625rem;
  }
  
  .feedback-icon-wrapper {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9375rem;
  }
  
  .feedback-title {
    font-size: 1rem;
  }
  
  .feedback-subtitle {
    font-size: 0.8125rem;
  }
  
  .feedback-form-modern {
    padding: 0.875rem;
  }
  
  .feedback-form-label {
    font-size: 0.8125rem;
  }
  
  .feedback-form-control {
    padding: 0.5rem 0.625rem;
    min-height: 40px;
  }
  
  .feedback-submit-btn {
    min-height: 44px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
}

/* --- Large Desktop (> 1200px) --- */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .hero-modern {
    min-height: 75vh;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-description {
    font-size: 1.25rem;
    max-width: 600px;
  }
}

/* --- Extra Large Desktop (> 1400px) --- */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
}

/* --- Wide Screen (> 2560px) --- */
@media (min-width: 2560px) {
  .container {
    max-width: 1600px;
  }
  
  .hero-modern {
    min-height: 60vh;
  }
}


/* ============================================
   Task 10.2: Typography and Touch Targets Optimization
   Requirements: 9.3, 9.4
   - Use relative units (rem, em, clamp)
   - Minimum 44x44px touch targets
   ============================================ */

/* --- Responsive Typography with Relative Units --- */

/* Base typography using rem units */
html {
  font-size: 100%; /* 16px base */
}

/* Fluid typography scale using clamp() */
.text-fluid-xs {
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
}

.text-fluid-sm {
  font-size: clamp(0.8125rem, 0.75rem + 0.3125vw, 0.9375rem);
}

.text-fluid-base {
  font-size: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
}

.text-fluid-md {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
}

.text-fluid-lg {
  font-size: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
}

.text-fluid-xl {
  font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
}

.text-fluid-2xl {
  font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
}

.text-fluid-3xl {
  font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
}

.text-fluid-4xl {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
}

/* Heading typography with clamp() - Override fixed pixel values */
h1, .h1 {
  font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
}

h2, .h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
}

h3, .h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
}

h4, .h4 {
  font-size: clamp(1.125rem, 1rem + 0.625vw, 1.5rem);
}

h5, .h5 {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
}

h6, .h6 {
  font-size: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
}

/* Body text with relative units */
body {
  font-size: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  line-height: 1.6;
}

/* Paragraph spacing with em units */
p {
  margin-bottom: 1em;
  line-height: 1.7;
}

/* Small text with relative units */
small, .small {
  font-size: 0.875em;
}

/* --- Touch Target Optimization --- */

/* Minimum touch target size variable */
:root {
  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;
}

/* Interactive elements base touch target */
button,
[type="button"],
[type="submit"],
[type="reset"],
.btn,
a.btn {
  min-height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Links with adequate touch area */
a:not(.btn) {
  display: inline-block;
  padding: 0.25em 0;
  min-height: var(--touch-target-min);
  line-height: calc(var(--touch-target-min) - 0.5em);
}

/* Inline links exception - don't force block display */
p a,
span a,
li a:not(.btn):not(.nav-link):not(.dropdown-item) {
  display: inline;
  padding: 0;
  min-height: auto;
  line-height: inherit;
}

/* Navigation links touch targets */
.nav-link {
  min-height: var(--touch-target-min);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}

/* Dropdown items touch targets */
.dropdown-item {
  min-height: var(--touch-target-min);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}

/* Form controls touch targets */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
  min-height: var(--touch-target-min);
  padding: 0.625rem 0.875rem;
  font-size: 1rem; /* Prevent iOS zoom */
}

/* Checkbox and radio touch targets */
.form-check {
  min-height: var(--touch-target-min);
  padding-left: 2rem;
  display: flex;
  align-items: center;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0;
}

.form-check-label {
  padding: 0.5rem 0;
  cursor: pointer;
}

/* Icon buttons touch targets */
.btn-icon,
.icon-btn {
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Close buttons touch targets */
.btn-close {
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  padding: 0.5rem;
}

/* Pagination touch targets */
.page-link {
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  padding: 0.625rem 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* List group items touch targets */
.list-group-item {
  min-height: var(--touch-target-min);
  padding: 0.75rem 1rem;
}

.list-group-item-action {
  cursor: pointer;
}

/* Card action areas touch targets */
.card-link {
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
}

/* Tab buttons touch targets */
.nav-tabs .nav-link,
.nav-pills .nav-link {
  min-height: var(--touch-target-min);
  padding: 0.75rem 1rem;
}

/* Accordion buttons touch targets */
.accordion-button {
  min-height: var(--touch-target-min);
  padding: 1rem 1.25rem;
}

/* Modal close button touch target */
.modal .btn-close {
  width: var(--touch-target-comfortable);
  height: var(--touch-target-comfortable);
  padding: 0.75rem;
}

/* Toast close button touch target */
.toast .btn-close {
  width: var(--touch-target-min);
  height: var(--touch-target-min);
}

/* Breadcrumb links touch targets */
.breadcrumb-item a {
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
}

/* Badge as button touch target */
.badge[role="button"],
.badge.clickable {
  min-height: calc(var(--touch-target-min) * 0.75);
  min-width: calc(var(--touch-target-min) * 0.75);
  cursor: pointer;
}

/* Social links touch targets */
.social-link,
.footer-social-link {
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Table action buttons touch targets */
.table .btn,
.table-responsive .btn {
  min-height: var(--touch-target-min);
  min-width: var(--touch-target-min);
}

/* Mobile-specific touch target enhancements */
@media (max-width: 767.98px) {
  /* Increase touch targets on mobile */
  .btn {
    min-height: var(--touch-target-comfortable);
    padding: 0.75rem 1rem;
  }
  
  .btn-sm {
    min-height: var(--touch-target-min);
    padding: 0.5rem 0.75rem;
  }
  
  .btn-lg {
    min-height: calc(var(--touch-target-comfortable) + 8px);
    padding: 1rem 1.5rem;
  }
  
  /* Form controls comfortable touch targets */
  .form-control,
  .form-select {
    min-height: var(--touch-target-comfortable);
    padding: 0.75rem 1rem;
  }
  
  /* Navigation comfortable touch targets */
  .nav-link {
    min-height: var(--touch-target-comfortable);
    padding: 0.875rem 1rem;
  }
  
  /* Dropdown comfortable touch targets */
  .dropdown-item {
    min-height: var(--touch-target-comfortable);
    padding: 0.875rem 1rem;
  }
  
  /* List items comfortable touch targets */
  .list-group-item {
    min-height: var(--touch-target-comfortable);
    padding: 0.875rem 1rem;
  }
  
  /* Tab buttons comfortable touch targets */
  .tab-btn-modern {
    min-height: var(--touch-target-comfortable);
  }
  
  /* Footer links comfortable touch targets */
  .footer-links a {
    min-height: var(--touch-target-comfortable);
    padding: 0.5rem 0;
  }
}

/* Touch device specific optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Ensure all interactive elements have adequate touch targets */
  button,
  [type="button"],
  [type="submit"],
  [type="reset"],
  .btn,
  a.btn,
  .nav-link,
  .dropdown-item,
  .list-group-item-action {
    min-height: var(--touch-target-comfortable);
  }
  
  /* Increase spacing between touch targets */
  .btn + .btn {
    margin-left: 0.5rem;
  }
  
  .nav-item + .nav-item {
    margin-top: 0.25rem;
  }
}

/* Additional touch device optimizations - pointer: coarse only */
@media (pointer: coarse) {
  /* Larger touch targets for coarse pointer devices */
  .form-check-input {
    width: 1.25em;
    height: 1.25em;
  }
  
  /* Ensure adequate spacing for touch */
  .form-check {
    padding-left: 2em;
    min-height: var(--touch-target-min);
  }
  
  /* Range inputs need larger touch area */
  input[type="range"] {
    height: var(--touch-target-min);
  }
  
  /* Color inputs */
  input[type="color"] {
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
  }
}


/* ============================================
   Task 10.3: Responsive Images
   Requirements: 9.5, 9.6
   - max-width: 100% for all images
   - Proper aspect ratio handling
   ============================================ */

/* --- Base Responsive Image Styles --- */

/* All images should be responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Inline images exception */
p img,
span img,
a img {
  display: inline-block;
  vertical-align: middle;
}

/* Prevent images from overflowing containers */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* Object-fit for images in fixed containers */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.img-fill {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* --- Aspect Ratio Containers --- */

/* Aspect ratio wrapper for responsive media */
.aspect-ratio {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.aspect-ratio > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Common aspect ratios */
.aspect-ratio-1x1 {
  aspect-ratio: 1 / 1;
}

.aspect-ratio-4x3 {
  aspect-ratio: 4 / 3;
}

.aspect-ratio-16x9 {
  aspect-ratio: 16 / 9;
}

.aspect-ratio-21x9 {
  aspect-ratio: 21 / 9;
}

.aspect-ratio-3x2 {
  aspect-ratio: 3 / 2;
}

.aspect-ratio-2x3 {
  aspect-ratio: 2 / 3;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1 / 1) {
  .aspect-ratio-1x1::before {
    content: "";
    display: block;
    padding-top: 100%;
  }
  
  .aspect-ratio-4x3::before {
    content: "";
    display: block;
    padding-top: 75%;
  }
  
  .aspect-ratio-16x9::before {
    content: "";
    display: block;
    padding-top: 56.25%;
  }
  
  .aspect-ratio-21x9::before {
    content: "";
    display: block;
    padding-top: 42.86%;
  }
  
  .aspect-ratio-3x2::before {
    content: "";
    display: block;
    padding-top: 66.67%;
  }
  
  .aspect-ratio-2x3::before {
    content: "";
    display: block;
    padding-top: 150%;
  }
}

/* --- Card Images --- */

/* Card image responsive handling */
.card-img,
.card-img-top,
.card-img-bottom {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* Card image with fixed aspect ratio */
.card-img-fixed {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* --- Hero Images --- */

/* Hero background images */
.hero-img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* --- Avatar and Profile Images --- */

/* Avatar images with fixed aspect ratio */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-sm {
  width: 2rem;
  height: 2rem;
}

.avatar-lg {
  width: 3.5rem;
  height: 3.5rem;
}

.avatar-xl {
  width: 5rem;
  height: 5rem;
}

/* --- Icon Images --- */

/* Icon images with fixed dimensions */
.icon-img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.icon-img-sm {
  width: 1rem;
  height: 1rem;
}

.icon-img-lg {
  width: 2rem;
  height: 2rem;
}

.icon-img-xl {
  width: 3rem;
  height: 3rem;
}

/* --- Thumbnail Images --- */

/* Thumbnail with fixed aspect ratio */
.thumbnail {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--card-radius);
}

.thumbnail-lg {
  max-width: 200px;
}

.thumbnail-sm {
  max-width: 100px;
}

/* --- Gallery Images --- */

/* Gallery grid with responsive images */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--card-radius);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* --- Figure and Figcaption --- */

figure {
  margin: 0;
  max-width: 100%;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--card-radius);
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Responsive Image Utilities --- */

/* Full width image */
.img-full {
  width: 100%;
  height: auto;
}

/* Centered image */
.img-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Image with rounded corners */
.img-rounded {
  border-radius: var(--card-radius);
}

/* Circular image */
.img-circle {
  border-radius: 50%;
}

/* Image with shadow */
.img-shadow {
  box-shadow: var(--card-shadow);
}

/* --- Lazy Loading Placeholder --- */

/* Placeholder for lazy-loaded images */
.img-placeholder {
  background-color: var(--slate-100);
  background-image: linear-gradient(
    90deg,
    var(--slate-100) 0%,
    var(--slate-200) 50%,
    var(--slate-100) 100%
  );
  background-size: 200% 100%;
  animation: img-loading 1.5s ease-in-out infinite;
}

@keyframes img-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] .img-placeholder {
    background-color: var(--slate-700);
    background-image: linear-gradient(
      90deg,
      var(--slate-700) 0%,
      var(--slate-600) 50%,
      var(--slate-700) 100%
    );
  }
}

[data-bs-theme="dark"] .img-placeholder {
  background-color: var(--slate-700);
  background-image: linear-gradient(
    90deg,
    var(--slate-700) 0%,
    var(--slate-600) 50%,
    var(--slate-700) 100%
  );
}

/* --- Responsive Image Breakpoints --- */

@media (max-width: 767.98px) {
  /* Gallery adjusts to 2 columns on mobile */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  /* Thumbnails smaller on mobile */
  .thumbnail {
    max-width: 100px;
  }
  
  .thumbnail-lg {
    max-width: 150px;
  }
  
  /* Avatars slightly smaller on mobile */
  .avatar-xl {
    width: 4rem;
    height: 4rem;
  }
}

@media (max-width: 479.98px) {
  /* Gallery single column on very small screens */
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* --- SVG Responsive Handling --- */

svg {
  max-width: 100%;
  height: auto;
}

/* SVG icons with fixed dimensions */
.svg-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.svg-icon-sm {
  width: 1rem;
  height: 1rem;
}

.svg-icon-lg {
  width: 2rem;
  height: 2rem;
}

/* --- Iframe Responsive Handling --- */

/* Responsive iframe container */
.iframe-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 16:9 iframe container */
.iframe-16x9 {
  aspect-ratio: 16 / 9;
}

/* 4:3 iframe container */
.iframe-4x3 {
  aspect-ratio: 4 / 3;
}

/* Fallback for browsers without aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .iframe-16x9::before {
    content: "";
    display: block;
    padding-top: 56.25%;
  }
  
  .iframe-4x3::before {
    content: "";
    display: block;
    padding-top: 75%;
  }
}

/* --- Prevent Horizontal Scroll --- */

/* Ensure no horizontal overflow from images */
.container,
.container-fluid,
main,
article,
section {
  overflow-x: hidden;
}

/* Allow horizontal scroll only where needed */
.table-responsive,
.overflow-x-auto {
  overflow-x: auto;
}

/* Phase A-C responsive stabilization */
.login-container {
  min-height: 100svh;
  justify-content: center;
  gap: 1.25rem;
  padding-block: clamp(1rem, 3vh, 2rem);
}

.login-footer {
  line-height: 1.4;
}

.dashboard-metric-grid {
  align-items: stretch;
}

.dashboard-metric-grid > [class*="col-"],
.dashboard-metric-grid > .col {
  display: flex;
}

.dashboard-metric-grid > [class*="col-"] > .card,
.dashboard-metric-grid > .col > .card {
  width: 100%;
}

.dashboard-metric-card {
  min-height: 180px;
}

.dashboard-metric-value {
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.responsive-tabs-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.responsive-tabs-scroll > .nav,
.responsive-tabs-scroll > .tab-nav-list {
  flex-wrap: nowrap;
  min-width: max-content;
}

.responsive-tabs-scroll .nav-link,
.responsive-tabs-scroll .tab-btn-modern {
  white-space: nowrap;
}

.dashboard-table-stable {
  min-width: 760px;
}

.text-truncate-min {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-admin .navbar-brand,
.navbar-guru .navbar-brand {
  min-width: 0;
}

.navbar-admin .navbar-brand span,
.navbar-guru .navbar-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-guru .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: min(64vw, 520px);
}

.landing-stats-grid > [class*="col-"] {
  display: flex;
}

.landing-stats-grid .stat-card-modern {
  width: 100%;
}

@media (min-width: 992px) {
  .navbar-landing .navbar-toggler-custom {
    display: none !important;
  }

  .navbar-landing .navbar-collapse {
    display: flex !important;
    justify-content: flex-end;
  }
}

@media (max-width: 991.98px) {
  .navbar-landing .navbar-collapse {
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
  }

  .navbar-landing .navbar-nav {
    gap: 0.25rem;
  }

  .navbar-landing .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .navbar-admin .container-fluid,
  .navbar-guru .container-fluid {
    gap: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .dashboard-metric-grid {
    row-gap: 0.875rem;
  }

  .dashboard-metric-card {
    min-height: auto;
  }

  .dashboard-table-stable {
    min-width: 680px;
  }

  .navbar-guru .navbar-brand {
    max-width: 58vw;
    font-size: 0.95rem;
  }

  .navbar-guru .dropdown-toggle {
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tab-nav-modern.responsive-tabs-scroll {
    margin-inline: -1rem;
    padding-inline: 1rem;
  }
}

@media (max-height: 760px) {
  .login-container {
    justify-content: flex-start;
    gap: 0.875rem;
  }

  .login-container .text-center.mb-4 {
    margin-bottom: 0.75rem !important;
  }

  .login-card {
    padding: 1.25rem !important;
  }

  .login-header {
    margin-bottom: 1rem !important;
  }

  .login-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 0.75rem !important;
  }

  .login-title {
    font-size: 1.5rem;
  }
}

@media (max-height: 760px) and (min-width: 992px) {
  .hero-modern {
    padding-block: 2rem;
  }

  .stats-section-mobile {
    padding-block: 1.5rem;
  }

  .stat-card-modern {
    min-height: 180px;
  }
}

/* ============================================================================
   RESPONSIVE SHELL FINALIZATION
   ============================================================================ */
.app-shell {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  .app-shell {
    overflow-x: hidden;
  }
}

.app-main,
.landing-main,
.admin-main,
.guru-main {
  width: 100%;
  min-width: 0;
}

.app-shell img,
.app-shell svg,
.app-shell canvas,
.app-shell iframe {
  max-width: 100%;
}

.app-shell .card,
.app-shell .card-clean,
.app-shell .modal-content,
.app-shell .alert,
.app-shell .list-group,
.app-shell .input-group,
.app-shell .btn-group {
  min-width: 0;
}

.app-shell .card-header.d-flex,
.app-shell .modal-footer,
.app-shell .filter-actions,
.app-shell .form-actions {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.app-shell .table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.app-shell .table-responsive > .table {
  min-width: 680px;
}

.app-shell .table td,
.app-shell .table th {
  vertical-align: middle;
}

.app-shell .table .btn,
.app-shell .table-responsive .btn {
  white-space: nowrap;
}

.app-shell .pagination {
  min-width: 0;
}

.app-shell .page-link {
  text-align: center;
}

.app-shell .responsive-tabs-scroll,
.app-shell .status-tabs-wrapper,
.app-shell .tab-nav-modern {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.app-shell .responsive-tabs-scroll > .nav,
.app-shell .responsive-tabs-scroll > .tab-nav-list,
.app-shell .tab-nav-modern > .tab-nav-list {
  flex-wrap: nowrap;
  min-width: max-content;
}

.app-shell .responsive-tabs-scroll .nav-link,
.app-shell .responsive-tabs-scroll .tab-btn-modern,
.app-shell .tab-nav-modern .tab-btn-modern {
  white-space: nowrap;
}

.admin-shell .navbar-admin,
.guru-shell .navbar-guru,
.landing-shell .navbar-landing {
  z-index: 1030;
}

.admin-shell .navbar-admin .container-fluid,
.guru-shell .navbar-guru .container-fluid,
.landing-shell .navbar-landing .navbar-mobile-row {
  min-width: 0;
  max-width: 100%;
}

.admin-shell .navbar-admin .navbar-brand,
.guru-shell .navbar-guru .navbar-brand,
.landing-shell .navbar-landing .navbar-brand {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-shell .navbar-admin .navbar-collapse,
.landing-shell .navbar-landing .navbar-collapse {
  max-width: 100%;
}

.guru-shell .navbar-guru .dropdown-menu {
  max-width: calc(100vw - 1.5rem);
}

.landing-shell .hero-modern {
  min-height: auto;
  padding-block: 4rem;
}

.landing-shell .hero-modern .row {
  min-width: 0;
}

.landing-shell .hero-title,
.landing-shell .hero-title-highlight,
.landing-shell .hero-description,
.landing-shell .hero-feature-item,
.admin-shell .dashboard-metric-value,
.guru-shell .dashboard-metric-value {
  overflow-wrap: anywhere;
}

.landing-shell .hero-description {
  max-width: 42rem;
}

.landing-shell .hero-badge {
  max-width: 100%;
  white-space: normal;
}

.landing-shell .landing-stats-grid {
  align-items: stretch;
}

.landing-shell .landing-stats-grid > [class*="col-"] {
  min-width: 0;
}

.admin-shell .dashboard-metric-grid,
.guru-shell .dashboard-metric-grid {
  align-items: stretch;
}

.admin-shell .dashboard-metric-card,
.guru-shell .dashboard-metric-card {
  min-width: 0;
  min-height: 170px;
}

.app-shell .modal-dialog {
  max-width: min(var(--bs-modal-width, 500px), calc(100vw - 1.5rem));
}

.app-shell .modal-body {
  min-width: 0;
  overflow-x: auto;
}

@media (min-width: 992px) {
  .admin-shell .navbar-admin .navbar-collapse,
  .landing-shell .navbar-landing .navbar-collapse {
    position: static !important;
    display: flex !important;
    flex-basis: auto !important;
    width: auto !important;
    margin-top: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .admin-shell .navbar-admin .navbar-nav,
  .landing-shell .navbar-landing .navbar-nav {
    flex-direction: row !important;
    align-items: center;
  }

  .admin-shell .navbar-admin .navbar-brand {
    max-width: min(22vw, 260px);
  }

  .guru-shell .navbar-guru .navbar-brand {
    max-width: min(50vw, 540px);
  }

  .landing-shell .hero-modern {
    min-height: min(72svh, 760px);
  }
}

@media (max-width: 991.98px) {
  .landing-shell .navbar-landing .navbar-mobile-row,
  .admin-shell .navbar-admin .container-fluid,
  .guru-shell .navbar-guru .container-fluid {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.5rem;
  }

  .landing-shell .navbar-landing .navbar-collapse,
  .admin-shell .navbar-admin .navbar-collapse {
    position: static !important;
    inset: auto !important;
    flex-basis: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0.75rem !important;
    padding: 0.75rem 0 0 !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background: var(--bg-card) !important;
  }

  .landing-shell .navbar-landing .navbar-nav,
  .admin-shell .navbar-admin .navbar-nav {
    width: 100%;
    flex-direction: column !important;
    gap: 0.25rem;
  }

  .landing-shell .navbar-landing .nav-link,
  .admin-shell .navbar-admin .nav-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .admin-shell .navbar-admin .d-flex.align-items-center {
    width: 100%;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
  }

  .admin-shell .navbar-admin .navbar-text {
    width: 100%;
    max-width: none !important;
    text-align: center;
  }

  .admin-shell .navbar-admin form.d-inline,
  .admin-shell .navbar-admin form.d-inline .btn {
    width: 100%;
  }

  .admin-shell .navbar-admin .navbar-brand {
    max-width: calc(100% - 3.5rem);
  }

  .guru-shell .navbar-guru .navbar-brand {
    max-width: 58vw;
  }

  .guru-shell .navbar-guru .dropdown-toggle {
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-main.container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .landing-shell .hero-modern {
    padding-block: 2.5rem;
  }

  .landing-shell .hero-modern .hero-content {
    padding-block: 0;
  }

  .landing-shell .hero-title {
    font-size: 2rem;
    line-height: 1.15;
  }

  .landing-shell .hero-title br {
    display: none;
  }

  .landing-shell .hero-description {
    font-size: 1rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .landing-shell .hero-features {
    align-items: flex-start;
  }

  .app-shell .card-header.d-flex > .btn,
  .app-shell .card-header.d-flex > .btn-group,
  .app-shell .modal-footer > .btn {
    min-width: min(100%, 11rem);
  }
}

@media (max-width: 575.98px) {
  .app-main.container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .admin-main,
  .guru-main {
    margin-top: 1rem !important;
  }

  .landing-shell .navbar-landing,
  .admin-shell .navbar-admin,
  .guru-shell .navbar-guru {
    padding-block: 0.5rem;
  }

  .landing-shell .navbar-landing .container,
  .admin-shell .navbar-admin .container-fluid,
  .guru-shell .navbar-guru .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .landing-shell .navbar-landing .navbar-brand,
  .admin-shell .navbar-admin .navbar-brand,
  .guru-shell .navbar-guru .navbar-brand {
    font-size: 0.95rem;
  }

  .landing-shell .navbar-toggler-custom,
  .admin-shell .navbar-toggler {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  .landing-shell .hero-modern {
    padding-block: 2rem;
  }

  .landing-shell .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .landing-shell .hero-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .landing-shell .hero-description {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
  }

  .landing-shell .hero-features {
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
  }

  .landing-shell .hero-feature-item {
    font-size: 0.82rem;
  }

  .landing-shell .stat-card-modern {
    padding: 0.875rem;
  }

  .landing-shell .stat-value {
    font-size: 1.2rem;
  }

  .landing-shell .stat-label {
    font-size: 0.76rem;
  }

  .app-shell .table-responsive > .table,
  .app-shell .dashboard-table-stable {
    min-width: 620px;
  }

  .app-shell .pagination {
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding-left: 0;
  }

  .app-shell .page-link {
    min-width: 2.5rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }

  .app-shell .card-header.d-flex {
    align-items: stretch !important;
  }

  .app-shell .card-header.d-flex > .btn,
  .app-shell .card-header.d-flex > .btn-group,
  .app-shell .modal-footer > .btn {
    width: 100%;
  }

  .app-shell .modal-dialog {
    margin: 0.75rem;
    max-width: calc(100vw - 1.5rem);
  }

  .app-shell .modal-content {
    max-height: calc(100svh - 1.5rem);
  }

  .app-shell .modal-body {
    overflow-y: auto;
  }

  .initial-password-shell {
    align-items: flex-start !important;
    padding-block: 1rem;
  }
}

@media (max-height: 760px) {
  .landing-shell .hero-modern {
    padding-block: 1.5rem;
  }

  .landing-shell .hero-title {
    font-size: 1.75rem;
  }

  .landing-shell .hero-description {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}
