:root {
    --bg: #f3efe8;
    --surface: rgba(255, 253, 249, 0.96);
    --surface-solid: #fffdf9;
    --surface-strong: #ffffff;
    --ink: #1c2430;
    --muted: #667085;
    --line: rgba(28, 36, 48, 0.1);
    --brand: #0f766e;
    --brand-strong: #0b5d57;
    --accent: #d97706;
    --success: #15803d;
    --danger: #b42318;
    --warning: #b54708;
    --info: #155eef;
    --shadow-soft: 0 16px 34px rgba(28, 36, 48, 0.06);
    --shadow-card: 0 8px 18px rgba(28, 36, 48, 0.06);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f7f3ec 0%, var(--bg) 48%, #eee6da 100%);
    font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top center, rgba(15, 118, 110, 0.04), transparent 32%);
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.dashboard-hero-title,
.section-title,
.card-title {
    font-family: "Aptos Display", "Trebuchet MS", "Aptos", "Segoe UI", sans-serif;
    letter-spacing: -0.03em;
}

a {
    color: inherit;
}

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    padding: 12px 18px 0;
    background: transparent;
}

.app-navbar-inner {
    max-width: 1720px;
    margin: 0 auto;
    padding: 10px 14px 10px 18px;
    border: 1px solid rgba(238, 244, 250, 0.08);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(40, 51, 63, 0.98), rgba(24, 33, 43, 0.985));
    backdrop-filter: blur(18px);
    box-shadow:
        0 16px 34px rgba(9, 14, 20, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.app-navbar-compact .app-navbar-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #0a4e4a);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

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

.brand-kicker {
    font-size: 0.54rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.5);
}

.brand-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
}

.app-menu-panel {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}

.app-menu-header {
    display: none;
}

.app-menu-layout {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex: 1 1 auto;
}

.app-nav-cluster {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0 0.15rem;
}

.app-nav-cluster + .app-nav-cluster {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 0.8rem;
    margin-left: 0.2rem;
}

.app-nav-cluster-secondary {
    margin-left: auto;
}

.app-nav-cluster-executive .app-nav-section-label {
    color: rgba(224, 235, 245, 0.72);
}

.app-utility-rail {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.18rem 0.2rem 0.18rem 0.55rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.app-nav-section-label {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
}

.app-navbar-primary,
.app-navbar-secondary {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.22rem;
}

.nav-link {
    color: rgba(234, 240, 246, 0.76) !important;
    border-radius: 12px;
    padding: 0.46rem 0.64rem !important;
    font-weight: 650;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nav-link i {
    font-size: 0.76rem;
    color: rgba(214, 224, 235, 0.62);
}

.nav-link:hover,
.nav-link.active,
.nav-item.show > .nav-link {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    background: linear-gradient(180deg, rgba(18, 29, 38, 0.88), rgba(10, 20, 28, 0.78));
    border-color: rgba(20, 181, 167, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(20, 181, 167, 0.08);
}

.nav-link.active i,
.nav-link:hover i {
    color: rgba(120, 234, 221, 0.88);
}

.nav-link-secondary {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.8) !important;
}

.nav-link-utility {
    min-height: 34px;
    padding: 0.4rem 0.58rem !important;
    justify-content: flex-start;
    border-radius: 10px !important;
}

.nav-link-utility span {
    display: inline;
}

.nav-link-utility i {
    margin: 0 0.45rem 0 0 !important;
}

.dropdown-menu {
    border: 1px solid rgba(28, 36, 48, 0.08);
    border-radius: 18px;
    padding: 0.5rem;
    box-shadow: var(--shadow-card);
}

.dropdown-item {
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    font-weight: 600;
}

.dropdown-item:hover {
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-strong);
}

.app-navbar-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #fff;
    flex-shrink: 0;
    padding-left: 0.8rem;
    margin-left: 0.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.app-menu-toggle {
    display: inline-flex !important;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    transition: background-color 180ms ease, transform 180ms ease;
}

.app-navbar-compact .navbar-toggler {
    display: none !important;
    margin-left: 0;
    border: 0;
}

.app-menu-toggle:hover,
.app-menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.app-menu-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

.app-menu-toggle-icon {
    font-size: 1.45rem;
    line-height: 1;
    color: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.app-menu-toggle[aria-expanded="true"] .app-menu-toggle-icon {
    transform: rotate(90deg);
}

.app-navbar-compact .navbar-collapse {
    display: flex !important;
    align-items: center;
    gap: 0.85rem;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0.6rem;
}

.app-navbar-compact .navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 0.35rem;
    margin-right: 0 !important;
}

.app-navbar-compact .nav-link {
    display: flex;
    align-items: center;
    border-radius: 999px;
}

.app-navbar-compact .app-navbar-meta {
    display: flex;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

@media (max-width: 1720px) and (min-width: 1200px) {
    .app-navbar-inner {
        padding: 12px 16px;
    }

    .app-navbar-compact .app-navbar-inner {
        align-items: flex-start;
    }

    .app-navbar-compact .navbar-collapse {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 0.8rem;
        align-items: stretch;
        margin-left: 0.9rem;
    }

    .app-menu-panel {
        width: 100%;
    }

    .app-menu-layout {
        gap: 0.55rem;
        width: 100%;
        align-items: flex-start;
    }

    .app-nav-cluster {
        display: grid;
        align-content: start;
        gap: 0.34rem;
    }

    .app-nav-cluster + .app-nav-cluster {
        padding-left: 0.65rem;
    }

    .app-nav-section-label {
        display: block;
        margin: 0 0 0.1rem;
        line-height: 1;
    }

    .app-navbar-primary,
    .app-navbar-secondary {
        gap: 0.16rem;
    }

    .app-utility-rail {
        display: grid;
        align-content: start;
        gap: 0.34rem;
        padding: 0.45rem 0.5rem 0.5rem 0.65rem;
    }

    .nav-link {
        padding: 0.42rem 0.56rem !important;
        font-size: 0.72rem;
    }

    .app-navbar-meta {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding-left: 0;
        margin-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 0.78rem;
    }

    .app-meta-chip,
    .app-connection-pill,
    .app-action-btn {
        min-height: 38px;
    }
}

.app-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.56rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.7rem;
}

.app-connection-pill {
    background: rgba(21, 128, 61, 0.14);
    color: #d8fbe2;
    border: 1px solid rgba(111, 218, 146, 0.18);
    padding: 0.38rem 0.56rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-action-btn {
    border-radius: 10px;
    padding: 0.38rem 0.62rem;
    font-weight: 700;
    border-width: 1px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-content {
    max-width: 1720px;
    margin: 0 auto;
    padding: 18px 24px 48px;
}

#main-content {
    min-height: calc(100vh - 110px);
}

.dashboard-page {
    animation: pageRise 280ms ease;
    max-width: 1640px;
    margin: 0 auto;
    position: relative;
}

@keyframes pageRise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-hero,
.dashboard-panel,
.summary-card,
.chart-panel,
.table-panel {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
}

.operating-capital-panel {
    border-radius: var(--radius-xl);
    padding: 26px;
}

.operating-capital-card {
    min-height: 100%;
}

.operating-capital-table th,
.operating-capital-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.operating-capital-table tbody tr td:first-child {
    white-space: normal;
}

.operating-capital-breakdown {
    animation: pageRise 220ms ease;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 30px;
    margin-bottom: 22px;
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 18px;
}

.dashboard-hero-compact,
.dashboard-control-panel {
    margin-bottom: 0;
    min-height: 100%;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -28% auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.2), transparent 62%);
    pointer-events: none;
}

