@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/inter-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter-700.woff2') format('woff2');
}

/*
 * SHARED STYLES - Drone Flight Verification System
 * Modern Sleek Theme - Transport Canada Compliance
 * Version: 2.0.0
 */

/* ========================================
   CSS VARIABLES - THEMING SYSTEM
   ======================================== */

:root {
    /* Background Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-border: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-surface: #f8fafc;

    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #1e293b;
    --text-muted: #475569;
    --text-tertiary: #64748b;
    --text-inverse: #ffffff;

    /* Brand Colors - Modern Blue/Indigo */
    --accent-primary: #4f46e5;
    --accent-primary-dark: #4338ca;
    --accent-primary-light: #818cf8;
    --accent-bg: #eef2ff;
    --accent-border: #c7d2fe;
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

    /* Status Colors */
    --success: #047857;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --success-light: #34d399;

    --error: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --error-light: #f87171;

    --warning: #b45309;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --warning-light: #fbbf24;

    --info: #3b82f6;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;
    --info-light: #60a5fa;

    /* Neutral Colors */
    --neutral-bg: #f1f5f9;
    --neutral-border: #cbd5e1;
    --neutral: #64748b;

    /* Example/Code Box Colors */
    --example-bg: #f0fdf4;
    --example-border: #86efac;

    /* Borders and Radii */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 20px;
    --border-radius-full: 9999px;
    --border-width: 1px;
    --border-width-thick: 2px;
    --border-width-heavy: 4px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-card-hover: 0 10px 25px rgba(0,0,0,0.1), 0 6px 10px rgba(0,0,0,0.06);

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-Index */
    --z-base: 1;
    --z-elevated: 10;
    --z-sticky: 50;
    --z-dropdown: 100;
    --z-modal: 1000;
    --z-tooltip: 2000;
    --z-toast: 3000;
}

/* Dark Theme */
html.dark-theme {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #1e293b;
    --bg-elevated: #1e293b;
    --bg-border: #334155;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --bg-surface: #0f172a;

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0f172a;

    --accent-primary: #818cf8;
    --accent-primary-dark: #6366f1;
    --accent-primary-light: #a5b4fc;
    --accent-bg: rgba(99, 102, 241, 0.15);
    --accent-border: rgba(99, 102, 241, 0.3);
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);

    --success: #34d399;
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-border: rgba(16, 185, 129, 0.3);

    --error: #f87171;
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-border: rgba(239, 68, 68, 0.3);

    --warning: #fbbf24;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-border: rgba(245, 158, 11, 0.3);

    --info: #60a5fa;
    --info-bg: rgba(59, 130, 246, 0.15);
    --info-border: rgba(59, 130, 246, 0.3);

    --neutral-bg: #334155;
    --neutral-border: #475569;
    --neutral: #94a3b8;

    --example-bg: rgba(16, 185, 129, 0.1);
    --example-border: rgba(16, 185, 129, 0.3);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-card-hover: 0 10px 25px rgba(0,0,0,0.3);
}

/* Auto-detect OS dark mode when no manual preference is set */
@media (prefers-color-scheme: dark) {
    html:not(.light-theme):not(.dark-theme) {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #1e293b;
        --bg-elevated: #1e293b;
        --bg-border: #334155;
        --bg-card: #1e293b;
        --bg-hover: #334155;
        --bg-surface: #0f172a;
        --text-primary: #ffffff;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --text-inverse: #0f172a;
        --accent-primary: #818cf8;
        --accent-primary-dark: #6366f1;
        --accent-primary-light: #a5b4fc;
        --accent-bg: rgba(99, 102, 241, 0.15);
        --accent-border: rgba(99, 102, 241, 0.3);
        --success: #34d399;
        --success-bg: rgba(16, 185, 129, 0.15);
        --success-border: rgba(16, 185, 129, 0.3);
        --error: #f87171;
        --error-bg: rgba(239, 68, 68, 0.15);
        --error-border: rgba(239, 68, 68, 0.3);
        --warning: #fbbf24;
        --warning-bg: rgba(245, 158, 11, 0.15);
        --warning-border: rgba(245, 158, 11, 0.3);
        --info: #60a5fa;
        --info-bg: rgba(59, 130, 246, 0.15);
        --info-border: rgba(59, 130, 246, 0.3);
        --neutral-bg: #334155;
        --neutral-border: #475569;
        --neutral: #94a3b8;
        --example-bg: rgba(16, 185, 129, 0.1);
        --example-border: rgba(16, 185, 129, 0.3);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
        --shadow-card: 0 1px 3px rgba(0,0,0,0.2);
        --shadow-card-hover: 0 10px 25px rgba(0,0,0,0.3);
    }
}

