﻿:root {
    --spx-header-height: 58px;
    --spx-sidebar-width: 248px;
    --spx-sidebar-collapsed-width: 62px;
    --spx-shell-border: #dfe4ea;
    --spx-shell-bg: #f5f7fa;
    --spx-sidebar-bg: #ffffff;
    /*--spx-sidebar-bg: #f8f9fb;*/
    --spx-text: #27313d;
    --spx-muted: #6d7783;
    --spx-accent: #245f78;
    --spx-accent-soft: #eaf2f6;
    --spx-hover: #f1f5f7;
}

html, body {
    height: 100%;
}

    body.spx-shell-body {
        margin: 0;
        background: var(--spx-shell-bg);
        color: var(--spx-text);
        overflow: hidden;
    }

.spx-shell {
    min-height: 100vh;
}

.spx-shell-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--spx-header-height);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--spx-shell-border);
    box-shadow: 0 1px 4px rgba(24, 39, 58, .05);
}

.spx-brand-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spx-brand-logo {
    width: 36px;
    height: 36px;
    display: block;
    object-fit: contain;
}
.spx-brand {
    height: 100%;
    display: flex;
    align-items: center;
}

.spx-icon-button {
    width: 58px;
    height: 100%;
    border: 0;
    border-right: 1px solid var(--spx-shell-border);
    background: transparent;
    font-size: 1.25rem;
    color: var(--spx-muted);
}

    .spx-icon-button:hover {
        background: var(--spx-hover);
        color: var(--spx-accent);
    }

.spx-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 0 14px;
    color: var(--spx-text);
    text-decoration: none;
}

.spx-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: var(--spx-accent);
}

.spx-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

    .spx-brand-text strong {
        font-size: .98rem;
    }

    .spx-brand-text small {
        margin-top: 3px;
        color: var(--spx-muted);
        font-size: .69rem;
    }

.spx-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 14px;
}

.spx-year-pill,
.spx-user-button {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--spx-shell-border);
    border-radius: 8px;
    background: #fff;
    color: var(--spx-text);
    text-decoration: none;
    padding: 5px 10px;
    font-size: .84rem;
}

    .spx-year-pill:hover,
    .spx-user-button:hover {
        background: var(--spx-hover);
        color: var(--spx-text);
    }

.spx-header-caption {
    color: var(--spx-muted);
}

.spx-user-button {
    border: 0;
}

.spx-sidebar {
    position: fixed;
    top: var(--spx-header-height);
    left: 0;
    bottom: 0;
    z-index: 1030;
    width: var(--spx-sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--spx-sidebar-bg);
    border-right: 1px solid var(--spx-shell-border);
    transition: width .18s ease;
}

.spx-sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 7px 12px;
}

.spx-nav-section {
    margin-bottom: 2px;
}

.spx-module-toggle,
.spx-module-link {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--spx-text);
    text-align: left;
    text-decoration: none;
    padding: 7px 9px;
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: .875rem;
    font-weight: 400;
}

    .spx-module-toggle:hover,
    .spx-module-link:hover {
        background: var(--spx-hover);
        color: var(--spx-accent);
    }

    .spx-module-toggle.active,
    .spx-module-link.active {
        background: var(--spx-accent-soft);
        color: var(--spx-accent);
    }

.spx-module-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spx-module-icon-img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.spx-module-title {
    flex: 1 1 auto;
    white-space: nowrap;
}

.spx-chevron {
    color: #8c96a1;
    transition: transform .15s ease;
}

.spx-module-toggle[aria-expanded="true"] .spx-chevron {
    transform: rotate(90deg);
}

.spx-quick-toggle[aria-expanded="true"] .spx-chevron {
    transform: rotate(180deg);
}

.spx-module-panel {
    display: none;
    padding: 2px 0 5px 33px;
}

    .spx-module-panel.show {
        display: block;
    }

    .spx-module-panel > a,
    .spx-nav-group > a,
    .spx-quick-item {
        display: block;
        border-radius: 6px;
        color: #4d5865;
        text-decoration: none;
        padding: 6px 8px;
        margin: 1px 0;
        font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: .8125rem;
        font-weight: 400;
        line-height: 1.35;
    }

        .spx-module-panel > a:hover,
        .spx-nav-group > a:hover,
        .spx-quick-item:hover {
            background: var(--spx-hover);
            color: var(--spx-accent);
        }

    .spx-module-panel a.spx-active-link {
        background: var(--spx-accent-soft);
        color: var(--spx-accent);
        font-weight: 400;
        box-shadow: none;
    }

.spx-primary-destination {
    font-weight: 400;
}