.dashboard-hero-title {
    max-width: 780px;
    margin: 0 0 0.45rem;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 0.96;
}

.dashboard-hero-copy {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
}

.dashboard-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 22px;
}

.hero-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--ink);
}

.hero-status-chip i {
    color: var(--brand);
}

.dashboard-panel {
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.dashboard-hero-compact {
    padding: 22px 24px;
}

.dashboard-hero-compact .dashboard-hero-title {
    max-width: 640px;
    font-size: clamp(1.72rem, 3vw, 2.75rem);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.dashboard-hero-compact .dashboard-hero-copy {
    max-width: 520px;
    font-size: 0.96rem;
}

.dashboard-hero-compact .dashboard-hero-meta {
    gap: 0.55rem;
    margin-top: 16px;
}

.dashboard-hero-compact .hero-status-chip {
    gap: 0.45rem;
    padding: 0.58rem 0.82rem;
    font-size: 0.84rem;
}

.dashboard-control-panel {
    padding: 20px 22px;
}

.dashboard-command-bar {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2.3fr);
    gap: 14px;
    align-items: end;
    padding: 18px 20px;
    border: 1px solid rgba(28, 36, 48, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 253, 250, 0.97), rgba(246, 241, 233, 0.96)),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 30%);
    box-shadow: 0 18px 34px rgba(28, 36, 48, 0.05);
}

.dashboard-command-bar-hero {
    grid-template-columns: minmax(300px, 0.95fr) minmax(420px, 1.4fr);
    align-items: center;
    padding: 20px 22px;
}

.dashboard-command-title {
    font-size: clamp(1.1rem, 1.5vw, 1.55rem);
    line-height: 1;
    margin-bottom: 0;
}

.command-bar-copy {
    margin: 0;
    max-width: 42rem;
    color: var(--muted);
    font-size: 0.94rem;
}

.command-bar-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
}

.command-bar-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
}

.etl-command-bar {
    margin-bottom: 1rem;
}

.etl-auto-refresh-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.55rem 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(28, 36, 48, 0.08);
    background: rgba(255, 255, 255, 0.68);
    min-height: 40px;
}

.etl-auto-refresh-switch .form-check-input {
    margin-top: 0;
}

.etl-auto-refresh-switch .form-check-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #344054;
}

.etl-controls-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-filter-toggle {
    white-space: nowrap;
}

.dashboard-filters-panel {
    overflow: hidden;
    transition: max-height 220ms ease, opacity 180ms ease, margin 180ms ease, padding 180ms ease;
    max-height: 420px;
    opacity: 1;
}

.dashboard-filters-drawer {
    max-width: 980px;
    margin: -4px 0 12px auto;
    padding: 16px 18px;
    border: 1px solid rgba(28, 36, 48, 0.08);
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.99), rgba(248, 243, 235, 0.97));
    box-shadow: 0 18px 36px rgba(28, 36, 48, 0.08);
}

.dashboard-filters-drawer::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 184px;
    width: 16px;
    height: 16px;
    background: rgba(255, 253, 249, 0.98);
    border-top: 1px solid rgba(28, 36, 48, 0.08);
    border-left: 1px solid rgba(28, 36, 48, 0.08);
    transform: rotate(45deg);
}