/* ========================================
   REGULATION TOOLTIPS
   ======================================== */

.reg-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: help;
    margin-left: 6px;
    flex-shrink: 0;
    vertical-align: middle;
    border: 1px solid var(--accent-border);
    transition: background var(--transition-fast), color var(--transition-fast);
    user-select: none;
    -webkit-user-select: none;
}

.reg-info:hover {
    background: var(--accent-primary);
    color: #fff;
}

#reg-tooltip {
    position: fixed;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    word-wrap: break-word;
}

#reg-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .reg-info {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
    }

    #reg-tooltip {
        max-width: calc(100vw - 24px);
    }
}

/* ========================================
   BASE RESET AND GLOBAL STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color var(--transition-normal),
                color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.2;
}

h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    margin: 24px 0 12px 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 16px 0 8px 0;
    font-weight: 600;
}

p {
    line-height: 1.7;
    margin: 12px 0;
    color: var(--text-secondary);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-dark);
    text-decoration: underline;
}

ul, ol {
    margin: 12px 0 12px 24px;
    line-height: 1.8;
    color: var(--text-secondary);
}

li {
    margin: 6px 0;
}

code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.875em;
}

/* ========================================
   LAYOUT CONTAINERS
   ======================================== */

.container {
    max-width: 100%;
    margin: 0;
    background: var(--bg-primary);
    overflow: hidden;
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

.container-narrow {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius);
}

.subsection {
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   HEADER STYLES
   ======================================== */

header {
    background: var(--bg-card);
    border-bottom: var(--border-width) solid var(--bg-border);
    padding: var(--spacing-lg);
    position: relative;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========================================
   CARD COMPONENTS
   ======================================== */

.card {
    background: var(--bg-card);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-card);
}

.card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.card-hover {
    cursor: pointer;
}

.card-hover:hover {
    background: var(--bg-hover);
}

.card-critical {
    border-left: var(--border-width-heavy) solid var(--error);
}

.card-warning {
    border-left: var(--border-width-heavy) solid var(--warning);
}

.card-success {
    border-left: var(--border-width-heavy) solid var(--success);
}

.card-info {
    border-left: var(--border-width-heavy) solid var(--info);
}

/* ========================================
   BUTTON COMPONENTS
   ======================================== */

.btn {
    padding: 16px 20px;
    min-height: 48px;
    border: var(--border-width) solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Primary Button */
.btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background: var(--accent-primary-dark);
    border-color: var(--accent-primary-dark);
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--bg-border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--neutral-border);
    color: var(--text-primary);
}

/* Success Button */
.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

/* Danger Button */
.btn-danger {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Warning Button */
.btn-warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
}

/* Info Button */
.btn-info {
    background: var(--info);
    color: white;
    border-color: var(--info);
}

.btn-info:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Outline Buttons */
.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-border);
}

.btn-outline:hover {
    background: var(--accent-bg);
    border-color: var(--accent-primary);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Button Sizes */
.btn-sm {
    padding: 10px 16px;
    min-height: 40px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 16px 32px;
    min-height: 56px;
    font-size: 1rem;
    border-radius: var(--border-radius);
}

.btn-block {
    width: 100%;
    display: flex;
}

/* Icon Button */
.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.theme-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: var(--border-width) solid var(--bg-border);
    padding: 12px 16px;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    z-index: var(--z-elevated);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-border);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   TAB SYSTEM
   ======================================== */

