:root {
    --cm-navy: #0e2b47;
    --cm-navy-2: #173d60;
    --cm-blue: #145da0;
    --cm-blue-strong: #0d4f8b;
    --cm-blue-soft: #eaf3fb;
    --cm-page: #f4f7fb;
    --cm-card: #ffffff;
    --cm-border: #dce8f2;
    --cm-border-strong: #b9ccdc;
    --cm-text: #1f2937;
    --cm-muted: #64748b;
    --cm-success: #067647;
    --cm-success-bg: #e8f7ef;
    --cm-warning: #9a3e00;
    --cm-warning-bg: #fff4e5;
    --cm-danger: #b42318;
    --cm-danger-bg: #fbe9e7;
    --cm-focus: #f59e0b;
    --cm-shadow: 0 10px 30px rgba(14, 43, 71, 0.08);
    --cm-radius: 14px;
}

.cm-application-shell,
.cm-application-shell * {
    box-sizing: border-box;
}

.cm-application-shell {
    min-height: calc(100vh - 1rem);
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    background: var(--cm-page);
    color: var(--cm-text);
    border: 1px solid var(--cm-border);
    border-radius: 16px;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.cm-application-shell.cm-embedded {
    grid-template-columns: minmax(0, 1fr);
}
.cm-sidebar {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.2rem 1rem;
    color: #fff;
    background: linear-gradient(180deg, var(--cm-navy) 0%, #10263b 100%);
}

.cm-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .25rem .35rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.cm-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 10px;
    background: #fff;
    color: var(--cm-navy);
    font-size: 1.15rem;
    font-weight: 800;
}

.cm-brand strong,
.cm-brand small {
    display: block;
}

.cm-brand small {
    margin-top: .1rem;
    color: #cbd9e4;
}

.cm-nav {
    display: grid;
    gap: .35rem;
}

.cm-nav-label {
    padding: .25rem .65rem .45rem;
    color: #92aec4;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cm-nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 42px;
    padding: .65rem .75rem;
    border-radius: 9px;
    color: #e7ecf2;
    text-decoration: none;
    font-weight: 600;
    transition: background .15s ease, color .15s ease;
}

.cm-nav-link:hover,
.cm-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.cm-nav-link:focus-visible,
.cm-button:focus-visible,
.cm-link-button:focus-visible,
.cm-icon-button:focus-visible,
.cm-control:focus-visible,
.cm-attention-item:focus-visible {
    outline: 3px solid var(--cm-focus);
    outline-offset: 2px;
}

.cm-sidebar-note {
    margin-top: auto;
    padding: .8rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    color: #cbd9e4;
    background: rgba(255,255,255,.05);
    font-size: .78rem;
    line-height: 1.45;
}

.cm-sidebar-note strong {
    color: #fff;
}

.cm-workspace {
    min-width: 0;
}

.cm-topbar {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cm-border);
    background: #fff;
}

.cm-topbar h1 {
    margin: 0;
    color: var(--cm-navy);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.2;
}

.cm-topbar p {
    margin: .25rem 0 0;
    color: var(--cm-muted);
    font-size: .9rem;
}

.cm-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .55rem;
}

.cm-company {
    max-width: 220px;
    overflow: hidden;
    padding: .55rem .75rem;
    border: 1px solid var(--cm-border-strong);
    border-radius: 8px;
    color: var(--cm-navy);
    background: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .86rem;
    font-weight: 600;
}

.cm-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    border-radius: 50%;
    color: #fff;
    background: var(--cm-blue);
    font-size: .78rem;
    font-weight: 800;
}

.cm-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
}

.cm-banner,
.cm-alert {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .78rem .9rem;
    border-radius: 10px;
    font-size: .88rem;
    line-height: 1.45;
}

.cm-banner {
    border: 1px solid #b9d8f5;
    color: var(--cm-navy);
    background: #eef6ff;
}

