/* ==========================================================================
   JEIN Neural Climate AI Forecasting Studio Stylesheet
   Lead Architect & Chief Telemetry Specialist: Michael Nagy Riad Kamel Abd AlMalk
   Futuristic Cyberpunk / Deep AI Command Center Design System
   ========================================================================== */

:root {
    --bg-base: #030712;
    --bg-surface: #070d1e;
    --bg-surface-2: rgba(11, 20, 42, 0.85);
    --bg-card: rgba(8, 16, 36, 0.82);
    --bg-card-hover: rgba(14, 26, 56, 0.95);
    --bg-input: rgba(4, 9, 20, 0.9);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.35);
    --border-ai: rgba(168, 85, 247, 0.45);
    --border-emerald: rgba(16, 185, 129, 0.35);
    --border-rose: rgba(244, 63, 94, 0.35);

    --accent-cyan: #00f2fe;
    --accent-blue: #3b82f6;
    --accent-emerald: #10b981;
    --accent-purple: #a855f7;
    --accent-magenta: #ec4899;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --glow-cyan: 0 0 25px rgba(0, 242, 254, 0.45);
    --glow-ai: 0 0 30px rgba(168, 85, 247, 0.5);
    --glow-emerald: 0 0 25px rgba(16, 185, 129, 0.45);
    --glow-magenta: 0 0 25px rgba(236, 72, 153, 0.45);
    --glass-blur: blur(20px);

    --font-main: 'Space Grotesk', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Orbitron', 'Space Grotesk', sans-serif;
    --font-ar: 'Cairo', 'Space Grotesk', sans-serif;

    --header-h: 70px;
    --footer-h: 38px;
}

[data-lang="ar"] {
    font-family: var(--font-ar), var(--font-main);
    direction: rtl;
}

[data-lang="en"] {
    font-family: var(--font-main);
    direction: ltr;
}

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

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(168, 85, 247, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.14) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.06) 0%, transparent 55%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* =========================================
   TOP APP HEADER (Unified with index.html)
   ========================================= */
header.ai-header {
    height: var(--header-h);
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(0, 242, 254, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.jein-logo-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.jein-logo-wrap:hover .jein-logo-img {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.9)) drop-shadow(0 0 30px rgba(168, 85, 247, 0.6));
}

.jein-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.6));
    animation: jein-logo-pulse 4s ease-in-out infinite;
}

@keyframes jein-logo-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.5)); }
    50%       { filter: drop-shadow(0 0 20px rgba(0, 242, 254, 0.9)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.45)); }
}

.title-meta h1 {
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.title-meta h1 span.badge-v {
    font-size: 0.64rem;
    padding: 3px 8px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.25));
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.title-meta p {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(11, 20, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 7px 15px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    font-family: var(--font-main);
    transition: all 0.25s ease;
}

.header-nav-btn:hover {
    color: #fff;
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.12);
    box-shadow: var(--glow-cyan);
    transform: translateY(-1px);
}

/* =========================================
   LIVE AI STATUS TICKER BANNER
   ========================================= */
.ai-live-banner {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.12) 0%, rgba(0, 242, 254, 0.12) 50%, rgba(236, 72, 153, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    padding: 7px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #cbd5e1;
    overflow-x: auto;
    white-space: nowrap;
    gap: 20px;
}

.ai-live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #00f2fe;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.ai-pulse-dot {
    width: 8px;
    height: 8px;
    background: #00f2fe;
    border-radius: 50%;
    box-shadow: 0 0 10px #00f2fe, 0 0 20px #00f2fe;
    animation: ai-live-pulse 1.8s infinite;
}

@keyframes ai-live-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

.ai-live-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
}

.ai-meta-key {
    color: #64748b;
    font-weight: 700;
    margin-right: 2px;
}

.ai-meta-separator {
    color: rgba(255, 255, 255, 0.2);
}

/* =========================================
   PAGE HERO BANNER
   ========================================= */
.ai-hero {
    padding: 28px 32px;
    background: linear-gradient(180deg, rgba(8, 16, 36, 0.8) 0%, rgba(3, 7, 18, 0.6) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    position: relative;
}

.ai-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00f2fe, #a855f7, transparent);
}

.ai-hero-content {
    max-width: 720px;
}