.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-button {
    padding: 14px 20px;
    min-height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    position: relative;
    font-family: var(--font-sans);
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
}

.tab-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.tab-button.complete::after {
    content: '\2713';
    width: 16px;
    height: 16px;
    background: var(--success);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-full);
    position: absolute;
    top: 4px;
    right: 4px;
}

.tab-button.incomplete::after {
    content: '!';
    width: 16px;
    height: 16px;
    background: var(--warning);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-full);
    position: absolute;
    top: 4px;
    right: 4px;
}

.tab-content {
    display: none;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border: var(--border-width) solid var(--bg-border);
    border-top: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ========================================
   CHECKLIST ITEMS
   ======================================== */

.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 6px;
    transition: all var(--transition-fast);
    position: relative;
    background: var(--bg-elevated);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius-sm);
}

.checklist-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-border);
}

.checklist-item input[type="checkbox"] {
    margin-right: 14px;
    margin-top: 0;
    width: 32px;
    height: 32px;
    cursor: pointer;
    accent-color: var(--accent-primary);
    flex-shrink: 0;
    border-radius: 4px;
}

.checklist-item input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.checklist-item label {
    cursor: pointer;
    flex: 1;
    color: var(--text-primary);
    user-select: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checklist-item.checked {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.checklist-item.checked label {
    color: var(--text-muted);
    text-decoration: line-through;
}

.checklist-item.critical,
.checkbox-critical {
    border-left: 3px solid var(--error);
}

.checklist-item.warning,
.checkbox-warning {
    border-left: 3px solid var(--warning);
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-card);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-xl);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: var(--border-width) solid var(--bg-border);
}

.modal-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.25rem;
}

.modal-close {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--error-bg);
    color: var(--error);
}

.modal-body {
    margin: var(--spacing-lg) 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: var(--border-width) solid var(--bg-border);
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress-container {
    margin: var(--spacing-md) 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-full);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: var(--border-radius-full);
    transition: width var(--transition-slow);
}

.progress-fill.success {
    background: var(--success);
}

.progress-fill.warning {
    background: var(--warning);
}

.progress-fill.danger {
    background: var(--error);
}

/* ========================================
   TOOLTIP
   ======================================== */

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--accent-bg);
    color: var(--accent-primary);
    border-radius: var(--border-radius-full);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    cursor: help;
    margin-left: 6px;
    position: relative;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 16px;
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    white-space: normal;
    width: 280px;
    z-index: var(--z-tooltip);
    font-weight: normal;
    line-height: 1.5;
    box-shadow: var(--shadow-lg);
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-border);
    z-index: calc(var(--z-tooltip) + 1);
}

/* ========================================
   ALERT BOXES
   ======================================== */

.alert {
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border: var(--border-width) solid;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--text-primary);
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--text-primary);
}

.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--text-primary);
}

.alert-danger {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--text-primary);
}

.alert h3 {
    color: inherit;
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.alert p {
    color: var(--text-primary);
    margin: 6px 0;
}

/* Offline status indicator */
.offline-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--warning);
    color: #000;
    text-align: center;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: var(--z-toast);
    animation: slideDown 0.3s ease;
}

.offline-indicator.visible {
    display: block;
}

.online-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--success);
    color: #fff;
    text-align: center;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: var(--z-toast);
    animation: slideDown 0.3s ease;
}

