/* ConsultJá NOC - V14 shell/sidebar consolidado */

:root {
    color-scheme: dark;
    --noc-sidebar-bg: #0c151f;
    --noc-sidebar-border: #213141;
    --noc-sidebar-text: #c9d5e1;
    --noc-sidebar-muted: #72869b;
    --noc-sidebar-active: rgba(255, 122, 24, .13);
    --noc-sidebar-active-border: rgba(255, 122, 24, .38);
    --noc-orange: #ff7a18;
}

html[data-theme="light"] { color-scheme: light; }

/* -----------------------------------------------------------------------
   SIDEBAR V14 - estilos completos para o markup novo
------------------------------------------------------------------------ */
.sidebar {
    box-sizing: border-box;
    min-width: 218px;
    width: 218px;
    height: 100vh;
    min-height: 100vh;
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--noc-sidebar-bg);
    border-right: 1px solid var(--noc-sidebar-border);
    color: var(--noc-sidebar-text);
}

.sidebar *, .sidebar *::before, .sidebar *::after { box-sizing: border-box; }

.sidebar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    min-height: 52px;
    padding: 2px 1px 10px;
}

.sidebar .brand-mark {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
    border-radius: 10px !important;
    background: var(--noc-orange) !important;
    color: #0b1118 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.sidebar-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.sidebar-brand-copy strong {
    display: block;
    overflow: hidden;
    color: #f0f5fa !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-brand-copy small {
    display: block;
    margin-top: 4px;
    color: #7290ac !important;
    font-size: 8px !important;
    letter-spacing: .01em;
    white-space: nowrap;
}

.sidebar-menu-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0 10px;
    scrollbar-width: thin;
}

.sidebar-section { margin-top: 13px; }
.sidebar-section:first-child { margin-top: 4px; }

.sidebar-section-title {
    display: block;
    margin: 0 3px 6px;
    color: #5f7891 !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .09em;
    line-height: 1.2;
}

.sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar .nav-link,
.sidebar-account-link,
.sidebar-logout {
    width: 100%;
    min-height: 37px;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--noc-sidebar-text) !important;
    font: inherit !important;
    font-size: 11px !important;
    line-height: 1 !important;
    text-align: left !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.sidebar .nav-link:hover,
.sidebar-account-link:hover,
.sidebar-logout:hover {
    background: rgba(255,255,255,.045) !important;
    border-color: rgba(255,255,255,.05) !important;
    color: #fff !important;
}

.sidebar .nav-link.active,
.sidebar-account-link.active {
    background: var(--noc-sidebar-active) !important;
    border-color: var(--noc-sidebar-active-border) !important;
    color: #fff !important;
}

.sidebar .nav-icon {
    width: 14px;
    min-width: 14px;
    display: inline-grid;
    place-items: center;
    color: #91a7bc;
    font-size: 10px;
}

.sidebar .nav-link.active .nav-icon { color: #ff9c52; }

.sidebar-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #1d2b39;
}

.sidebar-user {
    margin-bottom: 8px;
    padding: 10px 11px;
    border: 1px solid #263849;
    border-radius: 9px;
    background: #101d29;
}