.cm-alert-success {
    border: 1px solid #8ed0b2;
    color: var(--cm-success);
    background: var(--cm-success-bg);
}

.cm-alert-error {
    border: 1px solid #e7a49f;
    color: var(--cm-danger);
    background: var(--cm-danger-bg);
}

.cm-tag,
.cm-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 24px;
    padding: .2rem .55rem;
    border-radius: 999px;
    color: #0d4f8b;
    background: #dcebf7;
    font-size: .72rem;
    font-weight: 800;
}

.cm-tag-proposed {
    color: var(--cm-warning);
    background: var(--cm-warning-bg);
}

.cm-card {
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: var(--cm-card);
    box-shadow: var(--cm-shadow);
}

.cm-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.cm-metric {
    padding: 1rem 1.1rem;
}

.cm-metric-label {
    color: var(--cm-muted);
    font-size: .82rem;
    font-weight: 700;
}

.cm-metric-value {
    margin-top: .45rem;
    color: var(--cm-navy);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.cm-metric-detail {
    margin-top: .55rem;
    color: var(--cm-muted);
    font-size: .78rem;
}

.cm-text-warning {
    color: var(--cm-warning);
}

.cm-dashboard-grid,
.cm-notes-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
    gap: 1rem;
    margin-top: 1rem;
}

.cm-panel {
    min-width: 0;
    padding: 1rem;
}

.cm-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

.cm-panel-header h2 {
    margin: 0;
    color: var(--cm-navy);
    font-size: 1.02rem;
}

.cm-section-gap {
    margin-top: 1rem;
}

.cm-bars {
    height: 230px;
    display: grid;
    grid-template-columns: repeat(6, minmax(40px, 1fr));
    align-items: end;
    gap: .7rem;
    padding: 1rem .35rem .25rem;
    border-bottom: 1px solid var(--cm-border);
}

.cm-bar-wrap {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
    gap: .35rem;
    color: var(--cm-muted);
    font-size: .72rem;
}

.cm-bar {
    width: min(42px, 75%);
    min-height: 10%;
    border-radius: 7px 7px 2px 2px;
    background: linear-gradient(180deg, #3989cd 0%, var(--cm-blue) 100%);
}

.cm-bar-wrap small {
    color: var(--cm-navy);
    font-weight: 700;
}

.cm-attention-list,
.cm-activity-list,
.cm-note-list {
    display: grid;
    gap: .65rem;
}

.cm-attention-item {
    width: 100%;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    padding: .8rem;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    text-align: left;
    color: inherit;
    background: #fbfdff;
    cursor: pointer;
}

.cm-attention-item:hover:not(:disabled) {
    border-color: #92aec4;
    background: #f7f9fc;
}

.cm-attention-item:disabled {
    cursor: default;
}

.cm-attention-item strong,
.cm-attention-item small {
    display: block;
}

.cm-attention-item small {
    margin-top: .2rem;
    color: var(--cm-muted);
}

.cm-dot {
    width: 10px;
    height: 10px;
    margin-top: .25rem;
    border-radius: 50%;
    background: var(--cm-muted);
}

.cm-dot-danger { background: var(--cm-danger); }
.cm-dot-warning { background: #d97706; }
.cm-dot-good { background: var(--cm-success); }

.cm-activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem .2rem;
    border-bottom: 1px solid var(--cm-border);
}

.cm-activity-row:last-child {
    border-bottom: 0;
}

.cm-activity-row strong,
.cm-activity-row span {
    display: block;
}

.cm-activity-row strong {
    color: var(--cm-navy);
    font-size: .86rem;
    text-transform: capitalize;
}

.cm-activity-row span,
.cm-activity-row small {
    color: var(--cm-muted);
    font-size: .75rem;
}

.cm-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--cm-border);
    border-radius: 12px;
    background: #fff;
}

.cm-filter-row,
.cm-button-row,
.cm-modal-form-actions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: .65rem;
}

