/* ========================================
   EKWANI CONSULTING - UNIFIED STYLESHEET
   Professional Design with Smooth Animations
   ======================================== */

/* ----------------------------------------
   CSS @LAYER DECLARATIONS
   Establishes cascade order:
   1. reset   - Base reset & defaults
   2. tokens  - Design tokens & custom properties
   3. base    - Base element styles
   4. layout  - Layout & structure
   5. components - Reusable components
   6. utilities - Utility classes & overrides
   ---------------------------------------- */
@layer reset, tokens, base, layout, components, utilities;

/* ----------------------------------------
   RESPONSIVE BREAKPOINTS (Tailwind Standard)
   sm: 640px  - Mobile landscape
   md: 768px  - Tablets
   lg: 1024px - Desktop
   xl: 1280px - Large desktop
   2xl: 1536px - Extra large
   ---------------------------------------- */

/* ----------------------------------------
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   Ekwani Consulting Brand Colors
   ---------------------------------------- */
:root {
    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Montserrat, Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;

    /* ========== EKWANI COLOR PALETTE ========== */

    /* Text & Backgrounds */
    --color-dark-1: #000000;
    --color-light-1: #FFFFFF;
    --color-dark-2: #373545;
    --color-light-2: #CEDBE6;

    /* Accent Colors (mix & match for cohesive designs) */
    --accent-1: #34B29D;
    --accent-2: #58B6C0;
    --accent-3: #75BDA7;
    --accent-4: #7A8C8E;
    --accent-5: #84ACB6;
    --accent-6: #2683C6;
    --color-link: #06898C;
    --color-link-visited: #0070C0;

    /* Semantic Colors (UI feedback only) */
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* ========== ALIASES (for convenience) ========== */

    /* Text */
    --text-primary: var(--color-dark-1);
    --text-secondary: var(--color-dark-2);
    --text-muted: #566367;
    --text-light: var(--color-light-1);

    /* Primary accent shortcuts */
    --accent: var(--accent-1);
    --accent-strong: var(--accent-2);
    --accent-deep: var(--color-link);
    --accent-soft: rgba(52, 178, 157, .18);
    --accent-hover: #2a9d8a;
    --accent-text: #238577;

    /* Semantic shortcuts */
    --success: var(--accent-1);
    --success-light: rgba(52, 178, 157, .15);
    --warning: var(--color-warning);
    --warning-light: #fff3cd;
    --critical: var(--color-error);
    --critical-light: #f8d7da;
    --info: var(--accent-6);
    --info-light: rgba(38, 131, 198, .15);

    /* Neutral grays & borders */
    --gray-light: #ccc;
    --gray-medium: #666;
    --border-light: #e0e0e0;

    /* Glass & Surface */
    --glass-border: rgba(255, 255, 255, .55);
    --glass-bg: rgba(255, 255, 255, .75);
    --surface-light: rgba(255, 255, 255, .6);
    --surface-lighter: rgba(255, 255, 255, .8);
    --bg-light: var(--color-light-2);

    /* ========== LIQUID GLASS TOKENS ========== */

    /* Glass Blur Intensities */
    --glass-blur-subtle: 8px;
    --glass-blur-medium: 16px;
    --glass-blur-strong: 24px;

    /* Glass Filter Values */
    --glass-saturate: 180%;
    --glass-brightness: 105%;

    /* Specular Highlights */
    --glass-specular: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    --glass-specular-subtle: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 40%);

    /* Rim Lighting */
    --glass-rim-light: inset 0 1px 1px rgba(255,255,255,0.4);
    --glass-rim-accent: inset 0 -1px 1px rgba(52,178,157,0.15);
    --glass-rim-combined: inset 0 1px 1px rgba(255,255,255,0.4), inset 0 -1px 1px rgba(52,178,157,0.15);

    /* Glass Borders */
    --glass-border-light: 1px solid rgba(255,255,255,0.5);
    --glass-border-accent: 1px solid rgba(52,178,157,0.25);
    --glass-border-glow: 0 0 0 1px rgba(52,178,157,0.1);

    /* Glass Backgrounds */
    --glass-bg-light: rgba(255,255,255,0.65);
    --glass-bg-medium: rgba(255,255,255,0.45);
    --glass-bg-dark: rgba(55,53,69,0.75);

    /* Glass Shadows */
    --glass-shadow-sm: 0 4px 16px rgba(0,0,0,0.06);
    --glass-shadow-md: 0 8px 32px rgba(0,0,0,0.08);
    --glass-shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
    --glass-shadow-glow: 0 8px 32px rgba(52,178,157,0.15);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-card: 32px;
    --radius-input: 18px;
    --radius-pill: 9999px;

    /* Transitions & Easing */
    --ease-out: cubic-bezier(.2, .8, .2, 1);
    --ease-spring: cubic-bezier(.16, 1, .3, 1);
    --ease-bounce: cubic-bezier(.68, -.55, .265, 1.55);
    --transition-fast: 150ms;
    --transition-normal: 250ms;
    --transition-slow: 400ms;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
    --shadow-card: 0 34px 90px rgba(15, 23, 42, .13);
    --shadow-glow: 0 12px 28px rgba(52, 178, 157, .35);

    /* ----------------------------------------
       Z-INDEX SCALE (Documented & Enforced)

       Use these variables for all z-index values:
       - z-background: Below content (decorative backgrounds)
       - z-normal: Default stacking context
       - z-dropdown: Autocomplete, select menus
       - z-sticky: Sticky table headers, fixed elements
       - z-fixed: Navigation, floating buttons
       - z-sidebar: Sidebar navigation
       - z-overlay: Modal backdrops, loading overlays
       - z-modal: Modal dialogs
       - z-toast: Toast notifications
       - z-tooltip: Tooltips, popovers

       NEVER use arbitrary z-index values like 9999 or 10000.
       ---------------------------------------- */
    --z-background: -1;
    --z-normal: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-sidebar: 400;
    --z-overlay: 500;
    --z-modal: 600;
    --z-toast: 700;
    --z-tooltip: 800;
}

/* ----------------------------------------
   DARK MODE GLASS TOKENS
   ---------------------------------------- */
