/*
 * Alternative design directions, chosen per person in Settings > Appearance.
 *
 *   (none)  A  Minimalist Institutional -- the default; nothing here applies.
 *   b       B  Modern Professional Workspace -- dark navigation rail, denser rows, squarer corners.
 *   c       C  Premium Data-Driven -- warm paper surfaces, serif headings, deep green accent.
 *
 * Each direction only redefines the design tokens of style.css (and the few
 * sidebar rules that read a text token), so every page follows without being
 * touched. Shape and type apply in both themes; the palettes apply in the
 * light theme only -- in dark mode dark.css keeps its measured colours.
 * Flat colours only; every text/background pair below was measured to WCAG AA.
 */

/* ===================== B. Modern Professional Workspace ===================== */
html[data-design="b"] {
    --radius-xs: 4px; --radius-sm: 5px; --radius-md: 6px; --radius-lg: 8px; --radius-xl: 8px;
    --card-radius: 6px;
    --card-pad: 14px 16px; --card-pad-tight: 10px 12px;
    --text-base: 14px; --text-md: 16px;
}
html[data-design="b"] body { font-family: 'IBM Plex Sans', 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; }
html[data-design="b"] .main-content { padding: 12px 18px 84px; }
html[data-design="b"] .page-header { margin-bottom: 12px; }
html[data-design="b"] .page-header h2 { font-size: 21px; letter-spacing: 0; }
html[data-design="b"] .table > :not(caption) > * > * { padding-top: 7px; padding-bottom: 7px; }
html[data-design="b"] .card-header { padding: 11px 16px; }
html[data-design="b"] .sidebar-link { padding: 7px 11px; }

html[data-design="b"]:not([data-theme="dark"]) {
    --color-brand: #0f6b82;
    --color-brand-hover: #0b5567;
    --color-brand-light: #e3f1f5;
    --color-brand-dark: #0a2a36;
    --color-brand-on-overlay: #0c5a6e;
    --color-canvas: #f4f6f8;
    --color-surface: #ffffff;
    --color-overlay: #e8edf1;
    --color-text-primary: #16212b;
    --color-text-secondary: #3a4955;
    --color-text-muted: #55636f;
    --color-border: #d3dae0;
    --color-border-strong: #7c8a96;
    --color-sidebar: #12232e;
    --color-sidebar-hover: #1b3442;
    --color-sidebar-active: #21414f;
    --color-sidebar-text: #c3d0d9;
    --color-sidebar-text-active: #ffffff;
    --color-sidebar-accent: #6fcbe0;
    --color-sidebar-border: #27404d;
}

/* ===================== C. Premium Data-Driven ===================== */
html[data-design="c"] {
    --radius-xs: 5px; --radius-sm: 7px; --radius-md: 10px; --radius-lg: 12px; --radius-xl: 12px;
    --card-radius: 10px;
}
html[data-design="c"] body { font-family: 'Public Sans', 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; }
html[data-design="c"] .page-header h2,
html[data-design="c"] .acc-hero h2,
html[data-design="c"] .sidebar-logo-title,
html[data-design="c"] .nx-stat-value,
html[data-design="c"] .qa-sel-stat-n {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    letter-spacing: -.2px;
}
html[data-design="c"] .page-header h2 { font-size: 28px; font-weight: 600; }

html[data-design="c"]:not([data-theme="dark"]) {
    --color-brand: #1f5c4d;
    --color-brand-hover: #174539;
    --color-brand-light: #e3efe9;
    --color-brand-dark: #12332b;
    --color-brand-on-overlay: #1a4f42;
    --color-canvas: #f7f5f0;
    --color-surface: #fffdf9;
    --color-overlay: #ece7dc;
    --color-text-primary: #1d2a26;
    --color-text-secondary: #3f4c46;
    --color-text-muted: #56615b;
    --color-border: #dbd4c6;
    --color-border-strong: #857d6e;
    --color-success-light: #e3efe9;
    --color-sidebar: #1d2a26;
    --color-sidebar-hover: #29392f;
    --color-sidebar-active: #31453d;
    --color-sidebar-text: #c9d2cc;
    --color-sidebar-text-active: #fffdf9;
    --color-sidebar-accent: #8fd0b8;
    --color-sidebar-border: #34463e;
    --card-bg: #fffdf9;
}
html[data-design="c"]:not([data-theme="dark"]) body { background: var(--color-canvas); }
html[data-design="c"]:not([data-theme="dark"]) .repo-scroll-panel .table thead th,
html[data-design="c"]:not([data-theme="dark"]) .accordion-body .table thead th { background: var(--color-overlay); }

