/* ==========================================================================
   AFFILIATE PANEL - CORPORATE DESIGN SYSTEM
   Bloomberg Terminal / Financial Dashboard Aesthetic
   Pure Black + White | Sharp Edges | Data-Dense
   ========================================================================== */

:root {
    /* ===== TYPOGRAPHY ===== */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', 'Consolas', monospace;

    /* Font Sizes */
    --text-xs: 0.6875rem;    /* 11px */
    --text-sm: 0.75rem;      /* 12px */
    --text-base: 0.8125rem;  /* 13px */
    --text-md: 0.875rem;     /* 14px */
    --text-lg: 1rem;         /* 16px */
    --text-xl: 1.125rem;     /* 18px */
    --text-2xl: 1.375rem;    /* 22px */
    --text-3xl: 1.625rem;    /* 26px */
    --text-4xl: 2rem;        /* 32px */

    /* Font Weights */
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;

    /* Letter Spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.02em;
    --tracking-wider: 0.04em;
    --tracking-widest: 0.08em;

    /* ===== COLORS - DARK THEME ===== */

    /* Base Backgrounds - Pure Dark */
    --bg-base: #0d0d0d;           /* Main background - darkest */
    --bg-elevated: #1a1a1a;       /* Card backgrounds */
    --bg-surface: #222222;        /* Surface elements */
    --bg-hover: #2a2a2a;          /* Hover states */
    --bg-active: #333333;         /* Active states */
    --bg-input: #1a1a1a;          /* Input backgrounds */

    /* Accent Colors */
    --accent-primary: #D4AF37;    /* Gold - main accent */
    --accent-primary-rgb: 212, 175, 55;  /* RGB for rgba() usage */
    --accent-primary-dim: #B8962E;
    --accent-primary-bright: #E5C458;
    --accent-secondary: #FFFFFF;  /* White for secondary */

    /* Status Colors - Muted for corporate look */
    --color-positive: #22C55E;
    --color-positive-dim: #16A34A;
    --color-positive-bg: rgba(34, 197, 94, 0.1);

    --color-negative: #EF4444;
    --color-negative-dim: #DC2626;
    --color-negative-bg: rgba(239, 68, 68, 0.1);

    --color-warning: #F59E0B;
    --color-warning-dim: #D97706;
    --color-warning-bg: rgba(245, 158, 11, 0.1);

    --color-info: #3B82F6;
    --color-info-dim: #2563EB;
    --color-info-bg: rgba(59, 130, 246, 0.1);

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #808080;
    --text-disabled: #4D4D4D;
    --text-inverse: #000000;

    /* Border Colors */
    --border-default: #2a2a2a;
    --border-subtle: #1f1f1f;
    --border-strong: #3a3a3a;
    --border-accent: #D4AF37;
    --border-focus: #D4AF37;

    /* ===== SPACING ===== */
    --space-0: 0;
    --space-px: 1px;
    --space-0-5: 0.125rem;  /* 2px */
    --space-1: 0.25rem;     /* 4px */
    --space-1-5: 0.375rem;  /* 6px */
    --space-2: 0.5rem;      /* 8px */
    --space-2-5: 0.625rem;  /* 10px */
    --space-3: 0.75rem;     /* 12px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-8: 2rem;        /* 32px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-16: 4rem;       /* 64px */

    /* ===== BORDERS - SHARP EDGES ===== */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 3px;
    --radius-lg: 4px;

    /* Border Widths */
    --border-width-default: 1px;
    --border-width-thick: 2px;
    --border-width-accent: 3px;

    /* ===== SHADOWS - MINIMAL ===== */
    --shadow-none: none;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.8);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.8);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.02);

    /* ===== LAYOUT ===== */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    --header-height: 48px;
    --filter-bar-height: 48px;
    --content-max-width: 1600px;

    /* ===== Z-INDEX ===== */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;

    /* ===== TRANSITIONS ===== */
    --duration-instant: 0ms;
    --duration-fast: 100ms;
    --duration-normal: 150ms;
    --duration-slow: 200ms;

    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);

    /* ===== COMPONENT TOKENS ===== */

    /* KPI Cards */
    --kpi-bg: var(--bg-elevated);
    --kpi-border: var(--border-default);
    --kpi-border-left: 3px;
    --kpi-padding-x: var(--space-5);
    --kpi-padding-y: var(--space-4);

    /* Data Tables */
    --table-header-bg: var(--bg-surface);
    --table-header-border: var(--border-accent);
    --table-row-bg: var(--bg-elevated);
    --table-row-alt-bg: #141414;
    --table-row-hover: var(--bg-hover);
    --table-border: var(--border-default);
    --table-cell-padding-x: var(--space-4);
    --table-cell-padding-y: var(--space-3);

    /* Filter Bar */
    --filter-bg: var(--bg-surface);
    --filter-border: var(--border-default);

    /* Charts */
    --chart-bg: var(--bg-elevated);
    --chart-border: var(--border-default);
    --chart-grid: #2a2a2a;
    --chart-text: var(--text-muted);

    /* Sidebar */
    --sidebar-bg: var(--bg-elevated);
    --sidebar-border: var(--border-default);
    --sidebar-nav-height: 40px;
    --sidebar-nav-active-bg: var(--bg-hover);
    --sidebar-nav-active-border: var(--accent-primary);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) var(--bg-base);
}

/* ===== SELECTION ===== */
::selection {
    background: var(--accent-primary);
    color: var(--text-inverse);
}