.cm-field {
    min-width: 170px;
    display: grid;
    gap: .35rem;
    color: var(--cm-navy);
    font-size: .78rem;
    font-weight: 700;
}

.cm-search {
    min-width: min(340px, 70vw);
}

.cm-control {
    width: 100%;
    min-height: 40px;
    padding: .55rem .65rem;
    border: 1px solid var(--cm-border-strong);
    border-radius: 8px;
    color: var(--cm-text);
    background: #fff;
    font: inherit;
    font-weight: 400;
}

.cm-control:focus {
    border-color: var(--cm-blue);
}

.cm-textarea {
    min-height: 110px;
    resize: vertical;
}

.cm-button,
.cm-link-button,
.cm-icon-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .55rem .85rem;
    border: 1px solid var(--cm-border-strong);
    border-radius: 8px;
    color: var(--cm-navy);
    background: #fff;
    font: inherit;
    font-size: .83rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
}

.cm-button:hover:not(:disabled) {
    border-color: #92aec4;
    background: #f7f9fc;
}

.cm-button-primary {
    border-color: var(--cm-blue);
    color: #fff;
    background: var(--cm-blue);
}

.cm-button-primary:hover:not(:disabled) {
    border-color: var(--cm-blue-strong);
    background: var(--cm-blue-strong);
}

.cm-button-danger {
    border-color: #d86f67;
    color: var(--cm-danger);
    background: #fff;
}

.cm-button-small {
    min-height: 32px;
    padding: .35rem .65rem;
    font-size: .75rem;
}

.cm-button:disabled,
.cm-link-button:disabled,
.cm-icon-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.cm-link-button {
    min-height: auto;
    padding: .2rem .25rem;
    border-color: transparent;
    color: var(--cm-blue);
    background: transparent;
}

.cm-link-button:hover:not(:disabled) {
    text-decoration: underline;
}

.cm-icon-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    border-color: transparent;
    font-size: 1.35rem;
    background: transparent;
}

.cm-table-card {
    overflow: hidden;
}

.cm-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.cm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.cm-table th,
.cm-table td {
    padding: .75rem .8rem;
    border-bottom: 1px solid var(--cm-border);
    text-align: left;
    vertical-align: middle;
}

.cm-table th {
    color: #475467;
    background: #f7f9fc;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cm-table tbody tr:hover {
    background: #fbfdff;
}

.cm-table tbody tr:last-child td {
    border-bottom: 0;
}

.cm-table-subtext {
    display: block;
    margin-top: .15rem;
    color: var(--cm-muted);
    font-size: .7rem;
}

.cm-money {
    text-align: right !important;
    white-space: nowrap;
}

.cm-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
}

.cm-status-good {
    color: var(--cm-success);
    background: var(--cm-success-bg);
}

.cm-status-warning {
    color: var(--cm-warning);
    background: var(--cm-warning-bg);
}

.cm-status-danger {
    color: var(--cm-danger);
    background: var(--cm-danger-bg);
}

.cm-status-neutral {
    color: #475467;
    background: #f2f4f7;
}

.cm-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-top: 1px solid var(--cm-border);
    color: var(--cm-muted);
    font-size: .78rem;
}

.cm-empty-state,
.cm-state,
.cm-access-denied,
.cm-shell-loading {
    display: grid;
    place-items: center;
    gap: .55rem;
    min-height: 240px;
    padding: 2rem;
    text-align: center;
}

.cm-empty-state h2,
.cm-access-denied h2 {
    margin: 0;
    color: var(--cm-navy);
    font-size: 1.2rem;
}

.cm-empty-state p,
.cm-access-denied p,
.cm-state p {
    max-width: 650px;
    margin: 0;
    color: var(--cm-muted);
}

.cm-empty-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--cm-blue);
    background: var(--cm-blue-soft);
    font-size: 1.6rem;
}