/* ===== Both: the rail is dark in the light theme, so its text tokens are light ===== */
html[data-design="b"]:not([data-theme="dark"]) body,
html[data-design="b"]:not([data-theme="dark"]) .main-wrapper { background: var(--color-canvas); }
html[data-design="b"]:not([data-theme="dark"]) .sidebar,
html[data-design="c"]:not([data-theme="dark"]) .sidebar { border-right-color: var(--color-sidebar); }
html[data-design="b"]:not([data-theme="dark"]) .sidebar-logo,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-logo,
html[data-design="b"]:not([data-theme="dark"]) .sidebar-logo:hover,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-logo:hover { color: #ffffff; }
html[data-design="b"]:not([data-theme="dark"]) .sidebar-logo-sub,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-logo-sub,
html[data-design="b"]:not([data-theme="dark"]) .sidebar-menu-label,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-menu-label { color: var(--color-sidebar-text); }
html[data-design="b"]:not([data-theme="dark"]) .sidebar-link:hover,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-link:hover,
html[data-design="b"]:not([data-theme="dark"]) .sidebar-link:hover i,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-link:hover i { color: #ffffff; }
html[data-design="b"]:not([data-theme="dark"]) .sidebar-collapse-btn,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-collapse-btn,
html[data-design="b"]:not([data-theme="dark"]) .sidebar-close,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-close { color: var(--color-sidebar-text); border-color: var(--color-sidebar-border); }
html[data-design="b"]:not([data-theme="dark"]) .sidebar-collapse-btn:hover,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-collapse-btn:hover { color: #ffffff; background: var(--color-sidebar-hover); border-color: var(--color-sidebar-border); }
/* The logo is drawn for a light surface: it sits on a white tile on the dark rail. */
html[data-design="b"]:not([data-theme="dark"]) .sidebar-logo-icon-svg,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-logo-icon-svg { background: #ffffff; border-radius: var(--radius-sm); }
/* Sign out: the page's red is tuned for white; on the dark rail it takes the dark theme's red. */
html[data-design="b"]:not([data-theme="dark"]) .sidebar-logout,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-logout { color: #f4a199 !important; }
html[data-design="b"]:not([data-theme="dark"]) .sidebar-logout:hover,
html[data-design="c"]:not([data-theme="dark"]) .sidebar-logout:hover { background: #4a2420 !important; color: #ffd9d4 !important; }
html[data-design="b"]:not([data-theme="dark"]) .sidebar .badge,
html[data-design="c"]:not([data-theme="dark"]) .sidebar .badge { box-shadow: none; }

/* Plain links: Bootstrap's blue is tuned for white (4.15:1 on B's tinted page); links take the design's accent. */
html[data-design="b"]:not([data-theme="dark"]) { --bs-link-color: #0f6b82; --bs-link-color-rgb: 15, 107, 130; --bs-link-hover-color: #0b5567; --bs-link-hover-color-rgb: 11, 85, 103; }
html[data-design="c"]:not([data-theme="dark"]) { --bs-link-color: #1f5c4d; --bs-link-color-rgb: 31, 92, 77; --bs-link-hover-color: #174539; --bs-link-hover-color-rgb: 23, 69, 57; }
/* The page's red measured 4.46:1 on C's paper surface; one step darker clears 4.5:1. */
html[data-design="c"]:not([data-theme="dark"]) { --color-danger: #a3271f; }
html[data-design="c"]:not([data-theme="dark"]) .btn-outline-danger { color: #a3271f; border-color: #a3271f; }
