:root {
    color-scheme: light;
    --verde: #123a2d;
    --verde-escuro: #0c3025;
    --fundo: #f5f6ef;
    --tinta: #162e26;
    --texto-leve: #456157;
    --linha: #d7e1d7;
    --terracota: #a94f35;
    --branco: #fff;
    font: 16px/1.5 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--fundo); color: var(--tinta); }
a { color: inherit; }
:focus-visible { outline: 3px solid #bb6348; outline-offset: 3px; }
.topo {
    min-height: 78px;
    padding: 14px clamp(18px,4vw,64px);
    background: var(--branco);
    border-bottom: 1px solid var(--linha);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; line-height: 1.2; }
.marca small { display: block; color: var(--texto-leve); font-weight: 550; margin-top: 3px; }
.logo-marca { width: 56px; height: 66px; object-fit: contain; }
.menu-topo, nav, .barra-mes form, .aprovacao { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.menu-topo a { font-size: .9rem; }
.entrada {
    display: grid;
    grid-template-columns: minmax(0,1.36fr) minmax(310px, .8fr);
    align-items: stretch;
    max-width: 1220px;
    margin: clamp(22px, 7vh, 80px) auto;
    padding: 0 clamp(16px,4vw,48px);
    gap: 14px;
}
.apresentacao {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 16px;
    min-height: 440px;
    padding: clamp(26px,6vw,74px);
    color: #f8f5e8;
    background:
        radial-gradient(ellipse at 110% 135%, transparent 47%, #8ec4a63d 47.2%, transparent 47.45%),
        radial-gradient(ellipse at 115% 138%, transparent 53%, #8ec4a642 53.2%, transparent 53.45%),
        linear-gradient(150deg, #123a2d, #1c493a);
}
.identidade { font-size: .75rem; font-weight: 750; letter-spacing: .14em; color: #e4d5aa; }
.apresentacao h1 { font: 540 clamp(2.3rem, 5vw, 3.8rem)/1.02 Georgia,serif; margin: 12px 0 24px; max-width: 14ch; }
.apresentacao p:last-child { color: #e4ece4; max-width: 40ch; margin: 0; }
.painel { border: 1px solid var(--linha); background: var(--branco); border-radius: 13px; }
.login { padding: clamp(24px, 4vw, 44px); align-content: center; }
h1, h2, h3, h4 { line-height: 1.16; margin: 0 0 10px; }
.login p, .titulo p { color: var(--texto-leve); margin: 0 0 18px; }
form label { display: block; font-weight: 650; font-size: .9rem; margin: 10px 0 4px; }
input:not([type=hidden]), select, textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 1px solid #b3c6b8;
    border-radius: 7px;
    padding: 8px 10px;
    background: var(--branco);
    color: var(--tinta);
    font: inherit;
}
textarea { resize: vertical; }
.botao {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--terracota);
    color: white;
    border: 1px solid transparent;
    border-radius: 7px;
    min-height: 42px;
    padding: 7px 13px;
    cursor: pointer;
    text-decoration: none;
    font: 660 .875rem/1.2 system-ui,sans-serif;
}
.botao:hover { filter: brightness(.92); }
.botao.secundario { border-color: #aec4b6; color: var(--verde); background: white; }
.login .botao { margin-top: 20px; width: 100%; }
.login .ajuda { margin: 18px 0 0; font-size: .86rem; }
.conta { max-width: 550px; margin: 34px auto; padding: 26px; }
.conta .botao { margin-top: 17px; }
.rodape { text-align: center; padding: 24px 16px; color: var(--texto-leve); font-size: .82rem; }
.area { max-width: 1580px; margin: 0 auto; padding: clamp(14px,3vw,40px); }
.titulo, .barra-mes { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.titulo p, .barra-mes h2 { margin: 0; }
.titulo { margin-bottom: 18px; }
.planejamento { padding: clamp(12px,2vw,22px); }
.barra-mes form { align-items: end; }
.barra-mes label { margin-top: 0; }
.aprovacao { margin: 12px 0; }
.mes-e-dia { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); gap: 14px; margin-top: 16px; }
.grade-scroll { overflow-x: auto; min-width: 0; }
.calendario { width: 100%; border-spacing: 0; table-layout: fixed; min-width: 650px; }
.calendario th { background: var(--verde-escuro); color: white; padding: 8px 3px; font-size: .9rem; }
.calendario td { border: 1px solid #e1e8e0; border-top: 0; border-left: 0; height: 100px; vertical-align: top; padding: 5px; overflow-wrap: anywhere; }
.calendario td:first-child { border-left: 1px solid #e1e8e0; }
.calendario .fora { background: #edf1eb; }
.calendario .selecionado { box-shadow: inset 0 0 0 2px var(--terracota); }
.dia-link { display: flex; align-items: center; justify-content: space-between; gap: 3px; text-decoration: none; font-size: .74rem; }
.dia-num { padding: 1px 7px; border: 1px solid #adc4b6; border-radius: 6px; color: var(--verde); font-weight: 750; }
.destaque { margin-top: 4px; font-size: .76rem; line-height: 1.24; }
.dia { padding: 13px; background: #f5f8f4; }
.dia > p { margin: 8px 0; }
.itens { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 7px; }
.itens li { display: grid; gap: 3px; border: 1px solid var(--linha); background: white; border-radius: 7px; padding: 8px; }
.itens small, .porcao { color: var(--texto-leve); font-size: .82rem; }
summary { cursor: pointer; color: var(--verde); font-size: .86rem; font-weight: 720; }
details form { margin: 6px 0; }
details .botao { margin-top: 7px; }
.estado { display: inline-block; width: fit-content; border-radius: 6px; padding: 2px 6px; font-size: .72rem; font-weight: 720; }
.estado.fechado { background: #e6ede8; color: #315247; }
.estado.aprovado { background: #e3f3e7; color: #1b5434; }
.calendario td.pendente, .campo-quantidade.pendente, .itens li.pendente, .estado.pendente { background: #fff2d4; color: #664304; }
.calendario td.aprovada, .campo-quantidade.aprovada, .itens li.aprovada, .estado.aprovada { background: #e3f3e7; color: #1b5434; }
.calendario td.reprovada, .campo-quantidade.reprovada, .itens li.reprovada, .estado.reprovada { background: #fbe6e7; color: #8c262d; }
.calendario td.dia-fechado { background: #e4e7e9; }
.legenda, .estados-dia { display: flex; flex-wrap: wrap; gap: 4px; }
.legenda { list-style: none; margin: 10px 0 0; padding: 0; }
.legenda .estado, .estados-dia .estado, .campo-quantidade .estado, .itens:not(.pedidos) .estado { border: 1px solid currentColor; }
.estados-dia { margin-top: 4px; }
.campo-quantidade { margin: 8px 0 12px; padding: 8px; border: 1px solid var(--linha); border-radius: 7px; background: white; }
.campo-quantidade details { margin-top: 5px; }
.erro, .sucesso { padding: 9px 12px; border-radius: 7px; background: #fae6e0; color: #7f2d1e; }
.sucesso { background: #def0e3; color: #174834; }
.vazio { color: var(--texto-leve); }
@media (max-width: 960px) { .mes-e-dia { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 690px) {
    .entrada { grid-template-columns: minmax(0,1fr); }
    .apresentacao { min-height: auto; }
    .conta { margin: 20px 14px; }
    .barra-mes form, .barra-mes form > div { width: 100%; }
}
.instalador { max-width: 940px; margin: 0 auto; }
.instalador > form > input:not([type=hidden]) { max-width: 420px; }
.instalador .botao { margin-top: 18px; }
.bancos-inst { display: grid; gap: 16px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 18px; }
.bancos-inst fieldset { min-width: 0; border: 1px solid var(--linha); border-radius: 9px; padding: 6px 14px 14px; }
.bancos-inst legend { font-weight: 700; color: var(--verde); }
@media (max-width: 690px) { .bancos-inst { grid-template-columns: minmax(0,1fr); } }
