/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --verde:    #22c55e;
    --amarelo:  #f59e0b;
    --vermelho: #ef4444;
    --cinza:    #6b7280;
    --bg:       #f5f5f5;
    --branco:   #ffffff;
    --texto:    #1a1a1a;
    --borda:    #e0e0e0;
    --topo-bg:  #ffffff;
    --topo-txt: #1a1a1a;
    --laranja:  #f97316;
    --laranja-escuro: #ea6c0a;
    --radius:   10px;
    --sombra:   0 2px 8px rgba(0,0,0,.10);
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--texto);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* =============================================
   Topo / Header
   ============================================= */
.topo {
    background: var(--topo-bg);
    color: var(--topo-txt);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--borda);
}

.topo-titulo { font-size: 1.1rem; font-weight: 700; }

.topo-logo img { display: block; margin: 4px 0; }
.logo-escuro { display: none !important; margin: 4px 0; }
[data-tema="escuro"] .logo-claro { display: none !important; }
[data-tema="escuro"] .logo-escuro { display: block !important; }

.login-logo .logo-escuro { display: none !important; }
[data-tema="escuro"] .login-logo .logo-claro { display: none !important; }
[data-tema="escuro"] .login-logo .logo-escuro { display: block !important; }

.topo nav { display: flex; gap: 1rem; flex-wrap: wrap; }

.topo nav a {
    color: var(--texto);
    font-size: .875rem;
    opacity: .75;
    transition: opacity .15s;
}
.topo nav a:hover { opacity: 1; text-decoration: none; }

/* =============================================
   Container
   ============================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* =============================================
   Alertas / Flash
   ============================================= */
.alerta {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
}
.alerta-erro { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alerta-ok   { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* =============================================
   Busca
   ============================================= */
.form-busca {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.form-busca input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: .5rem .75rem;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    font-size: .95rem;
}

.form-busca button,
.btn-limpar {
    padding: .5rem 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: .9rem;
}

.form-busca button { background: var(--laranja); color: #fff; }
.form-busca button:hover { background: var(--laranja-escuro); }
.btn-limpar { background: var(--borda); color: var(--texto); }

/* =============================================
   Grid de Cards
   ============================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--branco);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--sombra);
    border-left: 5px solid var(--cinza);
    display: flex;
    flex-direction: column;
    gap: .4rem;
    position: relative;
}

.card-verde   { border-left-color: var(--verde); }
.card-amarelo { border-left-color: var(--amarelo); }
.card-vermelho{ border-left-color: var(--vermelho); }

.card-status-badge {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .15rem .5rem;
    border-radius: 999px;
    align-self: flex-start;
    background: var(--bg);
    color: var(--cinza);
}

.card-verde   .card-status-badge { background: #dcfce7; color: #166534; }
.card-amarelo .card-status-badge { background: #fef9c3; color: #854d0e; }
.card-vermelho .card-status-badge { background: #fee2e2; color: #991b1b; }

.card h2 { font-size: 1rem; font-weight: 600; }
.card-categoria { font-size: .8rem; color: var(--cinza); }

.card-qtd {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: .25rem;
}
.card-unidade { font-size: .8rem; font-weight: 400; color: var(--cinza); }

.card-acoes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid var(--borda);
    gap: .5rem;
}

.card-acoes-grupo {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.card-acoes a {
    font-size: .82rem;
    color: #1a1a1a;
    font-weight: 500;
}
.card-acoes a:hover { color: #444; text-decoration: none; }

.card-btn-detalhe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #1a1a1a;
    color: #fff !important;
    border-radius: var(--radius);
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    transition: background .15s;
    text-decoration: none !important;
}
.card-btn-detalhe:hover { background: #333; text-decoration: none; }

.btn-excluir-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e5e7eb;
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius);
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    padding: 0;
}
.btn-excluir-card:hover { background: #1a1a1a; color: #fff; }

.card-excluir-form {
    position: absolute;
    top: .6rem;
    right: .6rem;
}

/* Card na página de detalhe */
.card-detalhe { max-width: 500px; margin-bottom: 1.5rem; }
.card-detalhe h1 { font-size: 1.3rem; }

/* =============================================
   Formulários
   ============================================= */
.form-pagina { max-width: 560px; }
.form-pagina h1 { margin-bottom: 1.25rem; font-size: 1.3rem; }

form label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: .9rem;
    font-size: .9rem;
    font-weight: 500;
}

form input[type="text"],
form input[type="number"],
form input[type="password"],
form textarea,
form select {
    padding: .5rem .75rem;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    width: 100%;
    background: var(--branco);
    transition: border-color .15s;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

form small { color: var(--cinza); font-size: .78rem; font-weight: 400; }

form button[type="submit"] {
    padding: .6rem 1.4rem;
    background: var(--laranja);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
form button[type="submit"]:hover { background: var(--laranja-escuro); }

/* =============================================
   Login
   ============================================= */
.pagina-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: var(--branco);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    width: 100%;
    max-width: 360px;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}
.login-logo img {
    max-width: 180px;
    height: auto;
}

.login-box h1 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* =============================================
   Tabela de Movimentações
   ============================================= */
.tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    background: var(--branco);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra);
}

.tabela th {
    background: #1a1a1a;
    color: #ffffff;
    padding: .6rem .75rem;
    text-align: left;
    font-weight: 600;
}

.tabela td {
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--borda);
}

