/* ==========================================================
   ALPHEA SUITE — MODE SOMBRE PREMIUM
========================================================== */

html[data-alphea-theme="dark"] {
    color-scheme: dark;

    --alphea-bg: #09111f;
    --alphea-panel: #111c2e;
    --alphea-dark: #f4f7fb;
    --alphea-muted: #91a1b8;
    --alphea-border: #26344a;
    --alphea-primary: #60a5fa;
    --alphea-primary-soft: rgba(59, 130, 246, 0.15);
    --alphea-success: #4ade80;
    --alphea-warning: #fbbf24;
    --alphea-danger: #fb7185;
    --alphea-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

html[data-alphea-theme="dark"] body.alphea-v2 {
    background:
        radial-gradient(
            circle at 45% -10%,
            rgba(37, 99, 235, 0.10),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #0b1424 0%,
            #08111f 100%
        ) !important;

    color: #edf3fb !important;
}

html[data-alphea-theme="dark"] body.alphea-v2 .alphea-main,
html[data-alphea-theme="dark"] body.alphea-v2 .alphea-content {
    background: transparent !important;
}

html[data-alphea-theme="dark"] body.alphea-v2 .alphea-topbar {
    border-bottom-color: #26344a !important;

    background:
        rgba(13, 23, 39, 0.92) !important;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.18) !important;

    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-topbar-heading h1 {
    color: #f8fafc !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-topbar-heading span {
    color: #91a1b8 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-global-search-form {
    border-color: #314057 !important;
    background: #121d2e !important;
    box-shadow: none !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-global-search-form:focus-within {
    border-color: #60a5fa !important;
    background: #152237 !important;

    box-shadow:
        0 0 0 3px rgba(96, 165, 250, 0.15),
        0 12px 35px rgba(0, 0, 0, 0.22) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
input.alphea-search {
    border-color: #314057 !important;
    background: #121d2e !important;
    color: #f1f5f9 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
input.alphea-search:hover {
    border-color: #41536f !important;
    background: #152237 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
input.alphea-search:focus {
    border-color: #60a5fa !important;
    background: #152237 !important;

    box-shadow:
        0 0 0 3px rgba(96, 165, 250, 0.14),
        0 10px 28px rgba(0, 0, 0, 0.24) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
input.alphea-search::placeholder {
    color: #8090a8 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-global-search-icon {
    color: #a9b7c9 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
button.alphea-search-shortcut {
    border-color: #3a4a62 !important;
    background: #1b293d !important;
    color: #b5c1d1 !important;
    box-shadow: none !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-panel {
    border-color: #2e3d54 !important;
    background: #101a2b !important;
    color: #edf3fb !important;

    box-shadow:
        0 35px 90px rgba(0, 0, 0, 0.48),
        0 10px 25px rgba(0, 0, 0, 0.26) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-panel-header {
    border-bottom-color: #26344a !important;

    background:
        linear-gradient(
            180deg,
            #142034 0%,
            #101a2b 100%
        ) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-panel-header strong,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-no-result strong {
    color: #f5f8fc !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-panel-header span,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-no-result span {
    color: #91a1b8 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-panel kbd {
    border-color: #3b4a61 !important;
    background: #19263a !important;
    color: #b6c2d2 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-panel-section,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-no-result {
    border-color: #26344a !important;
    background: #101a2b !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
a.alphea-search-suggestion {
    color: #eef4fb !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
a.alphea-search-suggestion:hover,
html[data-alphea-theme="dark"]
body.alphea-v2
a.alphea-search-suggestion:focus,
html[data-alphea-theme="dark"]
body.alphea-v2
a.alphea-search-suggestion.is-active {
    border-color: #35527b !important;
    background: rgba(59, 130, 246, 0.14) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-suggestion-icon {
    border-color: #314a6c !important;
    background: #19283d !important;
    color: #78b5ff !important;
    box-shadow: none !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-suggestion strong {
    color: #f1f5f9 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-suggestion small,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-suggestion em {
    color: #91a1b8 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-search-panel-footer {
    border-top-color: #26344a !important;
    background: #0d1727 !important;
    color: #8696ad !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-icon-button,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-user-button {
    border-color: #2e3d54 !important;
    background: #142034 !important;
    color: #f1f5f9 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-icon-button:hover,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-user-button:hover {
    border-color: #40536f !important;
    background: #19283d !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-user-button small {
    color: #91a1b8 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-card,
html[data-alphea-theme="dark"]
body.alphea-v2
.card,
html[data-alphea-theme="dark"]
body.alphea-v2
.hero,
html[data-alphea-theme="dark"]
body.alphea-v2
.tile,
html[data-alphea-theme="dark"]
body.alphea-v2
.kpi,
html[data-alphea-theme="dark"]
body.alphea-v2
.info-card,
html[data-alphea-theme="dark"]
body.alphea-v2
section.card {
    border-color: #26344a !important;
    background: #111c2e !important;
    color: #edf3fb !important;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.20) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
h1,
html[data-alphea-theme="dark"]
body.alphea-v2
h2,
html[data-alphea-theme="dark"]
body.alphea-v2
h3,
html[data-alphea-theme="dark"]
body.alphea-v2
h4,
html[data-alphea-theme="dark"]
body.alphea-v2
strong {
    color: #f5f8fc;
}

html[data-alphea-theme="dark"]
body.alphea-v2
p,
html[data-alphea-theme="dark"]
body.alphea-v2
.hint,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-subtitle {
    color: #91a1b8 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
input:not(.alphea-search),
html[data-alphea-theme="dark"]
body.alphea-v2
select,
html[data-alphea-theme="dark"]
body.alphea-v2
textarea {
    border-color: #314057 !important;
    background: #142034 !important;
    color: #edf3fb !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
input:not(.alphea-search):focus,
html[data-alphea-theme="dark"]
body.alphea-v2
select:focus,
html[data-alphea-theme="dark"]
body.alphea-v2
textarea:focus {
    border-color: #60a5fa !important;
    outline: none !important;

    box-shadow:
        0 0 0 3px rgba(96, 165, 250, 0.13) !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
table,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-table,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-table-wrap {
    border-color: #26344a !important;
    background: #111c2e !important;
    color: #edf3fb !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
table th,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-table th {
    border-color: #26344a !important;
    background: #142034 !important;
    color: #91a1b8 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
table td,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-table td {
    border-color: #26344a !important;
    color: #dbe5f1 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
table tr:hover td,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-table tr:hover td {
    background: #162338 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-btn-secondary,
html[data-alphea-theme="dark"]
body.alphea-v2
.btn:not(.btn-primary):not(.primary) {
    border-color: #314057 !important;
    background: #142034 !important;
    color: #edf3fb !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-attention-item,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-empty-state,
html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-summary-item {
    border-color: #2a394f !important;
    background: #142034 !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-theme-toggle {
    transition:
        border-color 150ms ease,
        background 150ms ease,
        transform 150ms ease !important;
}

html[data-alphea-theme="dark"]
body.alphea-v2
.alphea-theme-toggle:hover {
    transform: translateY(-1px) rotate(8deg) !important;
}

.alphea-theme-icon {
    display: inline-grid;
    place-items: center;
    font-size: 15px;
    line-height: 1;
}