.cm-empty-inline {
    padding: 1rem;
    border: 1px dashed var(--cm-border-strong);
    border-radius: 10px;
    color: var(--cm-muted);
    background: #fbfdff;
    font-size: .82rem;
}

.cm-state-error {
    color: var(--cm-danger);
}

.cm-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid var(--cm-border);
    border-top-color: var(--cm-blue);
    border-radius: 50%;
    animation: cm-spin .8s linear infinite;
}

@keyframes cm-spin {
    to { transform: rotate(360deg); }
}

.cm-run-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.cm-run-summary span,
.cm-run-summary strong {
    display: block;
}

.cm-run-summary span {
    color: var(--cm-muted);
    font-size: .72rem;
    font-weight: 700;
}

.cm-run-summary strong {
    margin-top: .3rem;
    color: var(--cm-navy);
    font-size: .86rem;
}

.cm-modal-backdrop {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(8, 24, 39, .62);
}

.cm-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
}

.cm-modal-header,
.cm-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--cm-border);
}

.cm-modal-header h2 {
    margin: 0;
    color: var(--cm-navy);
    font-size: 1.1rem;
}

.cm-modal-footer {
    border-top: 1px solid var(--cm-border);
    border-bottom: 0;
}

.cm-modal-body {
    padding: 1.2rem;
}

.cm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.cm-field-full,
.cm-detail-full {
    grid-column: 1 / -1;
}

.cm-modal-form-actions {
    justify-content: flex-end;
    margin-top: 1.2rem;
}

.cm-validation-summary {
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    border: 1px solid #e7a49f;
    border-radius: 8px;
    color: var(--cm-danger);
    background: var(--cm-danger-bg);
    font-size: .8rem;
}

.validation-message {
    color: var(--cm-danger);
    font-size: .72rem;
    font-weight: 600;
}

.invalid {
    border-color: var(--cm-danger) !important;
}

.cm-readonly-value {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: .55rem .65rem;
    border: 1px solid var(--cm-border);
    border-radius: 8px;
    color: var(--cm-muted);
    background: #f7f9fc;
    font-weight: 400;
}

.cm-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin: 0;
}

.cm-detail-grid > div {
    padding: .75rem;
    border: 1px solid var(--cm-border);
    border-radius: 9px;
    background: #fbfdff;
}