.spx-nav-group {
    margin: 2px 0;
}

    .spx-nav-group > summary {
        cursor: pointer;
        list-style: none;
        border-radius: 6px;
        padding: 6px 8px;
        color: #596574;
        font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: .8125rem;
        font-weight: 400;
        user-select: none;
    }

        .spx-nav-group > summary::-webkit-details-marker {
            display: none;
        }

        .spx-nav-group > summary::before {
            content: "›";
            display: inline-block;
            width: 14px;
            color: #8c96a1;
            transition: transform .15s ease;
        }

    .spx-nav-group[open] > summary::before {
        transform: rotate(90deg);
    }

    .spx-nav-group > summary:hover {
        background: var(--spx-hover);
    }

    .spx-nav-group > a {
        margin-left: 12px;
    }

.spx-nav-divider {
    height: 1px;
    margin: 8px 8px;
    background: var(--spx-shell-border);
}

.spx-pin-current {
    width: calc(100% - 8px);
    margin: 3px 4px 0;
    border: 1px dashed #c9d2da;
    border-radius: 6px;
    background: transparent;
    color: var(--spx-muted);
    padding: 6px 8px;
    text-align: left;
    font-size: .78rem;
}

    .spx-pin-current:hover {
        border-color: var(--spx-accent);
        color: var(--spx-accent);
        background: var(--spx-accent-soft);
    }

.spx-quick-item {
    position: relative;
    padding-right: 28px;
}

.spx-quick-remove {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9aa3ad;
    font-size: .8rem;
}

.spx-quick-empty {
    padding: 5px 8px 7px;
    color: #98a1aa;
    font-size: .76rem;
}
.spx-sidebar-footer-turti {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.spx-sidebar-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    border-top: 1px solid var(--spx-shell-border);
    padding: 0 13px;
    color: var(--spx-muted);
    font-size: .72rem;
    overflow: hidden;
}

.spx-sidebar-footer-mark {
    font-weight: 800;
    color: var(--spx-accent);
}

.spx-sidebar-footer-text {
    white-space: nowrap;
}

.spx-workspace {
    position: fixed;
    top: var(--spx-header-height);
    right: 0;
    bottom: 0;
    left: var(--spx-sidebar-width);
    overflow: auto;
    transition: left .18s ease;
}

.spx-workspace-inner {
    width: 100%;
    min-height: 100%;
    padding: 18px 20px 28px;
}

/* Collapsed state */
body.spx-sidebar-collapsed .spx-sidebar {
    width: var(--spx-sidebar-collapsed-width);
}

body.spx-sidebar-collapsed .spx-workspace {
    left: var(--spx-sidebar-collapsed-width);
}

body.spx-sidebar-collapsed .spx-module-title,
body.spx-sidebar-collapsed .spx-chevron,
body.spx-sidebar-collapsed .spx-module-panel,
body.spx-sidebar-collapsed .spx-sidebar-footer-text,
body.spx-sidebar-collapsed .spx-nav-label {
    display: none !important;
}

body.spx-sidebar-collapsed .spx-module-toggle,
body.spx-sidebar-collapsed .spx-module-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}


body.spx-sidebar-collapsed .spx-module-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
}

body.spx-sidebar-collapsed .spx-module-icon-img {
    width: 20px;
    height: 20px;
}

body.spx-sidebar-collapsed .spx-sidebar-footer {
    justify-content: center;
    padding: 0;
}

/* Keep existing page layouts free to control their own inner width. */
.spx-workspace .container,
.spx-workspace .container-fluid {
    max-width: none;
}

@media (max-width: 900px) {
    .spx-header-caption,
    .spx-brand-text small {
        display: none;
    }

    .spx-sidebar {
        transform: translateX(-100%);
        width: min(280px, 86vw);
        box-shadow: 8px 0 24px rgba(20, 32, 48, .12);
        transition: transform .18s ease;
    }

    body.spx-mobile-sidebar-open .spx-sidebar {
        transform: translateX(0);
    }

    .spx-workspace,
    body.spx-sidebar-collapsed .spx-workspace {
        left: 0;
    }

    body.spx-sidebar-collapsed .spx-sidebar {
        width: min(280px, 86vw);
    }

    body.spx-sidebar-collapsed .spx-module-title,
    body.spx-sidebar-collapsed .spx-chevron,
    body.spx-sidebar-collapsed .spx-sidebar-footer-text,
    body.spx-sidebar-collapsed .spx-nav-label {
        display: initial !important;
    }

    body.spx-sidebar-collapsed .spx-module-panel.show {
        display: block !important;
    }

    .spx-user-name {
        display: none;
    }
}
