:root {
    color-scheme: light;
    --cs-navy-950: #061629;
    --cs-navy-900: #08213d;
    --cs-navy-800: #0d2f55;
    --cs-navy-700: #123c6a;
    --cs-gold-900: #765018;
    --cs-gold-800: #9a6b22;
    --cs-gold-700: #bf8b2e;
    --cs-gold-500: #d6a23b;
    --cs-gold-300: #eac374;
    --cs-gold-100: #f8edcf;
    --cs-gold-50: #fcf7ea;
    --cs-ink: #172033;
    --cs-text: #1d2737;
    --cs-muted: #657184;
    --cs-subtle: #8b96a7;
    --cs-bg: #f4f7fb;
    --cs-surface: #ffffff;
    --cs-surface-soft: #f9fbfd;
    --cs-border: #dfe6ef;
    --cs-border-strong: #c7d2e0;
    --cs-primary: var(--cs-navy-800);
    --cs-primary-hover: var(--cs-navy-900);
    --cs-primary-soft: #eef4fb;
    --cs-success: #14724f;
    --cs-success-soft: #e8f6ef;
    --cs-warning: #9a6b22;
    --cs-warning-soft: #fcf3dc;
    --cs-danger: #b42318;
    --cs-danger-soft: #fdeceb;
    --cs-info: #0f5f8f;
    --cs-info-soft: #e8f3f9;
    --cs-sidebar-bg: linear-gradient(180deg, #061629 0%, #08213d 54%, #071a30 100%);
    --cs-sidebar-text: rgba(255, 255, 255, 0.82);
    --cs-sidebar-width: 13.75rem;
    --cs-sidebar-collapsed-width: 4.65rem;
    --cs-header-height: 3.65rem;
    --cs-radius-xs: 0.35rem;
    --cs-radius-sm: 0.5rem;
    --cs-radius: 0.65rem;
    --cs-radius-lg: 0.9rem;
    --cs-shadow-sm: 0 1px 2px rgba(8, 33, 61, 0.06);
    --cs-shadow: 0 10px 24px rgba(8, 33, 61, 0.08);
    --cs-shadow-lg: 0 18px 42px rgba(8, 33, 61, 0.13);
    --cs-focus: 0 0 0 0.18rem rgba(191, 139, 46, 0.3);
    --cs-transition: 160ms ease;
}

[data-theme="dark"] {
    color-scheme: dark;
    --cs-bg: #07111f;
    --cs-surface: #0d1c31;
    --cs-surface-soft: #10243d;
    --cs-border: #243852;
    --cs-border-strong: #36506d;
    --cs-text: #edf4ff;
    --cs-muted: #aebbd0;
    --cs-subtle: #8190a6;
    --cs-primary-soft: #10243d;
}

html,
body {
    background: var(--cs-bg);
    color: var(--cs-text);
    font-family: "Segoe UI", "Inter", "Aptos", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

body {
    min-width: 320px;
}

.login-shell {
    background:
        radial-gradient(circle at 16% 22%, rgba(214, 162, 59, 0.18), transparent 28rem),
        linear-gradient(135deg, var(--cs-navy-950) 0%, var(--cs-navy-900) 52%, #071a30 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
}

.login-screen {
    display: grid;
    grid-template-columns: minmax(20rem, 40%) minmax(0, 60%);
    min-height: 100vh;
    width: 100%;
}

.login-brand-zone,
.login-panel-zone {
    align-items: center;
    display: flex;
    min-width: 0;
}

.login-brand-zone {
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4.5rem);
    text-align: center;
}

.login-logo-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.25rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    display: flex;
    justify-content: center;
    max-width: 23.75rem;
    padding: clamp(1.1rem, 2.4vw, 1.8rem);
    width: 80%;
}

.login-logo-card img {
    display: block;
    height: auto;
    max-height: 42vh;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.login-brand-copy {
    display: grid;
    gap: 0.45rem;
    margin-top: 1.4rem;
}

.login-brand-copy h1 {
    color: #ffffff;
    font-size: clamp(1.75rem, 2.4vw, 2.45rem);
    font-weight: 850;
    line-height: 1.08;
    margin: 0;
}

.login-brand-copy p {
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(0.98rem, 1.2vw, 1.12rem);
    margin: 0;
}

.login-panel-zone {
    justify-content: center;
    padding: clamp(2rem, 4vw, 5rem);
}

.login-card {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 1.1rem;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.26);
    color: var(--cs-text);
    display: grid;
    gap: 1.15rem;
    max-width: 31.25rem;
    padding: clamp(2rem, 3vw, 2.65rem);
    width: min(100%, 31.25rem);
}

.login-lock {
    align-items: center;
    background: var(--cs-gold-100);
    border: 1px solid rgba(191, 139, 46, 0.24);
    border-radius: 999px;
    color: var(--cs-gold-800);
    display: inline-flex;
    height: 2.6rem;
    justify-content: center;
    position: relative;
    width: 2.6rem;
}

.login-lock::before {
    border: 0.18rem solid currentColor;
    border-bottom-width: 0;
    border-radius: 0.55rem 0.55rem 0 0;
    content: "";
    height: 0.78rem;
    margin-top: -0.35rem;
    position: absolute;
    width: 0.8rem;
}

.login-lock::after {
    background: currentColor;
    border-radius: 0.18rem;
    content: "";
    height: 0.82rem;
    margin-top: 0.55rem;
    width: 1.14rem;
}

.login-heading {
    display: grid;
    gap: 0.22rem;
}

.login-heading h2 {
    color: var(--cs-navy-900);
    font-size: clamp(1.65rem, 2vw, 2rem);
    font-weight: 850;
    margin: 0;
}

.login-heading p,
.login-note {
    color: var(--cs-muted);
    margin: 0;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.login-field {
    color: var(--cs-ink);
    display: grid;
    font-size: 0.88rem;
    font-weight: 780;
    gap: 0.38rem;
}

.login-field .form-control {
    min-height: 2.72rem;
}

.login-note {
    font-size: 0.84rem;
    line-height: 1.35;
    text-align: center;
}

.access-denied-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - var(--cs-header-height) - 4rem);
    padding: clamp(1.5rem, 4vw, 3rem);
}

