/*
================================================================================
 FILE: public/css/avia-sdcps.css
 VERSION: 2.0.0
 PURPOSE: Unified AVIA SDCPS design system — ICAO-inspired theme
 AUTHOR: AVIA Safety Systems Team
 LAST UPDATED: 2026-08-27
 DESCRIPTION:
   Single source of truth for all AVIA SDCPS views. Import via:
     <link rel="stylesheet" href="/css/avia-sdcps.css">
   Font is imported via @import below; prefer preconnect in HTML for perf:
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">

 STRUCTURE:
   /css/avia-sdcps.css
   ├── 1. CSS Variables / Root
   ├── 2. Reset & Base Styles
   ├── 3. Demo Banner
   ├── 4. Header & Navigation
   ├── 5. Hero Section
   ├── 6. Sections (common)
   ├── 7. Cards & Grids
   ├── 8. Buttons
   ├── 9. KPI Banner
   ├── 10. Charts
   ├── 11. Tables
   ├── 12. Badges & Tags
   ├── 13. Forms
   ├── 14. Footer
   ├── 15. Loading States
   ├── 16. Toast Notifications
   ├── 17. Responsive Styles
   └── 18. Utilities
================================================================================
*/

/* ==================== 0. FONT IMPORT ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* =============================================================================
   1. CSS Variables / Root
   ============================================================================= */
:root {
  /* Palette — ICAO-Inspired */
  --avia-primary-dark: #0a1628;   /* deep navy */
  --avia-primary-blue: #1a2a4a;   /* mid navy */
  --avia-accent-blue: #2e86c1;    /* ICAO blue */
  --avia-light-blue: #5dade2;     /* highlight */
  --avia-white: #ffffff;
  --avia-light-gray: #f8f9fc;
  --avia-text-dark: #0a1628;
  --avia-text-gray: #5a6a7a;
  --avia-danger: #c0392b;         /* alert */
  --avia-danger-light: #e74c3c;
  --avia-success: #1e8449;
  --avia-success-light: #27ae60;
  --avia-warning: #d4ac0d;
  --avia-warning-light: #f1c40f;
  --avia-info: #2471a3;

  /* Extended neutrals */
  --avia-border: #e3e8ef;
  --avia-border-strong: #d0d7e3;
  --avia-surface: #ffffff;
  --avia-surface-alt: #f8f9fc;
  --avia-overlay: rgba(10, 22, 40, 0.72);

  /* Typography */
  --avia-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --avia-leading-tight: 1.2;
  --avia-leading-normal: 1.5;
  --avia-leading-relaxed: 1.7;

  /* Radii */
  --avia-radius-xs: 4px;
  --avia-radius-sm: 6px;
  --avia-radius-md: 8px;
  --avia-radius-lg: 12px;
  --avia-radius-xl: 16px;
  --avia-radius-pill: 999px;

  /* Shadows */
  --avia-shadow-xs: 0 1px 2px rgba(10, 22, 40, 0.06);
  --avia-shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
  --avia-shadow-md: 0 4px 16px rgba(10, 22, 40, 0.08);
  --avia-shadow-lg: 0 8px 32px rgba(10, 22, 40, 0.12);
  --avia-shadow-focus: 0 0 0 3px rgba(46, 134, 193, 0.25);

  /* Layout */
  --avia-header-height: 64px;
  --avia-banner-height: 38px;
  --avia-nav-height: 52px;
  --avia-content-max: 1400px;
  --avia-content-pad: 30px;

  /* Transitions */
  --avia-transition: 0.2s ease;
  --avia-transition-slow: 0.35s ease;
}

:root {
    /* Colors */
    --color-primary-dark: #0a1628;
    --color-primary-mid: #1a2a4a;
    --color-primary-light: #2e86c1;
    --color-accent: #5dade2;
    --color-white: #ffffff;
    --color-light-bg: #f8f9fc;
    --color-text-dark: #0a1628;
    --color-text-gray: #5a6a7a;
    --color-danger: #c0392b;
    --color-success: #27ae60;
    --color-warning: #f39c12;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
}

/* =============================================================================
   2. Reset & Base Styles
   ============================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--avia-font);
  font-weight: 400;
  font-size: 15px;
  line-height: var(--avia-leading-normal);
  color: var(--avia-text-dark);
  background: var(--avia-light-gray);
  padding-top: var(--avia-banner-height);
  min-height: 100vh;
}

/* Landing variant — hero fills viewport; body reset handled by .avia-hero */
body.avia-landing {
  background: var(--avia-light-gray);
  display: block;
  padding-top: var(--avia-banner-height);
}

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

