/* ═══════════════════════════════════════════════════════════════════════
   SSR-ERP — Production UI Styles
   Bootstrap 5 overrides & custom components
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --erp-primary: #1a3a5c;
    --erp-primary-light: #2c5282;
    --erp-accent: #e89832;
    --erp-sidebar-bg: #1a3a5c;
    --erp-sidebar-hover: #2c5282;
    --erp-topbar-bg: #ffffff;
    --erp-bg: #f4f6f9;
}

/* ─── Sidebar ──────────────────────────────────────────────────────── */
.sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--erp-sidebar-bg);
    box-shadow: 1px 0 0 rgba(0, 0, 0, .08);
    z-index: 1040;
}

/* Brand header — fixed height, never grows */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
    min-height: 4rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    flex: 1 1 auto;
    color: #fff;
    text-decoration: none;
}
.sidebar-brand-link:hover,
.sidebar-brand-link:focus-visible { color: #fff; }
.sidebar-brand-logo {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: 2.25rem;
    max-width: 2.75rem;
    object-fit: contain;
    border-radius: .4rem;
    background: rgba(255, 255, 255, .92);
    padding: .15rem;
}
.sidebar-brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    color: var(--erp-primary);
    background: #fff;
    border-radius: .5rem;
    font-size: 1.1rem;
}
.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}
.sidebar-brand-text strong {
    overflow: hidden;
    font-size: .92rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-brand-text small {
    overflow: hidden;
    color: rgba(255, 255, 255, .55);
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-close {
    display: grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .1);
    border: 0;
    border-radius: .4rem;
}
.sidebar-close:hover { color: #fff; background: rgba(255, 255, 255, .2); }

/* Scrollable navigation region */
.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: .4rem; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
}
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav .nav { padding: .35rem 0 .5rem; }

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: rgba(255, 255, 255, .75);
    padding: .6rem 1.15rem;
    border-left: 3px solid transparent;
    font-size: .875rem;
    line-height: 1.3;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sidebar .nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar .nav-link:hover,
.sidebar .nav-link:focus-visible {
    color: #fff;
    background: var(--erp-sidebar-hover);
    border-left-color: var(--erp-accent);
    outline: none;
}
.sidebar .nav-link.active {
    color: #fff;
    font-weight: 600;
    background: var(--erp-sidebar-hover);
    border-left-color: var(--erp-accent);
}
.sidebar .nav-link i {
    flex: 0 0 auto;
    width: 1.15rem;
    text-align: center;
    font-size: 1rem;
}
.sidebar .sidebar-heading {
    padding: .85rem 1.15rem .3rem;
    color: rgba(255, 255, 255, .4);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Workspace card pinned to the bottom */
.sidebar-workspace-card {
    flex: 0 0 auto;
    margin: .5rem .75rem .75rem;
    padding: .8rem .85rem;
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .075);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .7rem;
}

/* Mobile sidebar toggle */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1035;
}
.sidebar-overlay.is-visible { display: block; }
.sidebar.show-mobile { transform: translateX(0); }

