/* ==========================================================================
   Sentinel Unity GRC - Design Tokens & Base Styles
   ========================================================================== */

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

:root {
    /* Primary – #0F172A (base) used for text, brand, dark UI; lighter tints for backgrounds */
    --primary-950: #0F172A;
    --primary-900: #0F172A;
    --primary-800: #0F172A;
    --primary-700: #0F172A;
    --primary-600: #0F172A;
    --primary-500: #0F172A;
    --primary-400: rgba(15, 23, 42, 0.75);
    --primary-300: rgba(15, 23, 42, 0.5);
    --primary-200: rgba(15, 23, 42, 0.15);
    --primary-100: rgba(15, 23, 42, 0.08);
    --primary: #0F172A;

    /* Neutrals (Slate) – main text/headings use #0F172A */
    --neutral-900: #0F172A;
    --neutral-800: #0F172A;
    --neutral-700: #374151;
    --neutral-600: #4b5563;
    --neutral-500: #6b7280;
    --neutral-400: #9ca3af;
    --neutral-300: #d1d5db;
    --neutral-200: #e5e7eb;
    --neutral-100: #f3f4f6;
    --neutral-50: #f9fafb;
    --white: #ffffff;

    /* Semantic Colors */
    --success-700: #15803d;
    --success-600: #16a34a;
    --success-200: #dcfce7;
    --success-100: #f0fdf4;
    --success: #16a34a;

    --warning-700: #a16207;
    --warning-600: #ca8a04;
    --warning-200: #fef9c3;
    --warning-100: #fefce8;
    --warning: #ca8a04;

    --danger-700: #b91c1c;
    --danger-600: #dc2626;
    --danger-200: #fee2e2;
    --danger-100: #fef2f2;
    --danger: #dc2626;

    --info-700: #0369a1;
    --info-600: #0284c7;
    --info-200: #e0f2fe;
    --info-100: #f0f9ff;
    --info: #0284c7;

    /* Accent blue (Google-style) – for links, hover states, UI life */
    --accent-blue: #4285f4;
    --accent-blue-hover: #1a73e8;
    --accent-blue-light: #e8f0fe;

    --purple-700: #7c3aed;
    --purple-600: #8b5cf6;
    --purple-200: #f3e8ff;
    --purple-100: #faf5ff;

    /* Aliases */
    --text: #0F172A;
    --text-muted: var(--neutral-500);
    --border: var(--neutral-200);
    --bg: var(--neutral-50);

    /* Typography – smaller, standardized scale */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --text-xs: 0.6875rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.0625rem;
    --text-xl: 1.1875rem;
    --text-2xl: 1.375rem;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --leading: 1.5;

    /* Spacing (8px grid) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Radii */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-dropdown: 0 4px 16px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;

    /* Sidebar – Google-style blue palette (enterprise) */
    --sidebar-bg: #1a365d;
    --sidebar-bg-hover: rgba(66, 133, 244, 0.12);
    --sidebar-bg-active: rgba(66, 133, 244, 0.2);
    --sidebar-accent: #4285f4;
    --sidebar-accent-bright: #5b9bf8;
    --sidebar-text: rgba(255, 255, 255, 0.85);
    --sidebar-text-muted: rgba(255, 255, 255, 0.6);
    --sidebar-text-dim: rgba(255, 255, 255, 0.45);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-brand-icon-bg: #2c5282;

    /* Layout: main app content is fluid (full viewport width). Use --content-max only on constrained pages e.g. auth. */
    --sidebar-width: 320px;
    --sidebar-collapsed: 64px;
    --header-height: 56px;
    --content-max: 1280px; /* optional: for .content-constrained wrapper on specific pages */
}

/* Base Element Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Scale entire app to 90% – makes 100% zoom look like the preferred 90% view */
html {
    zoom: 0.9;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-sm);
    line-height: var(--leading);
    color: var(--text);
    --bs-body-color: var(--text);
    background: var(--bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure Bootstrap components inherit our text color */
.table { --bs-table-color: var(--text); color: var(--text); }
.list-group-item { color: var(--text); }
.modal-body, .modal-title { color: var(--text); }
.dropdown-item { color: var(--text); }
.nav-link { color: var(--text); }
.breadcrumb-item { color: var(--text); }

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-semibold);
    color: var(--text);
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); }
h5 { font-size: var(--text-sm); }

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

a:hover {
    color: var(--primary-700);
}

/* Focus Ring */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary-200);
    color: var(--primary-950);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* Text color utility overrides */
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
