        body {
            background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
            color: #0f172a;
            font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        }

        .sidebar-link {
            display: block;
            padding: 10px 12px;
            border-radius: 12px;
            color: #475569;
            transition: 0.15s ease;
            cursor: pointer;
        }

        .sidebar-link:hover {
            background: #eef2f7;
            color: #0f172a;
        }

        .sidebar-link.active {
            background: #e2e8f0;
            color: #0f172a;
            font-weight: 600;
        }

        .panel {
            background: rgba(255,255,255,0.88);
            border: 1px solid rgba(226,232,240,0.9);
            border-radius: 18px;
            box-shadow:
                0 1px 2px rgba(15, 23, 42, 0.03),
                0 12px 32px rgba(15, 23, 42, 0.05);
            backdrop-filter: blur(10px);
        }

        .muted-note { color: #64748b; }

        .table-scroll {
            width: 100%;
            max-width: 100%;
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
        }

        .tree-account { color: #0f172a; font-weight: 600; }
        .tree-name { color: #475569; font-weight: 500; }

        .yoy-pos { color: #15803d; font-weight: 700; }
        .yoy-neg { color: #b91c1c; font-weight: 700; }
        .yoy-zero { color: #64748b; font-weight: 700; }

        .topbar-button {
            border: 1px solid #dbe3ee;
            background: rgba(255,255,255,0.85);
            color: #0f172a;
            border-radius: 12px;
            padding: 10px 14px;
            font-size: 14px;
            font-weight: 600;
            transition: 0.15s ease;
        }

        .topbar-button:hover {
            background: #ffffff;
            border-color: #cbd5e1;
        }

        .multiselect-wrap {
            position: relative;
            min-width: 340px;
        }

        .multiselect-btn {
            width: 100%;
            text-align: left;
            border: 1px solid #dbe3ee;
            background: rgba(255,255,255,0.9);
            color: #0f172a;
            border-radius: 12px;
            padding: 10px 14px;
            font-size: 14px;
            font-weight: 500;
        }

        .multiselect-panel {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            max-height: 320px;
            overflow: auto;
            background: #fff;
            border: 1px solid #dbe3ee;
            border-radius: 14px;
            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
            z-index: 20;
            display: none;
        }

        .multiselect-panel.open { display: block; }

        .multiselect-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-bottom: 1px solid #f1f5f9;
        }

        .multiselect-item:last-child { border-bottom: none; }

        .hidden-view { display: none; }






        .zlecenia-col-header {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            gap: 2px;
            line-height: 1.1;
            white-space: normal;
            text-align: left;
            overflow: visible;
        }

        .zlecenia-col-header-main {
            font-weight: 800;
            font-size: 13px;
            color: #0f172a;
        }

        .zlecenia-col-header-sub {
            font-size: 11px;
            color: #64748b;
        }

        .doc-card {
            border: 1px solid #e2e8f0;
            border-radius: 18px;
            background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
            padding: 20px;
        }

        .doc-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
        }

        .doc-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            font-weight: 700;
        }

        .doc-value {
            margin-top: 6px;
            font-size: 28px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.1;
        }

        .doc-subtle {
            color: #475569;
            font-size: 14px;
        }

        .doc-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 14px;
            font-size: 14px;
        }

        .doc-table th,
        .doc-table td {
            border-top: 1px solid #e2e8f0;
            padding: 10px 12px;
            text-align: left;
            vertical-align: top;
        }

        .doc-table th {
            color: #334155;
            font-weight: 700;
            background: #f8fafc;
        }

        .doc-pill {
            display: inline-flex;
            align-items: center;
            border-radius: 999px;
            padding: 4px 10px;
            font-size: 12px;
            font-weight: 700;
            background: #e2e8f0;
            color: #334155;
        }

        .home-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 18px;
        }

        .home-tile {
            border: 1px solid #dbe3ee;
            border-radius: 20px;
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
            padding: 22px;
            text-align: left;
            transition: 0.18s ease;
            cursor: pointer;
        }

        .home-tile:hover {
            border-color: #cbd5e1;
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
            transform: translateY(-1px);
        }

        .home-tile-title {
            font-size: 22px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.1;
        }

        .home-tile-body {
            margin-top: 10px;
            color: #64748b;
            font-size: 14px;
            line-height: 1.45;
        }

/* Hydron app shell: aligned with the BL fin navigation model. */
:root {
    --bg: #f8f9fd;
    --bg-accent: #eef3ff;
    --panel: #ffffff;
    --panel-soft: #f8f9fc;
    --line: #e8ecf4;
    --line-strong: #d9dfeb;
    --text: #101318;
    --muted: #6b7280;
    --muted-strong: #465365;
    --accent: #1f5f8f;
    --accent-soft: #eaf4f7;
    --accent-strong: #13445f;
    --shadow-sm: 0 8px 22px rgba(16, 19, 24, 0.045);
    --shadow-md: 0 18px 42px rgba(16, 19, 24, 0.06);
    --sidebar-width: 204px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(203, 231, 238, 0.62), transparent 31%),
        linear-gradient(180deg, #fbfcfd 0%, var(--bg) 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea { font: inherit; }

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    column-gap: 6px;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 8px 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    align-items: center;
}

.brand-block {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 4px 2px 10px;
    width: 100%;
}

.brand-logo {
    width: 150px;
    height: auto;
    display: block;
}

.nav {
    display: grid;
    gap: 8px;
    align-content: start;
    justify-items: center;
    width: 100%;
}

.nav-item {
    display: grid;
    justify-items: center;
    gap: 4px;
    width: 162px;
    padding: 8px 7px 10px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--text);
    text-align: center;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.78);
    transform: translateY(-1px);
}

