/* ============================================================
   CRM BR L.A.B. — Premium Core Design System
   Aesthetic: Modern SaaS, Solid, Imposing, Minimalist
   ============================================================ */

/* ─── Typography ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables (Dark Mode Default - Premium) ────────── */
:root {
    /* Brand - NEON TECH (LION CYAN) */
    --primary: #00f2ff;
    --primary-hover: #00d7e3;
    --primary-glow: rgba(0, 242, 255, 0.4);
    --primary-text: #0b141a;
    
    /* Backgrounds - Deep Cyber Dark */
    --bg-body: #0b141a;
    --bg-surface: #111b21;
    --bg-card: #152026;
    --bg-input: #1a252c;
    --bg-hover: #1d2a33;
    --bg-active: #222e35;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #8696a0;
    --text-muted: #667781;
    --text-inverse: #0b141a;

    /* Borders & Glass */
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --border-focus: var(--primary);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Status Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows - NEON GLOW */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-neon: 0 0 15px var(--primary-glow);

    /* Fonts & Transitions */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    --topbar-height: 70px;
}

/* ─── Light Mode Override (Crystal Clean) ───────────────── */
[data-theme="light"] {
    --bg-body: #f0f2f5;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --bg-hover: #f1f5f9;
    --bg-active: #e2e8f0;
    
    --text-primary: #111b21;
    --text-secondary: #475569; /* Slate-600 for outstanding contrast */
    --text-muted: #64748b;     /* Slate-500 for perfect legibility */
    
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --primary: #0077ff;
    --primary-hover: #0066dd;
    --primary-glow: rgba(0, 119, 255, 0.3);
    --primary-text: #ffffff;
    
    --success: #15803d; /* Darker emerald green for high contrast */
    --warning: #b45309; /* Darker amber orange for high contrast */
    --danger: #b91c1c;  /* Darker crimson red for high contrast */
    --info: #1d4ed8;    /* Darker royal blue for high contrast */
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-neon: 0 0 15px rgba(0, 119, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: #e2e8f0;
}

/* ─── Global Base ───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* ─── Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em; /* Crucial for premium look */
}
h1 { font-size: 1.875rem; letter-spacing: -0.04em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

small {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ─── Selection ─────────────────────────────────────────── */
::selection {
    background: var(--primary);
    color: #fff;
}