.dark, html.dark {
    /* Core text & surface overrides */
    --text-primary: #CEDBE6;
    --text-secondary: #CEDBE6;
    --text-muted: #9CACB0;
    --accent-text: #5fd4bf;
    --surface-light: rgba(255, 255, 255, 0.08);
    --surface-lighter: rgba(255, 255, 255, 0.12);

    --glass-bg-light: rgba(26,26,46,0.75);
    --glass-bg-medium: rgba(26,26,46,0.55);
    --glass-bg-dark: rgba(0,0,0,0.65);

    --glass-specular: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.02) 50%, transparent 100%);
    --glass-specular-subtle: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 40%);

    --glass-rim-light: inset 0 1px 1px rgba(255,255,255,0.1);
    --glass-rim-accent: inset 0 -1px 1px rgba(52,178,157,0.2);
    --glass-rim-combined: inset 0 1px 1px rgba(255,255,255,0.1), inset 0 -1px 1px rgba(52,178,157,0.2);

    --glass-border-light: 1px solid rgba(255,255,255,0.1);
    --glass-border-accent: 1px solid rgba(52,178,157,0.3);

    --glass-shadow-sm: 0 4px 16px rgba(0,0,0,0.2);
    --glass-shadow-md: 0 8px 32px rgba(0,0,0,0.25);
    --glass-shadow-lg: 0 16px 48px rgba(0,0,0,0.35);
    --glass-shadow-glow: 0 8px 32px rgba(52,178,157,0.25);

    /* Neutral grays & borders (dark overrides) */
    --gray-light: #555;
    --gray-medium: #aaa;
    --border-light: rgba(206, 219, 230, 0.2);
}

/* ----------------------------------------
   REDUCED MOTION / PERFORMANCE FALLBACKS
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    :root {
        --glass-blur-subtle: 0px;
        --glass-blur-medium: 0px;
        --glass-blur-strong: 0px;
        --glass-saturate: 100%;
        --glass-brightness: 100%;
    }

    /* Disable blur-heavy effects for performance */
    .glass-sidebar,
    .glass-modal,
    .glass-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ----------------------------------------
   BASE RESET & DEFAULTS
   ---------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ----------------------------------------
   CUSTOM SCROLLBARS
   ---------------------------------------- */
/* WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-deep);
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-base);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: radial-gradient(circle at 12% -10%, #f0faf9, transparent 50%),
                radial-gradient(circle at 88% 0%, #e0f7f5, transparent 55%),
                linear-gradient(180deg, #cff5f2, #8fd8d4);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px 40px;
    position: relative;
    isolation: isolate;
}

/* ----------------------------------------
   BACKGROUND EFFECTS (Aurora)
   ---------------------------------------- */
body::before {
    content: "";
    position: fixed;
    inset: -30%;
    z-index: -1;
    pointer-events: none;
    opacity: .85;
    filter: blur(38px) saturate(1.05);
    background: radial-gradient(circle at 12% 25%, rgba(52, 178, 157, .24), transparent 42%),
                radial-gradient(circle at 88% 10%, rgba(88, 182, 192, .18), transparent 44%),
                radial-gradient(circle at 65% 92%, rgba(6, 137, 140, .16), transparent 48%);
    animation: aurora-drift 18s var(--ease-out) infinite alternate;
}

/* Disable aurora animation on mobile to save battery/CPU */
@media (max-width: 768px) {
    body::before {
        animation: none;
        opacity: .4;
    }
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

@keyframes aurora-drift {
    0% { transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
    100% { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

/* ----------------------------------------
   REDUCED MOTION SUPPORT
   Respect user preferences for reduced motion
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    body::before {
        animation: none;
    }

    /* Disable infinite animations specifically */
    .skeleton,
    .badge-dot::before,
    .progress-bar-animated .progress-bar-fill,
    .step.active .step-icon,
    .loader-icon,
    .loader-circle,
    .loader-spinner,
    .status-dot.processing {
        animation: none !important;
    }
}

/* ----------------------------------------
   ANIMATIONS LIBRARY
   ---------------------------------------- */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-scale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.95); }
}

@keyframes pop-in {
    from { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); }
    to { transform: scale(1); opacity: 1; }
}

@keyframes ring-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

/* Shake utility class - add via JS for error feedback */
.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ----------------------------------------
   STAGGERED ANIMATION UTILITIES
   Apply to elements with fade-in animations for cascading effect
   ---------------------------------------- */
.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
.stagger-6 { animation-delay: 300ms; }
.stagger-7 { animation-delay: 350ms; }
.stagger-8 { animation-delay: 400ms; }

/* ----------------------------------------
   LAYOUT CONTAINERS
   ---------------------------------------- */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fade-in 520ms var(--ease-spring) both;
}

.container.narrow {
    max-width: 600px;
}

.container.medium {
    max-width: 900px;
}

.centered {
    justify-content: center;
    padding-top: 20px;
}

/* ----------------------------------------
   CARD COMPONENTS
   ---------------------------------------- */
.card {
    position: relative;
    background: radial-gradient(1200px 520px at 10% 0%, rgba(255, 255, 255, .66), transparent 60%),
                linear-gradient(180deg, rgba(186, 230, 253, .20), rgba(255, 255, 255, .92));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    border-radius: var(--radius-card);
    padding: 40px 36px;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal) var(--ease-out),
                box-shadow var(--transition-normal) var(--ease-out);
    overflow: hidden;
    animation: card-in 500ms var(--ease-spring) both;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 40px 100px rgba(15, 23, 42, .18), 0 0 0 1px rgba(255, 255, 255, .4);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    background: radial-gradient(1000px 500px at 0% 0%, rgba(255, 255, 255, .55), transparent 55%),
                radial-gradient(900px 520px at 110% 10%, rgba(52, 178, 157, .12), transparent 60%);
    z-index: 0;
}

.card > * {
    position: relative;
    z-index: 1;
}

.card h1, .card h2, .card h3, .card .card-title {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.dark .card h1, .dark .card h2, .dark .card h3, .dark .card .card-title {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}


/* Card Logo */
.card-logo {
    display: block;
    margin: 0 auto -15px;
    height: 140px;
    width: auto;
}

/* Clickable Card Grid */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-top: 8px;
}

.card-clickable {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-spring);
}

.card-clickable:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
}

.card-clickable:active {
    transform: translateY(-2px) scale(0.99);
    transition-duration: 100ms;
}

.card-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(52, 178, 157, .15), rgba(88, 182, 192, .1));
    border-radius: 16px;
    transition: transform var(--transition-normal) var(--ease-spring),
                background var(--transition-normal) var(--ease-out);
}

.card-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, .15), rgba(168, 85, 247, .1));
}

.card-clickable:hover .card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(52, 178, 157, .25), rgba(88, 182, 192, .2));
}

.card-clickable:hover .card-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, .25), rgba(168, 85, 247, .2));
}

.card-title {
    font-size: 16px;
    font-weight: 650;
    margin: 0 0 8px 0;
    color: var(--text-primary);
    transition: color var(--transition-fast) var(--ease-out);
}

