/* ============================================================
   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 (overridden per company) */
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --primary-glow: rgba(59, 130, 246, 0.15);
    
    /* Backgrounds - Deep, Solid Dark */
    --bg-body: #0a0a0a;
    --bg-surface: #111111;
    --bg-card: #141414;
    --bg-input: #1a1a1a;
    --bg-hover: #1f1f1f;
    --bg-active: #262626;
    
    /* Text */
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-inverse: #0a0a0a;

    /* Borders - Extremely subtle for clean look */
    --border: #262626;
    --border-strong: #333333;
    --border-focus: var(--primary);

    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Radius - Modern softer curves */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows - Layered & Smooth (No harsh drops) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.03);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Fonts */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Transitions */
    --transition: 0.15s ease-out;
    --transition-slow: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Layout */
    --sidebar-width: 250px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
}

/* ─── Light Mode Override (Premium Clean) ───────────────── */
[data-theme="light"] {
    --bg-body: #fbfbfc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f4f4f5;
    --bg-hover: #f4f4f5;
    --bg-active: #e4e4e7;
    
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    
    --border: #e4e4e7;
    --border-strong: #d4d4d8;
    
    /* Light Mode Shadows - Ultra Soft */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255,255,255,0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255,255,255,0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* ─── 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;
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

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;
}
