/*
 * Design-style presets. Components are shared; each preset only changes
 * surfaces, borders, shadows and depth. Colours come from the tenant's brand.
 * Selected by <html data-style="..."> (set by ThemeManager).
 */

/* ---------- 1. Corporate (calm enterprise) : default ---------- */
html[data-style="corporate"] .fi-section:not(.fi-section-not-contained),
html[data-style="corporate"] .fi-wi-stats-overview-stat,
html[data-style="corporate"] .fi-ta-ctn {
    box-shadow: none;
    border: 1px solid var(--gray-200);
}
html[data-style="corporate"].dark .fi-section:not(.fi-section-not-contained),
html[data-style="corporate"].dark .fi-wi-stats-overview-stat,
html[data-style="corporate"].dark .fi-ta-ctn {
    border-color: rgb(255 255 255 / 0.08);
}
html[data-style="corporate"] .fi-wi-stats-overview-stat-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* ---------- 2. Glass ---------- */
html[data-style="glass"] body {
    background:
        radial-gradient(1200px 600px at 100% 0%, color-mix(in oklab, var(--primary-400) 28%, transparent), transparent 60%),
        radial-gradient(900px 500px at 0% 100%, color-mix(in oklab, var(--primary-600) 18%, transparent), transparent 60%),
        var(--gray-50);
    background-attachment: fixed;
}
html[data-style="glass"].dark body {
    background:
        radial-gradient(1200px 600px at 100% 0%, color-mix(in oklab, var(--primary-500) 22%, transparent), transparent 60%),
        radial-gradient(900px 500px at 0% 100%, color-mix(in oklab, var(--primary-700) 20%, transparent), transparent 60%),
        var(--gray-950);
}
html[data-style="glass"] .fi-section:not(.fi-section-not-contained),
html[data-style="glass"] .fi-wi-stats-overview-stat,
html[data-style="glass"] .fi-ta-ctn,
html[data-style="glass"] .fi-topbar > nav,
html[data-style="glass"] .fi-sidebar {
    background: rgb(255 255 255 / 0.55) !important;
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgb(255 255 255 / 0.6);
    box-shadow: 0 8px 32px rgb(15 23 42 / 0.08);
}
html[data-style="glass"].dark .fi-section:not(.fi-section-not-contained),
html[data-style="glass"].dark .fi-wi-stats-overview-stat,
html[data-style="glass"].dark .fi-ta-ctn,
html[data-style="glass"].dark .fi-topbar > nav,
html[data-style="glass"].dark .fi-sidebar {
    background: rgb(15 23 42 / 0.5) !important;
    border-color: rgb(255 255 255 / 0.08);
}

/* ---------- 3. Dark premium ---------- */
html[data-style="dark_premium"] { color-scheme: dark; }
html[data-style="dark_premium"] body { background: #07090d; }
html[data-style="dark_premium"] .fi-section:not(.fi-section-not-contained),
html[data-style="dark_premium"] .fi-wi-stats-overview-stat,
html[data-style="dark_premium"] .fi-ta-ctn {
    background: linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.015));
    border: 1px solid rgb(255 255 255 / 0.07);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.4), 0 20px 40px -24px color-mix(in oklab, var(--primary-500) 45%, transparent);
}
html[data-style="dark_premium"] .fi-wi-stats-overview-stat-value {
    background: linear-gradient(90deg, #fff, var(--primary-300));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
html[data-style="dark_premium"] .fi-sidebar,
html[data-style="dark_premium"] .fi-topbar > nav {
    background: #0b0e14 !important;
    border-color: rgb(255 255 255 / 0.06);
}

/* ---------- Sidebar variants (any style) ---------- */
html[data-sidebar="dark"]:not([data-style="glass"]) .fi-sidebar {
    background: var(--gray-900) !important;
}
html[data-sidebar="brand"]:not([data-style="glass"]) .fi-sidebar {
    background: var(--primary-700) !important;
}
html[data-sidebar="dark"] .fi-sidebar .fi-sidebar-item-label,
html[data-sidebar="dark"] .fi-sidebar .fi-sidebar-group-label,
html[data-sidebar="dark"] .fi-sidebar .fi-sidebar-item-icon,
html[data-sidebar="brand"] .fi-sidebar .fi-sidebar-item-label,
html[data-sidebar="brand"] .fi-sidebar .fi-sidebar-group-label,
html[data-sidebar="brand"] .fi-sidebar .fi-sidebar-item-icon {
    color: rgb(255 255 255 / 0.82) !important;
}
html[data-sidebar="brand"] .fi-sidebar .fi-sidebar-item.fi-active > a,
html[data-sidebar="dark"] .fi-sidebar .fi-sidebar-item.fi-active > a {
    background: rgb(255 255 255 / 0.12) !important;
}
html[data-sidebar="brand"] .fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
html[data-sidebar="dark"] .fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #fff !important;
}

/* ---------- Tenant logo: light/dark variants ---------- */
.platform-logo-dark { display: none; }
html.dark .platform-logo-dark { display: inline-block; }
html.dark .platform-logo-light { display: none; }
