:root {
    --mp-teal: #14505a;
    --mp-teal-deep: #103e47;
    --mp-mint: #dcefeb;
    --mp-ink: #18343a;
    --mp-surface: #fff;
    --mp-border: #dce7e6;
    --mp-text-muted: #526b70;
    --mp-control-border: #b6cccc;
    --mp-control-radius: .625rem;
    --mp-control-height: 2.75rem;
    --mp-control-font-size: .875rem;
    --mp-control-padding-x: .6rem;
    --bs-primary-rgb: 20, 80, 90;
    --bs-link-color: #14505a;
    --bs-link-color-rgb: 20, 80, 90;
    --bs-link-hover-color: #103e47;
    --bs-link-hover-color-rgb: 16, 62, 71;
}

body {
    color: var(--mp-ink);
}

:is(.app-main, .login-shell) :is(.form-control, .form-select, .form-check-input):not(.is-invalid):not(.is-valid):focus {
    border-color: var(--mp-teal);
    box-shadow: 0 0 0 .2rem rgb(20 80 90 / 18%);
}

.app-main .table thead {
    --bs-table-bg: #f2f7f6;
}

.app-main .table thead th {
    color: var(--mp-teal-deep);
    font-weight: 650;
}

.empty-state {
    padding: clamp(1.5rem, 4vw, 2.5rem) 1rem;
    color: var(--mp-text-muted);
    text-align: center;
}

.empty-state > :first-child {
    margin-bottom: .35rem;
    color: var(--mp-ink);
}

.empty-state > p {
    max-width: 65ch;
    margin-inline: auto;
}

.app-sidebar {
    background: var(--mp-teal-deep);
}

.sidebar-brand {
    border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 3.75rem;
    padding-inline: 1rem;
    color: #fff;
    text-decoration: none;
}

.brand-link:hover {
    color: #fff;
}

.brand-mark,
.welcome-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: .8rem;
    background: var(--mp-mint);
    color: var(--mp-teal-deep);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
}

.brand-text {
    font-weight: 650;
    letter-spacing: -.015em;
}

.sidebar-menu .nav-header {
    padding: 1.15rem 1rem .45rem;
    color: #aac5c9;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .11em;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .1rem .55rem;
    border-radius: .55rem;
    color: #e0ebec;
}

.sidebar-menu .nav-link p {
    flex: 1;
    margin: 0;
}

.sidebar-menu .nav-link.active {
    background: var(--mp-surface);
    color: var(--mp-teal-deep);
    font-weight: 650;
}

.sidebar-menu a.nav-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sidebar-menu a.nav-link.active:focus-visible {
    outline-color: var(--mp-teal-deep);
}

.nav-mark {
    display: inline-grid;
    width: 1.2rem;
    flex: 0 0 1.2rem;
    place-items: center;
    font-size: 1.1rem;
    line-height: 1;
}

.nav-mark-small {
    font-size: 1.4rem;
}

.nav-arrow {
    float: right;
    font-size: 1.2rem;
    line-height: 1;
}

.nav-header-muted {
    color: #88a8ad !important;
}

.nav-item-future .nav-link {
    color: #adc3c6;
    cursor: default;
}

.nav-status {
    color: #9eb7ba;
    font-size: .66rem;
}

.menu-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.header-unit,
.unit-label {
    color: #45666c;
    font-size: .82rem;
    font-weight: 600;
}

.app-header .nav-link button,
.app-header button.nav-link {
    border: 0;
    background: transparent;
    color: #45666c;
}

.login-page {
    min-height: 100vh;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    padding: 1.25rem;
    place-items: center;
}

.login-card {
    width: min(100%, 27rem);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border: 1px solid var(--mp-border);
    border-radius: 1rem;
    background: var(--mp-surface);
    box-shadow: 0 1rem 3rem rgb(30 70 75 / 9%);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 2rem;
    color: var(--mp-teal-deep);
    font-weight: 700;
}

.login-note {
    margin-top: 1.25rem;
    color: var(--mp-text-muted);
    font-size: .78rem;
    line-height: 1.5;
}

