/* =========================================================================
   Global entry point.

   Component-specific styling now lives in each component's scoped .razor.css
   ("CSS behind"). What remains global is split into feature files, imported
   below. Everything here loads AFTER MudBlazor.min.css (see App.razor), so the
   MudBlazor overrides in these files reliably win the cascade.

     layout.css                -> the app shell (.app-root / .app-content)
     mud-overrides.css         -> MudBlazor (.mud-*) overrides outside org settings
     organization-settings.css -> the whole organization-settings feature area
   ========================================================================= */
@import "layout.css?v=8";
@import "mud-overrides.css?v=8";
@import "organization-settings.css?v=8";

/* =========================================================================
   Theme tokens.
   All app colors are declared here so light/dark themes can be added later
   by overriding these variables (e.g. :root[data-theme="light"] { ... }).
   Values below are the dark theme (default). They mirror the MudTheme palette
   in Routes.razor.cs, which stays the source of truth for MudBlazor colors.
   ========================================================================= */
:root {
    /* Flow-editor palette: layered blue-black surfaces + a periwinkle accent. Depth comes from the
       surface ramp (bg -> surface -> surface-2 -> surface-3), hairline borders and soft shadows. */
    --app-bg: #0e1118;
    --app-sidebar-bg: #0e1118;
    --app-surface: #161b26;
    --app-surface-2: #1d2432;
    --app-surface-3: #232c3d;
    --app-surface-hover: #1d2432;
    --app-border: #2a3140;
    --app-border-strong: #3b445a;
    --app-divider: #232c3d;

    --app-primary: #7c93ff;
    --app-primary-bright: #9fb0ff;
    --app-primary-dim: rgba(124, 147, 255, 0.45);
    --app-accent-soft: rgba(124, 147, 255, 0.14);

    /* Semantic accents, shared with the flow editor (success/stream, warn, crit) + its data hues. */
    --app-success: #46d19e;
    --app-warn: #e9b949;
    --app-crit: #f2688a;
    --app-ref: #c08cff;
    --app-data: #38c0d9;

    --app-user-bubble-bg: #7c93ff;
    --app-user-bubble-text: #0b0f1d;

    --app-text: #e6ebf5;
    --app-text-secondary: #9aa6bd;
    --app-text-muted: #67728c;

    /* Elevation — mirrors the flow editor's node/menu shadows. */
    --app-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --app-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);

    --app-sidebar-width: 264px;
    --app-sidebar-collapsed: 64px;
    --app-transition: 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================================
   Base
   ========================================================================= */
html, body {
    margin: 0;
    height: 100%;
    background-color: var(--app-bg);
    color: var(--app-text);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* Thin, subtle scrollbars everywhere that scrolls (brighten on hover) */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--app-border-strong) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--app-border-strong); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: var(--app-text-muted); }
