/* Navegação autenticada — sidebar MovCar */
:root {
    --mc-sidebar-expanded: 228px;
    --mc-sidebar-collapsed: 72px;
    --mc-sidebar-gutter: 14px;
}

body.mc-app-shell {
    --mc-sidebar-current: var(--mc-sidebar-expanded);
    background: #f4f7f5;
    background-attachment: scroll;
    overflow-x: hidden;
}

/* O brilho ambiente pertence à área inteira do app. Assim ele não termina em
   uma linha reta na borda dos containers centralizados. */
body.mc-app-shell:has(.rel-ink),
body.mc-app-shell:has(.dash-ink),
body.mc-app-shell:has(.fin-page),
body.mc-app-shell:has(.vl-page) {
    background:
        radial-gradient(circle at 88% 5%, rgba(34, 197, 94, .13) 0, rgba(34, 197, 94, .06) 11rem, transparent 24rem),
        radial-gradient(circle at 18% 30%, rgba(22, 163, 74, .08) 0, transparent 21rem),
        #f4f7f5;
    background-attachment: fixed;
}

body.mc-app-shell .rel-ink::before,
body.mc-app-shell .rel-ink::after,
body.mc-app-shell .dash-ink::before,
body.mc-app-shell .dash-ink::after,
body.mc-app-shell .fin-page::before,
body.mc-app-shell .fin-page::after,
body.mc-app-shell .vl-page::before,
body.mc-app-shell .vl-page::after {
    content: none;
}

.mc-app-frame {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    margin-left: calc(var(--mc-sidebar-current) + (var(--mc-sidebar-gutter) * 2));
    transition: margin-left .28s cubic-bezier(.22, 1, .36, 1);
}

.mc-app-frame > main {
    flex: 1 1 auto;
}

.mc-sidebar {
    position: fixed;
    z-index: 1040;
    top: var(--mc-sidebar-gutter);
    bottom: var(--mc-sidebar-gutter);
    left: var(--mc-sidebar-gutter);
    width: var(--mc-sidebar-current);
    transition: width .28s cubic-bezier(.22, 1, .36, 1), transform .28s cubic-bezier(.22, 1, .36, 1);
}

.mc-sidebar__surface {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 1px solid rgba(15, 81, 50, .1);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at 12% 0%, rgba(34, 197, 94, .1), transparent 28%),
        rgba(255, 255, 255, .94);
    box-shadow:
        0 18px 50px rgba(15, 81, 50, .11),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.mc-sidebar__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    min-height: 68px;
    padding: .85rem .9rem .75rem 1rem;
    border-bottom: 1px solid rgba(15, 81, 50, .08);
}

.mc-sidebar__logo {
    min-width: 0;
    margin: 0;
    color: #15803d !important;
    font-size: 1.08rem;
    font-weight: 800;
}

.mc-sidebar__logo .logo__icon {
    color: #16a34a;
    font-size: 1.22rem;
}

.mc-sidebar__collapse,
.mc-sidebar__close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(15, 81, 50, .12);
    border-radius: .7rem;
    color: #64748b;
    background: rgba(248, 250, 249, .9);
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .28s ease;
}

.mc-sidebar__collapse:hover,
.mc-sidebar__collapse:focus-visible,
.mc-sidebar__close:hover,
.mc-sidebar__close:focus-visible {
    color: #15803d;
    border-color: rgba(22, 163, 74, .26);
    background: #f0fdf4;
    outline: none;
}

.mc-sidebar-store-wrap {
    flex: 0 0 auto;
    padding: .72rem .7rem .2rem;
}

.mc-sidebar-store {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    gap: .65rem;
    padding: .55rem .65rem !important;
    border: 1px solid rgba(22, 163, 74, .13);
    border-radius: .9rem;
    color: #334155;
    text-align: left;
    background: #f8faf9;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

button.mc-sidebar-store {
    cursor: pointer;
}

button.mc-sidebar-store:hover,
button.mc-sidebar-store:focus-visible,
button.mc-sidebar-store[aria-expanded="true"] {
    border-color: rgba(22, 163, 74, .27);
    background: #f0fdf4;
    box-shadow: 0 5px 16px rgba(15, 81, 50, .06);
    outline: none;
}

.mc-sidebar-store.dropdown-toggle::after,
.mc-sidebar-account__button.dropdown-toggle::after {
    display: none !important;
}

.mc-sidebar-store__icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: .65rem;
    color: #15803d;
    background: #dcfce7;
    font-size: .9rem;
}