.dashboard-filters-hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-width: 0;
}

.dashboard-filters-header {
    margin-bottom: 0.15rem;
}

.dashboard-scope-inline {
    display: grid;
    gap: 0.28rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(28, 36, 48, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 246, 239, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    min-width: 0;
}

.scope-summary-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.scope-summary-main {
    font-family: "Aptos Display", "Trebuchet MS", "Aptos", "Segoe UI", sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
}

.scope-summary-meta {
    font-size: 0.72rem;
    color: var(--muted);
}

.dashboard-kpi-header-hero {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 2.2fr);
    padding: 16px 18px 12px;
}

.dashboard-kpi-hero {
    margin-bottom: 1rem;
}

.dashboard-kpi-header-compact {
    margin-bottom: 10px;
}

.dashboard-kpi-hero-compact .kpi-grid {
    gap: 0.72rem;
}

.summary-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.summary-card-primary.summary-card-featured {
    min-height: 190px;
    padding: 1.05rem;
}

.summary-card-primary.summary-card-featured .card-title {
    font-size: clamp(2.05rem, 2.5vw, 3rem);
    line-height: 0.92;
}

.summary-card-primary.summary-card-featured small {
    font-size: 0.82rem;
}

.dashboard-primary-analytics {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
    gap: 1.1rem;
    align-items: stretch;
}

.dashboard-primary-chart,
.dashboard-secondary-stack {
    min-width: 0;
}

.dashboard-secondary-stack {
    display: grid;
    gap: 1rem;
}

.chart-panel-primary .card-body {
    padding: 1.1rem 1.25rem 1.35rem;
}

.chart-panel-primary.chart-panel-expanded .card-body {
    padding-bottom: 1.5rem;
}

.chart-panel-primary.chart-panel-expanded canvas {
    max-height: none;
}

#transaction-trends-expand.active {
    background: rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.28);
    color: var(--teal-700);
}

.chart-panel-secondary .card-body {
    padding: 1rem 1.1rem 1.15rem;
}

.chart-panel-kicker {
    display: inline-block;
    margin-bottom: 0.2rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.command-bar-intro {
    align-self: center;
}

.command-bar-title {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.command-bar-controls .filter-grid {
    margin-top: 0;
    align-items: end;
}

.dashboard-filters-drawer .filter-grid {
    --bs-gutter-x: 0.8rem;
    --bs-gutter-y: 0.65rem;
}

.dashboard-command-bar .form-label {
    margin-bottom: 0.22rem;
    font-size: 0.69rem;
    letter-spacing: 0.08em;
}

.dashboard-command-bar .form-control,
.dashboard-command-bar .form-select,
.dashboard-command-bar .btn {
    min-height: 34px;
}

.dashboard-kpi-header {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2.1fr);
    gap: 10px;
    align-items: center;
    padding: 16px 18px 12px;
    background: linear-gradient(180deg, rgba(255, 253, 250, 0.92), rgba(247, 242, 234, 0.9));
    border: 1px solid rgba(28, 36, 48, 0.08);
}

.dashboard-kpi-header .panel-copy {
    font-size: 0.93rem;
}

.dashboard-trust-strip {
    padding: 0.65rem 0.8rem;
    font-size: 0.72rem;
    line-height: 1.28;
    border-radius: 14px;
    background: rgba(246, 240, 224, 0.92);
    border-color: rgba(181, 71, 8, 0.16);
    color: #5f4b22;
}

.dashboard-trust-strip-compact {
    background: rgba(247, 249, 252, 0.92);
    border-color: rgba(28, 36, 48, 0.08);
    color: #344054;
}

.dashboard-trust-strip-compact.alert-success {
    background: rgba(236, 248, 240, 0.96);
    border-color: rgba(21, 128, 61, 0.14);
    color: #166534;
}

.dashboard-trust-strip-compact.alert-warning {
    background: rgba(255, 249, 235, 0.96);
    border-color: rgba(181, 71, 8, 0.14);
    color: #9a3412;
}

.trust-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.3rem;
}

.trust-chip-row-compact {
    margin-bottom: 0.18rem;
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.46rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(28, 36, 48, 0.08);
    font-size: 0.66rem;
    color: #594823;
}

.dashboard-trust-strip-compact .trust-chip {
    background: rgba(255, 255, 255, 0.88);
    color: inherit;
}

.dashboard-trust-strip-compact .trust-chip strong {
    color: inherit;
    opacity: 0.75;
}

.trust-chip-status {
    font-weight: 700;
}

.trust-chip strong {
    font-weight: 700;
    color: #7b6130;
}

.trust-note {
    font-size: 0.68rem;
    line-height: 1.24;
}

.panel-kicker {
    display: inline-block;
    margin-bottom: 0.22rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.panel-title {
    margin: 0;
    font-size: 0.92rem;
}

.panel-copy {
    margin: 0.45rem 0 0;
    color: var(--muted);
}

.filter-grid {
    margin-top: 0.4rem;
}

.dashboard-control-panel .panel-title {
    font-size: 1.16rem;
}

.dashboard-control-panel .panel-copy {
    font-size: 0.93rem;
}

.dashboard-control-panel .filter-grid {
    margin-top: 1rem;
    row-gap: 0.8rem !important;
}

.dashboard-control-panel .form-label {
    margin-bottom: 0.32rem;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
}

.dashboard-control-panel .form-control,
.dashboard-control-panel .form-select {
    min-height: 38px;
    padding-top: 0.46rem;
    padding-bottom: 0.46rem;
}

.dashboard-control-panel .btn {
    min-height: 38px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.filter-actions {
    display: flex;
    align-items: end;
}

.summary-card {
    height: 100%;
    border-radius: 22px;
    padding: 0.8rem 0.9rem;
    transition: transform 200ms ease, box-shadow 200ms ease;
    border-color: rgba(28, 36, 48, 0.06);
    background: linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(248, 245, 240, 0.97));
    box-shadow: 0 10px 24px rgba(28, 36, 48, 0.05);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(28, 36, 48, 0.08);
}

.summary-card .card-body {
    padding: 0;
}

.summary-card .card-subtitle {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted) !important;
}

