
/*
============================================================
CDCOS UI-POLISH-01C
ENTERPRISE DENSITY / DE-SLOP LAYER

Intent:
- regulated financial operations interface
- less decorative SaaS styling
- denser information hierarchy
- records and controls before decoration

This stylesheet deliberately scopes itself to authenticated
dashboard workspaces. Login branding remains unchanged.
============================================================
*/


/* ---------------------------------------------------------
   SYSTEM RHYTHM
--------------------------------------------------------- */

.dashboard-page {
    --enterprise-radius-xs: 4px;
    --enterprise-radius-sm: 6px;
    --enterprise-radius-md: 8px;

    --enterprise-border:
        #d8dee4;

    --enterprise-border-strong:
        #c5cdd5;

    --enterprise-surface:
        #ffffff;

    --enterprise-surface-subtle:
        #f7f9fa;

    --enterprise-text-muted:
        #667587;

    --enterprise-text-strong:
        #141a1f;
}


/* ---------------------------------------------------------
   MAIN WORKSPACE
--------------------------------------------------------- */

.dashboard-page
.dashboard-workspace {
    min-width: 0;
}


.dashboard-page
.dashboard-heading {
    margin-bottom: 18px;
}


.dashboard-page
.dashboard-heading h1,
.dashboard-page
.dashboard-heading h2 {
    margin-top: 3px;
    margin-bottom: 7px;

    max-width: 1050px;

    font-size:
        clamp(
            30px,
            2.15vw,
            38px
        );

    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -0.025em;
}


.dashboard-page
.dashboard-heading p {
    max-width: 76ch;
    margin-top: 0;
    margin-bottom: 0;

    color:
        var(
            --enterprise-text-muted
        );

    font-size: 13.5px;
    line-height: 1.45;
}


