/*
 * SERONA INDUSTRIAL - DESIGN TOKENS (PRODUCTION FIDELITY FINAL - RESCUE V1)
 * Source of truth for all visual values, matching production VPS exactly.
 */

:root {
    --gp-color-surface-bright: #f8fafc;
    /* --- LAYER 1: PRIMITIVES (STATIC) --- */
    --gp-primitive-white: #FFFFFF;
    --gp-primitive-black: #000000;
    
    /* The Two Serona Greens (Fidelity Match) */
    --gp-primitive-green-dark: #0D5E54;
    --gp-primitive-green-light: #00C899;
    --gp-primitive-green-700: #0a7669;
    --gp-primitive-green-800: #085a51;
    
    /* RGB Variants for shadows and opacities */
    --gp-primitive-green-700-rgb: 10, 118, 105; /* #0a7669 */
    --gp-primitive-green-800-rgb: 8, 90, 81;   /* #085a51 */
    --gp-primitive-green-dark-rgb: 13, 94, 84;  /* #0D5E54 */
    --gp-primitive-green-light-rgb: 0, 200, 153; /* #00C899 */

    /* Technical Palette */
    --gp-primitive-blue-500: #3B7DDD;
    --gp-primitive-purple-500: #6f42c1;
    --gp-primitive-amber-500: #fd7e14;
    --gp-primitive-red-600: #BA1A1A;
    --gp-primitive-cyan-200: #ACEDFF;
    --gp-primitive-blue-100: #D3E4FE;

    /* Obsidian Scale (PRODUCTION MATCH) */
    --gp-obsidian-50: #F5F7FA;
    --gp-obsidian-100: #E4E9F0;
    --gp-obsidian-200: #CCD5E1;
    --gp-obsidian-300: #A3B3C7;
    --gp-obsidian-400: #7087A3;
    --gp-obsidian-500: #506680;
    --gp-obsidian-600: #3B4D63;
    --gp-obsidian-700: #2D3B4D;
    --gp-obsidian-800: #212A38;
    --gp-obsidian-900: #151B24;

    /* Master Identity Variable */
    --gp-color-primary: #0D5E54;
    --gp-color-primary-dark: #0a7669;
    --gp-color-primary-strong: #0a7669;
    --gp-color-identity: #00C899;
    --gp-color-shadow-base: #0a7669;
    
    --gp-color-on-primary: var(--gp-primitive-white);
    --gp-color-primary-container: var(--gp-color-primary);
    --gp-color-on-primary-container: #8fd5c8;
    
    /* RGB Components for Tailwind/CSS opacities */
    --gp-color-primary-rgb: 13, 94, 84;
    --gp-color-identity-rgb: 0, 200, 153;

    /* States */
    --gp-color-success: #27AE60;
    --gp-color-error: var(--gp-primitive-red-600);
    --gp-color-warning: var(--gp-primitive-amber-500);
    --gp-color-info: #00D2FF;
    
    /* Surfaces */
    --gp-color-background: #F0F2F5;
    --gp-color-surface: #F0F2F5;
    --gp-color-on-background: #191C1D;
    --gp-color-on-surface: #191C1D;
    --gp-color-on-surface-variant: #3f4946;
    --gp-color-surface-variant: #e1e3e4;
    --gp-color-surface-container-low: #f3f4f5;
    --gp-color-surface-container-lowest: #ffffff;
    
    /* Specific Semantic Tokens for Components */
    --gp-color-on-secondary-fixed: #00201c;
    --gp-color-on-primary-fixed-variant: #005047;
    --gp-color-outline: #6f7976;
    --gp-color-outline-variant: #bec9c5;

    /* Shadows */
    --gp-panel-shadow: 0 18px 45px rgba(8, 17, 31, 0.09);
    --gp-panel-shadow-hover: 0 22px 54px rgba(8, 17, 31, 0.13);

    /* Spacing & Radii (INDUSTRIAL VPS MATCH) */
    --gp-radius-xl: 12px;
    --gp-radius-2xl: 16px;
    --gp-radius-panel: 28px;
    --gp-radius-card: 22px;
    --gp-radius-control: 999px;

    /* Scaling Engine (FIXED AS REQUESTED) */
    --gp-root-font-size: 14px;
    --gp-scale-factor: 1;

    /* Transitions & Motion */
    --gp-motion-base: 150ms;
    --gp-motion-curve: cubic-bezier(0.22, 1, 0.36, 1);
    --gp-micro-fast: 80ms;
    --gp-micro-base: 120ms;
    --gp-micro-slow: 150ms;
    --gp-micro-ease: cubic-bezier(.22, .61, .36, 1);
    --gp-transition: all var(--gp-micro-base) var(--gp-micro-ease);

    /* Legacy Bridge (Fidelity to VPS) */
    --serona-primary: var(--gp-color-identity);
    --serona-dark: #151628;
    --serona-bg: var(--gp-color-background);
    --loader-color: var(--gp-color-primary);
    --gp-ink-strong: var(--gp-color-on-background);
    --gp-border: #e2e8f0;
}

/* Global Interactive Transition Engine */
button, 
a, 
input, 
select, 
textarea,
.gp-interactive {
    transition: var(--gp-transition);
}

/* --- THEME: INDUSTRIAL DARK (OBSIDIAN) --- */
.bg-obsidian {
    background-color: #020617 !important;
    --gp-surface: #0f172a;
    --gp-surface-soft: #1e293b;
    --gp-border: #334155;
    --gp-ink: #f1f5f9;
    --gp-ink-strong: #ffffff;
    --gp-muted: #cbd5e1; /* Expert UX: Slate-300 for labels */
    color: #f8fafc !important; /* Expert UX: Slate-50 */
}

.bg-obsidian .gp-label,
.bg-obsidian .text-muted-foreground,
.bg-obsidian .text-white\/70,
.bg-obsidian .text-white\/75 {
    color: #cbd5e1 !important; /* Expert UX: Slate-300 for crisp labels */
}

/* Financial Result Semantic Colors for Dark Context */
.bg-obsidian .financial-value.negative {
    color: #ff8a8a !important; /* Expert UX: Vibrant Coral */
}

.bg-obsidian .financial-value.positive {
    color: #34d399 !important; /* Expert UX: Emerald-400 */
}