.summary-card .card-title {
    margin-top: 0.18rem;
    font-size: 1.2rem;
    line-height: 0.98;
    font-weight: 800;
}

.summary-card small {
    display: inline-block;
    margin-top: 0.28rem;
    line-height: 1.32;
    font-size: 0.72rem;
}

.summary-card-utility {
    background: linear-gradient(180deg, rgba(249, 250, 252, 0.98), rgba(241, 244, 248, 0.96));
    border-color: rgba(220, 227, 236, 0.95);
}

.summary-card-primary {
    min-height: 190px;
    padding: 1.3rem;
    border-color: rgba(28, 36, 48, 0.07);
    box-shadow: 0 18px 36px rgba(28, 36, 48, 0.09);
}

.summary-card-primary .card-title {
    font-size: clamp(2.05rem, 2.5vw, 3rem);
    letter-spacing: -0.05em;
}

.summary-card-primary .card-subtitle {
    font-size: 0.72rem;
    color: rgba(20, 32, 52, 0.72) !important;
}

.summary-card-primary small {
    margin-top: 0.42rem;
    font-size: 0.82rem;
}

.summary-card-volume {
    background:
        radial-gradient(circle at top right, rgba(21, 94, 239, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(250, 252, 255, 0.99), rgba(245, 248, 252, 0.97));
}

.summary-card-sales {
    background:
        radial-gradient(circle at top right, rgba(21, 128, 61, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(250, 253, 250, 0.99), rgba(243, 249, 244, 0.97));
}

.summary-card-purchases {
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(255, 251, 244, 0.99), rgba(251, 246, 236, 0.97));
}

.summary-card-profit {
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(250, 253, 250, 0.99), rgba(241, 247, 242, 0.97));
}

.ingestion-timeline-card {
    min-height: 100%;
}

.kpi-grid,
.kpi-utility-row {
    display: grid;
    gap: 0.72rem;
}

.kpi-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-bottom: 0.7rem !important;
}

.kpi-utility-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-grid-item {
    min-width: 0;
    grid-column: span 2;
}

.kpi-grid-item-featured {
    grid-column: span 3;
}

.ingestion-timeline-panel .card-body {
    padding: 1rem 1.2rem 1.25rem;
}

.ingestion-timeline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ingestion-timeline-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.timeline-metric {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(28, 36, 48, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 238, 0.92));
}

.timeline-marker {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    width: fit-content;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-strong);
    font-size: 0.68rem;
    font-weight: 700;
}

.timeline-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.timeline-value {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.28;
}

.operating-capital-panel {
    padding: 22px;
}

.operating-capital-panel .row.mt-4 {
    margin-top: 1rem !important;
}

.operating-capital-panel .g-4 {
    --bs-gutter-y: 1rem;
    --bs-gutter-x: 1rem;
}

.operating-capital-trust-strip {
    margin-top: 0.9rem !important;
}

.icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@media (max-width: 1199px) {
    .kpi-grid,
    .kpi-utility-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-grid-item,
    .kpi-grid-item-featured {
        grid-column: auto;
    }

    .summary-card-primary.summary-card-featured {
        min-height: 158px;
    }
}

@media (max-width: 767px) {
    .kpi-grid,
    .kpi-utility-row,
    .ingestion-timeline-grid {
        grid-template-columns: 1fr;
    }
}