/*
Decorative eyebrow labels are reduced to quiet
context rather than a major visual layer.
*/
.dashboard-page
.section-label {
    display: inline-block;

    margin: 0 0 2px;
    padding: 0;

    border: 0;
    border-radius: 0;

    color: #8b5a2b;
    background: transparent;

    font-size: 10px;
    font-weight: 760;
    line-height: 1.2;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   SIDEBAR

   Preserve the approved navigation architecture and active
   orange workspace treatment. Only reduce decorative noise.
--------------------------------------------------------- */

.dashboard-page
.dashboard-sidebar {
    border-radius:
        var(
            --enterprise-radius-md
        );

    box-shadow:
        0 8px 22px
        rgba(
            6,
            12,
            16,
            0.09
        );
}


.dashboard-page
.navigation-group
+ .navigation-group {
    margin-top: 0;
}


.dashboard-page
.navigation-link {
    border-radius:
        var(
            --enterprise-radius-sm
        );

    height: 39px;
    min-height: 39px;
    max-height: 39px;
    box-sizing: border-box;
    flex: 0 0 39px;
}


.dashboard-page
.sidebar-logout {
    border-radius:
        var(
            --enterprise-radius-sm
        );
}


/* ---------------------------------------------------------
   KPI / METRIC CARDS
--------------------------------------------------------- */

.dashboard-page
.metric-grid {
    gap: 12px;
}


.dashboard-page
.metric-card {
    min-height: 118px;
    padding: 16px 18px;

    border:
        1px solid
        var(
            --enterprise-border
        );

    border-radius:
        var(
            --enterprise-radius-md
        );

    box-shadow: none;
}


.dashboard-page
.metric-card-highlight {
    box-shadow: none;
}


.dashboard-page
.metric-label {
    font-size: 11px;
    font-weight: 780;

    letter-spacing: 0.055em;
}


.dashboard-page
.metric-value {
    margin-top: 7px;

    font-size:
        clamp(
            29px,
            2.2vw,
            37px
        );

    font-weight: 760;
    line-height: 1;
}


.dashboard-page
.metric-context {
    margin-top: 11px;

    font-size: 11.5px;
    line-height: 1.35;
}


/* ---------------------------------------------------------
   PANELS / CARDS / REGISTERS
--------------------------------------------------------- */

.dashboard-page
.panel,
.dashboard-page
.admin-register,
.dashboard-page
.admin-create-panel {
    border:
        1px solid
        var(
            --enterprise-border
        );

    border-radius:
        var(
            --enterprise-radius-md
        );

    box-shadow: none;
}


.dashboard-page
.admin-create-panel {
    margin-bottom: 14px;
}


.dashboard-page
.admin-create-panel summary {
    padding: 11px 14px;

    font-size: 13px;
    font-weight: 720;
}


/* Common content card treatment */
.dashboard-page
[class$="-card"]:not(.metric-card),
.dashboard-page
[class*=" detail-card"],
.dashboard-page
[class*=" summary-card"] {
    box-shadow: none;
}


/* ---------------------------------------------------------
   TABLES

   Tables become the dominant operational surface.
--------------------------------------------------------- */

.dashboard-page
table {
    font-variant-numeric:
        tabular-nums;
}


.dashboard-page
table thead th {
    padding-top: 10px;
    padding-bottom: 10px;

    border-bottom:
        1px solid
        var(
            --enterprise-border-strong
        );

    color: #4f5e6d;
    background:
        var(
            --enterprise-surface-subtle
        );

    font-size: 10.5px;
    font-weight: 800;

    letter-spacing: 0.055em;
}


.dashboard-page
table tbody td {
    padding-top: 10px;
    padding-bottom: 10px;

    line-height: 1.35;
}


.dashboard-page
table tbody tr {
    transition:
        background-color
        100ms ease;
}


.dashboard-page
table tbody tr:hover {
    background: #fafbfc;
}


.dashboard-page
.admin-table th,
.dashboard-page
.admin-table td {
    padding:
        10px
        12px;
}


.dashboard-page
.admin-table td {
    font-size: 12.5px;
}


/* ---------------------------------------------------------
   STATUS INDICATORS

   Status is still visually obvious, but less pill-heavy.
--------------------------------------------------------- */

.dashboard-page
.admin-status {
    min-height: 23px;
    padding: 3px 8px;

    border-radius: 5px;

    font-size: 9.5px;
    font-weight: 820;
    line-height: 1;

    letter-spacing: 0.045em;
}


.dashboard-page
.badge {
    min-height: 23px;
    padding: 3px 8px;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 760;
}


/* ---------------------------------------------------------
   BUTTONS
--------------------------------------------------------- */

.dashboard-page
.primary-button,
.dashboard-page
.secondary-button,
.dashboard-page button {
    border-radius:
        var(
            --enterprise-radius-sm
        );
}


.dashboard-page
.primary-button,
.dashboard-page
.secondary-button {
    min-height: 38px;
    padding:
        8px
        13px;

    font-size: 12px;
    font-weight: 720;
}


.dashboard-page
.dashboard-heading-actions {
    gap: 10px;
}


/* ---------------------------------------------------------
   INPUTS / SELECTS / FORMS
--------------------------------------------------------- */

.dashboard-page
input,
.dashboard-page
select,
.dashboard-page
textarea {
    border-radius:
        var(
            --enterprise-radius-sm
        );
}


.dashboard-page
.admin-field input,
.dashboard-page
.admin-field select,
.dashboard-page
.admin-field textarea,
.dashboard-page
.admin-toolbar input,
.dashboard-page
.admin-toolbar select {
    min-height: 38px;

    padding:
        8px
        10px;
}


.dashboard-page
.admin-form {
    padding: 15px;
}


.dashboard-page
.admin-form-grid {
    gap: 12px;
}


.dashboard-page
.admin-field {
    gap: 5px;
}


.dashboard-page
.admin-field label {
    font-size: 11px;
}


/* ---------------------------------------------------------
   FILTER / TOOLBAR DENSITY
--------------------------------------------------------- */

.dashboard-page
.admin-toolbar {
    gap: 10px;

    margin-bottom: 12px;
}


/* ---------------------------------------------------------
   SECTION RHYTHM
--------------------------------------------------------- */

.dashboard-page
.admin-section {
    margin-top: 19px;
}


.dashboard-page
.admin-section
+ .admin-section {
    margin-top: 22px;
}


.dashboard-page
.admin-section-header {
    margin-bottom: 11px;
}


.dashboard-page
.admin-section-header h3 {
    margin-bottom: 3px;

    font-size: 18px;
    line-height: 1.2;
}


.dashboard-page
.admin-section-header p {
    font-size: 12.5px;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   CONTROL / INFORMATION NOTICES

   Replace oversized marketing-style banners with quiet
   operational control notices.
--------------------------------------------------------- */

.dashboard-page
.admin-control-banner {
    align-items: center;

    gap: 16px;

    margin-bottom: 16px;
    padding:
        10px
        13px;

    border:
        1px solid
        var(
            --enterprise-border
        );

    border-left:
        3px solid
        var(
            --brand-orange
        );

    border-radius:
        var(
            --enterprise-radius-sm
        );

    background:
        var(
            --enterprise-surface
        );

    box-shadow: none;
}


.dashboard-page
.admin-control-banner strong {
    margin-bottom: 2px;

    font-size: 12.5px;
}


.dashboard-page
.admin-control-banner p {
    max-width: 1100px;

    color:
        var(
            --enterprise-text-muted
        );

    font-size: 12px;
    line-height: 1.4;
}


/*
Maker-checker / read-only are control metadata,
not record status pills.
*/
.dashboard-page
.admin-control-badge {
    min-height: auto;
    padding: 0;

    border: 0;
    border-radius: 0;

    color: #7b5734;
    background: transparent;

    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: 0.055em;
    text-transform: uppercase;

    white-space: nowrap;
}


/* ---------------------------------------------------------
   DRAWERS / MODALS
--------------------------------------------------------- */

.dashboard-page
.admin-modal {
    border-radius:
        var(
            --enterprise-radius-md
        );

    box-shadow:
        0 18px 45px
        rgba(
            0,
            0,
            0,
            0.22
        );
}


.dashboard-page
.admin-modal-header {
    padding:
        15px
        17px;
}


.dashboard-page
.admin-modal-body {
    padding: 17px;
}


/* General drawer treatment where present */
.dashboard-page
[class*="drawer"] {
    --drawer-radius:
        var(
            --enterprise-radius-md
        );
}


/* ---------------------------------------------------------
   CURRENCY FLAGS
--------------------------------------------------------- */

.dashboard-page
.currency-with-flag {
    gap: 8px;
}


.dashboard-page
.currency-flag {
    width: 22px;
    height: 15px;

    border-radius: 2px;

    box-shadow: none;
}


.dashboard-page
.currency-code {
    font-weight: 720;
}


/* ---------------------------------------------------------
   EMPTY / NO-ACTION STATES
--------------------------------------------------------- */

.dashboard-page
.admin-empty {
    padding:
        18px
        14px;

    font-size: 12px;
}


/* ---------------------------------------------------------
   FOOTER
--------------------------------------------------------- */

.dashboard-page
.site-footer,
.dashboard-page
footer {
    font-size: 11px;
}


/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 1180px) {
    .dashboard-page
    .metric-card {
        min-height: 108px;
    }
}


@media (max-width: 800px) {
    .dashboard-page
    .dashboard-heading h1,
    .dashboard-page
    .dashboard-heading h2 {
        font-size: 28px;
    }

    .dashboard-page
    .admin-control-banner {
        align-items: flex-start;
    }
}


/* ==========================================================
   SIDEBAR FOOTER FINISH
   Keep Sign Out integrated with the sidebar surface.
   ========================================================== */

.dashboard-page .sidebar-footer {
    background: transparent;
    padding-top: 12px;
}

/*
UI-CLOSEOUT-05F3
Navigation pre-paint stabilisation.

The navigation retains its full layout dimensions while
permission filtering and saved scroll restoration complete.
This prevents the server-rendered navigation state from
visibly jumping during workspace navigation.
*/

.dashboard-page
.dashboard-navigation {
    scrollbar-gutter: stable;
}


.dashboard-page
.dashboard-navigation:not(.navigation-ready) {
    visibility: hidden;
}


.dashboard-page
.dashboard-navigation.navigation-ready {
    visibility: visible;
}

/*
UI-CLOSEOUT-05F5
Viewport scrollbar stability.

Reserve document scrollbar space across workspace pages so
navigation between long and short screens cannot move the
application shell horizontally.
*/

html {
    scrollbar-gutter: stable;
}