a { color: var(--avia-accent-blue); text-decoration: none; }
a:hover { color: var(--avia-primary-blue); text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--avia-shadow-focus);
  border-color: var(--avia-accent-blue) !important;
}

/* Typography scale — Inter 300-900 available */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--avia-font);
  color: var(--avia-text-dark);
  line-height: var(--avia-leading-tight);
  letter-spacing: -0.02em;
}
h1 { font-size: 40px; font-weight: 800; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 600; }
p { color: var(--avia-text-gray); line-height: var(--avia-leading-relaxed); }
small { font-size: 12px; color: var(--avia-text-gray); }
strong { font-weight: 700; }

/* =============================================================================
   3. Demo Banner — fixed top, red alert style
   ============================================================================= */
.demo-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 99999;
  height: var(--avia-banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--avia-danger);
  color: var(--avia-white);
  text-align: center;
  font-family: var(--avia-font);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 12px rgba(192, 57, 43, 0.35);
  animation: avia-pulse-banner 2.2s ease-in-out infinite;
  padding: 0 16px;
  white-space: nowrap;
}
.demo-banner .demo-icon { font-size: 14px; }
.demo-banner .demo-timer {
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 12px;
  border-radius: var(--avia-radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  backdrop-filter: blur(6px);
}
.demo-banner a {
  color: var(--avia-white);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.demo-banner a:hover { opacity: 0.9; }

@keyframes avia-pulse-banner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

/* =============================================================================
   4. Header & Navigation — dark blue, white text
   ============================================================================= */
/* Header */
.app-header {
  background: var(--avia-primary-dark);
  color: var(--avia-white);
  min-height: var(--avia-header-height);
  padding: 10px var(--avia-content-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 16px rgba(10, 22, 40, 0.22);
  position: sticky;
  top: var(--avia-banner-height);
  z-index: 1000;
}
.app-header .logo { display: flex; align-items: center; gap: 12px; }
.app-header .logo h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--avia-white);
  letter-spacing: -0.03em;
  line-height: 1;
}
.app-header .logo span {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
}
.app-header .tenant-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.app-header .tenant-selector select {
  padding: 8px 32px 8px 14px;
  border-radius: var(--avia-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: var(--avia-white);
  font-family: var(--avia-font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='white' stroke-opacity='0.8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: background var(--avia-transition), border-color var(--avia-transition);
}
.app-header .tenant-selector select:hover { background-color: rgba(255, 255, 255, 0.18); }
.app-header .tenant-selector select:focus { background-color: rgba(255, 255, 255, 0.18); border-color: var(--avia-light-blue); }
.app-header .tenant-selector select option { color: var(--avia-text-dark); background: var(--avia-white); }

/* Navigation tabs */
.app-nav {
  background: var(--avia-white);
  padding: 0 var(--avia-content-pad);
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--avia-border);
  position: sticky;
  top: calc(var(--avia-banner-height) + var(--avia-header-height));
  z-index: 999;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--avia-border) transparent;
}
.app-nav::-webkit-scrollbar { height: 4px; }
.app-nav::-webkit-scrollbar-thumb { background: var(--avia-border); border-radius: 999px; }
.app-nav button {
  padding: 14px 20px;
  border: none;
  background: transparent;
  font-family: var(--avia-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--avia-text-gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color var(--avia-transition), background var(--avia-transition), border-color var(--avia-transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
  margin-bottom: -2px;
}
.app-nav button:hover { color: var(--avia-primary-blue); background: var(--avia-light-gray); }
.app-nav button.active { color: var(--avia-primary-blue); border-bottom-color: var(--avia-accent-blue); }
.app-nav button:focus-visible { box-shadow: inset 0 -3px 0 var(--avia-accent-blue); }

/* =============================================================================
   5. Hero Section — gradient dark blue
   ============================================================================= */
.hero, .avia-hero {
  background: linear-gradient(135deg, var(--avia-primary-dark) 0%, var(--avia-primary-blue) 55%, #1e3a5f 100%);
  color: var(--avia-white);
  padding: 72px var(--avia-content-pad) 64px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero::before, .avia-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 20% 20%, rgba(93, 173, 226, 0.18), transparent 60%),
    radial-gradient(700px 400px at 90% 80%, rgba(46, 134, 193, 0.16), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.hero h1, .avia-hero h1 {
  font-size: 48px;
  font-weight: 900;
  color: var(--avia-white);
  line-height: 1.05;
  margin-bottom: 12px;
}
.hero h1 .highlight, .avia-hero h1 .highlight { color: var(--avia-light-blue); }
.hero .subtitle, .avia-hero .subtitle,
.hero p, .avia-hero p {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.hero .btn-group, .avia-hero .btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero .btn-primary, .avia-hero .btn-primary {
  background: var(--avia-accent-blue);
  box-shadow: 0 6px 20px rgba(46, 134, 193, 0.35);
}
.hero .btn-primary:hover, .avia-hero .btn-primary:hover { background: #2574a9; transform: translateY(-2px); }

/* Centered landing hero */
.hero--centered, .avia-hero--centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}
.hero--centered .subtitle,
.avia-hero--centered .subtitle { margin-left: auto; margin-right: auto; }
.hero--centered .btn-group,
.avia-hero--centered .btn-group { justify-content: center; }

/* Full-viewport landing hero (used by index.html when body.avia-landing is not needed) */
.hero--fullscreen, .avia-hero--fullscreen {
  min-height: calc(100vh - var(--avia-banner-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

/* =============================================================================
   6. Sections (common)
   ============================================================================= */
.avia-container {
  max-width: var(--avia-content-max);
  margin: 0 auto;
  padding: 0 var(--avia-content-pad);
}
.avia-content, .app-content {
  max-width: var(--avia-content-max);
  margin: 0 auto;
  padding: 24px var(--avia-content-pad);
}
.avia-section { padding: 48px 0; }
.avia-divider { height: 1px; background: var(--avia-border); margin: 24px 0; border: none; }

/* Page routing — SPA-style sections */
.page-section { display: none; animation: avia-fadeIn 0.32s ease; }
.page-section.active { display: block; }
@keyframes avia-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stats section — dark blue background (distinct from KPI banner) */
.stats, .avia-stats {
  background: var(--avia-primary-dark);
  color: var(--avia-white);
  padding: 48px var(--avia-content-pad);
  border-radius: var(--avia-radius-lg);
  margin-bottom: 28px;
}
.stats h2, .avia-stats h2, .stats h3, .avia-stats h3 { color: var(--avia-white); }
.stats p, .avia-stats p { color: rgba(255, 255, 255, 0.72); }
.stats-grid, .avia-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.stat-item, .avia-stat-item { text-align: center; }
.stat-item .stat-value, .avia-stat-item .stat-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--avia-white);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-item .stat-value.accent, .avia-stat-item .stat-value.accent { color: var(--avia-light-blue); }
.stat-item .stat-label, .avia-stat-item .stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* Landing "features" — translucent cards over hero gradient */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin-top: 40px;
}
.feature {
  background: rgba(255, 255, 255, 0.08);
  padding: 16px 20px;
  border-radius: var(--avia-radius-md);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.feature .icon { font-size: 28px; display: block; margin-bottom: 6px; }

/* Understanding Safety Reporting */
.understanding-section {
  background: var(--avia-white);
  text-align: center;
}
.understanding-section h2 { color: var(--avia-primary-dark); margin-bottom: 12px; }
.understanding-section .section-subtitle {
  max-width: 760px;
  margin: 0 auto;
  color: var(--avia-text-gray);
  font-size: 16px;
  line-height: 1.6;
}
.understanding-section .card { text-align: left; }

/* What Can I Report? */
.report-categories-section {
  background: var(--avia-light-gray);
  text-align: center;
}
.report-categories-section h2 { color: var(--avia-primary-dark); margin-bottom: 8px; }
.report-categories-section .section-subtitle {
  max-width: 720px;
  margin: 0 auto 32px;
  color: var(--avia-text-gray);
  font-size: 15px;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.report-card {
  background: var(--avia-white);
  border: 1px solid var(--avia-border);
  border-radius: var(--avia-radius-lg);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 128px;
  box-shadow: var(--avia-shadow-sm);
  transition: transform var(--avia-transition), box-shadow var(--avia-transition), border-color var(--avia-transition);
}
.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--avia-shadow-md);
  border-color: var(--avia-accent-blue);
}
.report-icon { font-size: 28px; line-height: 1; }
.report-label {
  font-family: var(--avia-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--avia-text-dark);
  line-height: 1.4;
}
.report-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: #eaf2fb;
  border: 1px solid #c9deef;
  border-left: 4px solid var(--avia-accent-blue);
  border-radius: var(--avia-radius-md);
  padding: 16px 18px;
  max-width: 860px;
  margin: 0 auto;
}
.report-info-box .info-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.report-info-box p {
  margin: 0;
  font-size: 14px;
  color: var(--avia-primary-blue);
  line-height: 1.5;
  font-weight: 500;
}

/* How Safety Reporting Works — Process Flow */
.process-section { background: var(--avia-white); text-align: center; }
.process-section h2 { color: var(--avia-primary-dark); margin-bottom: 8px; }
.process-section .section-subtitle { max-width: 720px; margin: 0 auto 32px; color: var(--avia-text-gray); font-size: 15px; }
.process-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
}
.process-step {
  background: var(--avia-white);
  border: 1px solid var(--avia-border);
  border-radius: var(--radius-lg, 12px);
  padding: 22px 16px;
  box-shadow: var(--shadow-sm, 0 4px 20px rgba(0,0,0,0.06));
  transition: transform var(--avia-transition), box-shadow var(--avia-transition);
}
.process-step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md, 0 8px 30px rgba(0,0,0,0.08)); }
.step-icon { font-size: 28px; margin-bottom: 8px; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--avia-accent-blue); color: var(--avia-white);
  font-size: 12px; font-weight: 800; margin-bottom: 8px;
}
.process-step h4 { font-size: 14px; font-weight: 700; color: var(--avia-text-dark); margin-bottom: 6px; }
.process-step p { font-size: 13px; color: var(--avia-text-gray); line-height: 1.5; }
.process-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--avia-accent-blue); font-weight: 700;
  padding-top: 48px;
}