.nav-item.active {
    background: linear-gradient(180deg, #f6fbfc 0%, var(--accent-soft) 100%);
    box-shadow: 0 10px 24px rgba(31, 95, 143, 0.08);
    color: var(--accent-strong);
}

.nav-icon {
    width: 46px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-strong);
}

.nav-item.active .nav-icon { color: var(--accent-strong); }

.nav-icon svg,
.logout-icon svg {
    width: 30px;
    height: 30px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.nav-caption {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 8px;
    justify-items: center;
    width: 100%;
}

.sidebar-build {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.ghost-button:hover {
    background: #fff;
    color: var(--accent-strong);
    transform: translateY(-1px);
}

.logout-icon svg {
    width: 17px;
    height: 17px;
}

.content { min-width: 0; width: 100%; }

.page {
    width: 100%;
    max-width: none;
    padding: 22px 32px 48px 10px;
}

.panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.topbar-button,
.multiselect-btn {
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 800;
    transition: 0.15s ease;
}

.topbar-button:hover,
.multiselect-btn:hover {
    background: #ffffff;
    border-color: #c4ccd9;
}

h1 {
    margin: 0;
    font-size: clamp(40px, 4.8vw, 64px) !important;
    line-height: 1.03 !important;
    letter-spacing: -0.064em !important;
    font-weight: 800 !important;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 430px);
    display: grid;
    gap: 22px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
}

.login-logo { width: 168px; height: auto; }

.login-copy h1 {
    font-size: 36px !important;
    letter-spacing: -0.055em !important;
}

.login-copy p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-form label {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
}

.login-form button {
    margin-top: 4px;
    border: 0;
    border-radius: 14px;
    padding: 13px 16px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.login-error {
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 10px;
    }

    .sidebar-inner {
        align-items: stretch;
    }

    .brand-block,
    .sidebar-footer {
        justify-items: start;
        justify-content: flex-start;
    }

    .nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        justify-items: start;
        padding-bottom: 4px;
    }

    .nav-item {
        flex: 0 0 138px;
        width: 138px;
    }

    .page {
        padding: 16px 12px 36px;
    }
}