.mc-sidebar-store__copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    line-height: 1.2;
}

.mc-sidebar-store__copy small {
    color: #94a3b8;
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.mc-sidebar-store__copy strong {
    overflow: hidden;
    color: #334155;
    font-size: .78rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-sidebar-store__chevron {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: .7rem;
    transition: transform .2s ease;
}

.mc-sidebar-store[aria-expanded="true"] .mc-sidebar-store__chevron {
    transform: rotate(180deg);
}

.mc-sidebar-store-menu,
.mc-sidebar-account-menu {
    min-width: 14.5rem;
    padding: .4rem;
    border: 1px solid rgba(15, 81, 50, .1);
    border-radius: .95rem;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.mc-sidebar-account-menu.show {
    transform-origin: left bottom;
    animation: mc-sidebar-account-menu-in .2s cubic-bezier(.2, .8, .2, 1) both;
}

.mc-sidebar-account-menu.show.is-closing {
    pointer-events: none;
    animation: mc-sidebar-account-menu-out .16s ease-in both;
}

@keyframes mc-sidebar-account-menu-in {
    from {
        opacity: 0;
        scale: .96;
    }
    to {
        opacity: 1;
        scale: 1;
    }
}

@keyframes mc-sidebar-account-menu-out {
    from {
        opacity: 1;
        scale: 1;
    }
    to {
        opacity: 0;
        scale: .96;
    }
}

.mc-sidebar-store-menu .dropdown-item,
.mc-sidebar-account-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .65rem;
    border-radius: .65rem;
    color: #475569;
    font-size: .8rem;
    font-weight: 600;
}

.mc-sidebar-store-menu .dropdown-item:hover,
.mc-sidebar-store-menu .dropdown-item:focus,
.mc-sidebar-account-menu .dropdown-item:hover,
.mc-sidebar-account-menu .dropdown-item:focus {
    color: #166534;
    background: #f0fdf4;
}

.mc-sidebar-store-menu .dropdown-item.is-active,
.mc-sidebar-account-menu .dropdown-item.active {
    color: #166534;
    background: #dcfce7;
}

.mc-sidebar-store-menu .dropdown-item .bi,
.mc-sidebar-account-menu .dropdown-item .bi {
    display: inline-grid;
    width: 1.15rem;
    place-items: center;
}

.mc-sidebar-menu-title {
    padding: .35rem .65rem .45rem;
    color: #94a3b8;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.mc-sidebar__scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: .65rem .7rem;
    scrollbar-color: rgba(22, 163, 74, .22) transparent;
    scrollbar-width: thin;
}

.mc-sidebar__scroll::-webkit-scrollbar {
    width: 5px;
}

.mc-sidebar__scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(22, 163, 74, .22);
}

.mc-sidebar__section-title {
    display: block;
    padding: .1rem .65rem .45rem;
    overflow: hidden;
    color: #94a3b8;
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mc-sidebar-nav {
    display: grid;
    gap: .22rem;
}

.mc-sidebar-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 42px;
    gap: .72rem;
    padding: .46rem .6rem;
    border: 1px solid transparent;
    border-radius: .78rem;
    color: #64748b;
    text-decoration: none;
    transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mc-sidebar-nav__link:hover,
.mc-sidebar-nav__link:focus-visible {
    color: #166534;
    border-color: rgba(22, 163, 74, .1);
    background: #f0fdf4;
    outline: none;
    transform: translateX(2px);
}

.mc-sidebar-nav__link.active {
    color: #fff;
    border-color: rgba(255, 255, 255, .2);
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow:
        0 8px 20px rgba(22, 163, 74, .22),
        inset 0 1px 0 rgba(255, 255, 255, .24);
}

.mc-sidebar-nav__icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border-radius: .55rem;
    font-size: .95rem;
}

.mc-sidebar-nav__link:not(.active) .mc-sidebar-nav__icon {
    background: rgba(241, 245, 249, .75);
}

.mc-sidebar-nav__link:hover .mc-sidebar-nav__icon,
.mc-sidebar-nav__link:focus-visible .mc-sidebar-nav__icon {
    background: #dcfce7;
}

.mc-sidebar-nav__link.active .mc-sidebar-nav__icon {
    color: #15803d;
    background: rgba(255, 255, 255, .9);
}

.mc-sidebar-nav__link.active:hover .mc-sidebar-nav__icon,
.mc-sidebar-nav__link.active:focus-visible .mc-sidebar-nav__icon {
    color: #166534;
    background: #dcfce7;
}

.mc-sidebar-nav__text {
    min-width: 0;
    overflow: hidden;
    font-size: .82rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-sidebar__footer {
    flex: 0 0 auto;
    padding: .7rem;
    border-top: 1px solid rgba(15, 81, 50, .08);
}

.mc-sidebar-account__button {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: .65rem;
    padding: .48rem .5rem !important;
    border: 1px solid rgba(15, 81, 50, .1);
    border-radius: .85rem;
    color: #334155;
    cursor: pointer;
    text-align: left;
    background: #f8faf9;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mc-sidebar-account__button:hover,
.mc-sidebar-account__button:focus-visible,
.mc-sidebar-account__button[aria-expanded="true"] {
    border-color: rgba(22, 163, 74, .24);
    background: #f0fdf4;
    box-shadow: 0 6px 16px rgba(15, 81, 50, .08), inset 0 1px 0 #fff;
    outline: none;
    transform: translateY(-1px);
}

.mc-sidebar-account__avatar {
    display: inline-grid;
    flex: 0 0 auto;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 5px 14px rgba(22, 163, 74, .2);
    font-size: .68rem;
    font-weight: 800;
}

.mc-sidebar-account__copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    line-height: 1.2;
}

.mc-sidebar-account__copy strong {
    overflow: hidden;
    color: #334155;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-sidebar-account__copy small {
    color: #94a3b8;
    font-size: .65rem;
}

.mc-sidebar-account__more {
    flex: 0 0 auto;
    color: #64748b;
    font-size: .72rem;
    transition: color .18s ease, transform .2s ease;
}

.mc-sidebar-account__button:hover .mc-sidebar-account__more,
.mc-sidebar-account__button:focus-visible .mc-sidebar-account__more,
.mc-sidebar-account__button[aria-expanded="true"] .mc-sidebar-account__more {
    color: #15803d;
}

.mc-sidebar-account__button[aria-expanded="true"] .mc-sidebar-account__more {
    transform: rotate(180deg);
}

.mc-mobile-appbar,
.mc-sidebar-backdrop {
    display: none;
}

@media (min-width: 992px) {
    html.mc-sidebar-collapsed body.mc-app-shell {
        --mc-sidebar-current: var(--mc-sidebar-collapsed);
    }

    html.mc-sidebar-collapsed .mc-sidebar__header {
        gap: .12rem;
        padding-inline: .62rem;
    }

    html.mc-sidebar-collapsed .mc-sidebar__logo {
        flex: 0 0 auto;
        width: 1.6rem;
        overflow: hidden;
    }

    html.mc-sidebar-collapsed .mc-sidebar__logo .logo__icon {
        margin-right: 0 !important;
    }

    html.mc-sidebar-collapsed .mc-sidebar__logo .logo__text,
    html.mc-sidebar-collapsed .mc-sidebar-store__copy,
    html.mc-sidebar-collapsed .mc-sidebar-store__chevron,
    html.mc-sidebar-collapsed .mc-sidebar__section-title,
    html.mc-sidebar-collapsed .mc-sidebar-nav__text,
    html.mc-sidebar-collapsed .mc-sidebar-account__copy,
    html.mc-sidebar-collapsed .mc-sidebar-account__more {
        display: none;
    }

    html.mc-sidebar-collapsed .mc-sidebar__collapse {
        width: 1.85rem;
        height: 1.85rem;
        transform: rotate(180deg);
    }

    html.mc-sidebar-collapsed .mc-sidebar-store-wrap {
        padding-inline: .62rem;
    }

    html.mc-sidebar-collapsed .mc-sidebar-store {
        min-height: 44px;
        justify-content: center;
        padding: .35rem !important;
    }

    html.mc-sidebar-collapsed .mc-sidebar__scroll {
        padding-inline: .55rem;
    }

    html.mc-sidebar-collapsed .mc-sidebar-nav__link {
        width: 44px;
        min-height: 44px;
        justify-content: center;
        margin-inline: auto;
        padding: 0;
    }

    html.mc-sidebar-collapsed .mc-sidebar-nav__link:hover,
    html.mc-sidebar-collapsed .mc-sidebar-nav__link:focus-visible {
        transform: translateY(-1px);
    }

    html.mc-sidebar-collapsed .mc-sidebar__footer {
        padding-inline: .55rem;
    }

    html.mc-sidebar-collapsed .mc-sidebar-account__button {
        width: 48px;
        justify-content: center;
        margin-inline: auto;
        padding: .38rem !important;
    }
}

@media (max-width: 991.98px) {
    body.mc-app-shell {
        display: block;
    }

    .mc-app-frame {
        width: 100%;
        min-height: calc(100vh - 66px);
        margin-left: 0;
    }

    .mc-mobile-appbar {
        position: sticky;
        z-index: 1035;
        top: .55rem;
        display: flex;
        align-items: center;
        gap: .65rem;
        width: calc(100% - 1.1rem);
        min-height: 52px;
        margin: .55rem;
        padding: .45rem .5rem .45rem .75rem;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 1.65rem;
        background: linear-gradient(135deg, rgba(34, 197, 94, .94), rgba(22, 163, 74, .98));
        box-shadow:
            0 10px 28px rgba(22, 163, 74, .22),
            0 2px 8px rgba(15, 23, 42, .08),
            inset 0 1px 0 rgba(255, 255, 255, .32);
        backdrop-filter: blur(16px) saturate(145%);
        -webkit-backdrop-filter: blur(16px) saturate(145%);
    }

    .mc-mobile-appbar__logo {
        flex: 0 0 auto;
        margin: 0;
        color: #fff !important;
        font-size: .96rem;
        font-weight: 800;
    }

    .mc-mobile-appbar .mc-mobile-appbar__logo .logo__icon {
        color: #fff !important;
    }

    .mc-mobile-appbar .mc-mobile-appbar__logo .logo__text {
        color: #fff !important;
    }

    .mc-mobile-appbar__store {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
        color: rgba(255, 255, 255, .78);
        font-size: .7rem;
        font-weight: 650;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mc-mobile-appbar__menu {
        display: inline-grid;
        flex: 0 0 auto;
        width: 2.4rem;
        height: 2.4rem;
        padding: 0;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, .35);
        border-radius: 999px;
        color: #fff;
        background: rgba(255, 255, 255, .12);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
        font-size: 1.25rem;
        transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
    }

    .mc-mobile-appbar__menu:hover,
    .mc-mobile-appbar__menu:focus-visible,
    .mc-mobile-appbar__menu[aria-expanded="true"] {
        border-color: rgba(255, 255, 255, .5);
        color: #fff;
        background: rgba(255, 255, 255, .22);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
        outline: none;
    }

    .mc-sidebar {
        top: .65rem;
        bottom: .65rem;
        left: .65rem;
        width: min(284px, calc(100vw - 1.3rem));
        transform: translateX(calc(-100% - 1.5rem));
    }

    .mc-sidebar__surface {
        border-radius: 1.25rem;
        box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    }

    .mc-sidebar-backdrop {
        position: fixed;
        z-index: 1039;
        inset: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(15, 23, 42, .38);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        transition: opacity .24s ease, visibility .24s;
    }

    body.mc-sidebar-mobile-open {
        overflow: hidden;
    }

    body.mc-sidebar-mobile-open .mc-sidebar {
        transform: translateX(0);
    }

    body.mc-sidebar-mobile-open .mc-sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .mc-sidebar-store-menu,
    .mc-sidebar-account-menu {
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 575.98px) {
    .mc-mobile-appbar__store {
        display: none;
    }

    .mc-mobile-appbar__menu {
        margin-left: auto;
    }

    .mc-app-frame .app-content {
        padding-left: .85rem;
        padding-right: .85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mc-app-frame,
    .mc-sidebar,
    .mc-sidebar-backdrop,
    .mc-sidebar-nav__link,
    .mc-sidebar__collapse,
    .mc-sidebar-account__button,
    .mc-sidebar-account__more {
        transition: none;
    }

    .mc-sidebar-account-menu.show,
    .mc-sidebar-account-menu.show.is-closing {
        animation: none;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .mc-sidebar__surface {
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .mc-mobile-appbar {
        background: linear-gradient(135deg, #22c55e, #16a34a);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}