.card-clickable:hover .card-title {
    color: var(--accent-deep);
}

.card-description {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.card-arrow {
    font-size: 20px;
    color: var(--accent-text);
    transition: transform var(--transition-normal) var(--ease-spring),
                color var(--transition-fast) var(--ease-out);
}

.card-clickable:hover .card-arrow {
    transform: translateX(6px);
    color: var(--accent-deep);
}

/* Results View Card */
.card.results-view {
    max-width: 900px;
}

/* ----------------------------------------
   TYPOGRAPHY
   ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -.02em;
    scroll-margin-top: 100px;
}

h1 {
    font-size: 28px;
    margin-bottom: 12px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
    text-align: center;
}

h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 32px 0;
    text-align: center;
    font-weight: 500;
}

.card .subtitle {
    color: var(--text-secondary);
}

.dark .card .subtitle {
    color: var(--text-secondary);
}


.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-text); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--critical); }

.ekw-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.ekw-breadcrumb a { color: var(--accent-text); text-decoration: none; }
.ekw-breadcrumb a:hover { color: var(--accent-deep); text-decoration: underline; }
.ekw-breadcrumb .ekw-breadcrumb-sep { color: var(--text-muted); opacity: 0.5; font-size: 11px; }
.ekw-breadcrumb .ekw-breadcrumb-current { color: var(--text-secondary); font-weight: 600; }

/* Screen reader only - visually hidden but accessible */
.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;
}

/* ----------------------------------------
   BUTTONS (LEGACY - DEPRECATED)
   Use .ekw-btn-* classes from Tailwind instead
   These remain for backwards compatibility only
   ---------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    font-family: var(--font-base);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal) var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, .2));
    opacity: 0;
    transition: opacity var(--transition-fast) var(--ease-out);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(0);
    transition-duration: 100ms;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-deep);
    border: 2px solid var(--accent);
}

.btn-secondary::before {
    display: none;
}

.btn-secondary:hover {
    background: rgba(52, 178, 157, .1);
    box-shadow: none;
    border-color: var(--accent-deep);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-danger:hover {
    box-shadow: 0 12px 28px rgba(239, 68, 68, .35);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, var(--success));
}

.btn-success:hover {
    box-shadow: 0 12px 28px rgba(5, 150, 105, .35);
}

.btn-small {
    padding: 6px 16px;
    font-size: 12px;
}

.ekw-btn-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }

.btn-large {
    padding: 16px 36px;
    font-size: 16px;
}

/* ----------------------------------------
   FORMS & INPUTS
   ---------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(52, 178, 157, .3);
    border-radius: var(--radius-input);
    font-size: 14px;
    font-family: var(--font-base);
    background: rgba(255, 255, 255, .7);
    color: var(--text-primary);
    transition: all var(--transition-fast) var(--ease-out);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover,
.form-control:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, .85);
}

.form-group input:focus:not(:focus-visible),
.form-group textarea:focus:not(:focus-visible),
.form-group select:focus:not(:focus-visible),
.form-control:focus:not(:focus-visible) {
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-control:focus {
    border-color: var(--accent-strong);
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 178, 157, .1);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Form Grid Layout */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(52, 178, 157, .15);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Password Strength Meter */
.pw-strength-meter {
    margin-top: 12px;
    margin-bottom: 16px;
}

.pw-strength-track {
    background: var(--gray-light);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.pw-strength-bar {
    width: 0%;
    height: 100%;
    background: var(--gray-light);
    transition: all 0.3s ease;
}

.pw-strength-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.pw-strength-text {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.pw-strength-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-medium);
}

