/* ============================================================
   Dom Bosco · Financeiro — identidade do empreendimento
   terracota #D0833C · grafite #39373E · cinza #D7D7D7
   pêssego #FFC599 · Lato
   ============================================================ */

:root {
  --terracota: #D0833C;
  --terracota-escuro: #B06A2A;
  --terracota-10: #F9EDE2;
  --pessego: #FFC599;
  --grafite: #39373E;
  --grafite-90: #2E2C33;
  --grafite-80: #4A4751;
  --tinta: #2B2930;
  --cinza: #D7D7D7;
  --papel: #F7F2EC;
  --papel-card: #FFFDFB;
  --linha: #E8E0D6;
  --ok: #3E7A38;
  --ok-fundo: #EAF3E8;
  --alerta: #9A5B12;
  --alerta-fundo: #FBEAD2;
  --neg: #A8362C;
  --sombra: 0 1px 2px rgba(57, 55, 62, .05), 0 8px 24px -12px rgba(57, 55, 62, .18);
  --raio: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", sans-serif;
  font-size: 15px;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}

/* grão de papel sutil sobre toda a interface */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- estrutura ---------- */

.layout { display: flex; min-height: 100vh; }

main {
  flex: 1;
  min-width: 0;
  padding: 36px 44px 24px;
  max-width: 1280px;
}

footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--linha);
  color: #A39C92;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- sidebar ---------- */

.sidebar {
  width: 232px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(420px 260px at -60px -80px, rgba(208, 131, 60, .28), transparent 70%),
    linear-gradient(165deg, var(--grafite) 0%, var(--grafite-90) 100%);
  color: #EDEAE4;
  padding: 22px 14px 16px;
}

.marca {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.marca-logo {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: #fff;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(57,55,62,.08);
}
.marca-logo img { width: 36px; height: 36px; object-fit: contain; }
.marca-texto { display: flex; flex-direction: column; line-height: 1.15; }
.marca-texto strong { font-weight: 900; font-size: 1.02rem; letter-spacing: .01em; }
.marca-texto small {
  color: var(--pessego);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding-top: 16px; flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #C9C4BC;
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.sidebar nav a svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .85; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a.ativo {
  background: rgba(208, 131, 60, .16);
  border-left-color: var(--terracota);
  color: #fff;
}
.sidebar nav a.ativo svg { color: var(--pessego); opacity: 1; }

.sidebar-pe {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--terracota);
  color: #fff;
  font-weight: 900;
  font-size: .9rem;
}
.quem { flex: 1; font-size: .88rem; color: #C9C4BC; }
.sair-form { display: contents; }
.sair { color: #8E8A83; display: grid; place-items: center;
        background: none; border: 0; padding: 0; cursor: pointer; }
.sair svg { width: 18px; height: 18px; }
.sair:hover { color: var(--pessego); }

/* ---------- títulos ---------- */

h1 {
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -.01em;
  margin: 0 0 6px;
}
.subtitulo { color: #857E74; margin: 0 0 28px; font-size: .95rem; }
.cabecalho-pagina { margin-bottom: 26px; }
.cabecalho-pagina .filete {
  width: 44px; height: 4px;
  background: var(--terracota);
  border-radius: 2px;
  margin-bottom: 14px;
}

/* ---------- revelação escalonada ---------- */

@keyframes subir {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.reveal { animation: subir .5s cubic-bezier(.2, .7, .3, 1) both; }
.reveal:nth-child(2) { animation-delay: .06s; }
.reveal:nth-child(3) { animation-delay: .12s; }
.reveal:nth-child(4) { animation-delay: .18s; }
.reveal:nth-child(5) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.card {
  background: var(--papel-card);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  padding: 18px 20px 16px;
  box-shadow: var(--sombra);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(57,55,62,.05), 0 16px 32px -14px rgba(57,55,62,.22);
}
.card h2 {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin: 0 0 10px;
  color: #97907F;
}
.card .valor {
  font-size: 1.62rem;
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.card .valor small { display: block; font-size: .8rem; font-weight: 400; color: #97907F; margin-top: 4px; }
.card .invest {
  margin: 8px 0 0;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}
.card.destaque { border-top: 3px solid var(--terracota); }
.card.destaque .valor { color: var(--terracota-escuro); }
.card.ok { border-top: 3px solid var(--ok); }
.card.ok .valor { color: var(--ok); }
.neg { color: var(--neg) !important; }

/* barra de progresso (recebido / contratado) */
.progresso { margin: 16px 0 6px; }
.progresso-rotulos {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: #857E74;
  margin-bottom: 6px;
}
.progresso-rotulos strong { color: var(--tinta); font-weight: 900; }
.barra {
  height: 10px;
  border-radius: 6px;
  background: var(--terracota-10);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--linha);
}
.barra > span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--pessego), var(--terracota));
  animation: crescer 1s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes crescer { from { width: 0 !important; } }
.barra-mini {
  height: 5px;
  min-width: 70px;
  border-radius: 4px;
  background: var(--terracota-10);
  overflow: hidden;
}
.barra-mini > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--pessego), var(--terracota));
}