.online-indicator.visible {
    display: block;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Emergency Contacts */
.emergency-contacts {
    background: var(--error-bg);
    border: var(--border-width) solid var(--error-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md);
}

.emergency-contacts h3 {
    color: var(--error);
    margin-bottom: 12px;
    font-size: 1rem;
}

/* Example Box */
.example-box {
    background: var(--example-bg);
    border: var(--border-width) solid var(--example-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.example-box strong {
    color: var(--success);
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.example-box code {
    display: block;
    background: var(--bg-elevated);
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--accent-primary);
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Tip Box */
.tip-box {
    background: var(--info-bg);
    border: var(--border-width) solid var(--info-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.tip-box strong {
    color: var(--info);
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Warning Box */
.warning-box {
    background: var(--warning-bg);
    border: var(--border-width) solid var(--warning-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.warning-box strong {
    color: var(--warning);
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-tertiary);
}

input::placeholder {
    color: var(--text-muted);
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

/* Required field indicators */
label.required::after,
.form-group.required > label::after {
    content: ' *';
    color: var(--error);
    font-weight: 700;
}

input:required:invalid:not(:placeholder-shown),
select:required:invalid {
    border-color: var(--error-border);
}

input:required:valid,
select:required:valid {
    border-color: var(--success-border);
}

/* Validation error highlighting */
.validation-error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.validation-error:focus {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

.question-group {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-elevated);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius);
}

.question-group:hover {
    border-color: var(--accent-border);
}

/* ========================================
   TABLE STYLES
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: var(--border-width) solid var(--bg-border);
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: var(--border-width) solid var(--bg-border);
}

th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-hover);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.highlight {
    background: var(--accent-bg);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.6;
}

.badge-primary { background: var(--accent-bg); color: var(--accent-primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--error-bg); color: var(--error); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* ========================================
   ACTIONS BAR
   ======================================== */

.actions {
    display: flex;
    gap: 12px;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border-top: var(--border-width) solid var(--bg-border);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ========================================
   TIME DISPLAY
   ======================================== */

.time-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.time-display {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 2;
}

.time-display strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ========================================
   FLIGHT INFO SECTION
   ======================================== */

.flight-info {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    margin: var(--spacing-md);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius);
    border-left: var(--border-width-heavy) solid var(--accent-primary);
}

.flight-info h3 {
    color: var(--accent-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.section-header {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: 12px;
    border-bottom: var(--border-width-thick) solid var(--bg-border);
    font-weight: 600;
}

/* ========================================
   DASHBOARD SPECIFIC STYLES
   ======================================== */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.level-card {
    background: var(--bg-card);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-card);
}

.level-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.level-card-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
}

.level-card-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.level-card-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ========================================
   SIGNATURE PAD
   ======================================== */

.signature-pad {
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius-sm);
    background: var(--bg-elevated);
    cursor: crosshair;
}

.signature-controls {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
}

/* ========================================
   STATUS CHIPS
   ======================================== */

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--border-radius-full);
}

.status-chip.active::before { background: var(--success); }
.status-chip.active { background: var(--success-bg); color: var(--success); }

.status-chip.pending::before { background: var(--warning); }
.status-chip.pending { background: var(--warning-bg); color: var(--warning); }

.status-chip.inactive::before { background: var(--text-muted); }
.status-chip.inactive { background: var(--neutral-bg); color: var(--text-muted); }

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .theme-toggle,
    .tabs,
    .btn,
    .actions,
    .bottom-nav {
        display: none !important;
    }

    .tab-content {
        display: block !important;
        page-break-after: always;
        border: none;
    }

    .tab-content:last-child {
        page-break-after: auto;
    }

    .card,
    .section,
    .checklist-item {
        border-color: #ccc;
        background: white;
        box-shadow: none;
        border-radius: 0;
    }

    h1, h2, h3, h4 {
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    @page {
        margin: 2cm;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1rem;
    }

    .theme-toggle {
        position: static;
        margin-bottom: var(--spacing-sm);
        display: flex;
        justify-content: center;
    }

    header {
        padding: var(--spacing-md);
    }

    .tabs {
        padding: var(--spacing-xs);
        gap: 2px;
    }

    .tab-button {
        padding: 12px 14px;
        min-height: 44px;
        font-size: 0.75rem;
    }

    .tab-content {
        padding: var(--spacing-md);
    }

    .modal-content {
        width: 95%;
        padding: var(--spacing-md);
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: var(--border-radius);
        margin-top: env(safe-area-inset-top, 16px);
    }

    .modal-overlay.active {
        align-items: flex-start;
        padding-top: 16px;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }

    .tooltip-icon:hover::after {
        width: 220px;
        font-size: 0.75rem;
        padding: 10px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .card {
        padding: var(--spacing-md);
    }

    .tab-button {
        padding: 12px 10px;
        min-height: 42px;
        font-size: 0.7rem;
    }

    .btn {
        padding: 14px 16px;
        min-height: 44px;
        font-size: 0.8rem;
    }

    .checklist-item {
        padding: 12px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn var(--transition-normal);
}

.slide-in {
    animation: slideIn var(--transition-normal);
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   GRID SYSTEM
   ======================================== */

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   BOTTOM NAVIGATION (MOBILE APP)
   ======================================== */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: var(--border-width) solid var(--bg-border);
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    z-index: var(--z-sticky);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    align-items: center;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    min-height: 48px;
    justify-content: center;
    transition: color var(--transition-fast);
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-sans);
}

.bottom-nav-item .nav-icon,
.bottom-nav-item .bottom-nav-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--accent-primary);
}

/* Operations submenu popup */
.bottom-nav-ops {
    position: relative;
    cursor: pointer;
}

.ops-submenu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    min-width: 140px;
    z-index: 1000;
    margin-bottom: 8px;
}

.ops-submenu.show {
    display: block;
}

.ops-submenu-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.ops-submenu-item:hover {
    background: var(--bg-tertiary);
}

.ops-submenu-item:active {
    background: var(--bg-border);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 70px;
    }
}

/* ========================================
   TOP APP BAR (MOBILE)
   ======================================== */

.app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px var(--spacing-md);
    background: var(--bg-card);
    border-bottom: var(--border-width) solid var(--bg-border);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    min-height: 56px;
}

.app-bar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}