.cm-detail-grid dt {
    color: var(--cm-muted);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cm-detail-grid dd {
    margin: .3rem 0 0;
    color: var(--cm-navy);
    font-size: .86rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.cm-workflow-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.cm-note-item {
    padding: .85rem;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    background: #fbfdff;
}

.cm-note-item p {
    margin: .7rem 0;
    white-space: pre-wrap;
}

.cm-note-item small,
.cm-note-meta {
    color: var(--cm-muted);
    font-size: .73rem;
}

.cm-note-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
}

.cm-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1150px) {
    .cm-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cm-run-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .cm-application-shell {
        grid-template-columns: 1fr;
    }

    .cm-sidebar {
        min-height: auto;
    }

    .cm-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cm-nav-label,
    .cm-sidebar-note {
        display: none;
    }

    .cm-dashboard-grid,
    .cm-notes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .cm-application-shell {
        border-radius: 0;
    }

    .cm-nav {
        grid-template-columns: 1fr;
    }

    .cm-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }

    .cm-top-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .cm-content {
        padding: 1rem;
    }

    .cm-metric-grid,
    .cm-run-summary,
    .cm-form-grid,
    .cm-detail-grid {
        grid-template-columns: 1fr;
    }

    .cm-field-full,
    .cm-detail-full {
        grid-column: auto;
    }

    .cm-filter-row,
    .cm-toolbar,
    .cm-button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .cm-field,
    .cm-search,
    .cm-button {
        width: 100%;
        min-width: 0;
    }

    .cm-bars {
        gap: .25rem;
    }

    .cm-pager,
    .cm-activity-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cm-spinner {
        animation-duration: 1.8s;
    }

    .cm-nav-link {
        transition: none;
    }
}
/* CHARGEMASTER LEADERSHIP DESIGN SYSTEM V1 */
:root {
    --cm-font-family: "Segoe UI", Inter, Arial, sans-serif;
    --cm-sidebar-bg: #0b2942;
    --cm-sidebar-bg-strong: #071f34;
    --cm-sidebar-text: #eef6ff;
    --cm-sidebar-muted: #9eb6ca;
    --cm-sidebar-active: #294d6d;
    --cm-canvas: #f3f7fb;
    --cm-surface: #ffffff;
    --cm-surface-muted: #f8fbfe;
    --cm-text: #102a43;
    --cm-text-muted: #5b7185;
    --cm-border: #d6e2ed;
    --cm-border-strong: #bfd0df;
    --cm-primary: #1266a8;
    --cm-primary-hover: #0d558e;
    --cm-primary-soft: #eaf4fc;
    --cm-success: #087f5b;
    --cm-success-soft: #e7f7f0;
    --cm-warning: #a55b00;
    --cm-warning-soft: #fff4df;
    --cm-danger: #b42318;
    --cm-danger-soft: #fff0ee;
    --cm-info: #175cd3;
    --cm-info-soft: #eaf2ff;
    --cm-radius-sm: 8px;
    --cm-radius-md: 12px;
    --cm-radius-lg: 16px;
    --cm-shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.06);
    --cm-shadow-md: 0 8px 24px rgba(16, 42, 67, 0.09);
    --cm-focus: 0 0 0 3px rgba(18, 102, 168, 0.24);
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--cm-canvas);
    color: var(--cm-text);
    font-family: var(--cm-font-family);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.cm-shell,
.cm-module-shell,
.cm-app-shell {
    min-height: 100vh;
    background: var(--cm-canvas);
    color: var(--cm-text);
}

.cm-shell,
.cm-module-layout,
.cm-shell-layout,
.cm-app-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    min-height: 100vh;
}

.cm-sidebar,
.cm-shell-sidebar,
.cm-module-sidebar {
    min-width: 0;
    background: linear-gradient(180deg, var(--cm-sidebar-bg) 0%, var(--cm-sidebar-bg-strong) 100%);
    color: var(--cm-sidebar-text);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.cm-nav {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 100%;
    padding: 20px 14px;
    background: linear-gradient(180deg, var(--cm-sidebar-bg) 0%, var(--cm-sidebar-bg-strong) 100%);
    color: var(--cm-sidebar-text);
}

.cm-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    margin: 0 2px 18px;
    padding: 0 4px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.cm-nav-brand-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #f5f9fd;
    color: var(--cm-sidebar-bg-strong);
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.cm-nav-brand-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cm-nav-brand-copy strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-nav-brand-copy small {
    color: var(--cm-sidebar-muted);
    font-size: 12px;
    line-height: 1.2;
}

.cm-nav-label {
    margin: 14px 8px 5px;
    color: #87a9c3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.cm-nav-link {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--cm-sidebar-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.cm-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    transform: translateX(1px);
}

.cm-nav-link.active,
.cm-nav-link[aria-current="page"] {
    background: var(--cm-sidebar-active);
    border-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #59a7dc;
}

.cm-nav-link > span:first-child,
.cm-nav-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    min-height: 22px;
    color: #b9d3e6;
    font-size: 12px;
    font-weight: 800;
}

.cm-nav-spacer {
    flex: 1 1 auto;
    min-height: 18px;
}

.cm-nav-link-external {
    margin-top: 1px;
    border-color: rgba(255, 255, 255, 0.08);
}

.cm-main,
.cm-shell-main,
.cm-module-main,
.cm-content {
    min-width: 0;
    background: var(--cm-canvas);
}