.ai-hero-content h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.ai-hero-content p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.ai-hero-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.ai-stat-box {
    background: rgba(8, 16, 36, 0.85);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 14px 20px;
    border-radius: 12px;
    min-width: 125px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.ai-stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00f2fe, #a855f7);
}

.ai-stat-box:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.ai-stat-num {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 800;
    color: #00f2fe;
    letter-spacing: 0.02em;
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.5);
}

.ai-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* =========================================
   MAIN WORKSPACE LAYOUT
   ========================================= */
.ai-workspace {
    flex: 1;
    padding: 28px 32px 60px 32px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: start;
}

/* =========================================
   LEFT SIDEBAR (Controls & Neural Models)
   ========================================= */
.ai-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
}

.ai-card:hover {
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 12px 40px rgba(0, 242, 254, 0.08);
}

.ai-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-card-title {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

/* Neural Architecture Chips */
.ai-model-chips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-model-chip {
    background: rgba(4, 9, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-model-chip:hover {
    background: rgba(14, 26, 56, 0.9);
    border-color: var(--accent-purple);
    transform: translateX(5px);
}

[data-lang="ar"] .ai-model-chip:hover {
    transform: translateX(-5px);
}

.ai-model-chip.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(0, 242, 254, 0.15));
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

.ai-model-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-main);
}

.ai-model-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-family: var(--font-mono);
}

.ai-model-acc {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid var(--border-emerald);
    color: var(--accent-emerald);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Zone Filter Pills */
.zone-pills-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.zone-pill {
    background: rgba(11, 20, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.2s;
}

.zone-pill:hover {
    color: #fff;
    border-color: var(--accent-cyan);
}

.zone-pill.active {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

/* Inputs & Selects */
.input-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--text-secondary);
    margin: 14px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
}

.ai-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    outline: none;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.ai-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}

.ai-btn-infer {
    width: 100%;
    margin-top: 18px;
    background: linear-gradient(135deg, #00f2fe 0%, #3b82f6 50%, #a855f7 100%);
    border: none;
    border-radius: 12px;
    color: #030712;
    padding: 13px 20px;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.45);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.ai-btn-infer:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.75), 0 0 50px rgba(168, 85, 247, 0.4);
    filter: brightness(1.1);
}

/* =========================================
   MAIN DASHBOARD: SUMMARY CARDS
   ========================================= */
.ai-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ai-summary-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 16px;
    backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #00f2fe;
}

