:root {
    --forest: #1a2fb5;
    --forest-dark: #10184a;
    --moss: #4d63e8;
    --cream: #f4f6fb;
    --white: #ffffff;
    --superficie: #ffffff;
    --ink: #202538;
    --slate: #5b6178;
    --terra: #b85042;
    --border: #e1e4f0;
    --danger: #b3261e;
    --sucesso: #1e7a34;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Arial, sans-serif;
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
}

a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Login (split-screen) ---------- */
.tela-login {
    min-height: 100vh;
    display: flex;
}

.login-marca {
    flex: 1.1;
    background: linear-gradient(150deg, var(--forest-dark), var(--forest) 70%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-marca-forma {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.login-marca-forma-1 { width: 420px; height: 420px; top: -140px; right: -140px; }
.login-marca-forma-2 { width: 300px; height: 300px; bottom: -120px; left: -80px; background: rgba(255,255,255,.05); }

.login-marca-conteudo { max-width: 420px; padding: 3rem; position: relative; z-index: 1; }
.login-logo { font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; opacity: .85; margin-bottom: 2.2rem; }
.login-marca h2 { font-size: 2rem; line-height: 1.3; margin: 0 0 1.1rem; }
.login-marca p { font-size: 1.02rem; line-height: 1.6; opacity: .85; margin: 0; }

.login-formulario {
    flex: 1;
    max-width: 480px;
    background: var(--superficie);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.login-formulario-conteudo { width: 100%; max-width: 320px; }

.login-formulario h1 {
    font-size: 1.6rem;
    margin: 0 0 .35rem;
    color: var(--ink);
}
.login-formulario p.subtitulo {
    margin: 0 0 1.8rem;
    color: var(--slate);
    font-size: .92rem;
}

.btn-login {
    width: 100%;
    padding: .75rem 1.1rem;
    font-size: .95rem;
    margin-top: .3rem;
}

@media (max-width: 860px) {
    .login-marca { display: none; }
    .login-formulario { flex: 1; max-width: 100%; }
}

/* ---------- Barra superior ---------- */
.topo-app {
    background: var(--forest-dark);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.4rem;
    height: 58px;
    flex-shrink: 0;
}

.marca-topo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.usuario-topo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .88rem;
}
.usuario-topo-nome { opacity: .9; }
.icone-topo {
    color: var(--white);
    font-size: 1.15rem;
    opacity: .85;
    text-decoration: none;
    line-height: 1;
}
.icone-topo:hover { opacity: 1; text-decoration: none; }
.icone-topo-texto {
    color: var(--white);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255,255,255,.12);
    padding: .4rem .7rem;
    border-radius: 6px;
    white-space: nowrap;
}
.icone-topo-texto:hover { background: rgba(255,255,255,.22); text-decoration: none; color: var(--white); }

/* ---------- Layout geral ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
.app {
    display: flex;
    flex: 1;
}

.sidebar {
    background: var(--superficie);
    color: var(--ink);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* ---------- Menu de duas colunas (trilho de ícones + flyout) ---------- */
.menu-shell { flex: 1; display: flex; align-items: stretch; overflow: hidden; }

.menu-rail {
    width: 68px;
    flex-shrink: 0;
    background: var(--superficie);
    border-right: 1px solid var(--border);
    padding: .5rem 0;
    overflow-y: auto;
}

.rail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    width: 100%;
    padding: .8rem .3rem;
    color: var(--forest);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}
.rail-item .rail-icone { font-size: 1.3rem; line-height: 1; }
.rail-item .rail-texto { display: none; }

.rail-item:hover { background: var(--cream); text-decoration: none; }
.rail-item.ativo {
    background: var(--forest);
    color: var(--white);
}
.rail-item.atual:not(.ativo) {
    box-shadow: inset 3px 0 0 var(--forest);
    color: var(--forest);
}

.menu-flyout {
    width: 0;
    flex-shrink: 0;
    background: var(--forest-dark);
    overflow: hidden;
    transition: width .16s ease;
}
.menu-flyout.aberto { width: 230px; }

.flyout-painel { display: none; padding: 1.2rem 1.1rem; white-space: nowrap; }
.flyout-painel.ativo { display: block; }

.flyout-painel h3 {
    color: var(--white);
    font-size: 1rem;
    margin: 0 0 1rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.flyout-painel a {
    display: block;
    color: #d7e0fb;
    font-weight: 600;
    font-size: .88rem;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.flyout-painel a:last-child { border-bottom: none; }
.flyout-painel a:hover,
.flyout-painel a.ativo {
    color: var(--white);
    text-decoration: none;
}
.flyout-painel a.ativo { color: #9db4ff; }

.sidebar .rodape-sidebar {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border);
    font-size: .82rem;
    color: var(--slate);
}
.sidebar .rodape-sidebar a { color: var(--forest); }

.conteudo { flex: 1; min-width: 0; }

.topbar {
    background: var(--superficie);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 { font-size: 1.25rem; margin: 0; color: var(--ink); }

.main { padding: 1.6rem; }

/* ---------- Componentes ---------- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.card-stat {
    background: var(--superficie);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}

.card-stat .numero { font-size: 1.8rem; font-weight: 700; color: var(--forest); }
.card-stat .rotulo { color: var(--slate); font-size: .85rem; }

.painel {
    background: var(--superficie);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    margin-bottom: 1.4rem;
}

.painel-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.painel-cabecalho h2 { font-size: 1.05rem; margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
th { color: var(--slate); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:hover { background: var(--cream); }

.badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-verde { background: #dbe4fb; color: var(--forest-dark); }
.badge-amarelo { background: #fff3cd; color: #7a5b00; }
.badge-vermelho { background: #fbe1de; color: var(--danger); }
.badge-cinza { background: #e6e8f2; color: var(--slate); }

.btn {
    display: inline-block;
    padding: .55rem 1.1rem;
    border-radius: 7px;
    border: none;
    background: var(--forest);
    color: var(--white);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover { background: var(--forest-dark); text-decoration: none; }
.btn-secundario { background: var(--superficie); color: var(--forest); border: 1px solid var(--forest); }
.btn-secundario:hover { background: var(--cream); }
.btn-perigo { background: var(--danger); }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }

.form-grupo { margin-bottom: 1rem; }
.form-grupo label { display: block; margin-bottom: .35rem; font-size: .85rem; font-weight: 600; color: var(--ink); }
.form-grupo input, .form-grupo select, .form-grupo textarea {
    width: 100%;
    padding: .6rem .7rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: .92rem;
    font-family: inherit;
}
.form-grupo input:focus, .form-grupo select:focus, .form-grupo textarea:focus {
    outline: none;
    border-color: var(--forest);
}
.form-linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }

.alerta {
    padding: .8rem 1rem;
    border-radius: 7px;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.alerta-sucesso { background: #dbe4fb; color: var(--forest-dark); }
.alerta-erro { background: #fbe1de; color: var(--danger); }

.vazio { color: var(--slate); font-style: italic; padding: 1.5rem 0; text-align: center; }

.acoes-tabela a, .acoes-tabela button { margin-right: .4rem; }

/* ---------- Fotos ---------- */
.foto-miniatura {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    background: var(--cream);
}
.foto-miniatura-vazia {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px dashed var(--border);
}
.foto-preview-atual {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
}

/* ---------- Formulário com quadro de foto lateral ---------- */
.form-com-foto {
    display: flex;
    gap: 1.6rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.form-campos { flex: 1; min-width: 0; }
.form-foto-lateral { width: 230px; flex-shrink: 0; }
.form-foto-lateral label { display: block; margin-bottom: .5rem; font-size: .85rem; font-weight: 600; }
.quadro-foto {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--superficie);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.quadro-foto-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quadro-foto-vazio {
    flex-direction: column;
    gap: .3rem;
    color: var(--slate);
    background: var(--cream);
    opacity: .65;
}
.quadro-foto-icone { font-size: 2rem; }
.quadro-foto-texto { font-size: .78rem; }

@media (max-width: 700px) {
    .form-com-foto { flex-direction: column-reverse; }
    .form-foto-lateral { width: 160px; }
}

/* ---------- Agenda semanal ---------- */
.agenda-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.2rem;
}
.agenda-nav { display: flex; align-items: center; gap: .5rem; }
.agenda-periodo { margin-left: .5rem; color: var(--forest); font-size: 1rem; }

.agenda-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .7rem;
}

.agenda-coluna {
    background: var(--superficie);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.agenda-coluna-hoje { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }

.agenda-coluna-cabecalho {
    background: var(--cream);
    padding: .6rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.agenda-coluna-hoje .agenda-coluna-cabecalho { background: var(--forest); color: var(--white); }
.agenda-dia-nome { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.agenda-dia-numero { display: block; font-size: 1.3rem; font-weight: 700; }

.agenda-coluna-corpo { padding: .5rem; flex: 1; display: flex; flex-direction: column; gap: .45rem; }

.agenda-card {
    display: flex;
    flex-direction: column;
    background: var(--cream);
    border-left: 3px solid var(--forest);
    border-radius: 6px;
    padding: .4rem .55rem;
    text-decoration: none;
    color: var(--ink);
    font-size: .78rem;
    line-height: 1.3;
}
.agenda-card:hover { background: #e9ede4; text-decoration: none; }
.agenda-card-fazenda { border-left-color: var(--terra); }
.agenda-card-concluido { opacity: .5; }
.agenda-card-hora { font-weight: 700; font-size: .74rem; color: var(--forest); }
.agenda-card-titulo { font-weight: 600; }
.agenda-card-sub { color: var(--slate); font-size: .7rem; }

.agenda-vazio-dia {
    display: block;
    text-align: center;
    color: var(--slate);
    font-size: .75rem;
    padding: .5rem;
    border: 1px dashed var(--border);
    border-radius: 6px;
    text-decoration: none;
}
.agenda-vazio-dia:hover { background: var(--cream); text-decoration: none; }

@media (max-width: 900px) {
    .agenda-grid { grid-template-columns: 1fr; }
}

/* ---------- Aparência ---------- */
.opcoes-tema { display: flex; gap: 1.2rem; }
.opcao-tema { display: flex; align-items: center; gap: .4rem; font-weight: 500; font-size: .92rem; cursor: pointer; }
.opcao-tema input { width: auto; }

.logo-topo { max-height: 34px; max-width: 160px; object-fit: contain; }

/* ---------- Tema escuro ---------- */
body.tema-escuro {    --cream: #141a30;
    --superficie: #1c2340;
    --ink: #e7e9f5;
    --slate: #9aa3c9;
    --border: #2c3560;
    --forest: #4d63e8;
    --forest-dark: #10142c;
    --moss: #6f83ef;
    --sucesso: #3fae5f;
}
body.tema-escuro { background: var(--cream); }
body.tema-escuro .badge-verde { background: #16321f; color: #7be0a0; }
body.tema-escuro .badge-amarelo { background: #3a2f0d; color: #f0c85b; }
body.tema-escuro .badge-vermelho { background: #3a1414; color: #f2938a; }
body.tema-escuro .badge-cinza { background: #262d4e; color: var(--slate); }
body.tema-escuro .alerta-sucesso { background: #16321f; color: #7be0a0; }
body.tema-escuro .alerta-erro { background: #3a1414; color: #f2938a; }
body.tema-escuro .foto-miniatura,
body.tema-escuro .foto-preview-atual { background: var(--cream); border-color: var(--border); }
body.tema-escuro tbody tr:hover { background: var(--cream); }
body.tema-escuro .rail-item:hover { background: var(--cream); }

/* ---------- Painel Inicial: saudação e relógio ---------- */
.painel-saudacao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--superficie);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.6rem;
}
.relogio-digital {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--forest);
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

/* ---------- Duas colunas (calendário + compromissos) ---------- */
.painel-duas-colunas {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.4rem;
    align-items: start;
}
@media (max-width: 900px) {
    .painel-duas-colunas { grid-template-columns: 1fr; }
}

/* ---------- Mini calendário ---------- */
.mini-calendario {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .3rem;
}
.mini-calendario-cabecalho {
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--slate);
    padding-bottom: .3rem;
}
.mini-calendario-dia {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 8px;
    font-size: .85rem;
    color: var(--ink);
    text-decoration: none;
}
.mini-calendario-dia:hover { background: var(--cream); text-decoration: none; }
.mini-calendario-vazio { visibility: hidden; }
.mini-calendario-hoje { background: var(--forest); color: var(--white); font-weight: 700; }
.mini-calendario-ponto {
    position: absolute;
    bottom: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--terra);
}
.mini-calendario-hoje .mini-calendario-ponto { background: var(--white); }
.mini-calendario-legenda-ponto {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--terra);
    margin-right: .3rem;
}

/* ---------- Lista de próximos compromissos ---------- */
.lista-compromissos { display: flex; flex-direction: column; gap: .6rem; }
.item-compromisso {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .7rem .9rem;
    border-radius: 8px;
    background: var(--cream);
    border-left: 3px solid var(--forest);
    text-decoration: none;
    color: var(--ink);
}
.item-compromisso:hover { background: #e9ede4; text-decoration: none; }
.compromisso-fazenda { border-left-color: var(--terra); }
.item-compromisso-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 46px;
    flex-shrink: 0;
    line-height: 1.1;
}
.item-compromisso-dia { font-size: 1.15rem; font-weight: 700; color: var(--forest); }
.item-compromisso-mes { font-size: .68rem; text-transform: uppercase; color: var(--slate); }
.item-compromisso-corpo { display: flex; flex-direction: column; gap: .1rem; font-size: .87rem; }
.item-compromisso-corpo span { color: var(--slate); font-size: .78rem; }

.card-stat-link { text-decoration: none; display: block; }
.card-stat-link:hover { background: var(--cream); text-decoration: none; }

/* ---------- Cartões financeiros do topo (A Receber/A Pagar Hoje) ---------- */
.grid-financeiro-topo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.6rem;
}
@media (max-width: 560px) {
    .grid-financeiro-topo { grid-template-columns: 1fr; }
}

.cartao-financeiro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: var(--radius);
    padding: 1.3rem 1.5rem;
    color: var(--white);
    height: 100%;
}
.cartao-financeiro-receber { background: var(--sucesso); }
.cartao-financeiro-pagar { background: var(--danger); }
.cartao-financeiro h3 { margin: 0 0 .6rem; font-size: 1rem; font-weight: 700; }
.cartao-financeiro-valor { font-size: 2rem; font-weight: 700; margin-bottom: .4rem; }
.cartao-financeiro-restante { margin: 0 0 1rem; font-size: .85rem; opacity: .92; }
.cartao-financeiro-acoes { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.btn-financeiro-branco {
    background: var(--white);
    color: var(--ink);
    font-weight: 700;
    font-size: .82rem;
    padding: .55rem 1rem;
    border-radius: 7px;
    text-decoration: none;
    white-space: nowrap;
}
.btn-financeiro-branco:hover { opacity: .9; text-decoration: none; }
.cartao-financeiro-ver-todos { color: var(--white); font-size: .85rem; text-decoration: underline; }
.cartao-financeiro-ver-todos:hover { color: var(--white); }

.cartao-atraso {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--superficie);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    text-decoration: none;
    color: var(--ink);
}
.cartao-atraso:hover { text-decoration: none; background: var(--cream); }
.cartao-atraso-icone { font-size: 1.6rem; line-height: 1; }
.cartao-atraso h4 { margin: 0 0 .3rem; font-size: .85rem; font-weight: 700; }
.cartao-atraso-receber h4 { color: var(--sucesso); }
.cartao-atraso-pagar h4 { color: var(--danger); }
.cartao-atraso-valor { font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.cartao-atraso-data { font-size: .74rem; color: var(--slate); }

/* ---------- Linha: calendário, alertas de estoque e financeiro ---------- */
.linha-financeiro-calendario {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 1.4rem;
    align-items: stretch;
    margin-bottom: 1.6rem;
}
@media (max-width: 1200px) {
    .linha-financeiro-calendario { grid-template-columns: 1fr 1fr; }
    .painel-alertas-estoque { grid-column: span 2; }
}
@media (max-width: 700px) {
    .linha-financeiro-calendario { grid-template-columns: 1fr; }
    .painel-alertas-estoque { grid-column: auto; }
}
.linha-financeiro-calendario .grid-financeiro-topo {
    margin-bottom: 0;
    height: 100%;
    grid-template-rows: 1fr 1fr;
}
.painel-calendario-lateral { margin-bottom: 0; height: 100%; }

/* ---------- Alertas do estoque (mini painel) ---------- */
.painel-alertas-estoque { margin-bottom: 0; height: 100%; display: flex; flex-direction: column; }
.lista-alertas-estoque { display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.item-alerta-estoque {
    display: block;
    background: var(--cream);
    border-radius: 8px;
    padding: .6rem .8rem;
    text-decoration: none;
    color: var(--ink);
}
.item-alerta-estoque:hover { background: #e9ede4; text-decoration: none; }
.item-alerta-estoque-topo {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .4rem;
    font-size: .82rem;
}
.item-alerta-estoque-topo strong { line-height: 1.25; }
.item-alerta-estoque-categoria { flex-shrink: 0; font-size: .7rem; color: var(--slate); white-space: nowrap; }
.item-alerta-estoque-barra {
    height: 6px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: .3rem;
}
.item-alerta-estoque-barra-preenchida { height: 100%; background: var(--danger); border-radius: 4px; }
.item-alerta-estoque-numeros { font-size: .74rem; color: var(--slate); text-align: right; }
.btn-alerta-estoque {
    display: block;
    text-align: center;
    background: var(--forest);
    color: var(--white);
    font-weight: 700;
    font-size: .82rem;
    padding: .65rem;
    border-radius: 7px;
    text-decoration: none;
    margin-top: 1rem;
}
.btn-alerta-estoque:hover { opacity: .9; text-decoration: none; color: var(--white); }

/* ---------- EAD (passo a passo) ---------- */
.ead-modulo {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: .8rem;
    overflow: hidden;
}
.ead-modulo summary {
    padding: .8rem 1.1rem;
    cursor: pointer;
    font-weight: 700;
    font-size: .95rem;
    background: var(--cream);
    list-style: none;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.ead-modulo summary::-webkit-details-marker { display: none; }
.ead-modulo summary::before { content: '▸'; color: var(--slate); margin-right: .2rem; }
.ead-modulo[open] summary::before { content: '▾'; }
.ead-passos { padding: 1rem 1.4rem 1.2rem 2.6rem; margin: 0; }
.ead-passos li { margin-bottom: .6rem; line-height: 1.5; font-size: .92rem; }
.ead-passos code { background: var(--cream); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }

/* Compromissos em faixa horizontal, com rolagem lateral se necessário */
.lista-compromissos-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .7rem;
}

/* ---------- Menu no topo (alternativa ao menu lateral) ---------- */
body.layout-topo .app { flex-direction: column; }

body.layout-topo .sidebar {
    width: 100%;
    border-bottom: 1px solid var(--border);
}

body.layout-topo .menu-shell {
    flex: none;
    position: relative;
    overflow: visible;
}

body.layout-topo .menu-rail {
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-right: none;
    padding: 0 .5rem;
    overflow: visible;
}

body.layout-topo .rail-item {
    flex-direction: row;
    width: auto;
    padding: .8rem .9rem;
    gap: .5rem;
}
body.layout-topo .rail-item .rail-texto { display: inline; font-size: .85rem; font-weight: 600; }
body.layout-topo .rail-item .rail-icone { font-size: 1.05rem; }

body.layout-topo .menu-flyout {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 0;
    transition: max-height .16s ease;
    box-shadow: 0 12px 24px rgba(0,0,0,.18);
    z-index: 20;
}
body.layout-topo .menu-flyout.aberto { width: 100%; max-height: 400px; overflow-y: auto; }

body.layout-topo .flyout-painel {
    max-width: 1100px;
    margin: 0 auto;
}
body.layout-topo .flyout-painel a { border-bottom: 1px solid rgba(255,255,255,.08); }

body.layout-topo .conteudo { width: 100%; }

/* ---------- Fluxo de caixa (barras simples) ---------- */
.fluxo-barra-linha {
    position: relative;
    height: 9px;
    background: var(--cream);
    border-radius: 4px;
    margin-bottom: 4px;
    overflow: hidden;
}
.fluxo-barra {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px;
}
.fluxo-barra-entrada { background: var(--forest); z-index: 2; }
.fluxo-barra-entrada-prevista { background: var(--moss); opacity: .5; z-index: 1; }
.fluxo-barra-saida { background: var(--terra); z-index: 2; }
.fluxo-barra-saida-prevista { background: var(--terra); opacity: .35; z-index: 1; }