/* Password Requirements Checklist */
.pw-requirements-box {
    background: var(--surface-light, #f9f9f9);
    padding: 14px;
    border-radius: 6px;
    text-align: left;
    border: 1px solid var(--border-light);
}

.pw-requirement-item {
    margin-bottom: 6px;
}

.pw-requirement-item:last-child {
    margin-bottom: 0;
}

.pw-requirement-icon {
    display: inline-block;
    width: 16px;
    margin-right: 6px;
    color: var(--critical, #ef4444);
}

.pw-requirement-item.met .pw-requirement-icon {
    color: var(--success, #34B29D);
}

.pw-email-display {
    font-size: 12px;
}

.pw-footer-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Dark mode support for password requirements */
.dark .pw-requirements-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .pw-strength-text,
.dark .pw-strength-label {
    color: var(--color-light-2);
}

/* Password Visibility Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 44px;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: var(--color-dark-2, #373545);
    opacity: 0.6;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    z-index: 2;
}

.password-toggle-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle-btn:focus:not(:focus-visible) {
    outline: none;
}

.password-toggle-btn .eye-icon {
    display: block;
}

.dark .password-toggle-btn {
    color: var(--color-light-2, #CEDBE6);
}

.dark .password-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ----------------------------------------
   FILE DROP ZONE
   Drag-over visual feedback for file uploads
   ---------------------------------------- */
.file-drop-zone {
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.file-drop-zone.drag-over {
    border-color: var(--accent-1, #34B29D) !important;
    background: rgba(52, 178, 157, 0.08);
    transform: scale(1.01);
}

.dark .file-drop-zone.drag-over {
    background: rgba(52, 178, 157, 0.15);
}

/* Pulse animation for active drag */
.file-drop-zone.drag-over::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid var(--accent-1, #34B29D);
    animation: drag-pulse 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes drag-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ----------------------------------------
   COPY BUTTON FEEDBACK
   Visual feedback when content is copied
   ---------------------------------------- */
.copy-success {
    background-color: var(--accent-1, #34B29D) !important;
    color: white !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ----------------------------------------
   SVG ICON SYSTEM
   Consistent icon sizing and styling
   ---------------------------------------- */
.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Icon sizes */
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.5rem; height: 1.5rem; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-xl { width: 2.5rem; height: 2.5rem; }
.icon-2xl { width: 3rem; height: 3rem; }

/* Card icon styling (replaces emoji) */
.ekw-card-icon .icon {
    width: 2.5rem;
    height: 2.5rem;
    stroke-width: 1.5;
}

/* Icon color variants */
.icon-primary { color: var(--accent-1, #34B29D); }
.icon-secondary { color: var(--accent-2, #58B6C0); }
.icon-purple { color: #8b5cf6; }
.icon-amber { color: #f59e0b; }
.icon-blue { color: #3b82f6; }
.icon-muted { color: var(--text-secondary); opacity: 0.7; }

.form-section h3 {
    font-size: 14px;
    font-weight: 650;
    color: var(--accent-deep);
    margin-bottom: 16px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    margin: 0;
    text-transform: none;
}

/* ----------------------------------------
   TABS COMPONENT
   ---------------------------------------- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(52, 178, 157, .1);
    padding: 4px;
    border-radius: var(--radius-lg);
}

.tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-base);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast) var(--ease-out);
}

.tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, .5);
}

.tab.active {
    background: white;
    color: var(--accent-deep);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
    animation: fade-in var(--transition-normal) var(--ease-out);
}

.tab-content.active {
    display: block;
}

/* ----------------------------------------
   LOADER COMPONENT
   ---------------------------------------- */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(52, 178, 157, .2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
    margin-bottom: 16px;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
}

.loader-animation {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 20px;
}

.loader-circle {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(88, 182, 192, .22);
    border-top-color: var(--accent-strong);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 12px 24px rgba(52, 178, 157, .25));
}

.loader-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    animation: pulse 2s ease-in-out infinite;
}

/* ----------------------------------------
   STATUS & PROGRESS COMPONENTS
   ---------------------------------------- */
.status-message {
    font-size: 17px;
    color: var(--text-primary);
    font-weight: 650;
    margin-bottom: 4px;
}

.status-submessage {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(52, 178, 157, .15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    width: 0%;
    transition: width 500ms var(--ease-out);
    border-radius: 3px;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
    animation: shimmer 1.5s linear infinite;
    background-size: 200% 100%;
}

.elapsed-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
    text-align: center;
}

/* Steps Container */
.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 4px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 58%;
    width: 84%;
    height: 2px;
    background: rgba(52, 178, 157, .2);
    transition: background var(--transition-normal) var(--ease-out);
}

.step.completed:not(:last-child)::after {
    background: var(--success);
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(52, 178, 157, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-deep);
    margin-bottom: 8px;
    transition: all var(--transition-normal) var(--ease-spring);
    position: relative;
    z-index: 1;
}

.step.active .step-icon {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 8px 20px rgba(52, 178, 157, .4);
    transform: scale(1.1);
}

.step.completed .step-icon {
    background: var(--success);
    color: #fff;
}

.step-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    transition: color var(--transition-fast) var(--ease-out);
}

.step.active .step-label {
    color: var(--accent-deep);
}

.step.completed .step-label {
    color: var(--accent-text);
}

/* ----------------------------------------
   ALERTS & NOTIFICATIONS
   ---------------------------------------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
}

.alert-error {
    background: var(--critical-light);
    border-color: rgba(239, 68, 68, .3);
    color: #991b1b;
}

.alert-success {
    background: var(--success-light);
    border-color: rgba(5, 150, 105, .3);
    color: #065f46;
}

.alert-warning {
    background: var(--warning-light);
    border-color: rgba(245, 158, 11, .3);
    color: #92400e;
}

.alert-info {
    background: var(--info-light);
    border-color: rgba(59, 130, 246, .3);
    color: #1e40af;
}

/* Inline alert variant (smaller, for form errors) */
.alert-inline {
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ----------------------------------------
   FLOATING STATS (Server Status)
   ---------------------------------------- */
.floating-stats {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-md);
    font-size: 12px;
    animation: fade-in-down 400ms var(--ease-spring) both;
}

.floating-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.floating-stats .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.floating-stats .stat-value {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
    min-width: 36px;
}

.floating-stats .stat-bar {
    width: 40px;
    height: 4px;
    background: rgba(15, 23, 42, .1);
    border-radius: 2px;
    overflow: hidden;
}

.floating-stats .stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    border-radius: 2px;
    transition: width 1s var(--ease-out);
}

.floating-stats .stat-fill.high {
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.floating-stats .stat-fill.medium {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.floating-stats .divider {
    width: 1px;
    height: 20px;
    background: rgba(15, 23, 42, .1);
}

.floating-stats .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    transition: all var(--transition-fast) var(--ease-out);
}

.floating-stats .status-dot.processing {
    background: var(--accent-strong);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.floating-stats .logs-btn,
.floating-stats .logout-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast) var(--ease-out);
}

.floating-stats .logs-btn:hover {
    color: var(--accent-strong);
    border-color: var(--accent-strong);
    background: rgba(52, 178, 157, .08);
}

.floating-stats .logout-btn:hover {
    color: var(--critical);
    border-color: var(--critical);
    background: rgba(239, 68, 68, .08);
}

/* Collapsed state for floating stats */
.floating-stats.collapsed {
    padding: 6px 12px;
    gap: 10px;
}

.floating-stats.collapsed .stat-label,
.floating-stats.collapsed .stat-bar,
.floating-stats.collapsed .divider {
    display: none;
}

.floating-stats.collapsed .stat {
    gap: 4px;
}

.floating-stats.collapsed .stat-value {
    font-size: 12px;
    min-width: auto;
}

.floating-stats.collapsed .status-dot {
    width: 6px;
    height: 6px;
}

.floating-stats.collapsed .logs-btn,
.floating-stats.collapsed .logout-btn {
    padding: 3px 8px;
    font-size: 12px;
}

/* Smooth transition for collapse */
.floating-stats,
.floating-stats .stat-label,
.floating-stats .stat-bar,
.floating-stats .divider,
.floating-stats .stat,
.floating-stats .stat-value,
.floating-stats .status-dot,
.floating-stats .logs-btn,
.floating-stats .logout-btn {
    transition: all 0.3s ease-out;
}

/* ----------------------------------------
   NAVIGATION BACK BUTTON
   ---------------------------------------- */
.nav-back {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: var(--z-fixed);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal) var(--ease-out);
    box-shadow: var(--shadow-md);
    animation: fade-in-down 400ms var(--ease-spring) both;
}

.nav-back:hover {
    background: rgba(255, 255, 255, .9);
    color: var(--accent-deep);
    transform: translateX(-4px);
    box-shadow: var(--shadow-lg);
}

.nav-back:active {
    transform: translateX(-2px);
    transition-duration: 100ms;
}

/* ----------------------------------------
   STAT CARDS (Dashboard)
   ---------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    background: var(--surface-light);
    border: 1px solid var(--surface-lighter);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal) var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-deep);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    font-weight: 600;
}

/* Summary Cards (Validator) */
.summary-cards {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.summary-card {
    flex: 1;
    min-width: 100px;
    padding: 16px;
    border-radius: var(--radius-lg);
    text-align: center;
    background: var(--surface-light);
    border: 1px solid var(--surface-lighter);
    transition: all var(--transition-normal) var(--ease-out);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-card.critical { border-left: 4px solid var(--critical); }
.summary-card.warning { border-left: 4px solid var(--warning); }
.summary-card.suggestion { border-left: 4px solid var(--accent); }
.summary-card.total { border-left: 4px solid var(--text-muted); }

.summary-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.summary-card.critical .summary-number { color: var(--critical); }
.summary-card.warning .summary-number { color: var(--warning); }
.summary-card.suggestion .summary-number { color: var(--accent-deep); }
.summary-card.total .summary-number { color: var(--text-secondary); }

.summary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    font-weight: 600;
}

/* ----------------------------------------
   BADGE COMPONENT
   ---------------------------------------- */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--transition-fast) var(--ease-out);
}

.badge-success {
    background: var(--success-light);
    color: #155724;
}

.badge-warning {
    background: var(--warning-light);
    color: #856404;
}

.badge-danger {
    background: var(--critical-light);
    color: #721c24;
}

.badge-info {
    background: var(--info-light);
    color: #004085;
}

.badge-default {
    background: #e2e3e5;
    color: #383d41;
}

/* Severity Badges */
.severity-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: .03em;
}

.severity-badge.critical {
    background: rgba(239, 68, 68, .15);
    color: var(--critical);
}

.severity-badge.warning {
    background: rgba(245, 158, 11, .15);
    color: var(--warning);
}

.severity-badge.suggestion {
    background: rgba(52, 178, 157, .15);
    color: var(--accent-deep);
}

.category-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .05);
    color: var(--text-muted);
}

/* ----------------------------------------
   CLIENT/ITEM LIST
   ---------------------------------------- */
.clients-list {
    margin-bottom: 24px;
}

.client-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--surface-light);
    border: 1px solid var(--surface-lighter);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    transition: all var(--transition-normal) var(--ease-out);
}

.client-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.client-info {
    flex: 1;
    min-width: 0;
}

.client-name {
    font-weight: 650;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-code {
    font-size: 12px;
    color: var(--text-muted);
}

.client-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ----------------------------------------
   FEATURE LIST (E-commerce)
   ---------------------------------------- */
.features {
    text-align: left;
    margin-bottom: 16px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(52, 178, 157, .1);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal) var(--ease-out);
    border-radius: var(--radius-sm);
    margin: 0 -12px;
}

.feature:last-child {
    border-bottom: none;
}

.feature:hover:not(.disabled) {
    background: rgba(52, 178, 157, .05);
    transform: translateX(4px);
}

.feature:active:not(.disabled) {
    transform: translateX(2px);
    transition-duration: 100ms;
}

.feature.disabled {
    opacity: 0.5;
    cursor: default;
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(52, 178, 157, .15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: all var(--transition-normal) var(--ease-spring);
}

.feature:hover:not(.disabled) .feature-icon {
    transform: scale(1.1);
    background: rgba(52, 178, 157, .25);
}

.feature-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: color var(--transition-fast) var(--ease-out);
}

.feature:hover:not(.disabled) .feature-text strong {
    color: var(--accent-deep);
}

/* ----------------------------------------
   FILE SECTIONS (Validator Results)
   ---------------------------------------- */
.file-section {
    margin-bottom: 24px;
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7);
    max-width: 100%;
    animation: fade-in-up 400ms var(--ease-spring) both;
}

.file-header {
    padding: 16px 20px;
    background: rgba(52, 178, 157, .1);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background var(--transition-fast) var(--ease-out);
}

.file-header:hover {
    background: rgba(52, 178, 157, .15);
}

.file-header .icon {
    font-size: 18px;
}

.file-header .filename {
    flex: 1;
}

.file-header .issue-count {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(52, 178, 157, .2);
    color: var(--accent-deep);
}

.file-header .toggle {
    color: var(--text-muted);
    transition: transform var(--transition-fast) var(--ease-out);
}

.file-header.collapsed .toggle {
    transform: rotate(-90deg);
}

.file-issues {
    padding: 0;
    max-width: 100%;
}

.file-issues.collapsed {
    display: none;
}

/* Issue Cards */
.issue {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(52, 178, 157, .1);
    max-width: 100%;
    overflow: hidden;
    transition: background var(--transition-fast) var(--ease-out);
}

.issue:hover {
    background: rgba(52, 178, 157, .03);
}

.issue:last-child {
    border-bottom: none;
}

.issue-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.line-number {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.issue-message {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.issue-recommendation {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 12px;
    background: rgba(52, 178, 157, .05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Overall Recommendations */
.overall-recommendations {
    margin-top: 24px;
    padding: 20px;
    background: rgba(52, 178, 157, .08);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(52, 178, 157, .2);
}

.overall-recommendations h3 {
    font-size: 14px;
    margin: 0 0 12px 0;
    color: var(--accent-deep);
}

.overall-recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.overall-recommendations li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.overall-recommendations li:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------
   CODE & LOG DISPLAY
   ---------------------------------------- */
pre, .code-snippet {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    max-width: 100%;
}

.code-snippet {
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(0, 0, 0, .05);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.log-container {
    text-align: left;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, .6);
    padding: 14px;
    border-radius: var(--radius-md);
    height: 100px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .7);
}

.log-entry {
    margin-bottom: 5px;
    padding: 3px 0;
    display: flex;
    gap: 8px;
    line-height: 1.4;
    animation: fade-in var(--transition-fast) var(--ease-out);
}

.log-entry.success {
    color: var(--accent-text);
}

.log-entry.info {
    color: var(--accent-deep);
}

/* ----------------------------------------
   SUCCESS ANIMATION
   ---------------------------------------- */
.success-animation {
    width: 88px;
    height: 88px;
    margin: 0 auto 8px;
    background: linear-gradient(135deg, #34d399, var(--success));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop-in 500ms var(--ease-spring);
    box-shadow: 0 20px 50px rgba(5, 150, 105, .4);
    position: relative;
}

.success-animation::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(52, 211, 153, .2);
    animation: ring-pulse 2s ease-out infinite;
}

.success-animation span {
    font-size: 40px;
    color: white;
    position: relative;
    z-index: 1;
}

.result-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.result-subtitle {
    margin: 0 0 32px;
    font-size: 14px;
    color: var(--text-muted);
}

/* No Issues State */
.no-issues {
    text-align: center;
    padding: 40px;
    animation: fade-in-scale 400ms var(--ease-spring) both;
}

.no-issues-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.no-issues h3 {
    margin: 0 0 8px 0;
    color: var(--accent-text);
}

.no-issues p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    animation: fade-in-scale 400ms var(--ease-spring) both;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: var(--text-secondary);
}

.empty-state p {
    margin: 0;
}

/* ----------------------------------------
   DATATABLES STYLING
   ---------------------------------------- */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, .7);
    padding: 16px;
}

.dataTables_wrapper {
    font-family: var(--font-base);
}

.dataTables_wrapper .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid rgba(52, 178, 157, .3);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-left: 8px;
    font-family: var(--font-base);
    transition: all var(--transition-fast) var(--ease-out);
}

.dataTables_wrapper .dataTables_filter input:focus:not(:focus-visible) {
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 178, 157, .1);
}