/* Local utility layer replacing the Tailwind CDN classes used by this app. */
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.w-full { width: 100%; }
.shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.p-5 { padding: 20px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 22px; }
.mb-8 { margin-bottom: 32px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.space-y-6 > * + * { margin-top: 24px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.border { border: 1px solid var(--line); }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.bg-white { background: #fff; }
.bg-slate-50 { background: #f8fafc; }
.text-sm { font-size: 14px; line-height: 1.45; }
.text-xl { font-size: 20px; line-height: 1.25; }
.text-3xl { font-size: 30px; line-height: 1.15; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.035em; }
.text-slate-700 { color: #334155; }
.md\:grid-cols-\[220px_180px_1fr\] { grid-template-columns: 220px 180px 1fr; }
.md\:items-end { align-items: end; }

body {
    font-family: "Manrope", "Aptos", "Segoe UI", sans-serif;
}

.brand-wordmark {
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.075em;
    line-height: 1;
}

.brand-logo {
    width: 154px;
    max-height: 58px;
    object-fit: contain;
}

h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 3.15vw, 42px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.052em !important;
    font-weight: 800 !important;
}

h2 {
    margin: 0 0 4px;
    line-height: 1.2;
}

.muted-note {
    color: var(--muted);
    line-height: 1.48;
}

.mb-5.flex.items-start.justify-between.gap-4 {
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.mb-5.flex.items-start.justify-between.gap-4 > div:first-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.nav-icon svg,
.logout-icon svg {
    fill: none;
    stroke: currentColor;
}

@media (max-width: 900px) {
    .md\:grid-cols-\[220px_180px_1fr\] {
        grid-template-columns: 1fr;
    }

    .md\:items-end {
        align-items: stretch;
    }

    .mb-5.flex.items-start.justify-between.gap-4 {
        flex-direction: column;
    }
}

.hyd-table-host {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.hyd-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    background: #fff;
    color: var(--text);
    font-size: 13px;
}

.hyd-table th,
.hyd-table td {
    border-right: 1px solid #eef2f6;
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.hyd-table th:last-child,
.hyd-table td:last-child {
    border-right: 0;
}

.hyd-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fb 100%);
    color: #334155;
    font-weight: 800;
    text-align: left;
}

.hyd-table tbody tr:nth-child(even) {
    background: #fcfdff;
}

.hyd-table tbody tr:hover {
    background: #f8fbff;
}

.hyd-table tfoot td {
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    font-weight: 800;
}

.hyd-table .is-right {
    text-align: right;
}

.hyd-table .hyd-toggle {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: #fff;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.hyd-table .tree-account,
.hyd-table .tree-name {
    font-weight: 800;
}

.hyd-table .tree-name {
    color: var(--text);
}

.hyd-table .yoy-pos { color: #15803d; font-weight: 800; }
.hyd-table .yoy-neg { color: #b91c1c; font-weight: 800; }
.hyd-table .yoy-zero { color: #64748b; font-weight: 800; }


/* Polish pass: closer to BL fin rhythm and lighter table reading. */
.page > [id^="view-"] > .mb-5.flex.items-start.justify-between.gap-4 {
    min-height: 70px;
    align-items: center;
    margin-bottom: 18px;
}

.portal-login-shell {
    width: min(100%, 360px);
    display: grid;
    justify-items: center;
    gap: 20px;
}

.portal-login-shell .login-logo { width: min(100%, 240px); }
.portal-login-form { width: 100%; display: grid; gap: 12px; }
.portal-login-form input[type="text"],
.portal-login-form input[type="password"] {
    width: 100%; height: 50px; padding: 0 16px; border: 1px solid #d9dfeb;
    border-radius: 12px; background: #fff; color: #0f172a; font: inherit;
}
.portal-login-form input:focus { outline: 0; border-color: rgba(29, 78, 216, .5); box-shadow: 0 0 0 4px rgba(29, 78, 216, .08); }
.portal-area-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.portal-area-switcher input { position: absolute; opacity: 0; pointer-events: none; }
.portal-area-switcher label {
    display: flex; align-items: center; justify-content: center; min-height: 50px;
    padding: 0 12px; border: 1px solid #d9dfeb; border-radius: 12px; background: #fff;
    color: #0f172a; font-size: 14px; font-weight: 700; cursor: pointer;
}
.portal-area-switcher input:checked + label { border-color: #aebcf0; background: #eef3ff; color: #1d4ed8; }
.portal-area-switcher input:disabled + label { opacity: .48; cursor: not-allowed; }
.portal-login-form button, .module-placeholder button {
    width: 100%; height: 50px; border: 1px solid #1d4ed8; border-radius: 12px;
    background: #1d4ed8; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.login-error { padding: 12px 14px; border-radius: 12px; background: #fff1f2; color: #be123c; font-size: 14px; }
.module-placeholder { width: min(100%, 440px); padding: 36px; text-align: center; border: 1px solid #e2e8f0; border-radius: 20px; background: #fff; }

.page > [id^="view-"] > .mb-5.flex.items-start.justify-between.gap-4 .muted-note {
    display: none;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-heading > div:first-child,
.panel-heading > h2:first-child {
    min-width: 0;
}

.panel-heading h2,
.panel > .mb-4 h2 {
    color: #151922;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.panel-actions > .flex {
    gap: 10px;
}

.panel-actions .topbar-button,
.panel-actions .multiselect-btn,
.topbar-button,
.multiselect-btn {
    font-weight: 600;
}

.hyd-table {
    font-size: 13px;
    font-weight: 500;
}

.hyd-table th {
    font-weight: 700;
}

.hyd-table td {
    font-weight: 500;
    color: #162033;
}

.hyd-table .tree-account,
.hyd-table .tree-name {
    font-weight: 650;
}

.hyd-table tfoot td {
    font-weight: 700;
}

.hyd-table .hyd-toggle {
    font-weight: 700;
}

.hyd-table .yoy-pos,
.hyd-table .yoy-neg,
.hyd-table .yoy-zero {
    font-weight: 700;
}

@media (max-width: 900px) {
    .panel-heading {
        flex-direction: column;
    }

    .panel-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
.panel-title-group {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.panel-title-group .muted-note {
    color: #6b7280;
    font-weight: 500;
}