.app-bar-back {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.app-bar-back:hover {
    background: var(--bg-hover);
}

.app-bar-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--bg-border);
    border-top-color: var(--accent-primary);
    border-radius: var(--border-radius-full);
    animation: spin 0.6s linear infinite;
}

/* ========================================
   SELECT OPTION STYLING
   ======================================== */

select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ========================================
   LEGACY BUTTON COMPAT (operations-avancees)
   ======================================== */

.btn-start {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    background: var(--success);
    color: white;
    transition: all var(--transition-fast);
}

.btn-start:hover {
    background: #059669;
    box-shadow: var(--shadow-md);
}

.btn-end {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    background: var(--error);
    color: white;
    transition: all var(--transition-fast);
}

.btn-end:hover {
    background: #dc2626;
    box-shadow: var(--shadow-md);
}

.btn-reset {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: var(--border-width) solid var(--bg-border);
    transition: all var(--transition-fast);
}

.btn-reset:hover {
    background: var(--bg-hover);
    border-color: var(--neutral-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

/* ========================================
   RADIO & CHECKBOX LABELS
   ======================================== */

input[type="radio"] + label,
.question-group label {
    color: var(--text-primary);
}

.question-group p {
    color: var(--text-secondary);
}

/* ========================================
   ANNOTATION SYSTEM
   ======================================== */

.annotation-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--bg-border);
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.annotation-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--bg-hover);
}

.annotation-toggle.has-content {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.annotation-panel {
    display: none;
    flex-basis: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--bg-border);
}

.annotation-panel.open {
    display: block;
}

.annotation-panel textarea {
    width: 100%;
    min-height: 50px;
    resize: vertical;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius-sm);
    padding: 8px;
    font-size: 0.82rem;
    font-family: var(--font-sans);
    box-sizing: border-box;
}

.annotation-images-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.annotation-image-preview {
    position: relative;
    display: inline-block;
    text-align: center;
}

.annotation-image-preview img {
    max-width: 120px;
    max-height: 90px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--bg-border);
}