.dataTables_wrapper .dataTables_filter input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dataTables_wrapper .dataTables_length {
    display: flex;
    align-items: center;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid rgba(52, 178, 157, .3);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    margin: 0 8px;
    font-family: var(--font-base);
    transition: all var(--transition-fast) var(--ease-out);
}

.dataTables_wrapper .dataTables_length select:focus:not(:focus-visible) {
    outline: none;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--accent);
}

.dataTables_wrapper .dataTables_length select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dataTables_wrapper .bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(52, 178, 157, .3);
    background: var(--surface-light);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-base);
    transition: all var(--transition-fast) var(--ease-out);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background: rgba(52, 178, 157, .1);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: default;
}

.dataTables_wrapper .dataTables_info {
    font-size: 13px;
    color: var(--text-muted);
}

/* DataTables Buttons */
.dt-buttons {
    display: flex;
    gap: 8px;
}

.dt-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    font-family: var(--font-base) !important;
    cursor: pointer !important;
    transition: all var(--transition-normal) var(--ease-out) !important;
}

.dt-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(52, 178, 157, .3) !important;
}

/* ----------------------------------------
   FIELD SELECTOR (Shopify)
   ---------------------------------------- */
.field-selector {
    margin: 16px 0;
    padding: 16px;
    background: var(--surface-light);
    border: 1px solid rgba(52, 178, 157, .2);
    border-radius: var(--radius-lg);
}