/* ─── Main content ─────────────────────────────────────────────────── */
.main-content { min-height: 100vh; background: var(--erp-bg); }
.fiscal-year-pill { display:flex; align-items:center; gap:.35rem; padding:.3rem .55rem; color:#405161; background:#f4f7fa; border:1px solid #dbe3e9; border-radius:.5rem; font-size:.72rem; white-space:nowrap; }
.fiscal-year-select { max-width:6rem; color:var(--erp-primary); background:transparent; border:0; font-size:.72rem; font-weight:750; outline:0; }
.global-search { width: min(38vw, 27rem); min-width: 0; }
.global-search-hint {
    position: absolute;
    right: .45rem;
    top: .2rem;
    z-index: 4;
    padding: .15rem .35rem;
    color: #6c757d;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    font-size: .68rem;
}
.global-search-results {
    position: absolute;
    top: calc(100% + .45rem);
    left: 0;
    right: 0;
    z-index: 1100;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(26, 58, 92, .12);
    border-radius: .65rem;
    box-shadow: 0 .75rem 2rem rgba(26, 58, 92, .16);
}
.global-search-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .75rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #f0f2f4;
}
.global-search-item:last-child { border-bottom: 0; }
.global-search-item:hover { background: #f7f9fb; }
.global-search-item-icon {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    color: var(--erp-primary);
    background: rgba(26, 58, 92, .08);
    border-radius: .45rem;
}
.global-search-item small,
.global-search-item strong,
.global-search-item em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search-item small { color: var(--erp-accent); font-size: .67rem; text-transform: uppercase; letter-spacing: .04em; }
.global-search-item strong { font-size: .82rem; }
.global-search-item em { color: #6c757d; font-size: .72rem; font-style: normal; }
.global-search-empty { padding: 1rem; color: #6c757d; text-align: center; font-size: .82rem; }
.topbar {
    background: var(--erp-topbar-bg);
    border-bottom: 1px solid #dee2e6;
    min-height: 54px;
    flex-wrap: nowrap;
}
.topbar-page-title { max-width: 16rem; }
.topbar .mobile-toggle { line-height: 1; }
.topbar .dropdown-toggle::after { margin-left: .35rem; }

/* ─── Cards ────────────────────────────────────────────────────────── */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    border-radius: .5rem;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: .75rem 1.25rem;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card .stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
}

/* ─── Tables ───────────────────────────────────────────────────────── */
.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .02em;
    color: #6c757d;
}
.table-hover tbody tr:hover { background: rgba(26, 58, 92, .04); }
.table-responsive { border-radius: .5rem; }

/* Mobile tables stay tables: use a deliberate horizontal viewport rather than
   converting rows into cards. Desktop rules above remain unchanged. */
@media (max-width: 768px) {
    .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-color: rgba(26, 58, 92, .35) transparent;
        scrollbar-width: thin;
    }
    .table-responsive::-webkit-scrollbar { height: .4rem; }
    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(26, 58, 92, .3);
        border-radius: 999px;
    }
    .table-responsive-mobile {
        width: max-content;
        min-width: 48rem;
        margin-bottom: 0;
        white-space: nowrap;
    }
    .table-responsive-mobile thead { display: table-header-group; }
    .table-responsive-mobile tfoot { display: table-footer-group; }
    .table-responsive-mobile tbody { display: table-row-group; }
    .table-responsive-mobile tr { display: table-row; }
    .table-responsive-mobile th,
    .table-responsive-mobile td {
        display: table-cell;
        min-width: 7rem;
        padding: .7rem .8rem;
        vertical-align: middle;
        white-space: nowrap;
    }
    .table-responsive-mobile th:first-child,
    .table-responsive-mobile td:first-child { min-width: 3.5rem; width: 3.5rem; }
    .table-responsive-mobile th:last-child,
    .table-responsive-mobile td:last-child { min-width: 12rem; }
    .table-responsive-mobile tbody tr:hover { background: rgba(26, 58, 92, .06); }
    .table-responsive-mobile .btn-group { display: inline-flex; flex-wrap: nowrap; }
    .table-responsive-mobile .btn { white-space: nowrap; }
}

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn-erp {
    background: var(--erp-primary);
    border-color: var(--erp-primary);
    color: #fff;
}
.btn-erp:hover {
    background: var(--erp-primary-light);
    border-color: var(--erp-primary-light);
    color: #fff;
}
.btn-outline-erp {
    color: var(--erp-primary);
    border-color: var(--erp-primary);
}
.btn-outline-erp:hover {
    background: var(--erp-primary);
    color: #fff;
}