/* Quick Knowledge — Learn the Basics */
.knowledge-section { background: var(--avia-light-gray); text-align: center; }
.knowledge-section h2 { color: var(--avia-primary-dark); margin-bottom: 8px; }
.knowledge-section .section-subtitle { max-width: 720px; margin: 0 auto 32px; color: var(--avia-text-gray); font-size: 15px; }
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}
.knowledge-card {
  background: var(--avia-white);
  border: 1px solid var(--avia-border);
  border-radius: 12px;
  padding: 24px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  width: 100%;
}
.knowledge-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.knowledge-icon { font-size: 30px; }
.knowledge-title { font-size: 15px; font-weight: 700; color: var(--avia-text-dark); }
.knowledge-hint { font-size: 12px; color: var(--avia-text-gray); font-weight: 400; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,22,40,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-content {
  background: var(--avia-white);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 520px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  text-align: center;
  animation: scaleIn 0.22s ease;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 26px; line-height: 1;
  color: var(--avia-text-gray); cursor: pointer;
}
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-content h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.modal-content p { font-size: 14px; color: var(--avia-text-gray); line-height: 1.6; }
@keyframes fadeIn { from {opacity:0} to {opacity:1} }
@keyframes scaleIn { from {transform:scale(0.96); opacity:0} to {transform:scale(1); opacity:1} }

/* FAQ */
.faq-section { background: var(--avia-white); }
.faq-section h2 { text-align: center; color: var(--avia-primary-dark); margin-bottom: 8px; }
.faq-section .section-subtitle { text-align: center; max-width: 720px; margin: 0 auto 32px; color: var(--avia-text-gray); font-size: 15px; }
.faq-container { max-width: 860px; margin: 0 auto; display: grid; gap: 28px; }
.faq-category-title {
  font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--avia-accent-blue); margin-bottom: 12px; padding-left: 4px;
}
.faq-item { border: 1px solid var(--avia-border); border-radius: 12px; background: var(--avia-white); box-shadow: 0 4px 20px rgba(0,0,0,0.06); overflow: hidden; }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 18px; background: none; border: none; cursor: pointer;
  font-family: var(--avia-font); font-size: 14px; font-weight: 600; color: var(--avia-text-dark); text-align: left;
}
.faq-question:hover { background: var(--avia-light-gray); }
.faq-icon { font-size: 18px; font-weight: 700; color: var(--avia-accent-blue); transition: transform 0.2s ease; flex-shrink: 0; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer { padding: 0 18px 16px; border-top: 1px solid var(--avia-border); }
.faq-answer p { margin: 0; padding-top: 12px; font-size: 13px; color: var(--avia-text-gray); line-height: 1.6; font-weight: 400; }

/* CTA */
.cta-section .btn-primary { box-shadow: 0 6px 20px rgba(46,134,193,0.35); }

/* Floating Help Widget */
.help-widget-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 9995;
  background: var(--avia-primary-dark); color: var(--avia-white);
  border: 1px solid var(--avia-accent-blue); border-radius: 999px;
  padding: 12px 18px; font-family: var(--avia-font); font-size: 13px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(10,22,40,0.2); cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.help-widget-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(10,22,40,0.28); }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(10,22,40,0.45); z-index: 9996; backdrop-filter: blur(2px);
}
.help-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 88vw;
  background: var(--avia-white); z-index: 9997; box-shadow: -8px 0 32px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.help-drawer.open { transform: translateX(0); }