.tabela tr:last-child td { border-bottom: none; }

.mov-entrada td:nth-child(2) { color: #166534; font-weight: 600; }
.mov-saida   td:nth-child(2) { color: #991b1b; font-weight: 600; }

/* =============================================
   Misc
   ============================================= */
.vazio { color: var(--cinza); font-style: italic; margin-top: 1rem; }

h2 { font-size: 1.1rem; margin: 1.25rem 0 .75rem; }

/* =============================================
   Landing Page
   ============================================= */
.lp-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.lp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.5rem;
    background: var(--branco);
    border-bottom: 1px solid var(--borda);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Botão hero */
.btn-hero {
    display: inline-block;
    background: var(--laranja);
    color: #fff;
    padding: .8rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    transition: background .15s;
}
.btn-hero:hover { background: var(--laranja-escuro); text-decoration: none; }
.btn-hero--sm { padding: .5rem 1.25rem; font-size: .875rem; }

/* Hero */
.lp-hero {
    background: #1a1a1a;
    color: #fff;
    padding: 5rem 1.25rem;
}

.lp-hero__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.lp-badge {
    display: inline-block;
    background: var(--laranja);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .3rem .8rem;
    border-radius: 999px;
    margin-bottom: .5rem;
}

.lp-hero__texto { display: flex; flex-direction: column; gap: 1rem; }

.lp-hero__texto h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.lp-hero__texto p {
    font-size: 1rem;
    color: #a1a1aa;
    line-height: 1.7;
}

/* Mockup */
.lp-mockup {
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.lp-mockup__bar {
    background: #3a3a3a;
    padding: .6rem 1rem;
    display: flex;
    gap: .4rem;
    align-items: center;
}

.lp-mockup__bar span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #555;
    display: block;
}
.lp-mockup__bar span:nth-child(1) { background: #ef4444; }
.lp-mockup__bar span:nth-child(2) { background: #f59e0b; }
.lp-mockup__bar span:nth-child(3) { background: #22c55e; }

.lp-mockup__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    padding: 1rem;
}

.lp-mini-card {
    background: #1a1a1a;
    border-radius: 8px;
    padding: .75rem;
    border-left: 4px solid #555;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.lp-mini-card--verde  { border-left-color: #22c55e; }
.lp-mini-card--amarelo{ border-left-color: #f59e0b; }
.lp-mini-card--vermelho{ border-left-color: #ef4444; }

.lp-mini-badge {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
}
.lp-mini-card--verde  .lp-mini-badge { color: #22c55e; }
.lp-mini-card--amarelo .lp-mini-badge { color: #f59e0b; }
.lp-mini-card--vermelho .lp-mini-badge { color: #ef4444; }

.lp-mini-card strong { font-size: .8rem; color: #e5e7eb; }

.lp-mini-qtd { font-size: 1.2rem; font-weight: 800; color: #fff; }
.lp-mini-qtd small { font-size: .7rem; font-weight: 400; color: #6b7280; }

/* Seção título */
.lp-secao-titulo {
    text-align: center;
    margin-bottom: 2.5rem;
}
.lp-secao-titulo h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: .5rem; }
.lp-secao-titulo p  { color: var(--cinza); font-size: .95rem; }
.lp-secao-titulo--claro h2 { color: #fff; }
.lp-secao-titulo--claro p  { color: #a1a1aa; }

/* Recursos */
.lp-recursos {
    padding: 4rem 1.25rem;
    background: var(--bg);
}

.lp-recursos__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.lp-recurso {
    background: var(--branco);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--sombra);
    border-top: 3px solid var(--laranja);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: transform .15s, box-shadow .15s;
}
.lp-recurso:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.lp-recurso__icone { font-size: 1.75rem; }
.lp-recurso h3 { font-size: 1rem; font-weight: 700; }
.lp-recurso p  { font-size: .875rem; color: var(--cinza); line-height: 1.6; }

/* Status */
.lp-status {
    background: #1a1a1a;
    padding: 4rem 1.25rem;
}

.lp-status__grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.lp-status-card {
    background: #2a2a2a;
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .75rem;
}

.lp-status-dot {
    width: 48px; height: 48px;
    border-radius: 50%;
}
.lp-status-dot--verde   { background: #22c55e; box-shadow: 0 0 16px rgba(34,197,94,.4); }
.lp-status-dot--amarelo { background: #f59e0b; box-shadow: 0 0 16px rgba(245,158,11,.4); }
.lp-status-dot--vermelho{ background: #ef4444; box-shadow: 0 0 16px rgba(239,68,68,.4); }

.lp-status-card h3 { font-size: 1rem; font-weight: 700; color: #fff; }
.lp-status-card p  { font-size: .875rem; color: #a1a1aa; line-height: 1.5; }

/* CTA */
.lp-cta {
    padding: 4.5rem 1.25rem;
    background: var(--laranja);
}

.lp-cta__inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lp-cta__inner h2 { font-size: 1.8rem; font-weight: 800; color: #fff; }
.lp-cta__inner p  { color: rgba(255,255,255,.8); font-size: 1rem; }

.lp-cta .btn-hero {
    background: #fff;
    color: var(--laranja);
}
.lp-cta .btn-hero:hover { background: #f5f5f5; }

/* Footer */
.lp-footer {
    background: #111;
    color: #6b7280;
    text-align: center;
    padding: 1.25rem;
    font-size: .8rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .lp-hero__inner { grid-template-columns: 1fr; }
    .lp-hero__visual { display: none; }
    .lp-status__grid { grid-template-columns: 1fr; }
    .lp-hero__texto h1 { font-size: 1.6rem; }
}

/* =============================================
   Lixeira
   ============================================= */
.lixeira-topo { margin-bottom: 1.25rem; }
.lixeira-topo h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; }
.lixeira-aviso { font-size: .875rem; color: var(--cinza); }

.dias-restantes { font-weight: 600; color: var(--cinza); }
.dias-urgente   { color: #991b1b; }

.lixeira-acoes { display: flex; gap: .5rem; align-items: center; }

.btn-restaurar,
.btn-apagar {
    border: none;
    border-radius: var(--radius);
    padding: .3rem .75rem;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.btn-restaurar { background: #dcfce7; color: #166534; }
.btn-apagar    { background: #fee2e2; color: #991b1b; }
.btn-restaurar:hover,
.btn-apagar:hover { opacity: .75; }

/* =============================================
   Nav Dropdown (configurações)
   ============================================= */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown__btn {
    background: none;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: .25rem .5rem;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    color: var(--texto);
}

.nav-dropdown__menu {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    background: var(--branco);
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 190px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity .15s, visibility .15s;
}

.nav-dropdown__menu.aberto {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.nav-dropdown__menu a {
    padding: .65rem 1rem;
    font-size: .875rem;
    color: var(--texto) !important;
    border-bottom: 1px solid var(--borda);
    opacity: 1 !important;
    transition: background .15s;
    white-space: nowrap;
}
.nav-dropdown__menu a:last-child { border-bottom: none; }
.nav-dropdown__menu a:hover { background: var(--bg); text-decoration: none; }

[data-tema="escuro"] .nav-dropdown__menu {
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* mobile: dropdown vira links normais no hamburguer */
.nav-config-mobile { display: none; }

@media (max-width: 780px) {
    .nav-dropdown { display: none; }
    .nav-config-mobile { display: block; }
}

/* =============================================
   Botão Toggle Tema
   ============================================= */
.btn-tema {
    background: none;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: .25rem .5rem;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}

/* =============================================
   Modo Escuro
   ============================================= */
[data-tema="escuro"] {
    --bg:     #0f172a;
    --branco: #2d3748;
    --texto:  #f1f5f9;
    --borda:  #334155;
    --cinza:  #94a3b8;
    --topo-bg: #1e293b;
    --topo-txt: #f1f5f9;
    --sombra: 0 2px 8px rgba(0,0,0,.6);
}


[data-tema="escuro"] .card {
    background: #2d3748;
    box-shadow: 0 2px 8px rgba(0,0,0,.6);
}

[data-tema="escuro"] .tabela {
    background: #1f2937;
}

[data-tema="escuro"] .tabela td {
    border-bottom-color: #374151;
}

[data-tema="escuro"] form input,
[data-tema="escuro"] form textarea,
[data-tema="escuro"] form select {
    background: #111827;
    border-color: #374151;
    color: #f3f4f6;
}

[data-tema="escuro"] .form-busca input {
    background: #111827;
    border-color: #374151;
    color: #f3f4f6;
}

[data-tema="escuro"] .btn-limpar {
    background: #374151;
    color: #f3f4f6;
}

[data-tema="escuro"] .card-status-badge {
    background: #111827;
}

[data-tema="escuro"] .card-acoes {
    border-top-color: #374151;
}

[data-tema="escuro"] .card-acoes a {
    color: #f1f5f9;
}
[data-tema="escuro"] .card-acoes a:hover {
    color: #cbd5e1;
}

[data-tema="escuro"] .card h2,
[data-tema="escuro"] .card-categoria,
[data-tema="escuro"] .card-qtd {
    color: #f1f5f9;
}

[data-tema="escuro"] .btn-excluir-card {
    background: var(--laranja);
    color: #fff;
}

[data-tema="escuro"] .card-btn-detalhe {
    background: #334155;
    color: #f1f5f9 !important;
}

[data-tema="escuro"] .login-box {
    background: #1f2937;
}

[data-tema="escuro"] .topo nav a {
    color: #f1f5f9;
}

[data-tema="escuro"] .topo {
    border-bottom-color: #334155;
}

/* =============================================
   Form Card
   ============================================= */
.form-card {
    background: var(--branco);
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
}

.form-card__header {
    padding: 1.5rem 1.75rem 0;
    border-bottom: 1px solid var(--borda);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.form-card__header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: .25rem;
}

.form-card__header p {
    font-size: .875rem;
    color: var(--cinza);
}

.form-card form {
    padding: 0 1.75rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1.25rem;
}

.form-col-2 { grid-column: span 2; }

.form-card__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--borda);
    margin-top: 1.25rem;
}

.btn-secundario {
    padding: .6rem 1.2rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    color: var(--cinza);
    background: var(--bg);
    border: 1px solid var(--borda);
    transition: background .15s;
}
.btn-secundario:hover { background: var(--borda); text-decoration: none; }

[data-tema="escuro"] .form-card__header,
[data-tema="escuro"] .form-card__footer { border-color: #334155; }

/* =============================================
   Responsivo Mobile
   ============================================= */
@media (max-width: 600px) {

    /* Topo */
    .topo {
        padding: .5rem 1rem;
        gap: .5rem;
    }
    .topo nav {
        gap: .5rem;
        font-size: .8rem;
    }
    .topo nav a { font-size: .78rem; }

    /* Cards */
    .grid-cards {
        grid-template-columns: 1fr;
    }

    /* Form card */
    .form-card {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-col-2 { grid-column: span 1; }
    .form-card__header,
    .form-card form,
    .form-card__footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .form-card__footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .form-card__footer button,
    .form-card__footer .btn-secundario {
        width: 100%;
        text-align: center;
    }

    /* Tabela lixeira */
    .tabela {
        font-size: .78rem;
    }
    .tabela th, .tabela td {
        padding: .4rem .5rem;
    }

    /* Login */
    .login-box {
        margin: 1rem;
        padding: 1.5rem 1rem;
    }

    /* Landing */
    .lp-header {
        padding: .6rem 1rem;
    }
    .lp-hero {
        padding: 3rem 1rem;
    }
    .lp-recursos,
    .lp-status,
    .lp-cta {
        padding: 2.5rem 1rem;
    }
    .lp-cta__inner h2 { font-size: 1.4rem; }

    /* Alterar senha */
    .form-pagina {
        padding: 0 1rem;
    }
}

/* =============================================
   Hamburguer
   ============================================= */
.topo-direita { display: none; align-items: center; gap: .5rem; }
.btn-tema--mobile { display: none; }

.btn-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .25rem;
    width: 32px;
    height: 32px;
}

.btn-hamburger span {
    display: block;
    height: 2px;
    background: var(--texto);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

.btn-hamburger.ativo span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.btn-hamburger.ativo span:nth-child(2) { opacity: 0; }
.btn-hamburger.ativo span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 780px) {
    .topo { flex-wrap: nowrap; position: relative; }

    .topo-direita { display: flex; }
    .btn-tema--mobile { display: block; }
    .btn-tema--desktop { display: none; }

    .topo nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--topo-bg);
        border-top: 1px solid var(--borda);
        border-bottom: 2px solid var(--borda);
        padding: .75rem 1rem;
        gap: .75rem;
        z-index: 200;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
    }

    .topo nav.nav-aberto { display: flex; }

    .topo nav a {
        font-size: .9rem;
        opacity: 1;
        padding: .4rem 0;
        border-bottom: 1px solid var(--borda);
    }
    .topo nav a:last-child { border-bottom: none; }

    .topo nav .btn-tema { display: none; }
}

@media (max-width: 780px) {
    .lp-header {
        padding: .5rem 1rem;
        justify-content: space-between;
    }
    .btn-hero--sm {
        padding: .4rem .85rem;
        font-size: .78rem;
        white-space: nowrap;
    }
}

/* =============================================
   Landing Institucional
   ============================================= */
.pagina-landing--institucional {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #111;
}

/* Hero foto */
.lp-hero-foto {
    position: relative;
    min-height: 480px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-hero-foto__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.62) 0%, rgba(0,0,0,.45) 100%);
}

.lp-hero-foto__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 3rem 1.5rem;
    max-width: 680px;
}

.lp-hero-foto__sub {
    font-size: 1rem;
    font-weight: 700;
    color: var(--laranja);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lp-hero-foto__desc {
    font-size: .95rem;
    color: rgba(255,255,255,.8);
    line-height: 1.7;
}

.lp-hero-foto__link {
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    border-bottom: 1px solid rgba(255,255,255,.25);
    padding-bottom: 2px;
    transition: color .15s;
}
.lp-hero-foto__link:hover { color: #fff; text-decoration: none; }

/* Galeria */
.lp-galeria {
    background: #1a1a1a;
    padding: 1.5rem;
}

.lp-galeria__grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}

.lp-galeria__item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.lp-galeria__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.lp-galeria__item:hover img { transform: scale(1.04); }

.lp-galeria__label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    padding: 1.25rem .75rem .5rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Acesso */
.lp-acesso {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: #111;
}

.lp-acesso__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.lp-acesso__titulo {
    font-size: 1rem;
    color: rgba(255,255,255,.55);
    letter-spacing: .02em;
}

.lp-inst__aviso {
    font-size: .75rem;
    color: rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    gap: .3rem;
}
.lp-inst__aviso::before { content: '🔒'; font-size: .75rem; }

@media (max-width: 700px) {
    .lp-galeria__grid { grid-template-columns: repeat(2, 1fr); }
    .lp-hero-foto { min-height: 360px; }
}

@media (max-width: 420px) {
    .lp-galeria__grid { grid-template-columns: 1fr 1fr; gap: .4rem; }
    .lp-galeria { padding: .75rem; }
}

/* =============================================
   Ajuda
   ============================================= */
.ajuda__titulo {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.75rem;
}

.ajuda__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.ajuda__bloco {
    background: var(--branco);
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    border-top: 3px solid var(--laranja);
}

.ajuda__icone { font-size: 1.5rem; }

.ajuda__bloco h2 { font-size: 1rem; font-weight: 700; }

.ajuda__bloco p,
.ajuda__bloco li {
    font-size: .875rem;
    color: var(--cinza);
    line-height: 1.65;
}

.ajuda__bloco ul {
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.ajuda__badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 999px;
    margin-right: .2rem;
}
.ajuda__badge--verde   { background: #dcfce7; color: #166534; }
.ajuda__badge--amarelo { background: #fef9c3; color: #854d0e; }
.ajuda__badge--vermelho{ background: #fee2e2; color: #991b1b; }