.section-eyebrow,
.module-kicker {
    color: #59777c;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-title {
    color: var(--mp-ink);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 650;
    letter-spacing: -.025em;
}

.unit-label {
    padding: .4rem .7rem;
    border: 1px solid #d5e2e2;
    border-radius: 999px;
    background: var(--mp-surface);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--mp-teal);
    --bs-btn-border-color: var(--mp-teal);
    --bs-btn-hover-bg: var(--mp-teal-deep);
    --bs-btn-hover-border-color: var(--mp-teal-deep);
    --bs-btn-active-bg: var(--mp-teal-deep);
    --bs-btn-active-border-color: var(--mp-teal-deep);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--mp-teal);
    --bs-btn-disabled-border-color: var(--mp-teal);
    --bs-btn-focus-shadow-rgb: 20, 80, 90;
}

/* Shared panel headings and form actions; no legacy floats inside modern layouts. */
.app-main .card-header .card-title {
    float: none;
    color: var(--mp-ink);
    font-size: 1.15rem;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.mp-panel-heading {
    flex: 1;
    min-width: 0;
}

.app-main .card-header.d-flex::after {
    content: none;
}

.mp-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.mp-loading-lines {
    display: grid;
    gap: .85rem;
}

.mp-skeleton {
    display: block;
    height: 1.1rem;
    border-radius: .35rem;
    background: var(--mp-mint);
}

.mp-loading-lines > .mp-skeleton:first-child {
    width: 60%;
    height: 1.5rem;
}

.mp-table-hint { display: none; }
.cep-results-scroll, .mp-table-scroll { overscroll-behavior-x: contain; }
.cep-results-scroll:focus-visible, .mp-table-scroll:focus-visible { outline: 2px solid var(--mp-teal); outline-offset: 2px; }

@media (max-width: 575.98px) {
    .mp-table-hint { display: block; }
    .cep-results-scroll .table { min-width: 38rem; }
    .mp-table-scroll .table { min-width: 40rem; }
}

@media (max-width: 575.98px) {
    .mp-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .mp-form-actions > .btn {
        width: 100%;
    }
}

/* Shared component defaults: every module inherits the same visual contract. */
.btn {
    --bs-btn-border-radius: var(--mp-control-radius);
    --bs-btn-font-weight: 600;
    --bs-btn-font-size: var(--mp-control-font-size);
    --bs-btn-padding-x: var(--mp-control-padding-x);
    min-height: var(--mp-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    white-space: normal;
}

.btn-outline-primary,
.btn-outline-secondary {
    --bs-btn-color: var(--mp-teal);
    --bs-btn-border-color: var(--mp-control-border);
    --bs-btn-hover-color: var(--mp-teal-deep);
    --bs-btn-hover-bg: var(--mp-mint);
    --bs-btn-hover-border-color: var(--mp-teal);
    --bs-btn-active-color: var(--mp-teal-deep);
    --bs-btn-active-bg: var(--mp-mint);
    --bs-btn-active-border-color: var(--mp-teal);
    --bs-btn-disabled-color: var(--mp-text-muted);
    --bs-btn-disabled-border-color: var(--mp-control-border);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-focus-shadow-rgb: 20, 80, 90;
}

.btn-secondary {
    --bs-btn-color: var(--mp-teal-deep);
    --bs-btn-bg: var(--mp-mint);
    --bs-btn-border-color: var(--mp-control-border);
    --bs-btn-hover-color: var(--mp-teal-deep);
    --bs-btn-hover-bg: #cbe4de;
    --bs-btn-hover-border-color: var(--mp-teal);
    --bs-btn-active-color: var(--mp-teal-deep);
    --bs-btn-active-bg: #cbe4de;
    --bs-btn-active-border-color: var(--mp-teal);
    --bs-btn-disabled-color: var(--mp-text-muted);
    --bs-btn-disabled-bg: var(--mp-mint);
    --bs-btn-disabled-border-color: var(--mp-control-border);
    --bs-btn-focus-shadow-rgb: 20, 80, 90;
}

.btn-link {
    --bs-btn-color: var(--mp-teal);
    --bs-btn-hover-color: var(--mp-teal-deep);
    --bs-btn-active-color: var(--mp-teal-deep);
    --bs-btn-disabled-color: var(--mp-text-muted);
    --bs-btn-focus-shadow-rgb: 20, 80, 90;
    text-underline-offset: .2em;
}

:is(.app-main, .login-shell) :is(.form-control, .form-select) {
    min-height: var(--mp-control-height);
    border-radius: var(--mp-control-radius);
    border-color: var(--mp-control-border);
    color: var(--mp-ink);
    font-size: var(--mp-control-font-size);
    padding-block: .5rem;
}

.app-main .form-label { font-size: .875rem; margin-bottom: .375rem; }
.app-main form .row { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
.app-main form .card-body { padding: .75rem; }

@media (max-width: 767.98px) {
    :is(.app-main, .login-shell) :is(.form-control, .form-select) { font-size: 1rem; }
}

:is(.app-main, .login-shell) .form-control::placeholder {
    color: var(--mp-text-muted);
    opacity: 1;
}

:is(.app-main, .login-shell) :is(.form-control, .form-select):disabled,
:is(.app-main, .login-shell) .form-control[readonly] {
    background-color: #edf3f2;
    color: var(--mp-text-muted);
}

:is(.app-main, .login-shell) .form-control.is-invalid,
:is(.app-main, .login-shell) .form-select.is-invalid,
:is(.app-main, .login-shell) .was-validated :is(.form-control, .form-select):invalid {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
}

:is(.app-main, .login-shell) .was-validated :is(.form-control, .form-select, .form-check-input):invalid:focus {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
    box-shadow: 0 0 0 .2rem rgb(220 53 69 / 20%);
}

:is(.app-main, .login-shell) .form-control.is-valid,
:is(.app-main, .login-shell) .form-select.is-valid,
:is(.app-main, .login-shell) .was-validated :is(.form-control, .form-select):valid {
    border-color: var(--bs-form-valid-border-color, #198754);
}

:is(.app-main, .login-shell) .was-validated :is(.form-control, .form-select, .form-check-input):valid:focus {
    border-color: var(--bs-form-valid-border-color, #198754);
    box-shadow: 0 0 0 .2rem rgb(25 135 84 / 20%);
}

:is(.app-main, .login-shell) .form-control::file-selector-button {
    background-color: var(--mp-mint);
    color: var(--mp-teal-deep);
}

:is(.app-main, .login-shell) .form-label {
    color: var(--mp-ink);
    font-weight: 600;
}

:is(.app-main, .login-shell) .form-text {
    color: var(--mp-text-muted);
}

.app-main .form-check-input:checked {
    background-color: var(--mp-teal);
    border-color: var(--mp-teal);
}

.app-main :is(.nav-pills, .nav-tabs) {
    --bs-nav-link-color: var(--mp-teal);
    --bs-nav-link-hover-color: var(--mp-teal-deep);
    --bs-nav-pills-link-active-bg: var(--mp-teal);
    --bs-nav-pills-border-radius: var(--mp-control-radius);
    gap: .35rem;
}

.app-main :is(.nav-pills, .nav-tabs) .nav-link {
    min-height: var(--mp-control-height);
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.app-main .nav-tabs .nav-link.active {
    color: var(--mp-teal-deep);
    background-color: var(--mp-mint);
    border-color: var(--mp-control-border);
}

.app-main .pagination {
    --bs-pagination-color: var(--mp-teal);
    --bs-pagination-border-color: var(--mp-control-border);
    --bs-pagination-hover-color: var(--mp-teal-deep);
    --bs-pagination-hover-bg: var(--mp-mint);
    --bs-pagination-focus-color: var(--mp-teal-deep);
    --bs-pagination-focus-bg: var(--mp-mint);
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgb(20 80 90 / 18%);
    --bs-pagination-active-bg: var(--mp-teal);
    --bs-pagination-active-border-color: var(--mp-teal);
}

.app-main .page-link {
    min-height: var(--mp-control-height);
    min-width: var(--mp-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-main .dropdown-menu {
    --bs-dropdown-link-color: var(--mp-ink);
    --bs-dropdown-link-hover-color: var(--mp-teal-deep);
    --bs-dropdown-link-hover-bg: var(--mp-mint);
    --bs-dropdown-link-active-color: var(--mp-teal-deep);
    --bs-dropdown-link-active-bg: var(--mp-mint);
    --bs-dropdown-border-color: var(--mp-border);
    --bs-dropdown-border-radius: var(--mp-control-radius);
}

.app-main .dropdown-item {
    min-height: var(--mp-control-height);
    display: flex;
    align-items: center;
}

:is(.app-main, .login-shell) :is(.btn, .nav-link, .page-link, .dropdown-item):focus-visible {
    outline: 2px solid var(--mp-teal);
    outline-offset: 2px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #587277;
    font-size: .8rem;
}

.footer-note {
    color: #718a8e;
}

@media (max-width: 575.98px) {
    .unit-label {
        display: none;
    }

    .app-footer {
        flex-direction: column;
        gap: .25rem;
    }
}

.mobile-menu-close { display: none; }
.product-table-hint { display: none; }
.product-table-scroll:focus-visible { outline: 2px solid var(--mp-teal); outline-offset: 2px; }
@media (max-width: 575.98px) {
    .product-table-hint { display: block; margin-bottom: .5rem; }
    .product-catalog .card-title { float: none; line-height: 1.4; }
    .product-catalog .card-header > .btn { width: 100%; }
    .product-catalog .btn,
    .movement-form-card .btn {
        display: inline-flex;
        min-height: 2.75rem;
        align-items: center;
        justify-content: center;
    }
    .product-catalog .form-control,
    .movement-form-card .form-control,
    .movement-form-card .form-select {
        min-height: 2.75rem;
        font-size: 1rem;
    }
    .product-table-scroll { overscroll-behavior-x: contain; }
    .product-table-scroll table { min-width: 42rem; font-size: .9rem; }
    .product-table-scroll th[scope="row"] { min-width: 12rem; overflow-wrap: anywhere; }
    .product-actions { min-width: 11rem; white-space: normal !important; }
    .product-actions .btn { width: 100%; margin-bottom: .4rem; white-space: normal; }
    .movement-form-card .card-title { float: none; line-height: 1.4; overflow-wrap: anywhere; }
    .movement-form-card .card-footer { flex-direction: column; }
    .movement-form-card .card-footer .btn { width: 100%; }
}
.mobile-tabs { display: none; }
/* Arquivos: estrutura da barra contextual e navegação recolhível (bloco 1). */
.context-shell .app-wrapper { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: 0; }
.context-shell .app-main, .context-shell .app-footer { margin-left: 0; }
.context-shell .app-main { flex: 1; }
.context-navbar { position: sticky; top: 1rem; z-index: 1042; display: flex; align-items: center; gap: 1rem; margin: 1rem; padding: .5rem .75rem; min-height: 4.5rem; border: 1px solid var(--mp-border); border-radius: 1rem; background: var(--mp-surface); color: var(--mp-ink); }
.context-navbar button { min-height: 44px; border: 0; border-radius: .5rem; background: transparent; color: var(--mp-teal-deep); padding: .5rem .75rem; font: inherit; }
.context-menu-toggle { display: inline-flex; align-items: center; gap: .5rem; }
.context-menu-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.context-navbar-title { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.context-navbar-unit { font-size: .8rem; color: var(--mp-text-muted); overflow-wrap: anywhere; }
.context-navbar-account { color: var(--mp-text-muted); }
.context-navbar button:focus-visible { outline: 3px solid var(--mp-teal); outline-offset: 2px; }
.context-shell .context-action,
.context-shell .context-more > summary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .5rem .75rem; border-radius: .65rem;
    color: var(--mp-teal-deep); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.context-shell .context-action svg,
.context-shell .context-more > summary svg { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.context-shell .context-action-primary { background: var(--mp-teal); color: #fff; }
.context-shell .context-action[aria-current="page"] { outline: 1px solid currentColor; outline-offset: -3px; }
.context-shell .context-more { position: relative; }
.context-shell .context-more > summary { list-style: none; }
.context-shell .context-more > summary::-webkit-details-marker { display: none; }
.context-shell .context-more[open] > summary { background: var(--mp-mint); }
.context-shell .context-more-panel {
    position: absolute; inset: calc(100% + 1rem) 0 auto auto; width: min(18rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 8rem); overflow-y: auto; overscroll-behavior: contain;
    padding: .75rem; border: 1px solid var(--mp-border); border-radius: 1rem;
    background: var(--mp-surface); color: var(--mp-ink); box-shadow: 0 8px 24px rgb(16 62 71 / 12%);
}
.context-shell .context-more-account { margin: 0 0 .5rem; padding: .5rem; color: var(--mp-text-muted); overflow-wrap: anywhere; }
.context-shell .context-more-panel a,
.context-shell .context-more-panel button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: .5rem .75rem; color: var(--mp-teal-deep); text-decoration: none; border-radius: .5rem; }
.context-shell .context-more-panel .context-more-trash { display: none; }
.context-shell :is(.context-action, .context-more > summary, .context-more-panel a):focus-visible { outline: 3px solid var(--mp-teal); outline-offset: 2px; }
#file-search, #trash-search { scroll-margin-block: 7rem; }
@media (hover: hover) and (pointer: fine) {
    .context-shell .context-action:not(.context-action-primary):hover,
    .context-shell .context-more > summary:hover,
    .context-shell .context-more-panel a:hover { background: var(--mp-mint); color: var(--mp-teal-deep); }
    .context-shell .context-action-primary:hover { background: var(--mp-teal-deep); color: #fff; }
}
@media (max-width: 991.98px) {
    .context-shell .context-navbar-title { display: none; }
    .context-shell .context-navbar { gap: .25rem; }
    .context-shell .context-navbar > :is(.context-menu-toggle, .context-action, .context-more) { flex: 1; min-width: 0; }
    .context-shell .context-navbar :is(.context-menu-toggle, .context-action, .context-more > summary) { flex-direction: column; gap: .2rem; padding: .35rem; font-size: .8rem; min-height: 54px; }
    .context-shell .context-navbar > .context-trash-shortcut { display: none; }
    .context-shell .context-more-panel .context-more-trash { display: flex; }
    .context-shell .context-more-panel { inset: auto 0 calc(100% + 1rem) auto; }
}
@media (forced-colors: active) {
    .context-shell .context-action-primary { background: ButtonFace; color: ButtonText; border: 1px solid ButtonText; }
    .context-shell .context-more-panel { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
    .context-shell :is(.context-action, .context-more > summary, .context-more-panel a):focus-visible { outline-color: Highlight; }
}
.context-shell .app-sidebar { position: fixed; inset: 6.5rem auto auto 1rem; z-index: 1041; width: min(20rem, calc(100vw - 2rem)); min-width: 0; max-width: none; height: auto; max-height: calc(100dvh - 7.5rem); display: flex; flex-direction: column; border-radius: 1rem; transform: none; transition: none; overflow: hidden; }
.context-shell .app-sidebar[hidden], .files-menu-backdrop[hidden] { display: none; }
.context-shell .sidebar-wrapper { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.context-shell .mobile-menu-close { display: block; flex-shrink: 0; min-height: 44px; margin: .5rem .75rem; border: 1px solid #8fb4ba; border-radius: .5rem; background: transparent; color: #e0ebec; }
.context-shell .sidebar-menu .nav-link { min-height: 44px; }
.context-shell .sidebar-menu .nav-link p { white-space: normal; }
.files-menu-backdrop { position: fixed; inset: 0; z-index: 1040; border: 0; background: rgb(16 62 71 / 20%); }
.context-shell.files-menu-open { overflow: hidden; }
.context-shell .app-sidebar { margin-left: 0 !important; margin-right: 0 !important; }
.context-shell .sidebar-menu .nav-treeview > .nav-item > .nav-link.active { background: var(--mp-mint); color: var(--mp-teal-deep); }
/* Bloco 3: movimento curto, ancorado no acionador e interrompível. */
.context-shell .app-sidebar {
    opacity: 0;
    transform: translateY(-8px);
    transform-origin: top left;
    transition: opacity 120ms cubic-bezier(.23, 1, .32, 1), transform 120ms cubic-bezier(.23, 1, .32, 1);
}
.context-shell .app-sidebar[data-open="true"] {
    opacity: 1;
    transform: translateY(0);
    transition-duration: 180ms;
}
.context-menu-cross { opacity: 0; }
.context-shell .context-menu-toggle :is(.context-menu-lines, .context-menu-cross) { transition: opacity 120ms ease-out; }
.context-menu-toggle[aria-expanded="true"] .context-menu-lines { opacity: 0; }
.context-menu-toggle[aria-expanded="true"] .context-menu-cross { opacity: 1; }
.context-shell[data-files-menu-instant] :is(.app-sidebar, .context-menu-lines, .context-menu-cross) { transition: none; }
@media (prefers-reduced-motion: reduce) {
    .context-shell :is(.app-sidebar, .context-menu-lines, .context-menu-cross) { transition: none; }
}
@media (max-width: 991.98px) {
    .context-shell .app-sidebar { transform: translateY(8px); transform-origin: bottom left; }
    .context-shell .app-sidebar[data-open="true"] { transform: translateY(0); }
}
/* Bloco 2: vidro apenas nos controles; superfícies sólidas são o padrão. */
.context-shell {
    --files-bar-surface: #fff;
    --files-menu-surface: #fff;
    --files-glass-shadow: 0 8px 24px rgb(16 62 71 / 12%), inset 0 1px 1px rgb(255 255 255 / 90%), inset 0 -1px 2px rgb(20 80 90 / 6%);
}
.context-shell .context-navbar {
    background: var(--files-bar-surface);
    border-color: #c9dddc;
    border-radius: 1.375rem;
    box-shadow: var(--files-glass-shadow);
}
.context-shell .context-navbar-title { line-height: 1.35; gap: .1rem; }
.context-shell .context-navbar-unit { color: #45666c; }
.context-shell .context-menu-toggle[aria-expanded="true"] { background: var(--mp-mint); }
.context-shell .app-sidebar {
    --lte-sidebar-hover-bg: var(--mp-mint);
    --lte-sidebar-color: var(--mp-ink);
    --lte-sidebar-hover-color: var(--mp-teal-deep);
    --lte-sidebar-active-color: var(--mp-teal-deep);
    --lte-sidebar-menu-active-bg: var(--mp-mint);
    --lte-sidebar-menu-active-color: var(--mp-teal-deep);
    --lte-sidebar-submenu-color: var(--mp-text-muted);
    --lte-sidebar-submenu-hover-color: var(--mp-teal-deep);
    --lte-sidebar-submenu-active-color: var(--mp-teal-deep);
    --lte-sidebar-header-color: var(--mp-text-muted);
    background: var(--files-menu-surface);
    color: var(--mp-ink);
    border-radius: 1.25rem;
    box-shadow: var(--files-glass-shadow);
    scrollbar-color: #789b9e transparent;
    scrollbar-width: thin;
}
.context-shell .sidebar-brand { border-bottom-color: var(--mp-border); }
.context-shell .brand-link, .context-shell .sidebar-menu .nav-link { color: var(--mp-ink); }
.context-shell .sidebar-menu .nav-link.active { background: var(--mp-mint); color: var(--mp-teal-deep); }
.context-shell .sidebar-menu .nav-header,
.context-shell .nav-status,
.context-shell .nav-item-future .nav-link { color: var(--mp-text-muted); }
.context-shell .sidebar-menu .nav-header-muted { color: var(--mp-text-muted) !important; }
.context-shell .mobile-menu-close {
    color: var(--mp-teal-deep);
    background: #f2f7f6;
    border-color: var(--mp-border);
    text-align: left;
    padding: .5rem .75rem;
}
.context-shell :is(.brand-link, .sidebar-menu a.nav-link, .mobile-menu-close):focus-visible {
    outline: 3px solid var(--mp-teal);
    outline-offset: 2px;
}
.context-shell :is(.context-navbar, .app-sidebar) ::selection { color: var(--mp-teal-deep); background: var(--mp-mint); }
@media (hover: hover) and (pointer: fine) {
    .context-shell .context-navbar button:hover,
    .context-shell .sidebar-menu a.nav-link:hover,
    .context-shell .mobile-menu-close:hover { background: var(--mp-mint); color: var(--mp-teal-deep); }
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .context-shell {
        --files-bar-surface: linear-gradient(155deg, rgb(250 254 253 / 88%), rgb(220 239 235 / 76%));
        --files-menu-surface: linear-gradient(155deg, rgb(250 254 253 / 96%), rgb(241 249 247 / 90%));
    }
    .context-shell .context-navbar { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
    .context-shell .app-sidebar { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
    .context-shell .context-more-panel {
        background: var(--files-menu-surface);
        box-shadow: var(--files-glass-shadow);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .context-shell { --files-bar-surface: #fff; --files-menu-surface: #fff; }
    .context-shell :is(.context-navbar, .app-sidebar, .context-more-panel) { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
    .context-shell :is(.context-navbar, .app-sidebar, .context-more-panel) { background: Canvas; color: CanvasText; border: 1px solid CanvasText; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .context-shell :is(.context-navbar button, .brand-link, .sidebar-menu .nav-link, .sidebar-menu .nav-header, .nav-status, .mobile-menu-close, .context-navbar-unit, .context-navbar-account) { color: CanvasText; }
    .context-shell .sidebar-menu .nav-header-muted { color: CanvasText !important; }
    .context-shell .sidebar-menu .nav-link.active,
    .context-shell .context-menu-toggle[aria-expanded="true"] { outline: 1px solid Highlight; }
    .context-shell :is(.context-navbar button, .brand-link, .sidebar-menu a.nav-link, .mobile-menu-close):focus-visible { outline-color: Highlight; }
}
@media print {
    .context-shell :is(.context-navbar, .app-sidebar, .files-menu-backdrop) { display: none !important; }
    .context-shell .app-wrapper { padding-bottom: 0 !important; }
}
@media (max-width: 991.98px) {
    .context-shell .app-wrapper { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
    .context-navbar { position: fixed; inset: auto 1rem max(1rem, env(safe-area-inset-bottom)); margin: 0; gap: .5rem; }
    .context-navbar-account { display: none; }
    .context-shell .app-sidebar { inset: auto auto calc(6.5rem + env(safe-area-inset-bottom)) 1rem; max-height: calc(100dvh - 8rem - env(safe-area-inset-bottom)); }
}
@media (max-width: 991.98px) {
    .app-wrapper { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
    .mobile-tabs { position: fixed; inset: auto 0 0; z-index: 1020; display: flex; justify-content: space-around; gap: .25rem; padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom)); background: var(--mp-surface); border-top: 1px solid var(--mp-border); }
    .mobile-tabs a, .mobile-tabs button { display: flex; flex: 1; min-width: 0; min-height: 3.4rem; align-items: center; justify-content: center; flex-direction: column; gap: .2rem; border: 0; border-radius: .65rem; background: transparent; color: var(--mp-text-muted); font: inherit; font-size: .75rem; text-decoration: none; }
    .mobile-tabs svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .mobile-tabs [aria-current="page"] { color: var(--mp-teal-deep); background: var(--mp-mint); font-weight: 700; }
    .mobile-tabs a:focus-visible, .mobile-tabs button:focus-visible { outline: 3px solid var(--mp-teal); outline-offset: -3px; }
    .app-header { position: sticky; top: 0; z-index: 1030; }
    .app-header .nav-link { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .mobile-menu-close { display: block; min-height: 44px; margin: .5rem .75rem; padding: .5rem .75rem; border: 1px solid #8fb4ba; border-radius: .5rem; background: transparent; color: #e0ebec; text-align: left; }
    .mobile-menu-close:focus-visible { outline: 2px solid #e0ebec; outline-offset: 3px; }
    .sidebar-menu .nav-link { min-height: 44px; }
    .sidebar-menu .nav-link p { white-space: normal; overflow: visible; text-overflow: clip; }
    .sidebar-wrapper { overscroll-behavior: contain; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
    body.sidebar-open { overflow: hidden; }
}