.help-drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--avia-border);
}
.help-drawer-header h3 { font-size: 16px; font-weight: 800; }
.help-drawer-close { background: none; border: none; font-size: 24px; color: var(--avia-text-gray); cursor: pointer; }
.help-drawer-nav { padding: 16px 12px; display: grid; gap: 8px; flex: 1; overflow-y: auto; }
.help-drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; background: var(--avia-light-gray);
  font-size: 13px; font-weight: 600; color: var(--avia-text-dark); text-decoration: none;
}
.help-drawer-link span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--avia-accent-blue); color: white; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.help-drawer-link:hover { background: #eaf2fb; }
.help-drawer-footer { padding: 16px 20px; border-top: 1px solid var(--avia-border); }

/* State Oversight — Overview Box */
.state-overview-box {
  background: #0a1628;
  color: #ffffff;
  border: 3px solid #2e86c1;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.state-overview-box h2 { color: #ffffff; margin-bottom: 8px; font-size: 22px; }
.state-overview-box p { color: rgba(255,255,255,0.85); line-height: 1.6; font-size: 14px; margin: 0; }

.state-risk-card { border-top-color: #2e86c1; border-left: 3px solid #2e86c1; }
.state-risk-summary {
  background: #eaf2fb;
  border: 1px solid #c9deef;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #1a2a4a;
  text-align: center;
  font-weight: 500;
}
.state-risk-matrix table { border: 2px solid #2e86c1; border-radius: 8px; overflow: hidden; }

/* =============================================================================
   7. Cards & Grids — white, subtle shadow, blue top border
   ============================================================================= */
.card, .chart-card, .avia-card {
  background: var(--avia-surface);
  border-radius: var(--avia-radius-lg);
  box-shadow: var(--avia-shadow-sm);
  border: 1px solid var(--avia-border);
  border-top: 3px solid var(--avia-accent-blue);
  padding: 22px;
  transition: box-shadow var(--avia-transition), transform var(--avia-transition);
}
.card:hover, .chart-card:hover, .avia-card:hover { box-shadow: var(--avia-shadow-md); }
.card h3, .chart-card h3, .avia-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--avia-text-dark);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.card p, .chart-card p, .avia-card p { font-size: 14px; color: var(--avia-text-gray); }

/* Card variants */
.card--plain, .avia-card--plain { border-top-color: transparent; }
.card--navy, .avia-card--navy { border-top-color: var(--avia-primary-blue); }
.card--success, .avia-card--success { border-top-color: var(--avia-success); }
.card--danger, .avia-card--danger { border-top-color: var(--avia-danger); }

/* Grid helpers */
.avia-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.avia-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.avia-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Hazard list — uses card-like items */
.hazard-list { display: grid; gap: 14px; }
.hazard-item {
  background: var(--avia-white);
  padding: 16px 20px;
  border-radius: var(--avia-radius-md);
  box-shadow: var(--avia-shadow-sm);
  border: 1px solid var(--avia-border);
  border-left: 4px solid var(--avia-primary-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: transform var(--avia-transition), box-shadow var(--avia-transition);
  flex-wrap: wrap;
}
.hazard-item:hover { transform: translateX(4px); box-shadow: var(--avia-shadow-md); }
.hazard-item .hazard-info { flex: 1; min-width: 200px; }
.hazard-item .hazard-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--avia-text-dark); }
.hazard-item .hazard-info p { font-size: 13px; color: var(--avia-text-gray); }
.hazard-item .hazard-meta {
  text-align: right;
  font-size: 12px;
  color: #8a99ad;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* =============================================================================
   8. Buttons — blue primary, outline secondary
   ============================================================================= */
.btn, .btn-primary, .btn-secondary, .btn-outline, .btn-success, .btn-danger, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--avia-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 10px 22px;
  border-radius: var(--avia-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--avia-transition), color var(--avia-transition), border-color var(--avia-transition), transform var(--avia-transition), box-shadow var(--avia-transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active, .btn-primary:active, .btn-outline:active { transform: translateY(0); }

/* Primary — Accent Blue */
.btn-primary {
  background: var(--avia-accent-blue);
  color: var(--avia-white);
  border-color: var(--avia-accent-blue);
  box-shadow: 0 2px 10px rgba(46, 134, 193, 0.25);
}
.btn-primary:hover {
  background: #2574a9;
  border-color: #2574a9;
  color: var(--avia-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(46, 134, 193, 0.32);
  text-decoration: none;
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Secondary — Outline */
.btn-outline, .btn-secondary {
  background: transparent;
  color: var(--avia-primary-blue);
  border-color: var(--avia-primary-blue);
}
.btn-outline:hover, .btn-secondary:hover {
  background: var(--avia-primary-blue);
  color: var(--avia-white);
  text-decoration: none;
}
/* Header variant — white outline on dark */
.app-header .btn-outline {
  color: var(--avia-white);
  border-color: rgba(255, 255, 255, 0.32);
  padding: 7px 16px;
  font-size: 13px;
}
.app-header .btn-outline:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); }

/* Hero secondary — translucent */
.hero .btn-secondary, .avia-hero .btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: var(--avia-white);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}
.hero .btn-secondary:hover, .avia-hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--avia-white);
}

/* Success / Danger */
.btn-success { background: var(--avia-success); color: var(--avia-white); border-color: var(--avia-success); }
.btn-success:hover { background: #196f3d; border-color: #196f3d; color: var(--avia-white); transform: translateY(-1px); text-decoration: none; }
.btn-danger { background: var(--avia-danger); color: var(--avia-white); border-color: var(--avia-danger); }
.btn-danger:hover { background: #a93226; border-color: #a93226; color: var(--avia-white); transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--avia-text-gray); border-color: transparent; }
.btn-ghost:hover { background: var(--avia-light-gray); color: var(--avia-text-dark); }

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--avia-radius-sm); }
.btn-lg { padding: 14px 36px; font-size: 16px; border-radius: var(--avia-radius-md); }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* =============================================================================
   9. KPI Banner — with colored values
   ============================================================================= */
.kpi-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.kpi-item {
  background: var(--avia-white);
  padding: 20px;
  border-radius: var(--avia-radius-lg);
  box-shadow: var(--avia-shadow-sm);
  border: 1px solid var(--avia-border);
  border-left: 4px solid var(--avia-primary-blue);
  text-align: center;
  transition: transform var(--avia-transition), box-shadow var(--avia-transition);
}
.kpi-item:hover { transform: translateY(-2px); box-shadow: var(--avia-shadow-md); }
.kpi-item .kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--avia-text-gray);
}
.kpi-item .kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--avia-text-dark);
  margin: 8px 0 4px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.kpi-item .kpi-value.success { color: var(--avia-success); }