.field-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.field-selector-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.field-selector-actions {
    display: flex;
    gap: 8px;
}

.field-selector-actions button {
    padding: 4px 12px;
    font-size: 12px;
    font-family: var(--font-base);
    border: 1px solid rgba(52, 178, 157, .3);
    background: rgba(255, 255, 255, .7);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast) var(--ease-out);
}

.field-selector-actions button:hover {
    background: rgba(52, 178, 157, .1);
    border-color: var(--accent);
}

.field-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.field-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(52, 178, 157, .2);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast) var(--ease-out);
    user-select: none;
}

.field-chip:hover {
    border-color: var(--accent);
    background: rgba(52, 178, 157, .1);
    transform: translateY(-1px);
}

.field-chip.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.field-chip.selected:hover {
    background: var(--accent-deep);
}

/* ----------------------------------------
   TIMING INFO
   ---------------------------------------- */
.timing-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(52, 178, 157, .08);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-muted);
}

/* ----------------------------------------
   RESULTS MODE (Validator)
   ---------------------------------------- */
body.results-mode {
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    overflow-y: auto;
    min-height: 100vh;
    height: auto;
}

body.results-mode .card.results-view {
    width: 100%;
    max-width: 900px;
}

#results-container {
    max-width: 100%;
    overflow: visible;
}

.results-header {
    text-align: center;
    margin-bottom: 24px;
}

.results-header h2 {
    font-size: 20px;
    margin: 0 0 8px 0;
}

/* Center the reset button */
#results-container > .btn {
    display: block;
    margin: 24px auto 0;
}

/* ----------------------------------------
   UTILITIES
   ---------------------------------------- */
.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

.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; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-pill); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Animation Delays (Staggered) */
.delay-1 { animation-delay: 50ms; }
.delay-2 { animation-delay: 100ms; }
.delay-3 { animation-delay: 150ms; }
.delay-4 { animation-delay: 200ms; }
.delay-5 { animation-delay: 250ms; }