.bg-primary { background: linear-gradient(135deg, #0f766e, #14b8a6) !important; }
.bg-success { background: linear-gradient(135deg, #15803d, #22c55e) !important; }
.bg-info { background: linear-gradient(135deg, #155eef, #3b82f6) !important; }
.bg-warning { background: linear-gradient(135deg, #b54708, #f59e0b) !important; }
.bg-secondary { background: linear-gradient(135deg, #475467, #667085) !important; }
.bg-danger { background: linear-gradient(135deg, #b42318, #f04438) !important; }

.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.trend-up {
    background: rgba(21, 128, 61, 0.12);
    color: var(--success);
}

.trend-down {
    background: rgba(180, 35, 24, 0.12);
    color: var(--danger);
}

.trend-neutral {
    background: rgba(102, 112, 133, 0.12);
    color: var(--muted);
}

.chart-panel,
.table-panel,
.card {
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.chart-panel {
    border-radius: 24px;
    border: 1px solid rgba(28, 36, 48, 0.07);
    background: linear-gradient(180deg, rgba(255, 253, 250, 0.985), rgba(248, 244, 238, 0.97));
    box-shadow: 0 14px 30px rgba(28, 36, 48, 0.06);
    overflow: hidden;
}

.chart-panel .card-header,
.table-panel .card-header,
.card-header {
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.2rem 0.9rem;
    background: transparent;
    font-weight: 700;
}

.chart-panel .card-header {
    padding: 1.15rem 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(250, 247, 242, 0.58));
}

.chart-panel .card-header h5 {
    font-size: 1.05rem;
    line-height: 1.08;
}

.chart-panel .card-body,
.table-panel .card-body,
.card-body {
    padding: 1.2rem;
}

.chart-panel canvas,
.card canvas {
    max-height: 320px;
}

.form-control,
.form-select {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(28, 36, 48, 0.12);
    background: rgba(255, 255, 255, 0.88);
    padding: 0.62rem 0.85rem;
    color: var(--ink);
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 0.22rem rgba(15, 118, 110, 0.14);
    background: #fff;
}

.form-label {
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #344054;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn {
    border-radius: 14px;
    padding: 0.68rem 1rem;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--brand-strong), var(--brand));
    border-color: transparent;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-light {
    color: var(--ink);
}

.table thead th {
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.table tbody tr:hover {
    background: rgba(15, 118, 110, 0.05);
}

.toast-container {
    z-index: 1080;
}

.toast {
    border: 1px solid rgba(28, 36, 48, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

#login-overlay {
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.26), rgba(28, 36, 48, 0.72)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 36%),
        #13212b;
    backdrop-filter: blur(18px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.login-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: stretch;
}

.login-aside {
    padding: 40px 14px 40px 6px;
    color: #fff;
}

.login-kicker,
.login-form-kicker {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-kicker {
    color: rgba(255, 255, 255, 0.68);
}

.login-aside h1 {
    margin: 16px 0;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 0.94;
}

.login-copy {
    max-width: 540px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.05rem;
}

.login-feature-list {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.login-feature-list div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
}

.login-feature-list span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.12);
}

.login-card {
    width: 100%;
    max-width: 440px;
    justify-self: end;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 251, 245, 0.96);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.24);
}

.login-form-kicker {
    color: var(--brand-strong);
}

.loading,
.spinner-border {
    transition: opacity 180ms ease;
}

.navbar-toggler {
    border: 0;
    box-shadow: none !important;
}

.workspace-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.workspace-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 251, 245, 0.96), rgba(253, 248, 241, 0.9));
    box-shadow: var(--shadow-card);
}

.workspace-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.26), transparent 45%);
}

.workspace-kicker {
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.workspace-title {
    margin: 0;
    font-size: clamp(1.85rem, 3vw, 3rem);
    line-height: 0.98;
}

.workspace-copy {
    max-width: 820px;
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.workspace-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 20px;
}

.workspace-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--line);
    font-weight: 600;
    color: #344054;
}

.stat-tile {
    height: 100%;
    padding: 1.15rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow-card);
    color: #fff;
}

.stat-tile .stat-label {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}

.stat-tile .stat-value {
    margin: 0.35rem 0 0;
    font-family: "Aptos Display", "Trebuchet MS", "Aptos", "Segoe UI", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1;
}

.stat-tile .stat-meta {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    opacity: 0.82;
}

.stat-tile .stat-icon {
    font-size: 1.8rem;
    opacity: 0.72;
}

.surface-section {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.surface-section .surface-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem 0.8rem;
    border-bottom: 1px solid var(--line);
}

.surface-section .surface-body {
    padding: 1.25rem;
}

.surface-title {
    margin: 0;
    font-size: 1.05rem;
}

.surface-copy {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.stack-list {
    display: grid;
    gap: 12px;
}

.stack-item {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
}

.metric-table td {
    padding: 0.7rem 0;
    border-color: rgba(28, 36, 48, 0.08);
}

.soft-callout {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    background: rgba(15, 118, 110, 0.06);
    color: #0f5132;
}

.soft-callout.warning {
    border-color: rgba(181, 71, 8, 0.18);
    background: rgba(245, 158, 11, 0.08);
    color: #8a380a;
}

.soft-callout.info {
    border-color: rgba(21, 94, 239, 0.15);
    background: rgba(21, 94, 239, 0.06);
    color: #1849a9;
}

.gcs-activity-hero {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.88)),
        rgba(255, 255, 255, 0.82);
}

.activity-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.activity-user {
    margin-top: 0.35rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.activity-meta,
.activity-note,
.activity-footer,
.activity-row-meta,
.activity-row-time,
.activity-time {
    color: var(--muted);
    font-size: 0.88rem;
}

.activity-list {
    gap: 10px;
}

.activity-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(28, 36, 48, 0.08);
}

.activity-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.activity-row-title {
    font-weight: 600;
    color: var(--text);
}

.service-checklist-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-check-item {
    background: rgba(255, 255, 255, 0.72);
}

.service-check-label {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: var(--text);
}

.service-check-title {
    display: inline-block;
}

.service-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-pills.settings-nav {
    gap: 0.5rem;
}

.nav-pills.settings-nav .nav-link {
    color: #475467 !important;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(28, 36, 48, 0.08);
    justify-content: flex-start;
}

.nav-pills.settings-nav .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    border-color: transparent;
}

.settings-page .workspace-hero {
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 251, 245, 0.98), rgba(249, 243, 235, 0.92));
}

.settings-hero-meta {
    gap: 0.65rem;
}

.settings-role-summary {
    margin-bottom: 1rem;
}

.settings-role-card {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(28, 36, 48, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 244, 237, 0.9));
}