.cm-topbar,
.cm-shell-header,
.cm-module-header,
.cm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 74px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--cm-border);
    box-shadow: var(--cm-shadow-sm);
}

.cm-page-title,
.cm-page-header h1,
.cm-shell-header h1,
.cm-module-header h1 {
    margin: 0;
    color: var(--cm-text);
    font-size: clamp(25px, 2.1vw, 34px);
    font-weight: 760;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.cm-page-subtitle,
.cm-page-header p,
.cm-shell-header p,
.cm-module-header p {
    max-width: 760px;
    margin: 5px 0 0;
    color: var(--cm-text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.cm-page-actions,
.cm-header-actions,
.cm-shell-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.cm-company-context,
.cm-user-context,
.cm-role-context,
.cm-context-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    background: var(--cm-surface);
    color: var(--cm-text);
    font-size: 13px;
    font-weight: 700;
}

.cm-page,
.cm-page-content,
.cm-shell-content,
.cm-module-content {
    box-sizing: border-box;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 24px 28px 38px;
}

.cm-card,
.cm-panel,
.cm-metric-card,
.cm-table-card,
.cm-toolbar {
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-md);
    background: var(--cm-surface);
    box-shadow: var(--cm-shadow-sm);
}

.cm-card,
.cm-panel {
    padding: 18px;
}

.cm-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.cm-panel-header h2,
.cm-card h2 {
    margin: 0;
    color: var(--cm-text);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.25;
}

.cm-panel-header p,
.cm-card p {
    color: var(--cm-text-muted);
}

.cm-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.cm-metric-card {
    min-width: 0;
    padding: 18px;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.cm-metric-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--cm-shadow-md);
}

.cm-button,
.cm-link-button,
.cm-icon-button,
.cm-pager button {
    min-height: 38px;
    border: 1px solid var(--cm-border-strong);
    border-radius: 9px;
    background: var(--cm-surface);
    color: var(--cm-text);
    font: inherit;
    font-size: 13px;
    font-weight: 720;
    line-height: 1;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.cm-button {
    padding: 9px 14px;
}

.cm-button:hover,
.cm-pager button:hover {
    border-color: #9cb7cc;
    background: #f7fbfe;
    transform: translateY(-1px);
}

.cm-button-primary {
    border-color: var(--cm-primary);
    background: var(--cm-primary);
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(18, 102, 168, 0.20);
}

.cm-button-primary:hover {
    border-color: var(--cm-primary-hover);
    background: var(--cm-primary-hover);
}

.cm-button-danger {
    border-color: #e5a29b;
    background: var(--cm-danger-soft);
    color: var(--cm-danger);
}

.cm-button:disabled,
.cm-link-button:disabled,
.cm-pager button:disabled {
    cursor: not-allowed;
    opacity: 0.56;
    transform: none;
}

.cm-link-button {
    min-height: auto;
    padding: 4px 6px;
    border-color: transparent;
    background: transparent;
    color: var(--cm-primary);
}

.cm-control,
.cm-field input,
.cm-field select,
.cm-field textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--cm-border-strong);
    border-radius: 9px;
    background: var(--cm-surface);
    color: var(--cm-text);
    font: inherit;
    font-size: 14px;
}

.cm-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--cm-text);
    font-size: 12px;
    font-weight: 720;
}

.cm-field > span:first-child {
    color: #36566f;
}

.cm-toolbar {
    padding: 14px;
    margin-bottom: 16px;
}

.cm-filter-row {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.cm-filter-row .cm-field {
    flex: 1 1 190px;
}

.cm-table-card {
    overflow: hidden;
}

.cm-table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.cm-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--cm-text);
    font-size: 13px;
}

.cm-table th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--cm-border-strong);
    background: #f3f7fb;
    color: #415f76;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.cm-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e7eef5;
    vertical-align: middle;
}

.cm-table tbody tr:hover {
    background: #f8fbfe;
}