/* ----------------------------------------
   RESPONSIVE DESIGN
   ---------------------------------------- */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .floating-stats {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        width: auto;
        justify-content: center;
    }

    .nav-back {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .card {
        padding: 24px 20px;
        border-radius: 24px;
    }

    h1 {
        font-size: 24px;
    }

    .cards {
        gap: 16px;
    }

    .card-clickable {
        width: 100%;
        max-width: 320px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .tabs {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .floating-stats {
        padding: 8px 12px;
        gap: 10px;
        width: auto;
        max-width: none;
        justify-content: center;
    }

    .floating-stats .stat {
        display: none;
    }

    .floating-stats .divider {
        display: none;
    }

    .floating-stats .stat-bar {
        width: 30px;
    }

    .nav-back span {
        display: none;
    }

    .summary-cards {
        flex-direction: column;
    }

    .summary-card {
        min-width: 100%;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .client-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .client-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ----------------------------------------
   FOCUS-VISIBLE STYLES (Accessibility)
   Consistent keyboard focus indicators
   ---------------------------------------- */
/* Remove focus outline for mouse clicks, keep for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Buttons - Enhanced focus ring */
.btn:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible,
.btn-success:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Form inputs */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.form-control:focus-visible {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Links */
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Cards and clickable elements */
.card-clickable:focus-visible,
.feature:focus-visible,
.client-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: var(--shadow-md);
}

/* Tab components */
.tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* Table rows (for keyboard navigation) */
table tbody tr:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* Skip focus ring for mouse users on specific elements */
.btn:focus:not(:focus-visible),
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* ========================================
   PREMIUM UI ENHANCEMENTS
   Modern, plush interface improvements
   ======================================== */

/* ----------------------------------------
   1. MICRO-INTERACTIONS & ANIMATIONS
   ---------------------------------------- */

/* Button press feedback - scale down on active */
.btn:active,
button:active,
.ekw-btn:active,
.ekw-btn-primary:active,
.ekw-btn-secondary:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* Ripple effect container */
.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.ripple-container:active::after {
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
}

/* Skeleton loader for content placeholders */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(206, 219, 230, 0.3) 0%,
        rgba(206, 219, 230, 0.5) 50%,
        rgba(206, 219, 230, 0.3) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-md);
}

.skeleton-btn {
    height: 44px;
    width: 120px;
    border-radius: var(--radius-sm);
}

/* Smooth hover lift for interactive elements */
.hover-lift {
    transition: transform var(--transition-normal) var(--ease-spring),
                box-shadow var(--transition-normal) var(--ease-out);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Subtle bounce on hover */
.hover-bounce:hover {
    animation: subtle-bounce 0.4s var(--ease-bounce);
}

@keyframes subtle-bounce {
    0% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

/* Icon spin on hover */
.hover-spin:hover svg,
.hover-spin:hover .icon {
    animation: spin 0.5s var(--ease-out);
}

/* Scale up slightly on hover */
.hover-grow {
    transition: transform var(--transition-fast) var(--ease-out);
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* Smooth icon rotation */
.icon-rotate {
    transition: transform var(--transition-normal) var(--ease-out);
}

.icon-rotate:hover {
    transform: rotate(15deg);
}

/* Loading dots animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: loading-dot 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ----------------------------------------
   2. VISUAL DEPTH & TEXTURE
   ---------------------------------------- */

/* Enhanced glassmorphism card */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 24px rgba(52, 178, 157, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-card:hover {
    box-shadow:
        0 8px 32px rgba(52, 178, 157, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Premium frosted glass */
.frosted {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Gradient border effect */
.gradient-border {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-6));
    border-radius: calc(var(--radius-md) + 2px);
    z-index: -1;
    opacity: 0.6;
    transition: opacity var(--transition-normal) var(--ease-out);
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Subtle inner glow */
.inner-glow {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* Accent glow effect */
.accent-glow {
    box-shadow: 0 0 0 0 rgba(52, 178, 157, 0);
    transition: box-shadow var(--transition-normal) var(--ease-out);
}

.accent-glow:hover {
    box-shadow: 0 0 24px 4px rgba(52, 178, 157, 0.25);
}

/* Soft ambient shadow */
.shadow-ambient {
    box-shadow:
        0 2px 4px rgba(52, 178, 157, 0.04),
        0 8px 16px rgba(52, 178, 157, 0.06),
        0 16px 32px rgba(52, 178, 157, 0.08);
}

/* Layered depth effect */
.depth-layered {
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04),
        0 2px 2px rgba(0, 0, 0, 0.04),
        0 4px 4px rgba(0, 0, 0, 0.04),
        0 8px 8px rgba(0, 0, 0, 0.04),
        0 16px 16px rgba(0, 0, 0, 0.04);
}

/* Subtle texture overlay */
.texture-subtle::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ----------------------------------------
   3. POLISHED COMPONENTS
   ---------------------------------------- */

/* Gradient primary button */
.btn-gradient {
    background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-6) 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out);
    box-shadow: 0 4px 16px rgba(52, 178, 157, 0.3);
}

.btn-gradient:hover {
    background-position: 100% 100%;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(52, 178, 157, 0.4);
}

.btn-gradient:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(52, 178, 157, 0.3);
}

/* Pill button variant */
.btn-pill {
    border-radius: var(--radius-pill);
    padding: 10px 24px;
}

/* Outlined button with gradient on hover */
.btn-outline-gradient {
    position: relative;
    background: transparent;
    border: 2px solid var(--accent-1);
    color: var(--accent-text);
    padding: 10px 26px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal) var(--ease-out);
}

.btn-outline-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    opacity: 0;
    transition: opacity var(--transition-normal) var(--ease-out);
    z-index: -1;
}

.btn-outline-gradient:hover {
    color: white;
    border-color: transparent;
}

.btn-outline-gradient:hover::before {
    opacity: 1;
}

/* Enhanced badge styles */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--transition-fast) var(--ease-out);
}

.badge-premium.success {
    background: linear-gradient(135deg, rgba(52, 178, 157, 0.15), rgba(88, 182, 192, 0.15));
    color: #0d7a6a;
    border: 1px solid rgba(52, 178, 157, 0.3);
}

.badge-premium.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.15));
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-premium.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.15));
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-premium.info {
    background: linear-gradient(135deg, rgba(38, 131, 198, 0.15), rgba(96, 165, 250, 0.15));
    color: #1e40af;
    border: 1px solid rgba(38, 131, 198, 0.3);
}

/* Dot indicator for badges */
.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Floating label input */
.input-float {
    position: relative;
    margin-top: 16px;
}

.input-float input,
.input-float textarea,
.input-float select {
    width: 100%;
    padding: 16px 14px 8px;
    border: 2px solid rgba(206, 219, 230, 0.5);
    border-radius: var(--radius-md);
    font-size: 15px;
    background: white;
    transition: all var(--transition-fast) var(--ease-out);
}

.input-float label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--text-muted);
    pointer-events: none;
    transition: all var(--transition-fast) var(--ease-out);
    background: white;
    padding: 0 4px;
}

.input-float input:focus:not(:focus-visible),
.input-float textarea:focus:not(:focus-visible),
.input-float select:focus:not(:focus-visible) {
    outline: none;
}

.input-float input:focus,
.input-float textarea:focus,
.input-float select:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 4px rgba(52, 178, 157, 0.1);
}

.input-float input:focus-visible,
.input-float textarea:focus-visible,
.input-float select:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: 2px;
}

.input-float input:focus + label,
.input-float input:not(:placeholder-shown) + label,
.input-float textarea:focus + label,
.input-float textarea:not(:placeholder-shown) + label,
.input-float select:focus + label,
.input-float select:valid + label {
    top: 0;
    font-size: 12px;
    color: var(--accent-text);
    font-weight: 600;
}

/* Enhanced tooltip */
.tooltip-premium {
    position: relative;
}

.tooltip-premium::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--color-dark-2), #2a2838);
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast) var(--ease-out);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: var(--z-tooltip);
}

.tooltip-premium::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-dark-2);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast) var(--ease-out);
    z-index: var(--z-tooltip);
}

.tooltip-premium:hover::after,
.tooltip-premium:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Status indicator with pulse */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.status-indicator::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: status-pulse 2s ease-in-out infinite;
}

.status-indicator.online::before {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(52, 178, 157, 0.4);
}

.status-indicator.offline::before {
    background: var(--critical);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    animation: none;
}

.status-indicator.warning::before {
    background: var(--warning);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
}

@keyframes status-pulse {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* ----------------------------------------
   4. NAVIGATION & LAYOUT REFINEMENTS
   ---------------------------------------- */

/* Breadcrumb navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast) var(--ease-out);
}

.breadcrumb a:hover {
    color: var(--accent-text);
}

.breadcrumb-separator {
    color: var(--color-light-2);
    font-size: 12px;
}

.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Enhanced page header */
.page-header {
    position: relative;
    padding: 24px 32px;
    margin: -32px -32px 32px;
    background: linear-gradient(135deg,
        rgba(52, 178, 157, 0.08) 0%,
        rgba(88, 182, 192, 0.05) 50%,
        rgba(38, 131, 198, 0.03) 100%);
    border-bottom: 1px solid rgba(52, 178, 157, 0.1);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle at 100% 50%, rgba(52, 178, 157, 0.1), transparent 70%);
    pointer-events: none;
}

