/**
 * Apex Door Works - Global Design System & Theme Engine
 * Inspired by modern performance tech (GlobalWiz UI standard)
 * Clean, luminous, tech-forward, high-conversion typography & color palette.
 */

:root {
    /* Brand Foundation Constants */
    --signal-blue: #0878FF;
    --signal-cyan: #00C4D8;
    --action-orange: #FF6B2C;
    --action-orange-dark: #D94D1A;
    --action-orange-light: #FF925F;
    --navy-ink: #061A2C;
    --slate-dark: #0F172A;
    --slate-body: #334155;
    --slate-muted: #64748B;
    --slate-light: #F8FAFC;
    --slate-border: #E2E8F0;
    --white: #FFFFFF;
    --success: #10B981;
    --danger: #EF4444;

    /* Global Typography Stacks */
    --font-heading: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Component Geometry */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;

    /* Micro-Transitions */
    --theme-transition-duration: 0.25s;
    --theme-transition-timing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   LIGHT MODE DESIGN SPECIFICATION (Modern Performance / GlobalWiz Style)
   Pure Crisp White, Cool Slate-50, Electric Signal Blue, High-Conversion Orange.
   ========================================================================== */
html[data-theme="light"],
:root {
    --bg-main: #FFFFFF;
    --bg-subtle: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFFFFF;
    --bg-secondary: #F1F5F9;
    --bg-secondary-card: #F8FAFC;
    --bg-accent-soft: rgba(8, 120, 255, 0.08);
    --bg-accent-subtle: rgba(8, 120, 255, 0.04);
    --bg-orange-soft: rgba(255, 107, 44, 0.08);

    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-inverse: #FFFFFF;

    --primary-accent: #0878FF;
    --primary-accent-hover: #0060DF;
    --primary-accent-focus: rgba(8, 120, 255, 0.25);

    --orange: #FF6B2C;
    --orange-dark: #D94D1A;
    --orange-light: #FF925F;

    --border-color: #E2E8F0;
    --border-subtle: rgba(15, 23, 42, 0.06);
    --border-focus: #0878FF;

    --navbar-bg: rgba(255, 255, 255, 0.88);
    --topbar-bg: #0F172A;
    --topbar-text: #F8FAFC;

    --emergency-bg: #F8FAFC;
    --emergency-border: #E2E8F0;
    --emergency-title: #0F172A;
    --emergency-desc: #475569;

    --final-cta-bg: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --final-cta-title: #FFFFFF;
    --final-cta-desc: #94A3B8;
    --final-cta-border: #334155;

    --page-hero-bg: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(8, 120, 255, 0.08), transparent 70%), #F8FAFC;
    --page-hero-title: #0F172A;
    --page-hero-subtitle: #475569;
    --page-hero-border: #E2E8F0;

    --sidebar-cta-bg: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    --sidebar-cta-title: #0F172A;
    --sidebar-cta-border: rgba(8, 120, 255, 0.20);

    --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 10px 25px -5px rgba(15, 23, 42, 0.04);
    --card-shadow-hover: 0 20px 35px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(8, 120, 255, 0.18);
    --modal-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);

    --input-bg: #FFFFFF;
    --input-border: #CBD5E1;
    --input-text: #0F172A;
    --input-placeholder: #94A3B8;

    --badge-bg: rgba(8, 120, 255, 0.08);
    --badge-text: #0878FF;

    --table-header-bg: #F8FAFC;
    --table-stripe: #F1F5F9;

    --footer-bg: #061A2C;
    --footer-card-bg: #0B253E;
    --footer-text: #94A3B8;
    --footer-heading: #FFFFFF;
    --footer-border: rgba(255, 255, 255, 0.08);

    --sun-opacity: 1;
    --moon-opacity: 0;
    --sun-rotate: 0deg;
    --moon-rotate: 90deg;
}

/* ==========================================================================
   DARK MODE DESIGN SPECIFICATION (Cyber Navy + Ice Blue / Clean Contrast)
   Deep Cyber Navy: #0B1120, Slate Surfaces: #131D33, Crisp Ice Highlights.
   ========================================================================== */
html[data-theme="dark"] {
    --bg-main: #0B1120;
    --bg-subtle: #0F172A;
    --bg-card: #131D33;
    --bg-card-hover: #18243E;
    --bg-secondary: #0F172A;
    --bg-secondary-card: #18243E;
    --bg-accent-soft: rgba(56, 189, 248, 0.12);
    --bg-accent-subtle: rgba(56, 189, 248, 0.06);
    --bg-orange-soft: rgba(255, 107, 44, 0.14);

    --text-heading: #F8FAFC;
    --text-body: #94A3B8;
    --text-muted: #64748B;
    --text-inverse: #0F172A;

    --primary-accent: #38BDF8;
    --primary-accent-hover: #0284C7;
    --primary-accent-focus: rgba(56, 189, 248, 0.35);

    --orange: #FF6B2C;
    --orange-dark: #FF8247;
    --orange-light: #FF925F;

    --border-color: rgba(255, 255, 255, 0.10);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-focus: #38BDF8;

    --navbar-bg: rgba(11, 17, 32, 0.88);
    --topbar-bg: #070B14;
    --topbar-text: #94A3B8;

    --emergency-bg: #131D33;
    --emergency-border: rgba(255, 255, 255, 0.08);
    --emergency-title: #F8FAFC;
    --emergency-desc: #94A3B8;

    --final-cta-bg: linear-gradient(135deg, #070B14 0%, #131D33 100%);
    --final-cta-title: #FFFFFF;
    --final-cta-desc: #94A3B8;
    --final-cta-border: rgba(255, 255, 255, 0.10);

    --page-hero-bg: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.08), transparent 70%), #0B1120;
    --page-hero-title: #FFFFFF;
    --page-hero-subtitle: #94A3B8;
    --page-hero-border: rgba(255, 255, 255, 0.08);

    --sidebar-cta-bg: #131D33;
    --sidebar-cta-title: #FFFFFF;
    --sidebar-cta-border: rgba(56, 189, 248, 0.25);

    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(56, 189, 248, 0.25);
    --modal-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);

    --input-bg: #131D33;
    --input-border: rgba(255, 255, 255, 0.15);
    --input-text: #F8FAFC;
    --input-placeholder: #64748B;

    --badge-bg: rgba(56, 189, 248, 0.12);
    --badge-text: #38BDF8;

    --table-header-bg: #0F172A;
    --table-stripe: #131D33;

    --footer-bg: #070B14;
    --footer-card-bg: #0F172A;
    --footer-text: #94A3B8;
    --footer-heading: #FFFFFF;
    --footer-border: rgba(255, 255, 255, 0.06);

    --sun-opacity: 0;
    --moon-opacity: 1;
    --sun-rotate: -90deg;
    --moon-rotate: 0deg;
}
