:root {
    --sidebar-width: 256px;
    --brand-50: #F0EADF;
    --brand-100: #F0EADF;
    --brand-500: #193B4F;
    --brand-600: #193B4F;
    --brand-700: #12303F;
    --brand-900: #12303F;
}

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

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--arx-font-ui), "Foco", system-ui, sans-serif;
    background-color: #F5F2EC;
    color: #1D2F3A;
}

body {
    overflow: hidden;
}

#moduleFrame {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width);
    border: none;
    width: calc(100% - var(--sidebar-width));
    height: 100vh;
    background-color: #F5F2EC;
}

.arx-sidebar {
    background: #193B4F;
    border-right: none;
}

/* A LISTA DO MENU ROLA SOZINHA (03/09/2026). O <body> da casca tem overflow:hidden,
   entao menu comprido em aparelho baixo nao era conteudo rolavel: era conteudo
   inalcancavel. Quem sentia era a administracao e a gerencia, que veem os dez itens
   mais os dois de administracao; o vendedor ve tres ou quatro e nunca notou. O
   min-height:0 e o que permite o item flex encolher dentro do <aside>. */
#mainSidebar nav {
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
}

/* Etiqueta de estado no item do menu (Estoque, em construcao): o rotulo diz o que a
   tela e ANTES do clique, para que funcionalidade incompleta nao pareca pronta. */
.nav-tag {
    margin-left: auto;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #EACFA5;
    border: 1px solid rgba(234, 207, 165, .45);
    border-radius: 999px;
    padding: 1px 7px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.arx-sidebar-topo {
    border-bottom: 1px solid #2C4B5E;
}

.arx-sidebar-logo {
    height: 30px;
    width: auto;
    max-width: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}

.arx-sidebar-nome {
    display:block;
    font-family: var(--arx-font-display), Georgia, serif;
    font-size:17px;
    font-weight:600;
    color:#F5F2EC;
    line-height:1.1;
}

.arx-sidebar-kicker {
    display:block;
    font-size:9px;
    letter-spacing:.18em;
    text-transform:uppercase;
    color:#EACFA5;
    margin-top:3px;
}

.arx-sidebar-rodape {
    border-top: 1px solid #2C4B5E;
}

.arx-sidebar-usuario-nome {
    color:#F5F2EC;
}

.arx-sidebar-usuario-papel {
    color:#93A7B3;
    text-transform:uppercase;
    letter-spacing:.1em;
    font-size:10px;
}

.nav-link {
    position: relative;
    color: #C9D5DC;
    border-radius: 0;
    border-left: 3px solid transparent !important;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.nav-link svg {
    flex-shrink: 0;
    color: #93A7B3;
    transition: color 120ms ease;
}

.nav-link:hover {
    background-color: #12303F;
    color: #F5F2EC;
}

.nav-link:hover svg {
    color: #EACFA5;
}

.nav-link.active {
    background-color: #12303F !important;
    color: #FFFFFF !important;
    border-left-color: #D07E1F !important;
    font-weight: 700;
}

.nav-link.active svg {
    color: #D07E1F;
}

.arx-sidebar-sair {
    color: #93A7B3;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 120ms ease, background-color 120ms ease;
}

.arx-sidebar-sair:hover {
    color: #EACFA5;
    background: #12303F;
}

.brand-initial,
.arx-avatar {
    background-color: #D07E1F;
    color: #FFFFFF;
    font-weight: 700;
}

/* Hamburger button */
/* 44x44 e o minimo de alvo de toque (era 40x40): dedo grande em celular pequeno
   errava a borda e o clique caia no conteudo do modulo atras. */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #EACFA5;
    background: #193B4F;
    color: #F5F2EC;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(25,59,79,.08);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(25, 59, 79, .45);
    z-index: 45;
}

@media (max-width: 1024px) {
    aside {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    aside.sidebar-open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .hamburger-btn {
        display: flex;
    }

    /* O menu encolhido só existe a partir de 1025px (ver a regra mais abaixo): no
       celular este botão não fazia nada e ainda era um alvo de 30x30. */
    .arx-menu-fino-btn {
        display: none;
    }

    #moduleFrame {
        left: 0;
        width: 100%;
    }
}

@media (min-width: 1025px) {
    .hamburger-btn {
        display: none;
    }
}

/* ── O MENU ENCOLHIDO (18/08/2026, pedido do Douglas) ────────────────────────
   Só os ícones e o logo da Lórica. A classe menu-fino mora no <html> (aplicada
   antes de pintar pelo theme-arx.js, porque o CSP não deixa script inline) e o
   iframe acompanha sozinho: ele já mede pela --sidebar-width. Só vale no
   desktop: no celular a barra já é gaveta pelo botão hambúrguer. */
.arx-menu-fino-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: #93A7B3;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}

.arx-menu-fino-btn:hover {
    color: #EACFA5;
    background: #12303F;
}

.arx-menu-fino-btn .ico-expandir {
    display: none;
}

@media (min-width: 1025px) {
    html.menu-fino {
        --sidebar-width: 76px;
    }

    html.menu-fino .arx-sidebar {
        width: 76px;
    }

    /* O topo vira coluna: o logo em cima, o botão de expandir logo abaixo. */
    html.menu-fino .arx-sidebar-topo {
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        height: auto;
        padding: 14px 0;
    }

    html.menu-fino .arx-sidebar-topo > span {
        display: none;
    }

    html.menu-fino .arx-menu-fino-btn {
        margin-left: 0;
    }

    html.menu-fino .arx-menu-fino-btn .ico-encolher {
        display: none;
    }

    html.menu-fino .arx-menu-fino-btn .ico-expandir {
        display: block;
    }

    /* Só o ícone no link: o rótulo é texto solto dentro do <a>, e font-size 0 o
       apaga sem tocar no svg, que mede em rem. O title (posto pelo shell) mantém
       o nome no passar do mouse, e a barrinha âmbar do ativo continua. */
    html.menu-fino #mainSidebar nav a {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
        font-size: 0;
        gap: 0;
    }

    /* A etiqueta tem tamanho proprio, entao o font-size 0 do rotulo nao a apaga. */
    html.menu-fino .nav-tag {
        display: none;
    }

    /* Rodapé: avatar e Sair empilhados, sem nome nem papel. */
    html.menu-fino .arx-sidebar-rodape {
        padding: 12px 8px;
    }

    html.menu-fino .arx-sidebar-rodape .flex {
        flex-direction: column;
        gap: 10px;
    }

    html.menu-fino .arx-sidebar-rodape .flex-1 {
        display: none;
    }

    /* A chave do tema fica; o rótulo dela sai. */
    html.menu-fino .arx-theme-lbl {
        display: none;
    }

    html.menu-fino .arx-theme-toggle {
        justify-content: center;
    }
}