.annotation-image-preview .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: none;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.annotation-image-preview input[type="text"] {
    display: block;
    width: 120px;
    margin-top: 4px;
    font-size: 0.72rem;
    padding: 2px 4px;
    border: 1px solid var(--bg-border);
    border-radius: 3px;
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.annotation-add-img-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin-top: 8px;
    font-size: 0.78rem;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.annotation-add-img-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ========================================
   ACCORDION / COLLAPSIBLE SECTIONS
   ======================================== */

.accordion-group {
    margin-bottom: var(--spacing-sm);
    border: var(--border-width) solid var(--bg-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-elevated);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background var(--transition-fast);
    border: none;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    gap: var(--spacing-sm);
}

.accordion-header:hover {
    background: var(--bg-tertiary);
}

.accordion-header:active {
    background: var(--bg-border);
}

.accordion-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.accordion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--border-radius-full);
    background: var(--accent-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.accordion-badge.complete {
    background: var(--success);
}

.accordion-badge.incomplete {
    background: var(--warning);
}

.accordion-chevron {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
    flex-shrink: 0;
    color: var(--text-muted);
}

.accordion-chevron.open {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: none;
    overflow: visible;
}

.accordion-content-inner {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: var(--border-width) solid var(--bg-border);
}

.breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   HERO LOGO (consolidated from 5 HTML files)
   ======================================== */
.hero-icon { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.hero-logo { max-width: 100%; max-height: 100%; object-fit: contain; }
.hero-logo-dark { display: none; }
.hero-logo-light { display: block; }
html.dark-theme .hero-logo-light { display: none; }
html.dark-theme .hero-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
    html:not(.light-theme):not(.dark-theme) .hero-logo-light { display: none; }
    html:not(.light-theme):not(.dark-theme) .hero-logo-dark { display: block; }
}

/* ========================================
   CHIP COMPONENTS (consolidated from 2 HTML files)
   ======================================== */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip {
    padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 500;
    border: 1px solid var(--bg-border); background: var(--bg-elevated); color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.chip:hover { border-color: var(--accent-primary); background: var(--accent-bg); }
.chip.selected { background: var(--accent-primary); color: white; border-color: var(--accent-primary); }
.chip.selected.warn { background: var(--warning); border-color: var(--warning); }
.chip.selected.danger { background: var(--error); border-color: var(--error); }
.chip-note { margin-top: 6px; width: 100%; font-size: 0.85rem; padding: 8px 12px; border-radius: var(--border-radius-sm); border: 1px solid var(--bg-border); background: var(--bg-primary); color: var(--text-primary); }
.chip-note::placeholder { color: var(--text-muted); font-style: italic; }

/* ========================================
   FLIGHT PANEL / VOLTAGE / BATTERY BAR (consolidated from 4 HTML files)
   ======================================== */
.flight-panel { background:var(--bg-elevated); border:var(--border-width) solid var(--bg-border); border-radius:var(--border-radius); padding:20px; margin-bottom:16px; }
.flight-panel h4 { margin:0 0 12px 0; color:var(--accent-primary); font-size:0.9em; text-transform:uppercase; letter-spacing:0.5px; }
.voltage-input-group { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; margin-bottom:12px; }
.voltage-input-group .form-group { flex:1; min-width:120px; margin-bottom:0; }
.voltage-input-group .form-group label { font-size:0.8rem; }
.voltage-link-icon { font-size:1.2rem; color:var(--text-muted); padding-bottom:8px; }
.battery-bar-container { width:100%; height:24px; background:var(--bg-tertiary); border-radius:var(--border-radius-full); overflow:hidden; position:relative; margin:8px 0; }
.battery-bar-fill { height:100%; border-radius:var(--border-radius-full); transition:width var(--transition-slow), background-color var(--transition-normal); display:flex; align-items:center; justify-content:center; font-size:0.7rem; font-weight:700; color:white; min-width:30px; }
.battery-bar-fill.green { background:var(--success); }
.battery-bar-fill.yellow { background:var(--warning); }
.battery-bar-fill.orange { background:#f97316; }
.battery-bar-fill.red { background:var(--error); }
.flight-active-indicator { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:var(--border-radius-full); font-size:0.8rem; font-weight:600; background:var(--success-bg); color:var(--success); border:1px solid var(--success-border); animation:pulse 2s ease-in-out infinite; }
.flight-active-indicator::before { content:''; width:8px; height:8px; background:var(--success); border-radius:50%; }
.flight-timer { font-size:1.8rem; font-weight:700; color:var(--accent-primary); font-family:var(--font-mono); text-align:center; padding:8px 0; }
.cell-config-badge { display:inline-block; padding:2px 8px; border-radius:var(--border-radius-full); font-size:0.7rem; font-weight:600; background:var(--accent-bg); color:var(--accent-primary); border:1px solid var(--accent-border); }
.voltage-mode-toggle { display:inline-flex; border-radius:var(--border-radius-sm); overflow:hidden; border:var(--border-width) solid var(--bg-border); margin-bottom:10px; }
.voltage-mode-toggle button { padding:6px 14px; font-size:0.8rem; font-weight:600; border:none; cursor:pointer; background:var(--bg-elevated); color:var(--text-secondary); transition:all var(--transition-fast); }
.voltage-mode-toggle button.active { background:var(--accent-primary); color:white; }
.vpc-display { display:flex; align-items:center; gap:8px; padding:8px 14px; background:var(--bg-tertiary); border:var(--border-width) solid var(--bg-border); border-radius:var(--border-radius-sm); margin-top:8px; }
.vpc-display .vpc-label { font-size:0.8rem; color:var(--text-muted); white-space:nowrap; }
.vpc-display .vpc-value { font-size:1.1rem; font-weight:700; font-family:var(--font-mono); color:var(--accent-primary); }
.vpc-display .vpc-status { font-size:0.75rem; font-weight:600; padding:2px 8px; border-radius:var(--border-radius-full); }
.vpc-status.full { background:var(--success-bg); color:var(--success); }
.vpc-status.nominal { background:rgba(59,130,246,0.12); color:#3b82f6; }
.vpc-status.storage { background:var(--warning-bg); color:var(--warning); }
.vpc-status.low { background:rgba(249,115,22,0.12); color:#f97316; }
.vpc-status.critical { background:var(--error-bg); color:var(--error); }
.no-battery-selected { text-align:center; padding:40px 20px; color:var(--text-muted); }
.no-battery-selected .icon { font-size:3rem; margin-bottom:12px; opacity:0.4; }

/* ========================================
   METEO-BLINK ANIMATION (consolidated from 3 HTML files)
   ======================================== */
@keyframes meteo-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ========================================
   OPERATIONS MOBILE RESPONSIVE (consolidated from 2 HTML files)
   ======================================== */
@media (max-width: 768px) {
    .section { padding: 8px; margin: 4px 0; border-radius: 6px; }
    .section h3 { font-size: 0.95rem; margin: 12px 0 8px; }
    .subsection { margin-bottom: 8px; }
    .checklist-item { padding: 6px 8px; margin: 3px 0; font-size: 0.85rem; }
    header { padding: 12px; }
    header h1 { font-size: 1.3rem; }
    .actions { padding: 4px; gap: 4px; }
    .tabs { padding: 0 4px; }
    .flight-info { padding: 8px; margin: 4px 0; }
    .progress-container { margin: 12px 0 !important; }
    .question-group { padding: 6px 0; }
    .chip-group { gap: 4px; }
    .chip { padding: 5px 10px; font-size: 0.78rem; }
    .voltage-input-group { flex-direction:column; }
    .voltage-link-icon { display:none; }
    #manual-entry-panel > div[style*="grid-template-columns"] { grid-template-columns:1fr !important; }
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
#dc-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    pointer-events: auto;
    cursor: pointer;
    animation: slideDown 0.3s ease;
    max-width: 380px;
    word-break: break-word;
    white-space: pre-line;
    box-shadow: var(--shadow-lg, 0 4px 12px rgba(0,0,0,0.15));
}
.toast.info { background: var(--accent-primary); }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--warning); color: #000; }
.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ========================================
   END OF STYLESHEET
   ======================================== */