/* ---------- tabelas ---------- */

.tabela-wrap {
  background: var(--papel-card);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  overflow: auto;
  max-height: 76vh;
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 10px 14px;
  text-align: left;
  font-size: .9rem;
  border-bottom: 1px solid #F1EBE2;
  white-space: nowrap;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--grafite);
  color: #EDEAE4;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
thead th.grupo { text-align: center; border-left: 1px solid var(--grafite-80); border-bottom: 0; }
/* top menor que a altura real da 1ª linha: a 2ª sobrepõe 2-3px e nunca
   abre vão entre as faixas quando o cabeçalho fixa no scroll */
thead tr + tr th { top: 30px; background: var(--grafite-90); }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--terracota-10); }
tbody tr:last-child td { border-bottom: 0; }
tr.mes-atual td { background: #FFF4E8; box-shadow: inset 3px 0 0 var(--terracota); }
tr.paga td { color: #8F8A82; }
tfoot th {
  position: sticky;
  bottom: 0;
  background: var(--terracota-10);
  color: var(--tinta);
  font-weight: 900;
  border-top: 2px solid var(--terracota);
  font-variant-numeric: tabular-nums;
}
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
/* compensa o respiro do letter-spacing após a última letra, que desalinha
   o rótulo em relação aos números alinhados à direita */
thead th.num { padding-right: calc(14px - .18em); }

/* ---------- ordenação por clique no cabeçalho ---------- */

th.ordenavel { cursor: pointer; user-select: none; }
th.ordenavel:hover { color: #fff; }
th.ordenavel::after {
  content: '↕';
  display: inline-block;
  margin-left: 6px;
  font-size: .9em;
  opacity: 0;
  transition: opacity .12s ease;
}
th.ordenavel:hover::after { opacity: .55; }
th.ord-asc::after { content: '↑'; opacity: 1 !important; color: var(--pessego); }
th.ord-desc::after { content: '↓'; opacity: 1 !important; color: var(--pessego); }
td.forte { font-weight: 900; }

/* ---------- chips e tags ---------- */

.chip {
  display: inline-block;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.chip-rei { background: var(--terracota-10); color: var(--terracota-escuro); box-shadow: inset 0 0 0 1px #EBCFB4; }
.chip-alvorada { background: #EAE8EE; color: var(--grafite); box-shadow: inset 0 0 0 1px #D4D1DA; }
.chip-terrenista { background: #F0EDE8; color: #8F8A82; box-shadow: inset 0 0 0 1px var(--linha); }
.chip-neutro { background: #F0EDE8; color: #6E6A63; }

.tag { font-size: .7rem; font-weight: 900; padding: 4px 10px; border-radius: 20px; letter-spacing: .05em; }
.tag.pago { background: var(--ok-fundo); color: var(--ok); }
.tag.aberto { background: var(--alerta-fundo); color: var(--alerta); }
.tag.vendida { background: var(--ok-fundo); color: var(--ok); }
.tag.disponivel { background: var(--terracota-10); color: var(--terracota-escuro); }
.tag.terrenista { background: #F0EDE8; color: #8F8A82; }
.tag.permuta { background: var(--pessego); color: #7A4A1E; }
.suave { color: #8F8A82; font-style: italic; }

/* ---------- notas e filtros ---------- */

.nota {
  color: #857E74;
  font-size: .88rem;
  background: var(--papel-card);
  border: 1px solid var(--linha);
  border-left: 3px solid var(--pessego);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 14px 0;
}

.filtros { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; font-size: .9rem; color: #857E74; }
.filtros a {
  text-decoration: none;
  color: var(--grafite);
  font-weight: 700;
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--cinza);
  background: var(--papel-card);
  transition: all .15s ease;
}
.filtros a:hover { border-color: var(--terracota); color: var(--terracota-escuro); }
.filtros a.ativo { background: var(--grafite); color: #fff; border-color: var(--grafite); }

a { color: var(--terracota-escuro); }
td a { font-weight: 900; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ---------- ficha da unidade ---------- */

.ficha {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  background: var(--papel-card);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 18px 22px;
  margin-bottom: 18px;
}
.ficha div { display: flex; flex-direction: column; gap: 3px; }
.ficha dt {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #97907F;
}
.ficha dd { margin: 0; font-weight: 900; font-size: 1.02rem; }

/* ---------- login ---------- */

.login-cena {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 520px) 1fr;
}
.login-painel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
  color: #EDEAE4;
  background:
    radial-gradient(640px 420px at 110% -10%, rgba(208, 131, 60, .5), transparent 65%),
    radial-gradient(500px 380px at -20% 110%, rgba(255, 197, 153, .18), transparent 60%),
    linear-gradient(160deg, var(--grafite) 10%, var(--grafite-90) 90%);
}
.login-painel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg,
    transparent 0 56px, rgba(255, 255, 255, .035) 56px 57px);
  pointer-events: none;
}
.login-painel .topo { display: flex; align-items: center; gap: 14px; }
.login-painel .topo img {
  width: 54px; height: 54px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
}
.login-painel .topo strong { display: block; font-size: 1.1rem; font-weight: 900; }
.login-painel .topo small {
  color: var(--pessego);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.login-painel h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -.01em;
  max-width: 420px;
  margin: 0;
}
.login-painel h2 strong { font-weight: 900; color: var(--pessego); }
.login-painel .pe { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #8E8A83; }

.login-form-area { display: grid; place-items: center; padding: 40px 24px; }
/* ---------- página INCC ---------- */

.incc-grade {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px) { .incc-grade { grid-template-columns: 1fr; } }
.form-incc h2 { margin-bottom: 4px; }
.form-incc label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #97907F;
  margin: 16px 0 6px;
}
.form-incc input {
  width: 100%;
  padding: 11px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--tinta);
  background: #fff;
  border: 1px solid var(--cinza);
  border-radius: 10px;
}
.form-incc input:focus {
  outline: none;
  border-color: var(--terracota);
  box-shadow: 0 0 0 3px rgba(208, 131, 60, .18);
}
.form-incc > button {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--terracota), var(--terracota-escuro));
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.form-incc > button:hover { filter: brightness(1.06); }

/* ---------- seletor de mês ---------- */

.selmes { position: relative; }
.selmes-campo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tinta);
  background: #fff;
  border: 1px solid var(--cinza);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.selmes-campo:focus-visible,
.selmes-campo:hover { border-color: var(--terracota); }
.selmes-campo:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(208, 131, 60, .18);
}
.selmes-campo.vazio span { color: #97907F; font-weight: 400; }
.selmes-campo svg { width: 17px; height: 17px; color: #97907F; flex-shrink: 0; }
.selmes-painel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  padding: 12px;
  background: var(--papel-card);
  border: 1px solid var(--linha);
  border-radius: 14px;
  box-shadow: 0 18px 44px -14px rgba(43, 41, 48, .4);
  animation: subir .18s cubic-bezier(.2, .7, .3, 1) both;
}
.selmes-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.selmes-topo strong { font-size: .95rem; letter-spacing: .04em; }
.selmes-nav {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: #8F8A82;
  cursor: pointer;
}
.selmes-nav:hover { background: var(--terracota-10); color: var(--terracota-escuro); }
.selmes-grade {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.selmes-mes {
  padding: 9px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--tinta);
  cursor: pointer;
}
.selmes-mes:hover { background: var(--terracota-10); color: var(--terracota-escuro); }
.selmes-mes.hoje:not(.ativo) { box-shadow: inset 0 0 0 1px var(--terracota); }
.selmes-mes.ativo {
  background: linear-gradient(135deg, var(--terracota), var(--terracota-escuro));
  color: #fff;
}
.form-dica { font-size: .8rem; color: #97907F; margin: 14px 0 0; }
.ok-nota { border-left-color: var(--ok); }

td.acoes { width: 1%; padding-top: 4px; padding-bottom: 4px; }
.acoes-grupo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s ease;
}
tr:hover .acoes-grupo { opacity: 1; }
.acoes-grupo form { display: inline-flex; margin: 0; }
.icone-acao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8F8A82;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.icone-acao svg { width: 15px; height: 15px; }
.icone-acao:hover { background: var(--terracota-10); color: var(--terracota-escuro); }
.icone-acao.excluir:hover { background: #FBEAE8; color: #C0392B; }
.icone-acao.pagar:hover { background: var(--ok-fundo); color: var(--ok); }

.cabecalho-acao {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.btn-topo {
  flex-shrink: 0;
  padding: 11px 18px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--terracota), var(--terracota-escuro));
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(208, 131, 60, .7);
}
.btn-topo:hover { filter: brightness(1.06); }

h2.secao {
  margin: 30px 0 12px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .02em;
}
.erro-nota { border-left-color: #C0392B; }

/* ---------- modal de confirmação ---------- */

dialog.modal {
  margin: auto;
  width: min(92vw, 380px);
  border: 0;
  border-radius: 18px;
  padding: 30px 28px 26px;
  text-align: center;
  color: var(--tinta);
  background: var(--papel-card);
  box-shadow: 0 24px 60px -16px rgba(43, 41, 48, .45);
}
dialog.modal[open] { animation: subir .28s cubic-bezier(.2, .7, .3, 1) both; }
dialog.modal::backdrop {
  background: rgba(43, 41, 48, .45);
  backdrop-filter: blur(3px);
}
.modal-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #FBEAE8;
  color: #C0392B;
  margin-bottom: 14px;
}
.modal-icone svg { width: 24px; height: 24px; }
.modal-icone.editar { background: var(--terracota-10); color: var(--terracota-escuro); }
.modal-campo {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: var(--tinta);
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.modal-campo:focus {
  outline: 2px solid var(--terracota);
  outline-offset: -1px;
  background: var(--papel-card);
}
dialog.modal h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: .01em;
}
dialog.modal p { margin: 0; font-size: .92rem; color: #6E6A63; line-height: 1.5; }
dialog.modal p strong { color: var(--tinta); }
.modal-acoes { display: flex; gap: 10px; margin-top: 22px; }
.modal-acoes button {
  flex: 1;
  padding: 11px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  transition: filter .12s ease, background .12s ease;
}
.btn-fantasma {
  border: 1px solid var(--linha);
  background: transparent;
  color: #6E6A63;
}
.btn-fantasma:hover { background: var(--papel); }
.btn-perigo {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #D04A3C, #B03328);
}
.btn-perigo:hover { filter: brightness(1.08); }
.btn-primario {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--terracota), var(--terracota-escuro));
}
.btn-primario:hover { filter: brightness(1.06); }

/* modal com formulário (novo boleto, novo lançamento) */
dialog.modal-form { width: min(92vw, 430px); text-align: left; }
dialog.modal-form h3 { margin-bottom: 4px; }
dialog.modal-form label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #97907F;
  margin: 14px 0 6px;
}
dialog.modal-form input,
dialog.modal-form select {
  width: 100%;
  padding: 11px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--tinta);
  background: #fff;
  border: 1px solid var(--cinza);
  border-radius: 10px;
}
dialog.modal-form input:focus,
dialog.modal-form select:focus {
  outline: none;
  border-color: var(--terracota);
  box-shadow: 0 0 0 3px rgba(208, 131, 60, .18);
}
dialog.modal-form .campos-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.login-box { width: 100%; max-width: 360px; animation: subir .55s cubic-bezier(.2,.7,.3,1) both; }
.login-box h1 { font-size: 1.4rem; margin-bottom: 4px; }
.login-box .dica { color: #857E74; font-size: .9rem; margin: 0 0 26px; }
.login-box label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #97907F;
  margin: 18px 0 6px;
}
.login-box input {
  width: 100%;
  padding: 13px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--tinta);
  background: var(--papel-card);
  border: 1px solid var(--cinza);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-box input:focus {
  outline: none;
  border-color: var(--terracota);
  box-shadow: 0 0 0 3px rgba(208, 131, 60, .18);
}
.login-box button {
  margin-top: 26px;
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--terracota), var(--terracota-escuro));
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(208, 131, 60, .7);
  transition: transform .15s ease, box-shadow .15s ease;
}
.login-box button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(208, 131, 60, .8); }
.login-box button:active { transform: none; }
.erro {
  color: var(--neg);
  background: #F9E8E6;
  border: 1px solid #EFC9C5;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: .9rem;
}

/* ---------- responsivo ---------- */

@media (max-width: 980px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
  }
  .marca { border: 0; padding: 0; }
  .marca-texto small { display: none; }
  .sidebar nav { flex-direction: row; padding: 0; overflow-x: auto; }
  .sidebar nav a { border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; padding: 8px 10px; }
  .sidebar nav a.ativo { border-bottom-color: var(--terracota); }
  .sidebar nav a span { display: none; }
  .sidebar-pe { border: 0; padding: 0; }
  .quem { display: none; }
  main { padding: 22px 16px; }
  .login-cena { grid-template-columns: 1fr; }
  .login-painel { display: none; }
}
