/* ==========================================================================
   Payslip Hub Design System Tokens & Base Styling
   ========================================================================== */

:root {
    /* Color Palette (Deep Slate & Premium Accents) */
    --bg-main: #090d16;
    --bg-surface: #0f172a;
    --bg-surface-elevated: #1e293b;
    --bg-surface-hover: #334155;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.16);
    --border-focus: #6366f1;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #090d16;

    /* Brand & Functional Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --primary-glow: rgba(99, 102, 241, 0.35);

    --success: #10b981;
    --success-light: #34d399;
    --success-bg: rgba(16, 185, 129, 0.15);
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);

    --info: #0ea5e9;
    --info-bg: rgba(14, 165, 233, 0.15);

    /* Glassmorphism */
    --glass-bg: rgba(15, 23, 42, 0.82);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(16px);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Elevations & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px var(--primary-glow);

    /* Mobile Dimensions */
    --header-height: 64px;
    --bottom-nav-height: 68px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f8fafc;
    --bg-surface-hover: #e2e8f0;
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-medium: rgba(15, 23, 42, 0.16);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(15, 23, 42, 0.1);
    --success: #059669;
    --success-light: #047857;
    --success-bg: rgba(16, 185, 129, 0.12);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-hover);
    border-radius: var(--radius-full);
}