.settings-role-card-personal {
    border-color: rgba(15, 118, 110, 0.14);
    background: linear-gradient(180deg, rgba(241, 249, 247, 0.96), rgba(247, 252, 251, 0.92));
}

.settings-role-card-admin {
    border-color: rgba(181, 71, 8, 0.16);
    background: linear-gradient(180deg, rgba(255, 248, 238, 0.96), rgba(252, 245, 235, 0.92));
}

.settings-role-card-label {
    margin-bottom: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.settings-role-card-admin .settings-role-card-label {
    color: #9a3412;
}

.settings-role-card-title {
    font-family: "Aptos Display", "Trebuchet MS", "Aptos", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
    color: #1f2937;
}

.settings-role-card-copy {
    margin-top: 0.42rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.theme-choice {
    height: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
}

.theme-choice .card-body {
    padding: 1rem;
}

.theme-choice i {
    color: var(--brand-strong);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ops-stat-grid,
.system-summary-grid {
    display: grid;
    gap: 1rem;
}

.ops-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-metric-list,
.resource-meter-list {
    display: grid;
    gap: 0.85rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-pill.is-healthy {
    background: rgba(21, 128, 61, 0.12);
    color: #166534;
}

.status-pill.is-warning {
    background: rgba(181, 71, 8, 0.12);
    color: #9a3412;
}

.status-pill.is-degraded {
    background: rgba(180, 35, 24, 0.12);
    color: #b42318;
}

.invoice-file-item {
    transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.invoice-file-item.is-current {
    background: rgba(21, 128, 61, 0.04);
    border-color: rgba(21, 128, 61, 0.18);
}

.invoice-file-item.is-legacy {
    opacity: 0.72;
    background: rgba(148, 163, 184, 0.06);
}

.invoice-file-item.is-legacy .fw-bold,
.invoice-file-item.is-legacy code,
.invoice-file-item.is-legacy .text-muted {
    color: #667085 !important;
}

.fx-balance-table th,
.fx-balance-table td {
    vertical-align: middle;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.96);
}

.fx-balance-table th:first-child,
.fx-balance-table td:first-child {
    min-width: 260px;
}

.fx-balance-table thead th:first-child,
.fx-balance-sticky-cell {
    position: sticky;
    left: 0;
    z-index: 2;
}

.fx-balance-table thead th:first-child {
    z-index: 3;
    background: rgba(255, 255, 255, 0.98);
}

.fx-balance-row-stale {
    background: rgba(181, 71, 8, 0.12);
}

.fx-balance-row-stale td {
    background: rgba(255, 248, 235, 0.98);
}

.fx-balance-row-stale td:first-child {
    box-shadow: inset 4px 0 0 rgba(181, 71, 8, 0.65);
}

.fx-balance-available-value {
    color: #15803d !important;
    font-weight: 700;
}

.resource-meter {
    display: grid;
    gap: 0.45rem;
}

.resource-meter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
    color: #344054;
}

.meter-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.meter-bar {
    height: 100%;
    border-radius: inherit;
}

.meter-good {
    background: linear-gradient(135deg, #15803d, #22c55e);
}

.meter-warn {
    background: linear-gradient(135deg, #b54708, #f59e0b);
}

@media (max-width: 1199px) {
    .app-navbar-inner {
        border-radius: 20px;
    }

    .app-navbar-compact .navbar-toggler {
        display: inline-flex !important;
        margin-left: auto;
    }

    .app-navbar-compact .navbar-collapse {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        left: auto !important;
        width: 420px;
        max-width: calc(100vw - 36px);
        display: none !important;
        flex-basis: auto;
        flex-grow: 0;
        align-items: stretch;
        padding: 1rem 1rem 1.1rem;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: linear-gradient(180deg, rgba(34, 44, 55, 0.985), rgba(19, 28, 37, 0.985));
        backdrop-filter: blur(22px);
        box-shadow: 0 24px 60px rgba(10, 16, 24, 0.36);
        margin-left: 0;
    }

    .app-navbar-compact .navbar-collapse.show {
        display: block !important;
    }

    .app-menu-panel,
    .app-menu-layout,
    .app-nav-cluster,
    .app-navbar-primary,
    .app-navbar-secondary {
        display: grid;
        width: 100%;
    }

    .app-menu-panel {
        gap: 1rem;
    }

    .app-menu-header {
        display: flex;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .app-menu-kicker {
        font-size: 0.66rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.52);
    }

    .app-menu-title {
        margin-top: 0.2rem;
        font-size: 1rem;
        font-weight: 700;
        color: #fff;
    }

    .app-nav-cluster {
        gap: 0.45rem;
        padding: 0;
        margin: 0;
        border-left: 0;
    }

    .app-nav-cluster + .app-nav-cluster {
        border-left: 0;
        padding-left: 0;
        margin-left: 0;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .app-nav-cluster-secondary {
        margin-left: 0;
    }

    .app-utility-rail {
        display: grid;
        gap: 0.45rem;
        padding: 0;
        border: 0;
        background: transparent;
        border-radius: 0;
    }

    .app-nav-section-label {
        margin-top: 0.15rem;
        margin-bottom: 0.25rem;
    }

    .app-navbar-compact .navbar-nav {
        display: grid;
        gap: 0.4rem;
    }

    .app-navbar-compact .nav-link {
        border-radius: 12px;
        padding: 0.8rem 0.9rem !important;
        justify-content: flex-start;
    }

    .nav-link-utility {
        width: auto;
        height: auto;
        padding: 0.8rem 0.9rem !important;
        border-radius: 12px !important;
        justify-content: flex-start;
    }

    .nav-link-utility span {
        display: inline;
    }

    .app-navbar-meta {
        margin-top: 14px;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-left: 0;
        margin-left: 0;
        border-left: 0;
    }

    .app-navbar-compact .app-navbar-meta {
        display: grid;
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .app-navbar-compact .app-meta-chip,
    .app-navbar-compact .app-connection-pill,
    .app-navbar-compact .app-action-btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-command-bar,
    .dashboard-kpi-header {
        grid-template-columns: 1fr;
    }

    .dashboard-primary-analytics,
    .command-bar-toolbar {
        grid-template-columns: 1fr;
    }

    .ops-stat-grid,
    .system-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .etl-controls-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-bar-actions {
        justify-content: flex-start;
    }

    .dashboard-filters-drawer {
        max-width: none;
        margin: 0 0 12px;
        padding: 14px 16px;
    }

    .dashboard-filters-drawer::before {
        display: none;
    }
}

@media (max-width: 991px) {
    .app-navbar {
        padding: 12px 12px 0;
    }

    .app-content {
        padding: 16px 12px 36px;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-aside {
        padding: 8px 0 0;
    }

    .login-card {
        max-width: 100%;
        justify-self: stretch;
    }

    .dashboard-hero,
    .dashboard-panel {
        padding: 22px 18px;
    }

    .dashboard-top-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-compact,
    .dashboard-control-panel {
        min-height: auto;
    }

    .dashboard-command-bar,
    .dashboard-kpi-header {
        padding: 18px;
    }

    .dashboard-command-bar-hero {
        padding: 18px;
    }

    .command-bar-controls .filter-grid {
        row-gap: 0.8rem !important;
    }

    .dashboard-filters-drawer {
        padding: 16px 18px;
    }

    .app-navbar-compact .navbar-collapse {
        width: calc(100vw - 24px);
        right: -1px;
    }

    .ops-stat-grid,
    .system-summary-grid {
        grid-template-columns: 1fr;
    }

    .etl-controls-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #login-overlay {
        align-items: flex-start !important;
        justify-content: stretch !important;
        padding: 16px 12px 24px;
    }

    .login-shell {
        width: 100%;
        gap: 16px;
    }

    .login-aside h1 {
        font-size: clamp(1.9rem, 10vw, 2.8rem);
        line-height: 1;
    }

    .login-card {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        gap: 10px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .brand-name {
        font-size: 0.95rem;
    }

    .brand-kicker {
        font-size: 0.54rem;
    }

    .dashboard-hero-title {
        font-size: 2rem;
    }

    .dashboard-scope-inline {
        padding: 0.85rem 0.95rem;
    }

    .summary-card .card-title {
        font-size: 1.45rem;
    }

    .summary-card-primary.summary-card-featured .card-title {
        font-size: 2rem;
    }

    .command-bar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .command-bar-actions .btn {
        width: 100%;
    }

    .app-navbar-meta {
        gap: 0.5rem;
    }

    .app-meta-chip,
    .app-connection-pill {
        width: 100%;
        justify-content: center;
    }

    .app-menu-toggle {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .dashboard-primary-analytics {
        grid-template-columns: 1fr;
    }
}

.reports-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 1.5rem;
    align-items: end;
    padding: 1.25rem 0 0.25rem;
}

.reports-command-bar {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.reports-command-title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1;
}

.reports-command-meta {
    min-width: 0;
}

.reports-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(10, 132, 255, 0.08);
    color: #315a92;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reports-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.85rem);
    line-height: 1.02;
    text-wrap: balance;
}

.reports-subtitle {
    max-width: 56rem;
    color: #5d6676;
    font-size: 1rem;
}

.reports-scope-card {
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(23, 36, 59, 0.08);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(58, 153, 114, 0.12), transparent 42%),
        rgba(255, 255, 255, 0.82);
    box-shadow: 0 20px 44px rgba(18, 39, 67, 0.08);
}

.reports-scope-label,
.reports-filter-section-title,
.reports-action-title,
.reports-config-title {
    color: #2f4059;
    font-weight: 700;
}

.reports-scope-label {
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reports-scope-value {
    font-size: 0.96rem;
    font-weight: 700;
    color: #17243b;
}

.reports-scope-meta,
.reports-filter-section-note,
.reports-action-note,
.reports-config-subtitle,
.reports-inline-helper,
.reports-trust-note,
.reports-trust-support {
    color: #647085;
    font-size: 0.92rem;
}

.reports-trust-banner {
    padding: 1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(67, 112, 86, 0.18);
    background: rgba(242, 249, 244, 0.92);
}

.reports-trust-banner-compact {
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
}

.reports-trust-banner-success {
    border-color: rgba(58, 127, 88, 0.2);
    background: rgba(239, 249, 243, 0.94);
}

.reports-trust-banner-warning {
    border-color: rgba(173, 129, 45, 0.22);
    background: rgba(255, 247, 230, 0.96);
}

.reports-trust-banner-danger {
    border-color: rgba(167, 69, 69, 0.22);
    background: rgba(255, 240, 240, 0.96);
}

.reports-trust-main {
    color: #22324a;
    font-weight: 700;
}

.reports-trust-note {
    margin-top: 0.35rem;
}

.reports-trust-support {
    margin-top: 0.45rem;
}

.reports-config-header {
    padding: 1rem 1.25rem;
}

.reports-config-card .card-body {
    padding-top: 1rem;
}

.reports-config-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.reports-config-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.reports-filter-section {
    margin-bottom: 0.3rem;
}

.reports-filter-section-title {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.reports-inline-helper {
    margin-top: 0.55rem;
}

.reports-group-by-field .reports-inline-helper {
    min-height: 2.7em;
}

.reports-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(23, 36, 59, 0.08);
}

.reports-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.reports-action-buttons .btn {
    min-width: 170px;
}

.reports-page .card {
    border-radius: 20px;
}

.reports-page .card-header {
    padding-top: 0.9rem;
    padding-bottom: 0.8rem;
}

.reports-page .card-header {
    border-bottom-color: rgba(23, 36, 59, 0.08);
}

.reports-page .display-6 {
    font-variant-numeric: tabular-nums;
}

.reports-page .form-label {
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3a475b;
}

.reports-page .form-select:disabled,
.reports-page .form-control:disabled {
    background-color: rgba(111, 122, 140, 0.08);
}

.reports-page .table th,
.reports-page .table td,
.reports-page #report-row-count,
.reports-page .display-6 {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 991px) {
    .reports-command-bar,
    .reports-hero {
        grid-template-columns: 1fr;
    }

    .reports-scope-card {
        max-width: none;
    }

    .reports-config-header-row {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .reports-config-actions {
        width: 100%;
    }

    .reports-config-actions .btn,
    .reports-action-buttons {
        width: 100%;
    }

    .reports-action-buttons .btn {
        flex: 1 1 100%;
        min-width: 0;
    }
}

.executive-profit-hero .reports-command-subtitle {
    color: var(--muted);
    max-width: 56rem;
}

.executive-profit-kpi {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 244, 237, 0.98));
    box-shadow: var(--shadow-card);
}

.executive-profit-kpi-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.executive-profit-kpi-value {
    font-family: "Aptos Display", "Trebuchet MS", "Aptos", "Segoe UI", sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.executive-profit-kpi-value-sm {
    font-size: 1.15rem;
}

.executive-profit-table-wrap {
    max-height: 70vh;
}

.executive-profit-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f4ee;
    white-space: nowrap;
}

.executive-profit-table tfoot th,
.executive-profit-table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #f3ede3;
    white-space: nowrap;
}

.executive-profit-metric-sold {
    color: var(--ink);
    font-weight: 700;
}

.executive-profit-metric-profit {
    font-weight: 600;
}

.executive-profit-metric-raw {
    color: var(--muted);
    font-weight: 500;
}

.executive-profit-note {
    background: linear-gradient(180deg, rgba(247, 242, 234, 0.9), rgba(255, 255, 255, 0.92));
}

.executive-profit-currency-report-table thead th,
.executive-profit-currency-report-table tfoot th,
.executive-profit-currency-report-table tfoot td {
    white-space: nowrap;
}

.executive-profit-currency-report-table tfoot th,
.executive-profit-currency-report-table tfoot td {
    background: #f8f4ee;
    font-weight: 700;
}

.dashboard-wizard-mode {
    display: inline-flex;
    align-items: center;
    margin-top: 0.55rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-wizard-header {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.06), rgba(255, 255, 255, 0.92));
}

.dashboard-wizard-kicker,
.dashboard-wizard-step-label,
.dashboard-wizard-preview-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
}

.dashboard-wizard-step-card,
.dashboard-wizard-preview-card {
    height: 100%;
    border: 1px solid rgba(28, 36, 48, 0.08);
    border-radius: 20px;
    background: #fff;
    padding: 1.15rem 1.2rem;
    box-shadow: var(--shadow-card);
}

.dashboard-wizard-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-wizard-builder {
    display: grid;
    gap: 1.5rem;
}

.dashboard-wizard-builder-section {
    display: grid;
    gap: 0.9rem;
    padding-top: 0.25rem;
}

.dashboard-wizard-builder-section + .dashboard-wizard-builder-section {
    border-top: 1px solid rgba(28, 36, 48, 0.08);
    padding-top: 1.5rem;
}

.dashboard-wizard-builder-heading h4 {
    margin: 0.15rem 0 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.dashboard-wizard-builder-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
}

.dashboard-wizard-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 148px;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(28, 36, 48, 0.08);
    background: #fffdf9;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dashboard-wizard-choice:hover,
.dashboard-wizard-choice.selected {
    border-color: rgba(15, 118, 110, 0.32);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
    transform: translateY(-1px);
}

.dashboard-wizard-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dashboard-wizard-choice-badge {
    align-self: flex-start;
    display: inline-flex;
    margin-bottom: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(14, 122, 117, 0.12);
    color: #0e7a75;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-wizard-choice-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

.dashboard-wizard-choice-copy,
.dashboard-wizard-scope-note,
.dashboard-wizard-preview-copy,
.dashboard-wizard-preview-list dd {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.dashboard-wizard-preview-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0.45rem 0 0.55rem;
}

.dashboard-wizard-preview-list {
    display: grid;
    gap: 0.8rem;
    margin: 1rem 0 0;
}

.dashboard-wizard-preview-list dt {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.18rem;
}

.dashboard-wizard-preview-list dd {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
}

.dashboard-wizard-footer {
    border-top: 1px solid var(--line);
}

@media (max-width: 991px) {
    .dashboard-wizard-card-grid {
        grid-template-columns: 1fr;
    }
}