.access-denied-card {
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-lg);
    box-shadow: var(--cs-shadow-lg);
    color: var(--cs-text);
    display: grid;
    gap: 1rem;
    max-width: 36rem;
    padding: clamp(1.6rem, 3vw, 2.35rem);
    text-align: center;
    width: min(100%, 36rem);
}

.access-denied-icon {
    align-items: center;
    background: var(--cs-gold-100);
    border: 1px solid rgba(191, 139, 46, 0.32);
    border-radius: 999px;
    color: var(--cs-gold-800);
    display: inline-flex;
    height: 3.25rem;
    justify-content: center;
    justify-self: center;
    position: relative;
    width: 3.25rem;
}

.access-denied-icon::before {
    border: 0.18rem solid currentColor;
    border-bottom-width: 0;
    border-radius: 0.55rem 0.55rem 0 0;
    content: "";
    height: 0.86rem;
    margin-top: -0.55rem;
    position: absolute;
    width: 0.95rem;
}

.access-denied-icon::after {
    background: currentColor;
    border-radius: 0.2rem;
    content: "";
    height: 0.95rem;
    margin-top: 0.56rem;
    width: 1.28rem;
}

.access-denied-content {
    display: grid;
    gap: 0.35rem;
}

.access-denied-content h1 {
    color: var(--cs-navy-900);
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    font-weight: 850;
    margin: 0;
}

.access-denied-content p,
.access-denied-note {
    color: var(--cs-muted);
    margin: 0;
}

.access-denied-actions {
    display: flex;
    justify-content: center;
}

.access-denied-note {
    border-top: 1px solid var(--cs-border);
    font-size: 0.86rem;
    padding-top: 0.85rem;
}

@media (min-width: 1101px) {
@supports selector(:has(*)) {
    .app-shell:has(.sidebar-compact-toggle:checked) {
        --cs-sidebar-width: var(--cs-sidebar-collapsed-width);
    }
}
}

::selection {
    background: rgba(191, 139, 46, 0.24);
}

a,
.btn-link {
    color: var(--cs-primary);
}

a:hover,
.btn-link:hover {
    color: var(--cs-primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--cs-ink);
    font-weight: 800;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(1.55rem, 2vw, 2.1rem);
}

h2 {
    font-size: clamp(1.18rem, 1.5vw, 1.42rem);
}

.text-muted {
    color: var(--cs-muted) !important;
}

.page-title {
    align-items: flex-start;
    border-bottom: 1px solid var(--cs-border);
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.7rem;
}

.page-title h1 {
    margin: 0;
}