.sidebar-user strong {
    display: block;
    overflow: hidden;
    color: #f1f6fb !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-user span,
.sidebar-user small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #7ea0c0 !important;
    font-size: 8.5px !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-account-link { margin-bottom: 3px !important; }
.sidebar-logout-form { margin: 0 !important; }
.sidebar-logout { border: 0 !important; color: #ff8d8d !important; }
.sidebar-logout:hover { color: #ffb1b1 !important; background: rgba(255,82,82,.08) !important; }

/* -----------------------------------------------------------------------
   CONTROLES DO SHELL
------------------------------------------------------------------------ */
.noc-shell-controls {
    position: relative;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    padding: 0 0 8px;
}

.noc-shell-button,
.noc-sidebar-reopen {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: var(--text, #eaf1f8);
    background: #111e2a;
    border: 1px solid #293b4c;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.noc-shell-button:hover,
.noc-sidebar-reopen:hover {
    border-color: rgba(255,122,24,.52);
    background: rgba(255,122,24,.12);
}

.noc-sidebar-reopen {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 50000;
    box-shadow: 0 8px 26px rgba(0,0,0,.28);
}

body:not(.noc-sidebar-hidden) .noc-sidebar-reopen { display: none; }

body.noc-sidebar-hidden .sidebar,
body.noc-sidebar-hidden .app-sidebar,
body.noc-sidebar-hidden nav.sidebar,
body.noc-sidebar-hidden .app > aside.sidebar,
body.noc-sidebar-hidden .app > nav.sidebar { display: none !important; }

body.noc-sidebar-hidden .app {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    width: 100% !important;
    max-width: none !important;
}

body.noc-sidebar-hidden .main,
body.noc-sidebar-hidden main.main,
body.noc-sidebar-hidden .map-main {
    display: block !important;
    grid-column: 1 / -1 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* -----------------------------------------------------------------------
   LIGHT THEME GLOBAL
------------------------------------------------------------------------ */
html[data-theme="light"] body,
html[data-theme="light"] .app,
html[data-theme="light"] .main {
    background: #eef2f6 !important;
    color: #17212b !important;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .app-sidebar,
html[data-theme="light"] nav.sidebar {
    background: #fff !important;
    border-color: #d9e1e8 !important;
    color: #17212b !important;
}

html[data-theme="light"] .sidebar-brand-copy strong { color: #17212b !important; }
html[data-theme="light"] .sidebar-brand-copy small,
html[data-theme="light"] .sidebar-section-title { color: #6d8195 !important; }
html[data-theme="light"] .sidebar .nav-link,
html[data-theme="light"] .sidebar-account-link { color: #243342 !important; }
html[data-theme="light"] .sidebar .nav-link:hover,
html[data-theme="light"] .sidebar-account-link:hover { background: #f3f6f9 !important; color: #17212b !important; }
html[data-theme="light"] .sidebar .nav-link.active,
html[data-theme="light"] .sidebar-account-link.active { background: #fff2e8 !important; border-color: #ffd1ae !important; color: #b85000 !important; }
html[data-theme="light"] .sidebar-footer { border-color: #d9e1e8 !important; }
html[data-theme="light"] .sidebar-user { background: #f7f9fb !important; border-color: #d9e1e8 !important; }
html[data-theme="light"] .sidebar-user strong { color: #17212b !important; }
html[data-theme="light"] .sidebar-user span,
html[data-theme="light"] .sidebar-user small { color: #62788d !important; }
html[data-theme="light"] .sidebar-logout { color: #c93e3e !important; }

html[data-theme="light"] .card,
html[data-theme="light"] .panel,
html[data-theme="light"] .table-card,
html[data-theme="light"] .modal,
html[data-theme="light"] .user-card,
html[data-theme="light"] .stat-card {
    background: #fff !important;
    border-color: #d9e1e8 !important;
    color: #17212b !important;
}

html[data-theme="light"] .input,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: #f8fafc !important;
    border-color: #cbd5df !important;
    color: #17212b !important;
}

html[data-theme="light"] .page-title,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] strong { color: #17212b; }
html[data-theme="light"] .page-subtitle,
html[data-theme="light"] .muted,
html[data-theme="light"] small { color: #667788; }
html[data-theme="light"] table,
html[data-theme="light"] th,
html[data-theme="light"] td { border-color: #d9e1e8 !important; }
html[data-theme="light"] th { color: #5e6f80 !important; }
html[data-theme="light"] .btn-secondary { background: #fff !important; border-color: #cbd5df !important; color: #23313f !important; }
html[data-theme="light"] .btn-secondary:hover { background: #f1f5f8 !important; }
html[data-theme="light"] .modal-backdrop { background: rgba(38,49,61,.48) !important; }
html[data-theme="light"] .noc-shell-button,
html[data-theme="light"] .noc-sidebar-reopen { color: #23313f; background: #fff; border-color: #cbd5df; }
html[data-theme="light"] .map-sync-status { background: #fff !important; border-color: #cbd6e0 !important; color: #425466 !important; box-shadow: none !important; }

/* -----------------------------------------------------------------------
   MOBILE
------------------------------------------------------------------------ */
@media (max-width: 820px) {
    .sidebar,
    .app-sidebar,
    nav.sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 40000 !important;
        width: min(86vw, 290px) !important;
        min-width: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
        box-shadow: 18px 0 55px rgba(0,0,0,.42);
    }

    body:not(.noc-sidebar-hidden)::after {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 39990;
        background: rgba(3,8,13,.52);
        backdrop-filter: blur(2px);
    }

    body.noc-sidebar-hidden .main,
    body.noc-sidebar-hidden main.main,
    body .main,
    body main.main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .noc-sidebar-reopen {
        top: max(9px, env(safe-area-inset-top)) !important;
        left: 9px !important;
        width: 38px;
        height: 38px;
        z-index: 50000 !important;
    }

    body.noc-sidebar-hidden .main:not(.map-main),
    body.noc-sidebar-hidden main.main:not(.map-main) {
        padding-top: max(56px, calc(env(safe-area-inset-top) + 50px)) !important;
    }

    .sidebar-brand { padding-top: 4px; }
}

/* ======================================================================
   V15 - RODAPE DA SIDEBAR SEM SUMIR EM TELAS BAIXAS
====================================================================== */
.sidebar-footer {
    display: grid;
    gap: 6px;
    padding-top: 8px;
}

.sidebar-user {
    margin-bottom: 0 !important;
    padding: 8px 10px !important;
}

.sidebar-user strong { font-size: 9.5px !important; }
.sidebar-user span,
.sidebar-user small { margin-top: 3px !important; font-size: 8px !important; }

.sidebar-footer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5px;
}

.sidebar-footer-actions .sidebar-account-link,
.sidebar-footer-actions .sidebar-logout-form,
.sidebar-footer-actions .sidebar-logout {
    min-width: 0;
    width: 100%;
    margin: 0 !important;
}

.sidebar-footer-actions .sidebar-account-link,
.sidebar-footer-actions .sidebar-logout {
    min-height: 32px !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 7px !important;
    font-size: 9.5px !important;
}

.sidebar-footer-actions .nav-icon {
    width: 11px !important;
    min-width: 11px !important;
}

@media (max-height: 700px) {
    .sidebar { padding-top: 8px !important; padding-bottom: 7px !important; }
    .sidebar-brand { min-height: 44px !important; padding-bottom: 5px !important; }
    .sidebar .brand-mark { width: 34px !important; height: 34px !important; min-width: 34px !important; }
    .sidebar-section { margin-top: 8px !important; }
    .sidebar .nav-link { min-height: 32px !important; }
    .sidebar-user { padding: 6px 9px !important; }
}

/* ======================================================================
   V16 - BOTOES NOC MAIS SOBRIOS / PROFISSIONAIS
====================================================================== */
.btn,
button.btn,
a.btn {
    min-height: 36px !important;
    padding: 0 13px !important;
    border-radius: 6px !important;
    border-width: 1px !important;
    border-style: solid !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    letter-spacing: .01em !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transform: none !important;
    transition: background-color .14s ease, border-color .14s ease, color .14s ease !important;
}

.btn-primary,
button.btn-primary,
a.btn-primary {
    color: #fff !important;
    background: #dd6b16 !important;
    border-color: #e77a28 !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
    background: #c95e11 !important;
    border-color: #d96c1b !important;
}

.btn-secondary,
button.btn-secondary,
a.btn-secondary {
    color: #d8e2eb !important;
    background: #101923 !important;
    border-color: #2b3948 !important;
}

.btn-secondary:hover,
button.btn-secondary:hover,
a.btn-secondary:hover {
    color: #fff !important;
    background: #162230 !important;
    border-color: #3a4b5c !important;
}

.btn-danger,
button.btn-danger,
a.btn-danger {
    color: #ff777d !important;
    background: transparent !important;
    border-color: #6f3338 !important;
}

.btn-danger:hover,
button.btn-danger:hover,
a.btn-danger:hover {
    color: #fff !important;
    background: #6c2d33 !important;
    border-color: #8e3940 !important;
}

.btn:focus-visible,
.noc-shell-button:focus-visible,
.noc-sidebar-reopen:focus-visible,
.graph-tab:focus-visible,
.graph-period:focus-visible,
.add-type-card:focus-visible {
    outline: 2px solid rgba(255,122,24,.68) !important;
    outline-offset: 2px !important;
}

.noc-shell-button,
.noc-sidebar-reopen {
    width: 34px;
    height: 34px;
    border-radius: 6px !important;
    background: #101923 !important;
    border-color: #2b3948 !important;
    box-shadow: none !important;
}

.noc-shell-button svg,
.noc-sidebar-reopen svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.graph-tab,
.graph-period {
    border-radius: 5px !important;
    font-weight: 650 !important;
    box-shadow: none !important;
}

.add-type-card {
    border-radius: 8px !important;
    box-shadow: none !important;
}

.modal-close {
    border-radius: 5px !important;
    box-shadow: none !important;
}

html[data-theme="light"] .btn-primary {
    color: #fff !important;
    background: #d76512 !important;
    border-color: #d76512 !important;
}

html[data-theme="light"] .btn-secondary {
    color: #243342 !important;
    background: #fff !important;
    border-color: #c8d2dc !important;
}

html[data-theme="light"] .noc-shell-button,
html[data-theme="light"] .noc-sidebar-reopen {
    color: #263646 !important;
    background: #fff !important;
    border-color: #c8d2dc !important;
}

/* ======================================================================
   V17 - BRANDING CONSULTJA + BOTOES MODERNOS
====================================================================== */

.sidebar-brand-v17 {
    gap: 9px !important;
}

.sidebar-brand-logo-wrap,
.login-brand-logo-wrap {
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.sidebar-brand-logo-wrap {
    width: 62px;
    height: 48px;
}

.sidebar-brand-logo {
    display: block;
    width: 62px;
    height: 48px;
    object-fit: contain;
}

.sidebar-brand-fallback,
.login-brand-fallback {
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(145deg, #ff942f, #d85b09);
    font-weight: 900;
}

.sidebar-brand-fallback {
    width: 42px;
    height: 42px;
    font-size: 13px;
}

.sidebar-brand-v17 .sidebar-brand-copy strong {
    font-size: 16px !important;
    letter-spacing: .08em;
}

.login-brand-v17 {
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-brand-logo-wrap {
    width: 116px;
    height: 78px;
}

.login-brand-logo {
    display: block;
    width: 116px;
    height: 78px;
    object-fit: contain;
}

.login-brand-fallback {
    width: 62px;
    height: 62px;
    font-size: 18px;
}

.login-brand-copy h1 {
    margin: 0;
    font-size: 27px !important;
    letter-spacing: .08em;
}

.login-brand-copy p {
    margin: 5px 0 0;
}

/* Botao principal com degradê discreto, sem cara de brinquedo. */
.btn-primary,
button.btn-primary,
a.btn-primary {
    color: #fff !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 45%),
        linear-gradient(135deg, #f58225 0%, #e56912 52%, #cc5608 100%) !important;
    border-color: #f28a36 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        0 7px 18px rgba(188,75,0,.16) !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,0) 48%),
        linear-gradient(135deg, #ff9138 0%, #ef741a 52%, #d95d09 100%) !important;
    border-color: #ffa059 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.20),
        0 10px 24px rgba(188,75,0,.22) !important;
    transform: translateY(-1px) !important;
}

.btn-primary:active,
button.btn-primary:active,
a.btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: inset 0 2px 5px rgba(85,30,0,.20) !important;
}

.btn-secondary,
button.btn-secondary,
a.btn-secondary {
    color: #dce6ef !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0)),
        linear-gradient(180deg, #182532 0%, #101923 100%) !important;
    border-color: #344555 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.045),
        0 5px 13px rgba(0,0,0,.14) !important;
}

.btn-secondary:hover,
button.btn-secondary:hover,
a.btn-secondary:hover {
    color: #fff !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,0)),
        linear-gradient(180deg, #203141 0%, #15212d 100%) !important;
    border-color: #4a6073 !important;
    transform: translateY(-1px) !important;
}

.btn-secondary:active,
button.btn-secondary:active,
a.btn-secondary:active {
    transform: translateY(0) !important;
}

.btn-danger,
button.btn-danger,
a.btn-danger {
    background: linear-gradient(180deg, rgba(134,42,48,.16), rgba(86,25,30,.12)) !important;
}

/* Acoes do rodape lateral ganham a mesma linguagem visual. */
.sidebar-account-link,
.sidebar-logout {
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)) !important;
}

html[data-theme="light"] .btn-primary {
    background:
        linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 46%),
        linear-gradient(135deg, #f47d1f 0%, #de650f 100%) !important;
    border-color: #e87721 !important;
}

html[data-theme="light"] .btn-secondary {
    color: #263646 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f3f6f9 100%) !important;
    border-color: #c8d2dc !important;
    box-shadow: 0 4px 12px rgba(48,68,88,.08) !important;
}

@media (max-width: 820px) {
    .sidebar-brand-logo-wrap {
        width: 56px;
        height: 44px;
    }

    .sidebar-brand-logo {
        width: 56px;
        height: 44px;
    }

    .login-brand-v17 {
        gap: 12px;
    }

    .login-brand-logo-wrap,
    .login-brand-logo {
        width: 92px;
        height: 64px;
    }
}

.btn,
button.btn,
a.btn {
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease !important;
}

.sidebar-brand-logo-wrap {
    padding: 3px;
    background: #091119;
    border: 1px solid #223243;
    border-radius: 10px;
}

html[data-theme="light"] .sidebar-brand-logo-wrap {
    background: #0b141d;
    border-color: #243545;
}

/* ======================================================================
   V18 - SIDEBAR MINIMALISTA / LOGO CENTRAL / LOGIN + SAIR
====================================================================== */
.sidebar-brand-v18 {
    min-height: 88px !important;
    justify-content: center !important;
    padding: 4px 0 12px !important;
}

.sidebar-brand-logo-only {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    text-decoration: none;
}

.sidebar-brand-ring {
    position: relative;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 50%;
    background:
        linear-gradient(#09131d, #09131d) padding-box,
        conic-gradient(from 210deg, #ff6a00, #ffb15a, #2bd49b, #4da3ff, #ff6a00) border-box;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.035),
        0 0 20px rgba(255,122,24,.16),
        0 9px 28px rgba(0,0,0,.30),
        inset 0 0 18px rgba(255,255,255,.025);
    transition: transform .18s ease, box-shadow .18s ease;
}

.sidebar-brand-logo-only:hover .sidebar-brand-ring {
    transform: translateY(-1px) scale(1.025);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.05),
        0 0 26px rgba(255,122,24,.24),
        0 12px 32px rgba(0,0,0,.34),
        inset 0 0 18px rgba(255,255,255,.035);
}

.sidebar-brand-v18 .sidebar-brand-logo {
    width: 58px !important;
    height: 58px !important;
    max-width: 58px !important;
    max-height: 58px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.sidebar-brand-v18 .sidebar-brand-fallback {
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

.sidebar-footer-v18 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding-top: 10px;
}

.sidebar-login-chip {
    min-width: 0;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 9px;
    overflow: hidden;
    color: #cdd8e3;
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0));
    border: 1px solid #263849;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.sidebar-login-chip:hover,
.sidebar-login-chip.active {
    color: #fff;
    border-color: rgba(255,122,24,.42);
    background: rgba(255,122,24,.08);
}

.sidebar-login-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #ff9c52;
    background: rgba(255,122,24,.10);
    font-size: 10px;
    font-weight: 900;
}

.sidebar-login-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9.5px;
    font-weight: 750;
}

.sidebar-logout-form-v18 {
    margin: 0 !important;
}

.sidebar-logout-v18 {
    width: auto !important;
    min-width: 62px !important;
    height: 36px !important;
    min-height: 36px !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    border: 1px solid rgba(255,91,91,.22) !important;
    border-radius: 8px !important;
    background: rgba(255,82,82,.045) !important;
    color: #ff8f8f !important;
    font-size: 9.5px !important;
}

.sidebar-logout-v18:hover {
    border-color: rgba(255,91,91,.40) !important;
    background: rgba(255,82,82,.09) !important;
    color: #ffb0b0 !important;
}

.sidebar-logout-icon {
    font-size: 12px;
    line-height: 1;
}

html[data-theme="light"] .sidebar-brand-ring {
    /*
     * A logo da ConsultJá foi desenhada para fundo escuro.
     * No tema claro mantemos somente o medalhão da marca escuro,
     * enquanto todo o restante da sidebar continua claro.
     */
    background:
        radial-gradient(circle at 50% 42%, #152230 0%, #0c1721 58%, #081119 100%) padding-box,
        conic-gradient(from 210deg, #ff6a00, #ffb15a, #2dbf8d, #4a8fe7, #ff6a00) border-box;
    box-shadow:
        0 0 0 1px rgba(20,35,50,.06),
        0 0 24px rgba(255,122,24,.14),
        0 10px 26px rgba(49,67,84,.16),
        inset 0 0 20px rgba(255,255,255,.025);
}

html[data-theme="light"] .sidebar-brand-v18 .sidebar-brand-logo {
    filter:
        drop-shadow(0 1px 1px rgba(0,0,0,.30))
        drop-shadow(0 0 5px rgba(255,255,255,.08));
}

html[data-theme="light"] .sidebar-brand-logo-only:hover .sidebar-brand-ring {
    box-shadow:
        0 0 0 1px rgba(20,35,50,.06),
        0 0 30px rgba(255,122,24,.22),
        0 13px 30px rgba(49,67,84,.18),
        inset 0 0 22px rgba(255,255,255,.035);
}

html[data-theme="light"] .sidebar-login-chip {
    color: #263746;
    background: #f7f9fb;
    border-color: #d8e0e7;
}

html[data-theme="light"] .sidebar-login-chip:hover,
html[data-theme="light"] .sidebar-login-chip.active {
    color: #9f4300;
    border-color: #f0bd96;
    background: #fff5ed;
}

@media (max-width: 820px) {
    .sidebar-brand-v18 {
        min-height: 80px !important;
    }

    .sidebar-brand-logo-only {
        width: 68px;
        height: 68px;
    }

    .sidebar-brand-ring {
        width: 64px;
        height: 64px;
    }

    .sidebar-brand-v18 .sidebar-brand-logo {
        width: 51px !important;
        height: 51px !important;
    }
}

/* ======================================================================
   V19 - MENU UM POUCO MAIS LEGIVEL
====================================================================== */
.sidebar .nav-link,
.sidebar-account-link,
.sidebar-logout {
    font-size: 12.5px !important;
}

.sidebar-section-title {
    font-size: 8.8px !important;
}

.sidebar .nav-icon {
    font-size: 11px !important;
}

.sidebar-login-text,
.sidebar-logout-v18 {
    font-size: 10.5px !important;
}

/* ======================================================================
   V22 - LOGIN MINIMALISTA / CONSULT JA - NOC
====================================================================== */
.login-page-v22 .login-card-v22 {
    width: min(430px, calc(100vw - 32px));
    padding: 30px 30px 26px;
}

.login-brand-v22 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    text-align: center;
}

.login-brand-logo-v22 {
    width: 190px;
    min-height: 112px;
    display: grid;
    place-items: center;
}

.login-brand-logo-v22 img {
    display: block;
    width: 190px;
    height: 112px;
    object-fit: contain;
}

.login-brand-fallback-v22 {
    width: 88px;
    height: 88px;
    place-items: center;
    border: 1px solid rgba(255,122,24,.45);
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(145deg, #ff942f, #d85b09);
    box-shadow: 0 18px 40px rgba(0,0,0,.24);
    font-size: 24px;
    font-weight: 900;
}

.login-system-title {
    color: #aab8c7;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.login-form-v22 {
    margin-top: 0;
}

.login-persistence-note {
    margin-top: 14px;
    color: #64778b;
    font-size: 9px;
    line-height: 1.45;
    text-align: center;
}

html[data-theme="light"] .login-system-title {
    color: #5d6e7f;
}

html[data-theme="light"] .login-persistence-note {
    color: #7a8998;
}

@media (max-width: 520px) {
    .login-page-v22 .login-card-v22 {
        padding: 24px 20px 22px;
    }

    .login-brand-logo-v22,
    .login-brand-logo-v22 img {
        width: 160px;
        height: 96px;
    }
}

/* ======================================================================
   V22 - BRAND MEDALLION AUTOMATICO NO TEMA CLARO
====================================================================== */
/* O círculo da marca permanece escuro automaticamente no tema claro. */


/* ======================================================================
   V24 - LOGIN: LOGO MAIOR
====================================================================== */
.login-page-v22 .login-brand-logo-v22 {
    width: 250px;
    min-height: 150px;
}

.login-page-v22 .login-brand-logo-v22 img {
    width: 250px;
    height: 150px;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 520px) {
    .login-page-v22 .login-brand-logo-v22,
    .login-page-v22 .login-brand-logo-v22 img {
        width: 210px;
        height: 126px;
    }
}