.ai-summary-card.warn::before { background: var(--accent-rose); }
.ai-summary-card.good::before { background: var(--accent-emerald); }
.ai-summary-card.ai::before { background: linear-gradient(90deg, #a855f7, #ec4899); }

.ai-summary-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ai-summary-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.ai-summary-val {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.ai-summary-card.warn .ai-summary-val { color: #f43f5e; text-shadow: 0 0 12px rgba(244, 63, 94, 0.4); }
.ai-summary-card.good .ai-summary-val { color: #10b981; text-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }
.ai-summary-card.ai .ai-summary-val { color: #00f2fe; text-shadow: 0 0 12px rgba(0, 242, 254, 0.4); }

.ai-summary-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* =========================================
   CHART CARD & CONTAINER
   ========================================= */
.ai-chart-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.ai-chart-wrap {
    height: 380px;
    width: 100%;
    position: relative;
    margin-top: 10px;
}

/* =========================================
   6-MONTH FORECAST CARDS DECK
   ========================================= */
.ai-forecast-months-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.ai-month-box {
    background: rgba(6, 12, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.ai-month-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(168, 85, 247, 0.4);
}

.ai-month-box:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.ai-month-label {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.ai-month-temp {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 800;
    color: #00f2fe;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.ai-month-anomaly {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ai-month-anomaly.pos { color: #f43f5e; }
.ai-month-anomaly.neg { color: #10b981; }

.ai-month-risk-pill {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 6px;
    margin-top: 4px;
    font-family: var(--font-mono);
}

.ai-month-risk-pill.risk-low {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-month-risk-pill.risk-med {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.ai-month-risk-pill.risk-high {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* =========================================
   MAP CARD & OPENLAYERS CONTAINER
   ========================================= */
.ai-map-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.ai-map-container {
    height: 480px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 242, 254, 0.2);
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.map-floating-legend {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
    font-family: var(--font-mono);
}

[data-lang="ar"] .map-floating-legend {
    right: auto;
    left: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* =========================================
   TABLES & BENCHMARKS
   ========================================= */
.ai-table {
    font-family: var(--font-mono);
}

.ai-table th {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* =========================================
   EXPORT ACTIONS ROW
   ========================================= */
.ai-actions-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.ai-btn-export {
    flex: 1;
    min-width: 200px;
    background: rgba(11, 20, 42, 0.8);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.ai-btn-export:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

/* =========================================
   TOAST NOTIFICATION
   ========================================= */
.ai-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(8, 16, 36, 0.95);
    border: 1px solid var(--accent-cyan);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--glow-cyan);
    backdrop-filter: blur(16px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    pointer-events: none;
}

.ai-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* =========================================
   BOTTOM FOOTER (Slim Cyber Architecture)
   ========================================= */
footer.footer-slim {
    height: var(--footer-h);
    background: rgba(3, 7, 18, 0.95);
    border-top: 1px solid rgba(0, 242, 254, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    font-size: 0.74rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    position: relative;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.telemetry-label {
    color: #64748b;
    font-weight: 700;
}

.telemetry-val.highlight {
    color: #00f2fe;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.footer-copy {
    color: #94a3b8;
    text-align: center;
    font-size: 0.72rem;
}

.footer-copy strong {
    color: #f8fafc;
    font-weight: 700;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-windows-btn {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #00f2fe;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-windows-btn:hover {
    background: rgba(0, 242, 254, 0.25);
    box-shadow: var(--glow-cyan);
    transform: translateY(-1px);
}

.windows-icon {
    width: 11px;
    height: 11px;
}

.footer-support-btn {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(236, 72, 153, 0.35);
    color: #ec4899;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-support-btn svg {
    width: 12px;
    height: 12px;
}

.footer-support-btn:hover {
    background: rgba(236, 72, 153, 0.25);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
    transform: translateY(-1px);
}

.footer-linkedin {
    background: rgba(11, 20, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #0077b5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-linkedin svg {
    width: 12px;
    height: 12px;
}

.footer-linkedin:hover {
    background: rgba(0, 119, 181, 0.2);
    border-color: #0077b5;
    box-shadow: 0 0 12px rgba(0, 119, 181, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

/* =========================================
   MODALS (Windows App & Support)
   ========================================= */
.windows-modal-overlay,
.support-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.windows-modal-overlay.active,
.support-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.windows-modal-card,
.support-modal-card {
    background: rgba(8, 16, 36, 0.95);
    border: 1px solid rgba(0, 242, 254, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 242, 254, 0.15);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.windows-modal-overlay.active .windows-modal-card,
.support-modal-overlay.active .support-modal-card {
    transform: scale(1);
}

.windows-modal-close,
.support-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.windows-modal-close:hover,
.support-modal-close:hover {
    color: #fff;
    background: rgba(244, 63, 94, 0.25);
}

.windows-modal-title,
.support-modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.windows-modal-subtitle,
.support-modal-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.windows-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.windows-feat-item {
    background: rgba(11, 20, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
}

.btn-win-primary,
.support-modal-btn {
    width: 100%;
    background: linear-gradient(135deg, #00f2fe 0%, #3b82f6 100%);
    color: #030712;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
    transition: all 0.25s ease;
}

.btn-win-primary:hover,
.support-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.7);
    filter: brightness(1.1);
}

.support-modal-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.support-qr-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #fff;
    padding: 8px;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1200px) {
    .ai-workspace {
        grid-template-columns: 1fr;
    }
    .ai-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-forecast-months-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ai-summary-grid {
        grid-template-columns: 1fr;
    }
    .ai-forecast-months-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-hero {
        padding: 20px 16px;
    }
    .ai-workspace {
        padding: 16px;
    }
    header.ai-header {
        padding: 0 16px;
    }
    footer.footer-slim {
        height: auto;
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
        text-align: center;
    }
}


/* =============================================
   PREMIUM PORTAL RETURN BUTTON (shared)
   ============================================= */
.portal-return-btn {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(168, 85, 247, 0.12)) !important;
    border: 1px solid rgba(0, 242, 254, 0.4) !important;
    color: #00f2fe !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    gap: 8px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4) !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15) !important;
    transition: all 0.25s ease !important;
}

.portal-return-btn:hover {
    background: rgba(0, 242, 254, 0.22) !important;
    border-color: #00f2fe !important;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4) !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}
