/* ==========================================================================
   DESIGN TOKENS - Single Source of Truth
   All design variables for the Discretionary Powers Tracker.
   Load this file FIRST, before any other custom CSS.
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@500;600;700&display=swap');

:root {
    /* ======================================
       COLORS
       ====================================== */

    /* Primary - Government Navy */
    --dp-primary: #1a2a6c;
    --dp-primary-light: #2a3f8c;
    --dp-primary-dark: #131f50;
    --dp-primary-rgb: 26, 42, 108;

    /* Accent - Interactive Blue */
    --dp-accent: #0d6efd;
    --dp-accent-light: #3d8bfd;
    --dp-accent-dark: #0b5ed7;
    --dp-accent-rgb: 13, 110, 253;

    /* Secondary - Amber */
    --dp-secondary: #f59e0b;
    --dp-secondary-light: #fbbf24;
    --dp-secondary-dark: #d97706;

    /* Status (Bootstrap-aligned) */
    --dp-success: #198754;
    --dp-warning: #ffc107;
    --dp-danger: #dc3545;
    --dp-info: #0dcaf0;

    /* Neutral Scale */
    --dp-gray-50: #f8fafc;
    --dp-gray-100: #f1f5f9;
    --dp-gray-200: #e2e8f0;
    --dp-gray-300: #cbd5e1;
    --dp-gray-400: #94a3b8;
    --dp-gray-500: #64748b;
    --dp-gray-600: #475569;
    --dp-gray-700: #334155;
    --dp-gray-800: #1e293b;
    --dp-gray-900: #0f172a;

    /* Semantic */
    --dp-text-primary: #111827;
    --dp-text-secondary: #6b7280;
    --dp-text-muted: #9ca3af;
    --dp-text-inverse: #ffffff;

    --dp-bg-body: #f8f9fa;
    --dp-bg-surface: #ffffff;
    --dp-bg-surface-alt: #f8fafc;

    --dp-border-light: #e5e7eb;
    --dp-border-default: #d1d5db;

    /* ======================================
       TYPOGRAPHY
       ====================================== */
    --dp-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --dp-font-heading: 'Montserrat', var(--dp-font-sans);
    --dp-font-mono: 'Courier New', Consolas, monospace;

    --dp-text-xs: 0.75rem;
    --dp-text-sm: 0.875rem;
    --dp-text-base: 1rem;
    --dp-text-lg: 1.125rem;
    --dp-text-xl: 1.25rem;
    --dp-text-2xl: 1.5rem;
    --dp-text-3xl: 2rem;

    --dp-font-normal: 400;
    --dp-font-medium: 500;
    --dp-font-semibold: 600;
    --dp-font-bold: 700;

    --dp-leading-tight: 1.2;
    --dp-leading-normal: 1.5;
    --dp-leading-relaxed: 1.6;

    /* ======================================
       SPACING
       ====================================== */
    --dp-space-xs: 0.25rem;
    --dp-space-sm: 0.5rem;
    --dp-space-md: 1rem;
    --dp-space-lg: 1.5rem;
    --dp-space-xl: 2rem;
    --dp-space-2xl: 3rem;
    --dp-space-3xl: 4rem;

    /* ======================================
       BORDERS & RADIUS
       ====================================== */
    --dp-radius-sm: 0.25rem;
    --dp-radius-md: 0.375rem;
    --dp-radius-lg: 0.5rem;
    --dp-radius-xl: 0.75rem;
    --dp-radius-2xl: 1rem;
    --dp-radius-full: 9999px;

    /* ======================================
       SHADOWS
       ====================================== */
    --dp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --dp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --dp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --dp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --dp-focus-ring: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);

    /* ======================================
       TRANSITIONS
       ====================================== */
    --dp-transition-fast: all 0.15s ease;
    --dp-transition-base: all 0.2s ease;
    --dp-transition-slow: all 0.3s ease;

    /* ======================================
       Z-INDEX
       ====================================== */
    --dp-z-dropdown: 1000;
    --dp-z-sticky: 1020;
    --dp-z-fixed: 1030;
    --dp-z-sidebar-overlay: 1039;
    --dp-z-sidebar: 1040;
    --dp-z-modal-backdrop: 1050;
    --dp-z-modal: 1060;
    --dp-z-tooltip: 1070;

    /* ======================================
       COMPONENT TOKENS
       ====================================== */

    /* Sidebar */
    --dp-sidebar-width: 250px;
    --dp-sidebar-width-collapsed: 70px;
    --dp-sidebar-bg: #313a46;
    --dp-sidebar-text: #8391a2;
    --dp-sidebar-active-bg: var(--dp-accent);

    /* Topbar */
    --dp-topbar-height: 64px;
    --dp-topbar-bg: var(--dp-bg-surface);
}

/* ======================================
   UNIFIED BUTTON OVERRIDES
   One canonical .btn-primary definition.
   ====================================== */

.btn-primary {
    background-color: var(--dp-primary);
    border-color: var(--dp-primary);
    color: var(--dp-text-inverse);
    font-weight: var(--dp-font-semibold);
    transition: var(--dp-transition-base);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--dp-primary-dark);
    border-color: var(--dp-primary-dark);
    color: var(--dp-text-inverse);
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background-color: var(--dp-primary-dark);
    border-color: var(--dp-primary-dark);
    color: var(--dp-text-inverse);
}

.btn-outline-primary {
    color: var(--dp-primary);
    border-color: var(--dp-primary);
    transition: var(--dp-transition-base);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--dp-primary);
    border-color: var(--dp-primary);
    color: var(--dp-text-inverse);
}

.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: var(--dp-primary-dark);
    border-color: var(--dp-primary-dark);
    color: var(--dp-text-inverse);
}

/* ======================================
   SHARED KEYFRAME ANIMATIONS
   ====================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======================================
   PRINT
   ====================================== */
@media print {
    :root {
        --dp-shadow-sm: none;
        --dp-shadow-md: none;
        --dp-shadow-lg: none;
        --dp-shadow-xl: none;
    }
}