.kpi-item .kpi-value.warning { color: #b7950b; }
.kpi-item .kpi-value.danger { color: var(--avia-danger); }
.kpi-item .kpi-value.info { color: var(--avia-accent-blue); }
.kpi-item .kpi-target { font-size: 12px; color: #8a99ad; font-weight: 500; }
.kpi-item .kpi-trend {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kpi-item .kpi-trend.up { color: var(--avia-success); }
.kpi-item .kpi-trend.down { color: var(--avia-danger); }
.kpi-item .kpi-trend.stable { color: #b7950b; }
/* Accent variants */
.kpi-item--accent { border-left-color: var(--avia-accent-blue); }
.kpi-item--success { border-left-color: var(--avia-success); }
.kpi-item--danger { border-left-color: var(--avia-danger); }
.kpi-item--warning { border-left-color: var(--avia-warning); }

/* =============================================================================
   10. Charts
   ============================================================================= */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.chart-card canvas { max-height: 300px; width: 100% !important; }

/* Risk matrix — chart-adjacent table */
.risk-matrix table { width: 100%; border-collapse: collapse; font-size: 13px; }
.risk-matrix th {
  padding: 10px;
  background: var(--avia-light-gray);
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--avia-text-gray);
}
.risk-matrix td {
  padding: 12px;
  text-align: center;
  font-weight: 700;
  border: 1px solid var(--avia-white);
  border-radius: var(--avia-radius-xs);
}
.risk-matrix .risk-low { background: var(--avia-success); color: var(--avia-white); }
.risk-matrix .risk-medium { background: var(--avia-warning-light); color: #3d2e00; }
.risk-matrix .risk-high { background: #e67e22; color: var(--avia-white); }
.risk-matrix .risk-critical { background: var(--avia-danger); color: var(--avia-white); }

/* =============================================================================
   11. Tables — clean, hover states
   ============================================================================= */
.table-container, .audit-table-container {
  background: var(--avia-white);
  border-radius: var(--avia-radius-lg);
  box-shadow: var(--avia-shadow-sm);
  border: 1px solid var(--avia-border);
  overflow-x: auto;
  padding: 20px;
}
.table-container .table-header, .audit-table-container .table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.table-container .table-header h3, .audit-table-container .table-header h3 { margin: 0; }

table, .audit-table, .avia-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table th, .audit-table th, .avia-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--avia-light-gray);
  color: var(--avia-text-dark);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--avia-border);
  white-space: nowrap;
}
table td, .audit-table td, .avia-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f7;
  color: var(--avia-text-dark);
  vertical-align: middle;
}
table tbody tr:last-child td, .audit-table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover td, .audit-table tbody tr:hover td, .avia-table tbody tr:hover td { background: #f6f8fb; }
table .cell-muted, .avia-table .cell-muted { color: var(--avia-text-gray); font-size: 13px; }

/* Generic table helper (risk-matrix shares same container styles when wrapped in card) */

/* =============================================================================
   12. Badges & Tags — colored status indicators
   ============================================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: var(--avia-radius-pill);
  font-family: var(--avia-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-success { background: #d5f0de; color: #145a2f; border-color: #bfe8cc; }
.badge-danger  { background: #f9d5d3; color: #7a1e16; border-color: #f2b8b3; }
.badge-warning { background: #fef3cd; color: #6b5900; border-color: #fde49a; }
.badge-info    { background: #d6eaf8; color: #1a4d6e; border-color: #aed6f1; }
.badge-secondary { background: #e9ecf1; color: #3a4556; border-color: #d6dce6; }
.badge-primary { background: #d6eaf8; color: var(--avia-primary-blue); border-color: #aed6f1; }

/* Severity pills — strong */
.severity-critical, .severity-high, .severity-medium, .severity-low {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--avia-radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  border: 1px solid transparent;
}
.severity-critical { background: var(--avia-danger); color: var(--avia-white); }
.severity-high { background: #e67e22; color: var(--avia-white); }
.severity-medium { background: var(--avia-warning-light); color: #3d2e00; }
.severity-low { background: var(--avia-success); color: var(--avia-white); }

/* Dot variant */
.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  opacity: 0.9;
}

/* Alert-style badges (inline alerts) */
.alert {
  padding: 12px 16px;
  border-radius: var(--avia-radius-md);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-info { background: #d6eaf8; color: #1a4d6e; border-color: #aed6f1; }
.alert-success { background: #d5f0de; color: #145a2f; border-color: #bfe8cc; }
.alert-warning { background: #fef9e7; color: #6b5900; border-color: #fde49a; }
.alert-danger { background: #f9d5d3; color: #7a1e16; border-color: #f2b8b3; }

/* =============================================================================
   13. Forms — clean, blue focus states
   ============================================================================= */
.form-group, .avia-form-group { margin-bottom: 16px; }
.form-group label, .avia-form-group label, label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--avia-text-dark);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
label.required::after { content: " *"; color: var(--avia-danger); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  font-family: var(--avia-font);
  font-size: 14px;
  font-weight: 400;
  color: var(--avia-text-dark);
  background: var(--avia-white);
  border: 1px solid var(--avia-border);
  border-radius: var(--avia-radius-md);
  padding: 10px 14px;
  line-height: 1.4;
  transition: border-color var(--avia-transition), box-shadow var(--avia-transition), background var(--avia-transition);
  appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235a6a7a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
input::placeholder, textarea::placeholder { color: #9aa8bd; }
input:hover, select:hover, textarea:hover { border-color: var(--avia-border-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--avia-accent-blue);
  box-shadow: var(--avia-shadow-focus);
  outline: none;
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--avia-light-gray);
  color: var(--avia-text-gray);
  cursor: not-allowed;
  opacity: 0.9;
}
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--avia-danger); }
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus { box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18); }
.form-hint, .avia-form-hint { font-size: 12px; color: var(--avia-text-gray); margin-top: 6px; }
.form-error, .avia-form-error { font-size: 12px; color: var(--avia-danger); margin-top: 6px; font-weight: 500; }
.form-row, .avia-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox, .radio { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox input[type="checkbox"], .radio input[type="radio"] { width: auto; accent-color: var(--avia-accent-blue); }

/* =============================================================================
   14. Footer — dark blue, light text
   ============================================================================= */
.footer, .avia-footer, .app-footer {
  background: var(--avia-primary-dark);
  color: rgba(255, 255, 255, 0.72);
  padding: 40px var(--avia-content-pad) 32px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.6;
}
.footer a, .avia-footer a, .app-footer a { color: var(--avia-light-blue); }
.footer a:hover, .avia-footer a:hover { color: var(--avia-white); }
.footer .footer-grid, .avia-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--avia-content-max);
  margin: 0 auto 28px;
}
.footer .footer-brand h4, .avia-footer .footer-brand h4 { color: var(--avia-white); font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.footer .footer-brand p, .avia-footer .footer-brand p { color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.footer .footer-col h5, .avia-footer .footer-col h5 {
  color: var(--avia-white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer .footer-col ul, .avia-footer .footer-col ul { list-style: none; }
.footer .footer-col li + li, .avia-footer .footer-col li + li { margin-top: 8px; }
.footer .footer-bottom, .avia-footer .footer-bottom {
  max-width: var(--avia-content-max);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.footer--simple, .avia-footer--simple { text-align: center; padding: 24px; }

/* =============================================================================
   15. Loading States
   ============================================================================= */
.loading { text-align: center; padding: 40px; color: var(--avia-text-gray); font-size: 14px; }
.loading .spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid #eef2f7;
  border-top-color: var(--avia-accent-blue);
  border-radius: 50%;
  animation: avia-spin 0.9s linear infinite;
  margin-bottom: 12px;
}
@keyframes avia-spin { to { transform: rotate(360deg); } }

/* Skeleton (optional) */
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #e6ebf2 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: avia-skeleton 1.4s ease infinite;
  border-radius: var(--avia-radius-sm);
  min-height: 14px;
}
@keyframes avia-skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* =============================================================================
   16. Toast Notifications
   ============================================================================= */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 18px;
  border-radius: var(--avia-radius-md);
  color: var(--avia-white);
  font-family: var(--avia-font);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--avia-shadow-lg);
  z-index: 99998;
  animation: avia-slideUp 0.28s ease;
  max-width: 420px;
  line-height: 1.4;
}
.toast-success { background: var(--avia-success); }
.toast-error { background: var(--avia-danger); }
.toast-warning { background: var(--avia-warning-light); color: #3d2e00; }
.toast-info { background: var(--avia-info); }
@keyframes avia-slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   17. Responsive Styles
   ============================================================================= */
/* Desktop: > 1024px — default (no media query) */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
  :root { --avia-content-pad: 24px; }
  h1, .hero h1, .avia-hero h1 { font-size: 36px; }
  h2 { font-size: 24px; }
  .avia-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .avia-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .process-flow { gap: 10px; }
  .footer .footer-grid, .avia-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .avia-form-row { grid-template-columns: 1fr; }
}

/* Mobile: < 768px */
@media (max-width: 768px) {
  :root { --avia-content-pad: 16px; --avia-banner-height: 42px; }
  body { font-size: 14px; }

  .demo-banner { font-size: 11px; gap: 6px; padding: 0 10px; flex-wrap: wrap; height: auto; min-height: var(--avia-banner-height); padding-top: 6px; padding-bottom: 6px; }
  .demo-banner .demo-timer { font-size: 10px; }

  .app-header { flex-direction: column; align-items: stretch; padding: 12px 16px; top: var(--avia-banner-height); }
  .app-header .logo { justify-content: space-between; }
  .app-header .tenant-selector { width: 100%; }
  .app-header .tenant-selector select { flex: 1; }

  .app-nav { padding: 0 8px; top: auto; position: sticky; }
  .app-nav button { padding: 10px 12px; font-size: 12px; }

  .hero, .avia-hero { padding: 40px 16px 36px; }
  .hero h1, .avia-hero h1 { font-size: 30px; }
  .hero .subtitle, .avia-hero .subtitle { font-size: 15px; }
  .hero .btn-group, .avia-hero .btn-group { flex-direction: column; }
  .hero .btn-group .btn, .avia-hero .btn-group .btn { width: 100%; }
  .hero--centered, .avia-hero--centered { min-height: 360px; }
  .hero--fullscreen, .avia-hero--fullscreen { min-height: calc(100vh - var(--avia-banner-height)); }

  .kpi-banner { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi-item { padding: 16px; }
  .kpi-item .kpi-value { font-size: 26px; }

  .report-grid { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .process-flow { grid-template-columns: 1fr; }
  .process-arrow { transform: rotate(90deg); padding-top: 0; justify-content: center; height: 24px; }

  .avia-grid-2, .avia-grid-3, .avia-grid-4 { grid-template-columns: 1fr; }
  .stats-grid, .avia-stats-grid { grid-template-columns: 1fr 1fr; }

  .hazard-item { flex-direction: column; align-items: flex-start; }
  .hazard-item .hazard-meta { text-align: left; align-items: flex-start; width: 100%; flex-direction: row; flex-wrap: wrap; }

  .table-container, .audit-table-container { padding: 14px; border-radius: var(--avia-radius-md); }
  table th, table td, .audit-table th, .audit-table td { padding: 10px 10px; font-size: 13px; }

  .footer .footer-grid, .avia-footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer .footer-bottom, .avia-footer .footer-bottom { flex-direction: column; align-items: flex-start; }

  .btn-lg { padding: 12px 20px; font-size: 15px; }
}

/* Small mobile: < 480px */
@media (max-width: 480px) {
  .kpi-banner { grid-template-columns: 1fr; }
  .stats-grid, .avia-stats-grid { grid-template-columns: 1fr; }
  .demo-banner { justify-content: center; text-align: center; }
  .app-nav button { padding: 10px 10px; font-size: 11px; }
}

/* =============================================================================
   18. Utilities
   ============================================================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--avia-text-gray); }
.text-danger { color: var(--avia-danger); }
.text-success { color: var(--avia-success); }
.font-light { font-weight: 300; }
.font-regular { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Spacing helpers for inline style migration */
.gap-10 { gap: 10px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

.metrics-legend-box h3 { color: var(--avia-primary-dark); }