.page-title .text-muted {
    font-size: 0.92rem;
    margin-top: 0.18rem;
}

.panel,
.metric,
.card,
.modal-content {
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-shadow-sm);
}

.panel,
.metric {
    padding: 0.85rem;
}

.panel {
    transition: border-color var(--cs-transition), box-shadow var(--cs-transition), transform var(--cs-transition);
}

.panel:hover,
.metric:hover {
    border-color: var(--cs-border-strong);
    box-shadow: var(--cs-shadow);
}

.metric {
    min-height: 5.8rem;
    position: relative;
    overflow: hidden;
}

.metric::before {
    background: linear-gradient(180deg, var(--cs-gold-500), var(--cs-gold-700));
    border-radius: 999px;
    content: "";
    height: 2.65rem;
    opacity: 0.16;
    position: absolute;
    right: -0.4rem;
    top: -0.55rem;
    width: 2.65rem;
}

.metric .label,
.panel .label {
    color: var(--cs-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.metric .value,
.panel .value {
    color: var(--cs-navy-900);
    font-weight: 850;
}

.metric .value {
    font-size: clamp(1.32rem, 2vw, 1.75rem);
    line-height: 1.1;
    margin-top: 0.22rem;
}

.card {
    overflow: hidden;
}

.card-header {
    background: var(--cs-surface-soft);
    border-bottom: 1px solid var(--cs-border);
    color: var(--cs-ink);
    font-weight: 800;
}

.table-responsive {
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-shadow-sm);
    overflow: auto;
    max-width: 100%;
}

.table {
    --bs-table-bg: var(--cs-surface);
    --bs-table-color: var(--cs-text);
    --bs-table-border-color: var(--cs-border);
    margin-bottom: 0;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 0.58rem 0.72rem;
}

.table thead th {
    background: var(--cs-surface-soft);
    border-bottom: 1px solid var(--cs-border-strong);
    color: var(--cs-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

.table tbody tr {
    transition: background-color var(--cs-transition);
}

.table tbody tr:hover {
    background: rgba(8, 33, 61, 0.035);
}

.table-sm > :not(caption) > * > * {
    padding: 0.5rem 0.7rem;
}

.btn {
    align-items: center;
    border-radius: var(--cs-radius-sm);
    display: inline-flex;
    font-weight: 750;
    gap: 0.42rem;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.42rem 0.78rem;
    transition:
        background-color var(--cs-transition),
        border-color var(--cs-transition),
        box-shadow var(--cs-transition),
        color var(--cs-transition),
        transform var(--cs-transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.btn-primary {
    --bs-btn-bg: var(--cs-primary);
    --bs-btn-border-color: var(--cs-primary);
    --bs-btn-hover-bg: var(--cs-primary-hover);
    --bs-btn-hover-border-color: var(--cs-primary-hover);
    --bs-btn-active-bg: var(--cs-navy-950);
    --bs-btn-active-border-color: var(--cs-navy-950);
    --bs-btn-disabled-bg: var(--cs-primary);
    --bs-btn-disabled-border-color: var(--cs-primary);
    color: #ffffff;
}

.btn-secondary {
    --bs-btn-bg: #eef2f7;
    --bs-btn-border-color: #d9e2ee;
    --bs-btn-color: var(--cs-ink);
    --bs-btn-hover-bg: #e3eaf4;
    --bs-btn-hover-border-color: #c7d2e0;
    --bs-btn-hover-color: var(--cs-ink);
}

.btn-outline-primary {
    --bs-btn-color: var(--cs-primary);
    --bs-btn-border-color: rgba(8, 33, 61, 0.28);
    --bs-btn-hover-bg: var(--cs-primary);
    --bs-btn-hover-border-color: var(--cs-primary);
}

.btn-outline-secondary {
    --bs-btn-color: var(--cs-muted);
    --bs-btn-border-color: var(--cs-border-strong);
    --bs-btn-hover-bg: var(--cs-surface-soft);
    --bs-btn-hover-border-color: var(--cs-border-strong);
    --bs-btn-hover-color: var(--cs-ink);
}

.form-label {
    color: var(--cs-ink);
    font-size: 0.82rem;
    font-weight: 780;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    background-color: var(--cs-surface);
    border-color: var(--cs-border-strong);
    border-radius: var(--cs-radius-sm);
    color: var(--cs-text);
    min-height: 2.34rem;
    transition: border-color var(--cs-transition), box-shadow var(--cs-transition), background-color var(--cs-transition);
}

.form-control:hover,
.form-select:hover {
    border-color: #aab8ca;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
    border-color: var(--cs-gold-700);
    box-shadow: var(--cs-focus);
    outline: 0;
}

.form-control:disabled,
.form-select:disabled {
    background: #eef2f6;
    color: var(--cs-subtle);
}

.account-selector-control,
.economic-activity-selector {
    width: 100%;
}

.account-selector-field,
.economic-activity-field {
    display: block;
    font-weight: 400;
    line-height: 1.35;
    overflow: hidden;
    padding-right: 2.25rem;
    text-align: left;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.account-selector-field:hover,
.account-selector-field:focus,
.economic-activity-field:hover,
.economic-activity-field:focus {
    color: var(--cs-text);
    text-decoration: none;
}

.account-selector-menu,
.economic-activity-options {
    background: var(--cs-surface);
    border-color: var(--cs-border-strong) !important;
    border-radius: var(--cs-radius-sm) !important;
    box-shadow: var(--cs-shadow-lg) !important;
    min-width: 16rem;
}

.account-selector-option,
.economic-activity-option {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--cs-text);
    display: flex;
    font-size: 0.86rem;
    font-weight: 400;
    gap: 0.55rem;
    justify-content: space-between;
    line-height: 1.25;
    min-height: 1.95rem;
    padding: 0.35rem 0.55rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.account-selector-option:hover:not(:disabled),
.account-selector-option:focus:not(:disabled),
.economic-activity-option:hover:not(:disabled),
.economic-activity-option:focus:not(:disabled) {
    background: var(--cs-surface-soft);
    color: var(--cs-ink);
    outline: 0;
    text-decoration: none;
}

.account-selector-option:disabled,
.economic-activity-option:disabled {
    color: var(--cs-subtle);
    cursor: not-allowed;
    opacity: 0.82;
    text-decoration: none;
}

.account-selector-option-label,
.economic-activity-option-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-selector-option-badge,
.economic-activity-option-badge {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid var(--cs-border);
    border-radius: 999px;
    color: var(--cs-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 750;
    line-height: 1;
    padding: 0.22rem 0.42rem;
}

.economic-activity-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.economic-activity-chip {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid var(--cs-border);
    border-radius: 999px;
    color: var(--cs-text);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 650;
    gap: 0.35rem;
    line-height: 1.15;
    max-width: 100%;
    padding: 0.28rem 0.45rem;
}

.economic-activity-chip-remove {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--cs-muted);
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.economic-activity-chip-remove:hover,
.economic-activity-chip-remove:focus {
    color: var(--cs-danger);
    outline: 0;
}

.input-group-text {
    background: var(--cs-surface-soft);
    border-color: var(--cs-border-strong);
    color: var(--cs-muted);
    font-weight: 750;
}

.alert {
    border-radius: var(--cs-radius);
    border-width: 1px;
    box-shadow: var(--cs-shadow-sm);
}

.alert-success {
    background: var(--cs-success-soft);
    border-color: rgba(20, 114, 79, 0.18);
    color: var(--cs-success);
}

.alert-warning {
    background: var(--cs-warning-soft);
    border-color: rgba(154, 107, 34, 0.22);
    color: var(--cs-warning);
}

.alert-danger {
    background: var(--cs-danger-soft);
    border-color: rgba(180, 35, 24, 0.18);
    color: var(--cs-danger);
}

.alert-info {
    background: var(--cs-info-soft);
    border-color: rgba(15, 95, 143, 0.18);
    color: var(--cs-info);
}

.badge,
.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.35rem 0.55rem;
}

.text-amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.col-account {
    width: 30%;
}

.col-amount {
    width: 15%;
}

.col-actions-tight {
    width: 1%;
}

.status-open,
.badge.bg-success {
    background: var(--cs-success-soft) !important;
    color: var(--cs-success) !important;
}

.status-locked,
.badge.bg-danger {
    background: var(--cs-danger-soft) !important;
    color: var(--cs-danger) !important;
}

.badge.bg-warning {
    background: var(--cs-warning-soft) !important;
    color: var(--cs-warning) !important;
}

.badge.bg-info,
.badge.bg-primary {
    background: var(--cs-primary-soft) !important;
    color: var(--cs-primary) !important;
}

.modal-content {
    border: 1px solid var(--cs-border);
}

.modal-header,
.modal-footer {
    border-color: var(--cs-border);
}

.dropdown-menu {
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-shadow-lg);
    padding: 0.35rem;
}

.dropdown-item {
    border-radius: var(--cs-radius-xs);
    font-weight: 650;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--cs-primary-soft);
    color: var(--cs-primary);
}

.cs-dashboard-hero {
    background:
        linear-gradient(135deg, rgba(8, 33, 61, 0.98), rgba(13, 47, 85, 0.92)),
        var(--cs-navy-900);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--cs-radius-lg);
    box-shadow: var(--cs-shadow-lg);
    color: #ffffff;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0.85rem;
    overflow: hidden;
    padding: clamp(0.85rem, 1.6vw, 1.15rem);
    position: relative;
}

.cs-dashboard-hero::after {
    background: linear-gradient(135deg, transparent, rgba(214, 162, 59, 0.22));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.cs-dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.cs-dashboard-hero h1 {
    color: #ffffff;
    margin: 0;
}

.cs-hero-kicker {
    color: var(--cs-gold-300);
    font-size: 0.76rem;
    font-weight: 850;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.cs-dashboard-hero p {
    color: rgba(255, 255, 255, 0.74);
    margin: 0.25rem 0 0;
    max-width: 58rem;
}

.cs-brand-mini {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border-radius: var(--cs-radius);
    display: flex;
    height: 4.5rem;
    justify-content: center;
    padding: 0.35rem;
    width: 6rem;
}

.cs-brand-mini img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.cs-stat-card {
    align-items: center;
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-shadow-sm);
    display: flex;
    gap: 0.75rem;
    min-height: 5.35rem;
    overflow: hidden;
    padding: 0.78rem 0.86rem;
    position: relative;
    transition: border-color var(--cs-transition), box-shadow var(--cs-transition), transform var(--cs-transition);
}

.cs-stat-card:hover {
    border-color: var(--cs-border-strong);
    box-shadow: var(--cs-shadow);
    transform: translateY(-1px);
}

.cs-stat-card::before {
    background: linear-gradient(180deg, var(--cs-gold-500), var(--cs-gold-700));
    border-radius: 999px;
    content: "";
    height: 2.2rem;
    opacity: 0.14;
    position: absolute;
    right: -0.38rem;
    top: -0.5rem;
    width: 2.2rem;
}

.cs-stat-icon,
.cs-quick-link-icon {
    background-color: currentColor;
    display: inline-block;
    -webkit-mask: var(--nav-icon) no-repeat center / contain;
    mask: var(--nav-icon) no-repeat center / contain;
}

.cs-stat-icon {
    color: var(--cs-gold-700);
    flex: 0 0 auto;
    height: 1.45rem;
    width: 1.45rem;
}

.cs-stat-content {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.cs-stat-label {
    color: var(--cs-muted);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.cs-stat-value {
    color: var(--cs-navy-900);
    font-size: clamp(1.24rem, 1.6vw, 1.62rem);
    font-weight: 850;
    line-height: 1.12;
}

.cs-stat-subtitle,
.cs-stat-trend {
    color: var(--cs-muted);
    font-size: 0.76rem;
    line-height: 1.2;
}

.cs-stat-trend {
    color: var(--cs-gold-800);
    font-weight: 780;
}

.cs-kpi-link {
    color: inherit;
    display: block;
    text-decoration: none;
}

.cs-kpi-link:focus-visible {
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-focus);
    outline: none;
}

.cs-stat-card.kpi-positive::before {
    background: linear-gradient(180deg, var(--cs-success), var(--cs-gold-500));
    opacity: 0.18;
}

.cs-stat-card.kpi-negative::before {
    background: linear-gradient(180deg, var(--cs-danger), var(--cs-gold-500));
    opacity: 0.18;
}

.cs-stat-card.kpi-positive .cs-stat-trend {
    color: var(--cs-success);
}

.cs-stat-card.kpi-negative .cs-stat-trend {
    color: var(--cs-danger);
}

.fs-report-scroll {
    overflow-x: auto;
}

.fs-report-table {
    min-width: 72rem;
}

.fs-report-table th {
    white-space: nowrap;
}

.fs-report-table .fs-sticky-rubro {
    background: var(--cs-surface);
    box-shadow: 1px 0 0 var(--cs-border);
    left: 0;
    min-width: 17rem;
    position: sticky;
    z-index: 1;
}

.fs-report-table thead .fs-sticky-rubro {
    z-index: 2;
}

.fs-report-table .fs-row-header td {
    background: var(--cs-primary-soft);
    color: var(--cs-primary);
    font-weight: 850;
    text-transform: uppercase;
}

.fs-report-table .fs-row-subtotal td,
.fs-report-table .fs-row-total td {
    border-top: 1px solid var(--cs-border-strong);
    font-weight: 850;
}

.fs-report-table .fs-row-margin td {
    color: var(--cs-muted);
    font-size: 0.86rem;
    font-weight: 760;
}

.fs-report-table .fs-row-total td {
    background: var(--cs-surface-soft);
}

.fs-report-table .fs-row-result td {
    color: var(--cs-primary);
}

.fs-report-table .fs-row-account-detail td {
    background: var(--cs-surface-soft);
    color: var(--cs-muted);
    font-size: 0.88rem;
}

.fs-amount-link {
    color: var(--cs-primary);
    font-weight: 780;
    text-decoration: none;
}

.fs-amount-link:hover,
.fs-amount-link:focus-visible {
    color: var(--cs-gold-800);
    text-decoration: underline;
}

.fs-amount-positive {
    color: var(--cs-success);
}

.fs-amount-negative {
    color: var(--cs-danger);
}

.fs-line-operator {
    color: var(--cs-gold-800);
    display: inline-block;
    font-weight: 850;
    min-width: 2.35rem;
}

.fs-expand-toggle,
.fs-expand-spacer {
    display: inline-flex;
    height: 1.5rem;
    justify-content: center;
    margin-right: 0.25rem;
    vertical-align: middle;
    width: 1.5rem;
}

.fs-expand-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--cs-radius-sm);
    color: var(--cs-primary);
    font-weight: 850;
    padding: 0;
    transition: background var(--cs-transition-fast), color var(--cs-transition-fast);
}

.fs-expand-toggle:hover,
.fs-expand-toggle:focus-visible {
    background: var(--cs-primary-soft);
    color: var(--cs-gold-800);
    outline: none;
}

.fs-account-code {
    color: var(--cs-primary);
    display: inline-block;
    font-weight: 850;
    margin-right: 0.35rem;
    min-width: 4.6rem;
}

.cs-quick-link-grid {
    display: grid;
    gap: 0.62rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.cs-quick-link {
    align-items: center;
    background: var(--cs-surface-soft);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-sm);
    color: var(--cs-primary);
    display: grid;
    gap: 0.62rem;
    grid-template-columns: 2.15rem minmax(0, 1fr);
    min-height: 3.2rem;
    padding: 0.58rem 0.7rem;
    text-decoration: none;
    transition:
        background-color var(--cs-transition),
        border-color var(--cs-transition),
        box-shadow var(--cs-transition),
        transform var(--cs-transition);
}

.cs-quick-link:hover,
.cs-quick-link:focus-visible {
    background: var(--cs-primary-soft);
    border-color: rgba(8, 33, 61, 0.18);
    box-shadow: var(--cs-shadow-sm);
    color: var(--cs-primary-hover);
    transform: translateY(-1px);
}

.cs-quick-link-icon {
    align-self: center;
    color: var(--cs-gold-800);
    height: 1.18rem;
    justify-self: center;
    width: 1.18rem;
}

.cs-quick-link-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.cs-quick-link-copy strong {
    color: var(--cs-ink);
    font-size: 0.9rem;
    line-height: 1.15;
}

.cs-quick-link-copy small {
    color: var(--cs-muted);
    font-size: 0.75rem;
    line-height: 1.2;
}

.erp-form-panel {
    padding: 0;
}

.erp-form {
    display: grid;
    gap: 0;
}

.form-section {
    border-bottom: 1px solid var(--cs-border);
    display: grid;
    gap: 0.72rem;
    padding: 0.85rem;
}

.form-section:last-child {
    border-bottom: 0;
}

.form-section-title {
    align-items: center;
    color: var(--cs-muted);
    display: flex;
    font-size: 0.72rem;
    font-weight: 850;
    gap: 0.45rem;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.form-section-title::before {
    background: var(--cs-gold-700);
    border-radius: 999px;
    content: "";
    height: 0.48rem;
    width: 0.48rem;
}

.form-grid {
    display: grid;
    gap: 0.72rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.form-grid > .span-2 { grid-column: span 2; }
.form-grid > .span-3 { grid-column: span 3; }
.form-grid > .span-4 { grid-column: span 4; }
.form-grid > .span-5 { grid-column: span 5; }
.form-grid > .span-6 { grid-column: span 6; }
.form-grid > .span-8 { grid-column: span 8; }
.form-grid > .span-12 { grid-column: span 12; }

.contasuite-reason-field {
    min-height: 4.6rem;
    resize: none;
    width: 100%;
}

.form-actions {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    justify-content: flex-end;
    padding: 0.85rem;
}

.cs-data-toolbar {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.72rem;
}

.cs-data-toolbar h2,
.cs-data-toolbar h3 {
    margin: 0;
}

.cs-data-toolbar .text-muted {
    font-size: 0.82rem;
}

.cs-table-panel {
    padding: 0.85rem;
}

.table-action {
    color: var(--cs-primary);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.table-action:hover,
.table-action:focus-visible {
    color: var(--cs-gold-800);
    text-decoration: underline;
}

.suite-link-list {
    display: grid;
    gap: 0.55rem;
}

.suite-link-list a {
    align-items: center;
    background: var(--cs-surface-soft);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-sm);
    color: var(--cs-primary);
    display: flex;
    font-weight: 780;
    justify-content: space-between;
    min-height: 2.65rem;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
    transition: background-color var(--cs-transition), border-color var(--cs-transition), transform var(--cs-transition);
}

.suite-link-list a::after {
    color: var(--cs-gold-700);
    content: "›";
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.suite-link-list a:hover,
.suite-link-list a:focus-visible {
    background: var(--cs-primary-soft);
    border-color: rgba(8, 33, 61, 0.18);
    transform: translateX(2px);
}

.cs-loading-skeleton {
    animation: cs-skeleton 1.2s ease-in-out infinite;
    background: linear-gradient(90deg, #eef2f7, #f7f9fc, #eef2f7);
    background-size: 220% 100%;
    border-radius: var(--cs-radius-sm);
    min-height: 1rem;
}

.cs-icon-dashboard { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M3 13h8V3H3v10Zm0 8h8v-6H3v6Zm10 0h8V11h-8v10Zm0-18v6h8V3h-8Z'/%3E%3C/svg%3E"); }
.cs-icon-company { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 21V3h11v5h5v13h-6v-4h-4v4H4Zm3-3h2v-2H7v2Zm0-4h2v-2H7v2Zm0-4h2V8H7v2Zm0-4h2V4H7v2Zm4 8h2v-2h-2v2Zm0-4h2V8h-2v2Zm0-4h2V4h-2v2Zm4 12h2v-2h-2v2Zm0-4h2v-2h-2v2Z'/%3E%3C/svg%3E"); }
.cs-icon-calendar { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h3v18H4V4h3V2Zm13 8H4v10h16V10ZM6 6v2h12V6H6Z'/%3E%3C/svg%3E"); }
.cs-icon-journal { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm8 1.5V8h4.5L14 3.5ZM7 12v2h10v-2H7Zm0 4v2h7v-2H7Z'/%3E%3C/svg%3E"); }
.cs-icon-report { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 19h16v2H4v-2Zm2-2h3V9H6v8Zm5 0h3V3h-3v14Zm5 0h3v-6h-3v6Z'/%3E%3C/svg%3E"); }
.cs-icon-treasury { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 3 3 7v2h18V7l-9-4ZM5 10v7H3v2h18v-2h-2v-7h-3v7h-3v-7h-2v7H8v-7H5Z'/%3E%3C/svg%3E"); }
.cs-icon-wallet { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 6h15a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm0 4v8h15v-8H4Zm12 3h2v2h-2v-2Z'/%3E%3C/svg%3E"); }
.cs-icon-transfer { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 7h12l-3-3 1.4-1.4L19.8 8l-5.4 5.4L13 12l3-3H4V7Zm16 10H8l3 3-1.4 1.4L4.2 16l5.4-5.4L11 12l-3 3h12v2Z'/%3E%3C/svg%3E"); }
.cs-icon-document { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6V2Zm8 1.5V8h4.5L14 3.5ZM8 12v2h8v-2H8Zm0 4v2h8v-2H8Z'/%3E%3C/svg%3E"); }
.cs-icon-bank { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 3 3 7v2h18V7l-9-4ZM5 10v7H3v2h18v-2h-2v-7h-3v7h-3v-7h-2v7H8v-7H5Z'/%3E%3C/svg%3E"); }
.cs-icon-payable { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 3h14v18H5V3Zm3 4v2h8V7H8Zm0 4v2h8v-2H8Zm0 4v2h5v-2H8Z'/%3E%3C/svg%3E"); }
.cs-icon-upload { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 20h14v-2H5v2ZM11 4v8H8l4 4 4-4h-3V4h-2Z'/%3E%3C/svg%3E"); }
.cs-icon-settings { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2.1-1.6-2-3.5-2.5 1a7.1 7.1 0 0 0-2.6-1.5L14 2h-4l-.4 2.9C8.7 5.2 7.8 5.7 7 6.4l-2.5-1-2 3.5 2.1 1.6c-.1.5-.1 1-.1 1.5s0 1 .1 1.5l-2.1 1.6 2 3.5 2.5-1c.8.7 1.7 1.2 2.6 1.5L10 22h4l.4-2.9c.9-.3 1.8-.8 2.6-1.5l2.5 1 2-3.5-2.1-1.6ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E"); }

@media (min-width: 1101px) {
@supports selector(:has(*)) {
    .app-shell:has(.sidebar-compact-toggle:checked) .brand-panel {
        grid-template-columns: 1fr;
        padding-inline: 0.5rem;
    }

    .app-shell:has(.sidebar-compact-toggle:checked) .brand-lockup {
        grid-template-columns: 1fr;
        justify-items: center;
        padding-inline: 0.18rem;
    }

    .app-shell:has(.sidebar-compact-toggle:checked) .brand-copy,
    .app-shell:has(.sidebar-compact-toggle:checked) .nav-group-title,
    .app-shell:has(.sidebar-compact-toggle:checked) .nav-subgroup > summary,
    .app-shell:has(.sidebar-compact-toggle:checked) .nav-text {
        height: 1px;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        position: absolute;
        width: 1px;
    }

    .app-shell:has(.sidebar-compact-toggle:checked) .sidebar-compact-control {
        justify-self: center;
    }

    .app-shell:has(.sidebar-compact-toggle:checked) .nav {
        padding-inline: 0.42rem;
    }

    .app-shell:has(.sidebar-compact-toggle:checked) .nav-group > summary,
    .app-shell:has(.sidebar-compact-toggle:checked) .nav-group-body .nav-link {
        grid-template-columns: 1fr;
        justify-items: center;
        padding-inline: 0.28rem;
    }

    .app-shell:has(.sidebar-compact-toggle:checked) .nav-group > summary::after {
        display: none;
    }

    .app-shell:has(.sidebar-compact-toggle:checked) .nav-subgroup > div {
        padding-left: 0;
    }
}
}

@keyframes cs-skeleton {
    0% { background-position: 220% 0; }
    100% { background-position: -220% 0; }
}

@media (max-height: 760px) and (min-width: 901px) {
    .login-brand-zone,
    .login-panel-zone {
        padding-block: 1.6rem;
    }

    .login-logo-card {
        max-width: 21rem;
        padding: 1rem;
    }

    .login-card {
        gap: 0.9rem;
        padding: 1.7rem;
    }
}

@media (max-width: 900px) {
    .login-shell {
        overflow: auto;
    }

    .login-screen {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .login-brand-zone {
        padding: 1.4rem 1.25rem 0.75rem;
    }

    .login-logo-card {
        max-width: 18rem;
        padding: 0.85rem;
        width: min(80%, 18rem);
    }

    .login-logo-card img {
        max-height: 22vh;
    }

    .login-brand-copy {
        margin-top: 0.9rem;
    }

    .login-panel-zone {
        align-items: flex-start;
        padding: 0.75rem 1.25rem 1.4rem;
    }

    .login-card {
        border-radius: 1rem;
        max-width: 100%;
        padding: 1.45rem;
    }
}

@media (max-width: 720px) {
    html,
    body {
        font-size: 14px;
    }

    .page-title {
        display: grid;
    }

    .panel,
    .metric {
        padding: 0.85rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.58rem 0.65rem;
    }

    .cs-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .cs-brand-mini {
        height: 3.75rem;
        width: 5.25rem;
    }

    .cs-data-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid > .span-2,
    .form-grid > .span-3,
    .form-grid > .span-4,
    .form-grid > .span-5,
    .form-grid > .span-6,
    .form-grid > .span-8,
    .form-grid > .span-12 {
        grid-column: 1;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}