/* ── O CHAMADO DA EQUIPE (28/08/2026) ────────────────────────────────────────
   O botão fica no rodapé da barra, acima do Tema escuro. O modal é do shell e
   cobre a tela inteira (o iframe inclusive). */
.arx-chamado-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: transparent;
    border: 1px solid #2C4B5E;
    border-radius: 8px;
    color: #C9D5DC;
    font-size: 13px;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}

.arx-chamado-btn:hover {
    color: #F5F2EC;
    background: #12303F;
}

.arx-chamado-btn svg {
    flex: 0 0 auto;
    color: #93A7B3;
}

.arx-chamado-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(18, 48, 63, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.arx-chamado-modal.hidden {
    display: none;
}

.arx-chamado-cartao {
    background: var(--arx-white, #FFFFFF);
    color: var(--arx-navy-ink, #1D2F3A);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(18, 48, 63, .35);
    width: min(560px, 96vw);
    overflow: hidden;
}

.arx-chamado-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--arx-line, #ECE4D6);
}

.arx-chamado-kicker {
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #D07E1F;
    margin-bottom: 2px;
}

.arx-chamado-topo h2 {
    font-family: var(--arx-font-display), Georgia, serif;
    font-size: 20px;
    margin: 0;
}

.arx-chamado-sub {
    font-size: 13px;
    color: var(--arx-soft, #606E78);
    margin-top: 4px;
}

.arx-chamado-topo button {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #93A7B3;
    cursor: pointer;
}

.arx-chamado-corpo {
    padding: 14px 20px;
}

.arx-chamado-tipos {
    display: flex;
    gap: 18px;
    margin-bottom: 10px;
    font-size: 13.5px;
}

.arx-chamado-tipos input {
    margin-right: 6px;
}

#chamadoMensagem {
    width: 100%;
    border: 1px solid var(--arx-line, #ECE4D6);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.arx-chamado-retorno {
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

.arx-chamado-retorno.ok { color: #288C46; }
.arx-chamado-retorno.erro { color: #BB4731; }

.arx-chamado-pe {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px 18px;
}

.arx-chamado-pe button {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    cursor: pointer;
}

#btnCancelarChamado {
    background: none;
    border: 1px solid var(--arx-line, #ECE4D6);
    color: var(--arx-navy-ink, #1D2F3A);
}

#btnEnviarChamado {
    background: #193B4F;
    border: none;
    color: #FFFFFF;
    font-weight: 600;
}

#btnEnviarChamado:disabled {
    opacity: .6;
    cursor: default;
}

@media (min-width: 1025px) {
    /* No menu encolhido sobra o icone, com o title dizendo o nome. */
    html.menu-fino .arx-chamado-btn {
        justify-content: center;
        padding: 8px 0;
    }

    html.menu-fino .arx-chamado-btn .arx-chamado-lbl {
        display: none;
    }
}
