/**
 * SehaPilot Brand V2 — shared design tokens
 * Source of truth: resources/css/sehapilot-public.css
 * Loaded when config('design_system.brand_v2_enabled') is true.
 */

:root {
    /* Brand primitives */
    --seha-primary-50: #f0fdfa;
    --seha-primary-100: #ccfbf1;
    --seha-primary-500: #14b8a6;
    --seha-primary-600: #0d9488;
    --seha-primary-700: #0f766e;
    --seha-primary-900: #134e4a;

    --seha-cta-500: #10b981;
    --seha-cta-600: #059669;
    --seha-cta-700: #047857;

    /* App semantic bridge */
    --primary-color: var(--seha-primary-600);
    --primary-hover: var(--seha-primary-700);
    --secondary-color: var(--seha-primary-500);
    --cta-color: var(--seha-cta-600);

    /* Bootstrap remap */
    --bs-primary: #0d9488;
    --bs-primary-rgb: 13, 148, 136;
    --bs-link-color: #0d9488;
    --bs-link-hover-color: #0f766e;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    --primary-hover-gradient: linear-gradient(135deg, #0f766e 0%, #047857 100%);
    --seha-sidebar-gradient: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
    --seha-table-head-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);

    /* Typography */
    --font-heading: 'Figtree', 'Cairo', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    /* Radius / shadows */
    --radius-card: 1.25rem;
    --shadow-base: 0 4px 6px -1px rgb(15 23 42 / 0.05), 0 2px 4px -2px rgb(15 23 42 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.04);

    /* Pagination / accents */
    --pagination-active-bg: var(--seha-primary-600);
    --pagination-active-border: var(--seha-primary-600);
    --dash-kpi-accent: var(--seha-primary-600);
}

[data-theme="dark"] {
    --primary-color: #14b8a6;
    --primary-hover: #2dd4bf;
    --secondary-color: #5eead4;
    --cta-color: #34d399;

    --bs-primary: #14b8a6;
    --bs-primary-rgb: 20, 184, 166;
    --bs-link-color: #5eead4;
    --bs-link-hover-color: #99f6e4;

    --primary-gradient: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
    --primary-hover-gradient: linear-gradient(135deg, #134e4a 0%, #0f172a 100%);
    --seha-sidebar-gradient: linear-gradient(135deg, #134e4a 0%, #1e293b 50%, #0f766e 100%);
    --seha-table-head-gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);

    --pagination-active-bg: #14b8a6;
    --pagination-active-border: #14b8a6;
    --dash-kpi-accent: #14b8a6;

    /* Dark palette — keep in sync with public/css/sehapilot-tokens.css [data-theme="dark"] */
    --bg-page: #0b1120;
    --bg-card: #1e293b;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
}

/* ------------------------------------------------------------------
   Brand V2 component overrides (loaded only when flag is ON)
   ------------------------------------------------------------------ */

html.brand-v2[data-theme="light"] .unified-sidebar {
    background: var(--seha-sidebar-gradient) !important;
}

html.brand-v2[data-theme="dark"] .unified-sidebar {
    background: var(--seha-sidebar-gradient) !important;
}

html.brand-v2 .ajax-loading-overlay .spinner-border,
html.brand-v2 .pagination .page-item.active .page-link {
    background: var(--primary-gradient) !important;
    border-color: var(--primary-color) !important;
}

html.brand-v2 .pagination .page-link:hover {
    color: var(--primary-color) !important;
}

html.brand-v2 .items-per-page-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.25) !important;
}

html.brand-v2 .dash-kpi.accent-primary,
html.brand-v2 .small-box.bg-primary {
    --dash-kpi-accent: var(--primary-color);
}

html.brand-v2 .badge-primary {
    background-color: var(--bs-primary) !important;
}

html.brand-v2 .form-control:focus,
html.brand-v2 .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.25) !important;
}

html.brand-v2[data-theme="dark"] .table thead {
    background: var(--seha-table-head-gradient) !important;
}

html.brand-v2 .btn-primary {
    background: var(--primary-gradient) !important;
    border-color: var(--primary-color) !important;
}

html.brand-v2 .btn-primary:hover {
    background: var(--primary-hover-gradient) !important;
}

html.brand-v2 .navbar-brand-gradient,
html.brand-v2 .user-avatar-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--cta-color)) !important;
}

/* Page-specific high-traffic surfaces */
html.brand-v2 .doctor-workspace-header,
html.brand-v2 .workspace-v2-header,
html.brand-v2 .prescribing-header-bar {
    background: var(--primary-gradient) !important;
}

html.brand-v2 .patient-picker-selected,
html.brand-v2 .sidebar-customization-header {
    background: var(--primary-gradient) !important;
}

html.brand-v2 .select2-container--bootstrap-5 .select2-dropdown .select2-results__option--highlighted {
    background-color: var(--primary-color) !important;
}

html.brand-v2 .select2-container--bootstrap-5.select2-container--focus .select2-selection,
html.brand-v2 .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 148, 136, 0.25) !important;
}