.cm-table tbody tr:last-child td {
    border-bottom: 0;
}

.cm-tag,
.cm-status-badge,
.cm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #c8dced;
    border-radius: 999px;
    background: var(--cm-primary-soft);
    color: #165b8d;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.cm-tag-success,
.cm-status-active,
.cm-status-approved {
    border-color: #a9ddc9;
    background: var(--cm-success-soft);
    color: var(--cm-success);
}

.cm-tag-warning,
.cm-status-pending,
.cm-status-review {
    border-color: #efd3a8;
    background: var(--cm-warning-soft);
    color: var(--cm-warning);
}

.cm-tag-danger,
.cm-status-inactive,
.cm-status-rejected {
    border-color: #efb6af;
    background: var(--cm-danger-soft);
    color: var(--cm-danger);
}

.cm-banner,
.cm-alert,
.cm-empty-state,
.cm-error-state,
.cm-loading-state {
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-md);
    background: var(--cm-surface);
    color: var(--cm-text);
}

.cm-banner,
.cm-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    margin-bottom: 16px;
    line-height: 1.45;
}

.cm-alert-success {
    border-color: #a9ddc9;
    background: var(--cm-success-soft);
    color: #075f46;
}

.cm-alert-error {
    border-color: #efb6af;
    background: var(--cm-danger-soft);
    color: #8d1d14;
}

.cm-empty-state,
.cm-error-state,
.cm-loading-state {
    padding: 34px 22px;
    text-align: center;
}

.cm-empty-state h2,
.cm-error-state h2,
.cm-loading-state h2 {
    margin: 0 0 8px;
}

.cm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5, 24, 40, 0.60);
    backdrop-filter: blur(2px);
}

.cm-modal {
    width: min(100%, 760px);
    max-height: min(88vh, 920px);
    overflow: auto;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-lg);
    background: var(--cm-surface);
    box-shadow: 0 26px 70px rgba(5, 24, 40, 0.30);
}

.cm-modal-header,
.cm-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
}

.cm-modal-header {
    border-bottom: 1px solid var(--cm-border);
}

.cm-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--cm-border);
}

.cm-modal-body {
    padding: 20px;
}

.cm-pager,
.cm-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 13px 14px;
    border-top: 1px solid var(--cm-border);
    background: var(--cm-surface-muted);
}

.cm-section-gap {
    margin-top: 18px;
}

.cm-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.cm-button:focus-visible,
.cm-link-button:focus-visible,
.cm-nav-link:focus-visible,
.cm-control:focus-visible,
.cm-field input:focus-visible,
.cm-field select:focus-visible,
.cm-field textarea:focus-visible,
.cm-pager button:focus-visible,
a:focus-visible {
    outline: 2px solid #2e85c1;
    outline-offset: 2px;
    box-shadow: var(--cm-focus);
}

@media (max-width: 1180px) {
    .cm-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cm-topbar,
    .cm-shell-header,
    .cm-module-header,
    .cm-page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 860px) {
    .cm-shell,
    .cm-module-layout,
    .cm-shell-layout,
    .cm-app-layout {
        grid-template-columns: 1fr;
    }

    .cm-nav {
        min-height: auto;
    }

    .cm-nav-spacer {
        display: none;
    }

    .cm-page,
    .cm-page-content,
    .cm-shell-content,
    .cm-module-content {
        padding: 18px 16px 28px;
    }

    .cm-topbar,
    .cm-shell-header,
    .cm-module-header,
    .cm-page-header {
        padding: 15px 16px;
    }
}

@media (max-width: 620px) {
    .cm-metric-grid {
        grid-template-columns: 1fr;
    }

    .cm-filter-row,
    .cm-page-actions,
    .cm-header-actions,
    .cm-shell-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cm-button {
        justify-content: center;
        width: 100%;
    }

    .cm-modal-backdrop {
        align-items: end;
        padding: 0;
    }

    .cm-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}