/* ─── Tabs ─────────────────────────────────────────────────────────── */
.nav-tabs .nav-link { color: #495057; }
.nav-tabs .nav-link.active {
    font-weight: 600;
    border-top: 3px solid var(--erp-accent);
}

/* ─── Auth pages ───────────────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f4f6f9 0%, #e9ecef 100%);
}
.auth-card {
    max-width: 420px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
}

/* ─── Utility colours ──────────────────────────────────────────────── */
.text-erp { color: var(--erp-primary); }
.bg-erp { background: var(--erp-primary); }
.badge-erp { background: var(--erp-accent); color: #fff; }

/* ─── Form tweaks ──────────────────────────────────────────────────── */
.form-shell { overflow: hidden; }
.form-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, var(--erp-primary), var(--erp-primary-light));
    border-radius: .8rem;
    box-shadow: 0 .35rem .8rem rgba(26, 58, 92, .2);
}
.gps-panel {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(232, 152, 50, .32);
    border-left: .25rem solid var(--erp-accent);
    border-radius: .75rem;
    background: linear-gradient(120deg, rgba(232, 152, 50, .08), rgba(255, 255, 255, .8));
}
.form-control:focus {
    border-color: var(--erp-accent);
    box-shadow: 0 0 0 .15rem rgba(232, 152, 50, .25);
}
.form-control.is-invalid { border-color: #dc3545; }

/* Crispy forms: override default spacing */
.asteriskField { color: #dc3545; margin-left: 2px; }
.controls > .form-control { margin-bottom: 0; }
.form-group { margin-bottom: 1rem; }

/* Alert offset checkboxes inline */
.checkbox-multi-col {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.checkbox-multi-col .form-check {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    cursor: pointer;
    transition: all .15s;
}
.checkbox-multi-col .form-check:hover { border-color: var(--erp-accent); }
.checkbox-multi-col .form-check input:checked + label { font-weight: 600; }

/* ─── Pagination ───────────────────────────────────────────────────── */
.pagination { margin-bottom: 0; }
.filter-disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1rem;
    cursor: pointer;
    list-style: none;
}
.filter-disclosure-summary::-webkit-details-marker { display: none; }
.filter-disclosure-icon {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: var(--erp-primary);
    background: rgba(26, 58, 92, .08);
    border-radius: .45rem;
}
.filter-chevron { transition: transform .2s ease; }
.filter-disclosure[open] .filter-chevron { transform: rotate(180deg); }
.filter-disclosure .form-label { margin-bottom: .25rem; font-size: .72rem; font-weight: 600; }
.bg-erp-subtle { background: rgba(26, 58, 92, .1); }
.table-export-toolbar {
    min-height: 2.5rem;
    background: linear-gradient(90deg, rgba(26, 58, 92, .035), transparent);
}
.table-export-toolbar .dt-buttons { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.table-export-toolbar .dt-button { margin: 0 !important; }
.list-toolbar {
    border: 1px solid rgba(26, 58, 92, .08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.list-toolbar .input-group-text { color: #6c757d; }
.list-toolbar .form-control { box-shadow: none; }
.dt-buttons .btn { border-radius: .35rem; margin-right: .25rem; }
.live-operations-card { border-left: .25rem solid var(--erp-primary); }
.live-pulse {
    width: .7rem;
    height: .7rem;
    flex: 0 0 auto;
    background: #adb5bd;
    border-radius: 50%;
}
.live-pulse-active { background: #20c997; box-shadow: 0 0 0 .3rem rgba(32, 201, 151, .15); }
.live-event-list { border-top: 1px solid #eef1f4; max-height: 180px; overflow-y: auto; }
.live-event-item { display: flex; align-items: center; padding: .65rem 1rem; font-size: .85rem; border-bottom: 1px solid #f0f2f4; }
.live-event-item small { display: block; color: #6c757d; margin-top: .15rem; }

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform .25s ease;
        will-change: transform;
    }
    .sidebar.show-mobile { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .topbar .mobile-toggle { display: inline-flex !important; }
    .stat-card { margin-bottom: .5rem; }
    body.sidebar-open { overflow: hidden; }
}

@media (max-width: 768px) {
    .topbar { gap: .4rem !important; padding-left: .6rem !important; padding-right: .6rem !important; }
    .global-search { width: auto; flex: 1 1 auto; }
    .fiscal-year-pill { padding: .25rem .4rem; }
    .fiscal-year-select { max-width: 4.5rem; }
    .topbar .dropdown-toggle { padding: .3rem .45rem; }
}

@media (max-width: 575.98px) {
    .topbar { min-height: 50px; }
    .global-search .input-group-text { padding-left: .5rem; padding-right: .5rem; }
    .fiscal-year-pill { gap: .2rem; }
    .fiscal-year-select { max-width: 3.75rem; font-size: .68rem; }
}

@media (min-width: 992px) {
    .main-content { margin-left: 240px; }
    .mobile-toggle { display: none !important; }
    .sidebar-close { display: none !important; }
}

/* ─── Tom Select overrides ─────────────────────────────────────────── */
.tom-select-wrapper .ts-wrapper { min-width: 100%; }
.tom-select-wrapper .ts-control {
    border-radius: .375rem;
    border-color: #ced4da;
    min-height: 38px;
}
.tom-select-wrapper .ts-control .ts-input { min-height: 28px; }
.ts-dropdown .ts-dropdown-content .ts-option {
    padding: .5rem .75rem;
}.live-operations-card { border-left: .25rem solid var(--erp-primary); }
.live-pulse { width: .7rem; height: .7rem; flex: 0 0 auto; background: #adb5bd; border-radius: 50%; }
.live-pulse-active { background: #20c997; box-shadow: 0 0 0 .3rem rgba(32, 201, 151, .15); }
.live-event-list { border-top: 1px solid #eef1f4; max-height: 180px; overflow-y: auto; }
.live-event-item { display: flex; align-items: center; padding: .65rem 1rem; font-size: .85rem; border-bottom: 1px solid #f0f2f4; }
.live-event-item small { display: block; color: #6c757d; margin-top: .15rem; }
.list-metrics { animation: metric-rise .35s ease-out both; }
.metric-card { border: 1px solid rgba(26,58,92,.08); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.metric-icon { display:grid; width:2.35rem; height:2.35rem; place-items:center; border-radius:.65rem; font-size:1.05rem; }
.metric-value { color:var(--erp-primary); font-size:1.25rem; font-weight:750; line-height:1.1; }
.metric-label { color:#6c757d; font-size:.72rem; letter-spacing:.03em; text-transform:uppercase; margin-top:.2rem; }
@keyframes metric-rise { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.visit-map { min-height: 24rem; width: 100%; }
@media (max-width: 768px) { .visit-map { min-height: 19rem; } }
.rich-editor-shell { border:1px solid #dee2e6; border-radius:.65rem; padding:.75rem; background:#fbfcfe; }
.rich-editor-toolbar { display:flex; gap:.35rem; margin-bottom:.65rem; }
.rich-editor-toolbar button { border:1px solid #ced4da; background:#fff; border-radius:.35rem; padding:.35rem .55rem; color:var(--erp-primary); }
.rich-editor { min-height:10rem; padding:.8rem; background:#fff; border:1px solid #ced4da; border-radius:.45rem; outline:none; }
.rich-editor:focus { border-color:var(--erp-accent); box-shadow:0 0 0 .15rem rgba(232,152,50,.2); }
.document-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:.75rem; }
.document-card { display:flex; align-items:center; gap:.7rem; min-width:0; padding:.8rem; border:1px solid rgba(26,58,92,.1); border-radius:.65rem; background:#fff; }
.document-card-icon { display:grid; width:2.35rem; height:2.35rem; flex:0 0 auto; place-items:center; color:var(--erp-primary); background:rgba(26,58,92,.08); border-radius:.5rem; }
.project-description { padding:.85rem 1rem; border-left:.25rem solid var(--erp-accent); background:rgba(232,152,50,.06); border-radius:.5rem; line-height:1.65; }
.project-description ul,.project-description ol { margin-bottom:.5rem; }
@media(max-width:768px){ .document-grid{grid-template-columns:1fr;} }
/* ─── Login experience ────────────────────────────────────────────── */
.auth-page-shell { min-height: calc(100vh - 2rem); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); overflow: hidden; background: #fff; border: 1px solid rgba(26,58,92,.08); border-radius: 1.15rem; box-shadow: 0 1.5rem 4rem rgba(26,58,92,.12); }
.auth-visual-panel { display:flex; flex-direction:column; justify-content:space-between; min-height: 40rem; padding: clamp(2rem, 5vw, 5rem); color:#fff; background: radial-gradient(circle at 80% 12%, rgba(232,152,50,.3), transparent 25%), linear-gradient(145deg, #112b46 0%, #1a3a5c 55%, #2c5282 100%); }
.auth-brand-lockup { display:flex; align-items:center; gap:1rem; }
.auth-company-logo { display:block; flex:0 0 auto; max-width:96px; max-height:96px; object-fit:contain; border-radius:.85rem; background:rgba(255,255,255,.92); padding:.4rem; }
.auth-company-logo-mobile { margin:0 auto .75rem; }
.auth-company-mark { display:grid; width:3.5rem; height:3.5rem; place-items:center; color:#1a3a5c; background:#fff; border-radius:1rem; font-size:1.5rem; }
.auth-company-name { color:inherit; font-size:1.1rem; font-weight:800; letter-spacing:.01em; }
.auth-company-tagline { color:rgba(255,255,255,.65); font-size:.78rem; margin-top:.2rem; }
.auth-visual-copy { max-width:32rem; }
.auth-visual-copy h1 { margin:.75rem 0 1rem; font-size:clamp(2rem, 4vw, 4rem); line-height:1.03; letter-spacing:-.04em; }
.auth-visual-copy p { max-width:28rem; color:rgba(255,255,255,.72); font-size:1rem; line-height:1.7; }
.auth-visual-footer { color:rgba(255,255,255,.58); font-size:.78rem; }
.auth-form-panel { display:flex; align-items:center; justify-content:center; padding:clamp(1.5rem, 5vw, 4.5rem); background:#fff; }
.auth-form-card { width:min(100%, 27rem); }
.auth-form-title { margin:.45rem 0 .55rem; color:#17212b; font-size:clamp(1.65rem, 3vw, 2.15rem); letter-spacing:-.03em; }
.auth-field .form-label { color:#344454; font-size:.8rem; font-weight:700; }
.auth-field .input-group-text { min-width:2.9rem; justify-content:center; color:#6c757d; background:#f8fafc; border-right:0; }
.auth-field .form-control { border-left:0; }
.auth-submit { display:flex; align-items:center; justify-content:center; gap:.35rem; min-height:3.25rem; box-shadow:0 .65rem 1.2rem rgba(26,58,92,.18); }
.demo-access { padding:1rem; background:#f8fafc; border:1px dashed #cbd5df; border-radius:.75rem; }
.demo-access .badge { color:#405161; background:#e8eef4; font-weight:600; }
@media (max-width: 900px) { .auth-page-shell { grid-template-columns:1fr; } .auth-visual-panel { min-height:auto; padding:2rem; gap:2.5rem; } .auth-visual-copy h1 { font-size:2.35rem; } }
@media (max-width: 576px) { .auth-page-shell { min-height:calc(100vh - 1rem); border:0; border-radius:0; box-shadow:none; } .auth-visual-panel { display:none; } .auth-form-panel { padding:1.25rem; } }
/* ─── Refined login screen ─────────────────────────────────────────── */
.login-screen { position:relative; min-height:100vh; display:flex; align-items:center; justify-content:center; overflow:hidden; margin:-1rem; padding:2rem 1.25rem; background:#f6f8f7; }
.login-screen::before { content:""; position:absolute; inset:0; background:linear-gradient(135deg, rgba(26,58,92,.06), transparent 46%), radial-gradient(circle at 18% 18%, rgba(232,152,50,.13), transparent 24%); pointer-events:none; }
.login-panel { position:relative; z-index:1; width:min(100%, 430px); padding:2.6rem 2.5rem 2.15rem; background:rgba(255,255,255,.94); border:1px solid rgba(26,58,92,.1); border-radius:1.2rem; box-shadow:0 1.5rem 4rem rgba(26,58,92,.13); backdrop-filter:blur(12px); }
.login-brand { display:flex; align-items:center; gap:.8rem; padding-bottom:1.8rem; border-bottom:1px solid #edf0f2; }
.login-logo-wrap { display:grid; width:3.5rem; height:3.5rem; flex:0 0 auto; place-items:center; overflow:hidden; background:#eef3f7; border-radius:.9rem; }
.login-logo { width:100%; height:100%; object-fit:contain; padding:.4rem; }
.login-logo-fallback { color:#fff; background:linear-gradient(145deg,#1a3a5c,#2c5282); display:grid; width:100%; height:100%; place-items:center; font-size:1.45rem; }
.login-brand-copy { min-width:0; }
.login-company-name { overflow:hidden; color:#17212b; font-size:1rem; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.login-company-tagline { overflow:hidden; color:#7a8792; font-size:.73rem; text-overflow:ellipsis; white-space:nowrap; }
.login-heading-block { padding:2rem 0 1.35rem; }
.login-kicker { color:var(--erp-accent); font-size:.7rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.login-heading-block h1 { margin:.45rem 0 .55rem; color:#17212b; font-size:2rem; letter-spacing:-.04em; }
.login-heading-block p { margin:0; color:#71808c; font-size:.9rem; }
.login-error { display:flex; gap:.65rem; align-items:flex-start; margin-bottom:1.25rem; padding:.75rem .85rem; color:#8c2d3b; background:#fff1f2; border:1px solid #f4c6cc; border-radius:.65rem; font-size:.82rem; }
.login-field { margin-bottom:1rem; }
.login-field label { display:block; margin-bottom:.4rem; color:#344454; font-size:.76rem; font-weight:800; }
.login-input-wrap { position:relative; }
.login-input-wrap input { width:100%; min-height:3rem; padding:.75rem 2.8rem .75rem 2.8rem; color:#17212b; background:#fbfcfd; border:1px solid #d9e0e5; border-radius:.6rem; outline:0; transition:border-color .18s, box-shadow .18s, background .18s; }
.login-input-wrap input:focus { background:#fff; border-color:var(--erp-accent); box-shadow:0 0 0 .2rem rgba(232,152,50,.14); }
.login-input-icon { position:absolute; left:1rem; top:50%; z-index:1; color:#8c9aa6; transform:translateY(-50%); }
.login-password-toggle { position:absolute; right:.65rem; top:50%; display:grid; width:2rem; height:2rem; place-items:center; color:#7a8792; background:transparent; border:0; transform:translateY(-50%); }
.login-submit { display:flex; align-items:center; justify-content:center; gap:.5rem; width:100%; min-height:3.1rem; margin-top:.5rem; color:#fff; background:linear-gradient(135deg,#1a3a5c,#2c5282); border:0; border-radius:.65rem; font-weight:800; box-shadow:0 .65rem 1.3rem rgba(26,58,92,.2); transition:transform .18s, box-shadow .18s; }
.login-submit:hover { color:#fff; transform:translateY(-1px); box-shadow:0 .85rem 1.5rem rgba(26,58,92,.27); }
.login-footer { display:flex; justify-content:space-between; gap:1rem; margin-top:1.65rem; padding-top:1rem; color:#89949e; border-top:1px solid #edf0f2; font-size:.72rem; }
.login-footer a { color:var(--erp-primary); font-weight:700; text-decoration:none; }
.login-page-note { position:absolute; bottom:1.15rem; z-index:1; color:#9aa5ae; font-size:.7rem; letter-spacing:.04em; }
.login-orbit { position:absolute; border:1px solid rgba(26,58,92,.07); border-radius:50%; pointer-events:none; }
.login-orbit-one { width:38rem; height:38rem; right:-18rem; top:-15rem; }
.login-orbit-two { width:24rem; height:24rem; left:-13rem; bottom:-11rem; }
@media(max-width:576px) { .login-screen { margin:-1rem; padding:1rem; } .login-panel { padding:2rem 1.35rem 1.5rem; border-radius:1rem; } .login-footer { flex-direction:column; gap:.4rem; } .login-page-note { bottom:.45rem; } }
.sidebar-workspace-label { color:rgba(255,255,255,.5); font-size:.64rem; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.sidebar-workspace-company { margin-top:.45rem; overflow:hidden; color:#fff; font-size:.85rem; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-workspace-meta { color:rgba(255,255,255,.62); font-size:.68rem; white-space:nowrap; }
.sidebar-status-dot { display:inline-block; width:.42rem; height:.42rem; margin-right:.35rem; vertical-align:middle; background:#20c997; border-radius:50%; }
.fiscal-select-page { min-height:calc(100vh - 2rem); display:grid; place-items:center; padding:2rem 1rem; background:radial-gradient(circle at 20% 15%,rgba(232,152,50,.13),transparent 26%),#f4f6f9; }
.fiscal-select-card { width:min(100%,34rem); padding:clamp(2rem,5vw,3.5rem); text-align:center; background:#fff; border:1px solid rgba(26,58,92,.1); border-radius:1.1rem; box-shadow:0 1.5rem 4rem rgba(26,58,92,.12); }
.fiscal-select-mark { display:grid; width:4rem; height:4rem; margin:0 auto 1.2rem; place-items:center; color:#fff; background:linear-gradient(145deg,var(--erp-primary),var(--erp-primary-light)); border-radius:1.2rem; font-size:1.6rem; }
.fiscal-select-card h1 { margin:.5rem 0 .7rem; color:#17212b; font-size:clamp(1.75rem,4vw,2.35rem); letter-spacing:-.04em; }
.fiscal-select-card p { line-height:1.7; }
.sidebar-workspace-card .fiscal-year-label { color:rgba(255,255,255,.75); }