.page-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.page-header-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Section divider with label */
.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(52, 178, 157, 0.3), transparent);
}

/* Quick action buttons row */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid rgba(52, 178, 157, 0.2);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast) var(--ease-out);
}

.quick-action-btn:hover {
    background: rgba(52, 178, 157, 0.08);
    border-color: var(--accent-1);
    color: var(--accent-text);
    transform: translateY(-1px);
}

.quick-action-btn svg,
.quick-action-btn .icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Stats row with gradient backgrounds */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    background: white;
    border: 1px solid rgba(206, 219, 230, 0.3);
    transition: all var(--transition-normal) var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.accent-1 {
    background: linear-gradient(135deg, rgba(52, 178, 157, 0.08), rgba(52, 178, 157, 0.02));
    border-color: rgba(52, 178, 157, 0.2);
}

.stat-card.accent-2 {
    background: linear-gradient(135deg, rgba(88, 182, 192, 0.08), rgba(88, 182, 192, 0.02));
    border-color: rgba(88, 182, 192, 0.2);
}

.stat-card.accent-6 {
    background: linear-gradient(135deg, rgba(38, 131, 198, 0.08), rgba(38, 131, 198, 0.02));
    border-color: rgba(38, 131, 198, 0.2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-secondary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 4px;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.stat-change.up {
    background: rgba(52, 178, 157, 0.1);
    color: var(--accent-text);
}

.stat-change.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--critical);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 24px;
}

/* Progress bar with gradient */
.progress-bar {
    height: 8px;
    background: rgba(206, 219, 230, 0.3);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    border-radius: var(--radius-pill);
    transition: width var(--transition-slow) var(--ease-out);
}

/* Animated progress bar */
.progress-bar-animated .progress-bar-fill {
    background: linear-gradient(
        90deg,
        var(--accent-1) 0%,
        var(--accent-2) 50%,
        var(--accent-1) 100%
    );
    background-size: 200% 100%;
    animation: progress-shimmer 2s linear infinite;
}

@keyframes progress-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ----------------------------------------
   PRINT STYLES
   ---------------------------------------- */
@media print {
    body {
        background: white;
        padding: 20px;
    }

    body::before,
    body::after {
        display: none;
    }

    .floating-stats,
    .nav-back,
    .btn,
    .dt-buttons {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ========================================
   ADMIN ACTIONS - MOBILE DROPDOWN
   ======================================== */
.admin-actions-mobile {
    display: none;
    position: relative;
}

.admin-actions-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 180px;
    background: var(--color-light-1, #ffffff);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: var(--z-dropdown);
    padding: 6px 0;
    display: none;
}

.admin-actions-dropdown.open {
    display: block;
}

.admin-actions-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

.admin-actions-dropdown button:last-child {
    border-bottom: none;
}

.admin-actions-dropdown button:hover,
.admin-actions-dropdown button:active {
    background: rgba(52, 178, 157, 0.1);
}

.admin-actions-dropdown button.text-danger {
    color: #ef4444;
}

.dark .admin-actions-dropdown {
    background: #1a1a2e;
    border-color: rgba(52, 178, 157, 0.3);
}

.dark .admin-actions-dropdown button {
    color: #CEDBE6;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .admin-actions-dropdown button:hover,
.dark .admin-actions-dropdown button:active {
    background: rgba(52, 178, 157, 0.15);
}

@media (max-width: 768px) {
    .admin-actions-desktop {
        display: none !important;
    }
    .admin-actions-mobile {
        display: block;
    }
}

/* ========================================
   ACTION BUTTON SPINNER
   ======================================== */
.action-spinner {
    display: none;
    align-items: center;
    gap: 5px;
}

.action-spinner-ring {
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: action-spin 0.7s linear infinite;
}

.action-spinner-text {
    font-size: inherit;
}

@keyframes action-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   TOAST NOTIFICATIONS (CSS fallback)
   ======================================== */
.ekw-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-sm, 8px);
    font-size: 14px;
    font-weight: 500;
    max-width: 400px;
    word-wrap: break-word;
    z-index: var(--z-toast, 700);
    color: #fff;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: var(--glass-shadow-md, 0 8px 32px rgba(0,0,0,0.08));
}

.ekw-toast--visible {
    opacity: 1;
    transform: translateX(0);
}

.ekw-toast--success { background: var(--accent, #34B29D); }
.ekw-toast--error   { background: var(--critical, #ef4444); }
.ekw-toast--warning { background: var(--warning, #f59e0b); }

/* ========================================
   SKELETON LOADING STATES
   ======================================== */
.ekw-skeleton {
    background: linear-gradient(90deg,
        rgba(206, 219, 230, 0.3) 25%,
        rgba(206, 219, 230, 0.5) 50%,
        rgba(206, 219, 230, 0.3) 75%);
    background-size: 200% 100%;
    animation: ekw-skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm, 8px);
}

.ekw-skeleton--text {
    height: 1em;
    margin-bottom: 0.5em;
}

.ekw-skeleton--title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 0.75em;
}

.ekw-skeleton--card {
    height: 120px;
}

.ekw-skeleton--circle {
    border-radius: 50%;
}

.dark .ekw-skeleton,
html.dark .ekw-skeleton {
    background: linear-gradient(90deg,
        rgba(55, 53, 69, 0.4) 25%,
        rgba(55, 53, 69, 0.7) 50%,
        rgba(55, 53, 69, 0.4) 75%);
    background-size: 200% 100%;
}

@keyframes ekw-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ekw-skeleton {
        animation: none;
    }
}

/* ========================================
   GLOBAL FOCUS INDICATORS
   ======================================== */
:focus-visible {
    outline: 2px solid var(--accent, #34B29D);
    outline-offset: 2px;
}

/* Remove default focus ring for mouse users (transparent preserves Windows High Contrast Mode) */
:focus:not(:focus-visible) {
    outline: 2px solid transparent;
}

/* Interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent, #34B29D);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Dark mode focus */
.dark :focus-visible,
html.dark :focus-visible {
    outline-color: var(--accent, #34B29D);
}

/* Component-specific focus-visible states */
.btn:focus-visible,
.tab:focus-visible,
.card-clickable:focus-visible,
.step:focus-visible {
    outline: 2px solid var(--accent-1, #34B29D);
    outline-offset: 2px;
}

/* ========================================
   ARIA LIVE REGION UTILITY
   ======================================== */
.ekw-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;
}
