/* Fontes servidas pelo próprio app (Fontsource, OFL): sem esperar o Google no 4G. */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/outfit-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
}

:root {
  /* Marca do app do personal: roxo profundo e coral. Verde fica só para "pago". */
  --ink: #1f1a2e;
  --pine: #6a3fd0;
  --pine-deep: #24133f;
  --leaf: #f0eaff;
  --leaf-line: #d9ccfb;
  --amber: #ff7a59;
  --amber-soft: #fff0ea;
  --sand: #f6f3fa;
  --paper: #ffffff;
  --line: #e5dfee;
  --ok: #1c6b48;
  --ok-deep: #0f5c3a;
  --ok-soft: #e7f6ee;
  --ok-line: #b7e4cb;
  --danger: #9d2c2c;
  --danger-soft: #fdeceb;
  --info: #1d4e89;
  --info-soft: #e7f0fa;
  --muted: #625a73;
  --shadow: 0 12px 32px rgba(36, 19, 63, .08);
  --radius: 18px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(255, 122, 89, .14), transparent 50%),
    var(--sand);
  min-height: 100vh;
}
body.com-nav { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
body.com-nav .btn,
body.com-nav input,
body.com-nav select,
body.com-nav textarea,
body.com-nav .item-card { scroll-margin-bottom: 140px; scroll-margin-top: 80px; }
a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.cabeca { position: sticky; top: 0; z-index: 30; }
.vista-barra {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .55rem 1rem; background: #f6e7c3; color: var(--ink); border-bottom: 1px solid #e3cf96;
}
.vista-barra form { margin: 0; }
.vista-barra .btn { background: white; border-color: #e3cf96; color: var(--ink); }
.topbar {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem;
  background: var(--pine-deep);
  color: white;
  border-bottom: 3px solid var(--amber);
}
.brand { display: flex; align-items: center; gap: .65rem; color: white; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--amber); color: var(--ink);
  font-family: var(--display); font-weight: 700;
}
.brand-mark img, .logo-preview {
  width: 100%; height: 100%; object-fit: contain; background: white;
}
.logo-preview {
  width: 72px; height: 72px; border-radius: 14px;
  border: 1px solid var(--line);
}
.brand-mark-grande { width: 64px; height: 64px; border-radius: 18px; font-size: 1.4rem; margin-bottom: .4rem; }
.marca-personal { width: 26px; height: 26px; display: block; }
.brand-mark-grande .marca-personal { width: 40px; height: 40px; }
.brand-texto { display: flex; flex-direction: column; min-width: 0; }
.brand-texto strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.brand-texto small { color: #d9cff2; }
.top-nav { display: none; gap: .25rem; margin-left: auto; }
.nav-link, .bottom-nav a, .sair, .btn-icone {
  display: inline-flex; align-items: center; gap: .35rem;
  color: white; text-decoration: none; border-radius: 999px;
}
.nav-link { padding: .45rem .7rem; color: #d9cff2; }
.nav-link.is-active, .bottom-nav a.is-active { background: rgba(255,255,255,.12); color: white; }
.btn-icone { margin-left: auto; width: 44px; height: 44px; justify-content: center; }
.top-user { display: flex; align-items: center; gap: .6rem; margin-left: .2rem; }
.top-user span { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sair { padding: .35rem .55rem; }
.btn-senha {
  margin-left: auto;
  padding: .4rem .85rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
}
.btn-senha:hover { text-decoration: none; background: rgba(255,255,255,.12); }
.btn-senha.is-active { background: rgba(255,255,255,.12); }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom));
  background: rgba(36, 19, 63, .95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.08);
}
.bottom-nav a {
  flex: 1; flex-direction: column; justify-content: center;
  min-height: 52px; padding: .28rem 0; gap: .15rem;
  font-size: .72rem; line-height: 1.15; color: #d9cff2;
}
.bottom-nav a span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bottom-nav a.is-active { color: var(--amber); background: transparent; }

.page { width: min(1100px, calc(100% - 1.5rem)); margin: 1rem auto 2rem; }
.flashes { display: grid; gap: .5rem; margin-bottom: 1rem; }
.flash { padding: .75rem 1rem; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.flash-ok { background: var(--ok-soft); border-color: var(--ok-line); }
.flash-erro { background: var(--danger-soft); border-color: #f0c2c2; }
.flash-info { background: var(--info-soft); border-color: #c5d7ee; }

.mes-nav {
  display: flex; align-items: center; justify-content: center; gap: .35rem;
  margin-bottom: .55rem; position: relative;
}
.mes-seta, .btn, .chip {
  min-height: 44px; border-radius: 12px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .45rem .85rem; text-decoration: none; cursor: pointer; background: var(--paper);
}
.mes-seta {
  width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0;
  color: var(--ink); border-color: var(--line); font-weight: 600;
}
.mes-seta.is-off { visibility: hidden; pointer-events: none; }
.mes-seta:hover { text-decoration: none; background: white; }
.mes-controle { position: relative; min-width: 0; }
.mes-botao {
  min-height: 42px; max-width: 100%;
  padding: 0 .7rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
}
.mes-botao:hover { background: white; }
.mes-nome { white-space: nowrap; }
.mes-chevron { display: inline-flex; transition: transform .15s ease; }
.mes-chevron .ico { width: .95rem; height: .95rem; opacity: .7; }
.mes-controle.aberto .mes-chevron { transform: rotate(180deg); }
.mes-painel {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  z-index: 40; width: min(340px, calc(100vw - 1.5rem));
  max-height: min(70vh, 440px); overflow: auto;
  padding: .75rem; background: white; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.mes-ano { display: flex; align-items: flex-start; gap: .4rem; margin-bottom: .4rem; }
.mes-ano-rotulo {
  flex: none; width: 2.7rem; padding-top: .4rem;
  font-size: .8rem; font-weight: 700; color: var(--pine-deep);
}
.mes-chips { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.mes-chip {
  display: flex; align-items: center; justify-content: center;
  min-height: 34px; padding: .15rem; border: 1px solid var(--line); border-radius: 8px;
  background: white; color: var(--ink); font-size: .82rem; text-decoration: none;
}
.mes-chip:hover { text-decoration: none; border-color: var(--pine); color: var(--pine); background: var(--leaf); }
.mes-chip.is-hoje:not(.is-on) { border-color: var(--pine); color: var(--pine); }
.mes-chip.is-on { background: var(--pine); border-color: var(--pine); color: white; font-weight: 700; }
.mes-painel-acoes { margin-top: .5rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.mes-novo {
  display: flex; align-items: center; justify-content: center;
  min-height: 38px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-weight: 650; text-decoration: none; background: white;
}
.mes-novo:hover { text-decoration: none; border-color: var(--pine); color: var(--pine); background: var(--leaf); }

.numeros { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.numero {
  display: flex; flex-direction: column; gap: .15rem;
  background: var(--paper); border-radius: var(--radius); padding: .9rem;
  box-shadow: var(--shadow); color: inherit; text-decoration: none;
  animation: rise .4s ease both;
}
.numero:hover { text-decoration: none; transform: translateY(-2px); }
.numero span { color: var(--muted); font-size: .85rem; }
.numero strong {
  font-family: var(--display); font-size: clamp(1.35rem, 5vw, 2rem);
  font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
.numero small { color: var(--muted); }
.numero.tem-atraso strong { color: #8a5a00; }
.numero.tem-resultado-neg strong { color: var(--danger); }

.bloco, .form-card, .item-card, .grafico-card {
  background: var(--paper); border-radius: var(--radius); padding: 1rem;
  box-shadow: var(--shadow); margin-bottom: 1rem;
}
.bloco h1, .bloco h2, .form-card h1 { font-family: var(--display); margin: 0 0 .4rem; }
.bloco-topo, .item-card header { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; }
.item-card h3 { margin: 0; font-size: 1.05rem; }
.item-card h3 a { color: inherit; }
.item-card p { margin: .15rem 0; }
.valor { font-family: var(--display); font-size: 1.45rem; font-variant-numeric: tabular-nums; margin: .45rem 0; }
.meta, .ajuda, .registro-audit { color: var(--muted); }
.registro-audit { font-size: 0.85rem; margin: 0.15rem 0 0; }
.periodos { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.periodos li { padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
.aviso { background: var(--amber-soft); padding: .7rem .8rem; border-radius: 12px; }

.grade-cards, .somente-cards { display: flex; flex-direction: column; gap: .4rem; }
.somente-cards .item-card { margin-bottom: 0; }
.item-card { animation: rise .35s ease both; }
.grade-cards .item-card:nth-child(2), .somente-cards .item-card:nth-child(2) { animation-delay: .04s; }
.grade-cards .item-card:nth-child(3), .somente-cards .item-card:nth-child(3) { animation-delay: .08s; }

.badge { border-radius: 999px; padding: .2rem .55rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-pago { background: var(--ok-soft); color: var(--ok-deep); }
.badge-aberto { background: var(--info-soft); color: var(--info); }
.badge-atrasado { background: var(--amber-soft); color: #8a5a00; }
.badge-emdia { background: white; color: var(--ok-deep); border: 1px solid var(--ok-line); }

.btn { font-weight: 700; }
.btn-primary { background: var(--pine); color: white; }
.btn-recebi { background: var(--ok); color: white; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-danger { background: transparent; border-color: #e7c1c1; color: var(--danger); margin-top: .8rem; }
.btn-zap { background: #e9f8ef; color: var(--ok-deep); border-color: var(--ok-line); }
.btn:hover { text-decoration: none; filter: brightness(1.03); }
.plat { display: grid; gap: 1rem; }
.plat h1, .plat-card h2 { font-family: var(--display); margin: 0; }
.plat h1 { font-size: 1.7rem; }
.plat-card h2 { font-size: 1.15rem; }
.plat-novo {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem;
}
.plat-novo > summary, .plat-acessos > summary, .plat-logo-manut > summary { cursor: pointer; width: fit-content; list-style: none; }
.plat-novo > summary::-webkit-details-marker,
.plat-acessos > summary::-webkit-details-marker,
.plat-logo-manut > summary::-webkit-details-marker { display: none; }
.plat-novo > summary::marker,
.plat-acessos > summary::marker,
.plat-logo-manut > summary::marker { content: ""; }
.plat-form { display: grid; gap: .65rem; margin-top: .8rem; max-width: 32rem; }
.plat-card .plat-form { max-width: none; margin-top: 0; }
.plat-par { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.plat-grade { display: grid; gap: .8rem; margin-top: .8rem; align-items: start; }
.plat-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem; display: grid; gap: .7rem; margin: 0;
}
.plat-card header { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; }
.plat-card header p { margin: .15rem 0 0; color: var(--muted); }
.plat-marca { display: flex; align-items: flex-start; gap: .7rem; }
.plat-logo { width: 4.5rem; height: 4.5rem; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: white; flex: 0 0 auto; }
.plat-marca-btns { display: flex; flex-direction: column; gap: .4rem; flex: 1 1 auto; min-width: 0; }
.plat-card form .btn, .plat-novo .plat-form .btn { width: 100%; }
.plat-novo > summary.btn, .plat-acessos > summary.btn, .plat-logo-manut > summary.btn { width: fit-content; }
.plat-marca-btns > .btn,
.plat-marca-btns > .plat-logo-manut > summary.btn { width: 100%; }
.plat-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.plat-acoes form { display: flex; }
.plat-acoes .btn { width: 100%; }
.plat-atalho .btn { width: fit-content; }
.plat-volta { margin: 0; }
.plat-volta a { font-weight: 700; }
.plat-ficha { max-width: 36rem; }
.plat-ficha h2 { margin: .4rem 0 0; font-size: 1.05rem; }
.plat-logo-corpo { display: grid; gap: .6rem; margin-top: .7rem; }
.plat-logo-manut:not([open]) > .plat-logo-corpo { display: none; }
.plat-logo-corpo > .btn { width: 100%; }
.plat-acessos-corpo { display: grid; gap: .6rem; margin-top: .7rem; }
.plat-acessos-corpo h3 { margin: .2rem 0 0; font-size: 1rem; }
.plat-pessoa { display: grid; gap: .45rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.plat-pessoa-topo { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; }
.plat-pessoa-topo div span { display: block; color: var(--muted); font-size: .9rem; font-weight: 400; }
@media (min-width: 900px) {
  .plat-grade { grid-template-columns: 1fr 1fr; }
}
.acoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.acoes form, .barra-acoes form { display: flex; }
.acoes .btn, .acoes form { flex: 1 1 40%; }
.acoes form .btn, .barra-acoes form .btn { width: 100%; }
.barra-acoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.acoes-tabela { display: flex; flex-wrap: wrap; gap: .35rem; }
.acoes-tabela form { display: inline; }

.busca-form { margin-bottom: .6rem; }
.busca {
  display: flex; align-items: center; gap: .45rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0 .8rem;
}
.busca input, .campo input, .campo select, .campo textarea {
  width: 100%; min-height: 44px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; padding: .55rem .7rem; background: white;
}
input::placeholder, textarea::placeholder { color: #b7c3bb; opacity: 1; }
.busca input { border: 0; padding-left: 0; background: transparent; }
.filtros { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.chip { background: transparent; border-color: var(--line); white-space: nowrap; }
.chip.is-on { background: var(--ink); color: white; border-color: var(--ink); }
.campo { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; }
.campo-select { min-width: 11rem; }
.grade-form { display: grid; gap: .75rem; }
.check { flex-direction: row; align-items: center; font-weight: 600; }
.check input { width: 1.1rem; height: 1.1rem; }
.contagem { color: var(--muted); min-height: 1.2rem; margin-top: 0; }

.somente-tabela { display: none; }
.tabela-wrap { overflow: auto; max-height: calc(100vh - 220px); border: 1px solid var(--line); border-radius: 16px; }
.tabela { width: 100%; border-collapse: collapse; min-width: 720px; }
.tabela th, .tabela td { padding: .75rem .8rem; text-align: left; vertical-align: middle; }
.tabela th {
  position: sticky; top: 0; z-index: 2;
  background: var(--pine-deep); color: white; font-weight: 600; font-size: .85rem;
}
.tabela td { border-top: 1px solid var(--line); background: var(--paper); }
.tabela small { color: var(--muted); }

.dre-grid, .graficos { display: grid; gap: .8rem; }
.linha { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.linha strong { font-variant-numeric: tabular-nums; }
.linha-total { font-weight: 700; }
.linha-resultado { font-family: var(--display); font-size: 1.25rem; border-bottom: 0; padding-top: .8rem; }
.linha-resultado.negativo strong { color: var(--danger); }
.grafico-card h2 { font-family: var(--display); font-size: 1rem; margin: 0 0 .6rem; }
.lista-simples { list-style: none; padding: 0; margin: 0 0 1rem; }
.lista-simples li { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.erros { color: var(--danger); }
.vazio { color: var(--muted); background: rgba(255,255,255,.55); border-radius: 12px; padding: .9rem; }
.login-corpo { min-height: calc(100vh - 2rem); display: grid; place-items: center; padding: .5rem 0 1rem; }
.login-card { width: min(420px, 100%); }
.login-painel {
  display: grid;
  width: min(860px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.login-apresentacao {
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(255, 122, 89, .30), transparent 60%),
    var(--pine-deep);
  color: white;
  padding: 1.8rem 1.5rem 1.6rem;
}
.login-apresentacao h1 {
  font-family: var(--display);
  font-size: 1.85rem;
  line-height: 1.15;
  margin: .85rem 0 .45rem;
}
.login-apresentacao p { color: #d9cff2; margin: 0 0 1.1rem; }
.login-apresentacao ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.login-apresentacao li { display: flex; align-items: center; gap: .55rem; }
.login-apresentacao .ico { color: var(--amber); }
.login-form { padding: 1.6rem 1.35rem 1.4rem; }
.login-form h2 { font-family: var(--display); margin: 0 0 .9rem; font-size: 1.45rem; }
body.sem-sessao .page { width: min(920px, calc(100% - 1.5rem)); }
@media (min-width: 800px) {
  .login-painel { grid-template-columns: 1.05fr .95fr; min-height: 460px; }
  .login-apresentacao { padding: 2.2rem 1.8rem; display: flex; flex-direction: column; justify-content: center; }
  .login-form { padding: 2.2rem 1.7rem; display: flex; flex-direction: column; justify-content: center; }
}
.ico { width: 1.15rem; height: 1.15rem; flex: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 800px) {
  .numeros { grid-template-columns: repeat(4, 1fr); }
  .grade-form { grid-template-columns: 1fr 1fr; }
  .campo-largo { grid-column: 1 / -1; }
  .dre-grid { grid-template-columns: 1fr 1fr; }
  .graficos { grid-template-columns: 1fr 1fr; }
  .grafico-largo { grid-column: 1 / -1; }
  .grade-cards { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .top-nav { display: flex; }
  .bottom-nav { display: none; }
  body.com-nav { padding-bottom: 2rem; }
  .somente-cards { display: none; }
  .somente-tabela { display: block; }
  .btn-icone { margin-left: 0; }
  .so-curto { display: none; }
}
@media (max-width: 959px) {
  .page { margin-top: .55rem; }
  .mes-seta { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; }
  .mes-botao { min-height: 36px; padding: 0 .55rem; font-size: .95rem; }
  .mes-chip { min-height: 32px; }
  .btn-so-icone span { display: none; }
  .btn-so-icone { min-height: 34px; min-width: 40px; padding: .2rem .55rem; }
  .so-largo { display: none; }
  .barra-acoes { margin-bottom: .3rem; gap: .3rem; align-items: center; }
  .barra-acoes .btn { min-height: 34px; padding: .15rem .6rem; font-size: .88rem; }
  .barra-acoes form { width: auto; }
  .barra-acoes form .btn { width: auto; }
  .busca-form { margin-bottom: .28rem; }
  .busca { min-height: 34px; border-radius: 12px; padding: 0 .6rem; }
  .busca input { min-height: 34px; padding: .2rem 0; }
  .filtros { flex-wrap: nowrap; gap: .3rem; margin-bottom: .1rem; }
  .chips { flex: 1 1 auto; min-width: 0; gap: .2rem; padding-bottom: 0; overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { min-height: 32px; padding: .1rem .38rem; font-size: .78rem; }
  .campo-select { min-width: 0; flex: 0 0 auto; max-width: 42%; }
  .filtros .campo select { min-height: 32px; width: auto; max-width: 7.5rem; padding: .15rem .3rem; }
  .contagem { min-height: 0; margin: 0 0 .2rem; font-size: .78rem; line-height: 1.2; }
  .ajuda-lista { display: none; }
}
@media (max-width: 420px) {
  .top-user span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .cabeca, .topbar, .vista-barra, .bottom-nav, .mes-nav, .barra-acoes, .btn, .flashes { display: none !important; }
  body { background: white; }
  .bloco, .numero, .item-card { box-shadow: none; border: 1px solid #ddd; }
}

/* O card inteiro abre o aluno: no celular o nome sozinho era um alvo de 24px. */
.card-toque { position: relative; }
.card-toque h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* Item que acabou de ser marcado como pago, ao voltar para a lista. */
.destaque { outline: 3px solid var(--amber); outline-offset: 2px; background: var(--amber-soft); transition: background 1.5s ease, outline-color 1.5s ease; }

.item-resumo { padding: .45rem .65rem; }
.item-resumo header { align-items: center; gap: .4rem; }
.item-resumo h3 { flex: 1; min-width: 0; font-size: .98rem; }
.item-resumo .item-valor, .item-resumo .badge { flex: none; }
.item-resumo h3 a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-valor { font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-resumo .meta {
  margin: .05rem 0 0; font-size: .8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-resumo .acoes { margin-top: .35rem; gap: .35rem; }
.item-resumo .acoes .btn { min-height: 36px; padding: .2rem .45rem; font-size: .85rem; }
.item-resumo .acoes .btn,
.item-resumo .acoes form { flex: 1 1 0; }

.toast {
  position: fixed; left: 16px; right: 16px; z-index: 60;
  bottom: calc(88px + env(safe-area-inset-bottom));
  padding: .8rem 1rem; border-radius: 14px; box-shadow: var(--shadow);
  background: var(--pine-deep); color: white; font-weight: 600;
  transition: opacity .6s ease;
}
.toast.flash-erro { background: var(--danger); }
.toast.saindo { opacity: 0; }
@media (min-width: 960px) {
  .toast { left: auto; right: 24px; bottom: 24px; max-width: 420px; }
}
body.com-nav .bloco { scroll-margin-top: 80px; }

.faixa-agora {
  display: flex; align-items: center; gap: .65rem;
  background: var(--pine-deep); color: white; text-decoration: none;
  border-radius: 16px; padding: .85rem 1rem; margin-bottom: .8rem;
  font-family: var(--display); font-weight: 650; font-size: 1.05rem;
}
.faixa-agora:hover { text-decoration: none; color: white; }
.faixa-agora .ico { color: var(--amber); }
.chamada-data {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .45rem;
  margin-bottom: .35rem;
}
.chamada-data > div { text-align: center; min-width: 0; }
.chamada-data strong {
  display: block; font-family: var(--display); text-transform: capitalize;
}
.chamada-data small, .chamada-data a { color: var(--muted); font-size: .85rem; }
.chamada-vago { width: 42px; }
.chamada-atalhos {
  display: flex; flex-wrap: wrap; gap: .35rem .8rem; align-items: center;
  margin: 0 0 .45rem; color: var(--muted);
}
.faixa-horas {
  display: flex; gap: .35rem; overflow-x: auto; margin: 0;
  padding-bottom: .15rem; scrollbar-width: none; position: relative;
  flex: 1; min-width: 0;
}
.faixa-horas::-webkit-scrollbar { display: none; }
.faixa-horas form { margin: 0; flex: none; }
.hora-chip { min-width: 4.2rem; min-height: 40px; padding: .2rem .55rem; }
.hora-chip.is-ligada { background: var(--leaf); border-color: var(--leaf-line); color: var(--pine); }
.hora-chip.is-ocupada {
  background: transparent; color: var(--muted); border-style: dashed; opacity: .8; cursor: default;
}
.hora-chip.is-ligada.is-on, .chip.hora-chip.is-on { background: var(--ink); color: white; border-color: var(--ink); }
.hora-nav {
  display: flex; align-items: center; gap: .3rem; position: relative; margin: 0 0 .45rem;
}
.hora-seta {
  flex: none; width: 36px; min-width: 36px; height: 40px; min-height: 40px; padding: 0;
  border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.hora-seta:disabled { opacity: .35; cursor: default; }
.hora-seta .ico { width: 1.05rem; height: 1.05rem; }
.hora-nav.hora-cabe [data-hora-passo] { display: none; }
.hora-nav.aberto [data-hora-lista] .ico { transform: rotate(180deg); }
.hora-painel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
  width: min(340px, calc(100vw - 1.5rem));
  max-height: min(60vh, 320px); overflow: auto;
  padding: .65rem; background: white; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.hora-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.hora-opcao {
  min-height: 36px; border: 1px solid var(--line); border-radius: 8px;
  background: white; color: var(--ink); font-weight: 650; cursor: pointer;
}
.hora-opcao.is-ligada { background: var(--leaf); border-color: var(--leaf-line); color: var(--pine); }
.hora-opcao.is-on { background: var(--ink); border-color: var(--ink); color: white; }
.hora-opcao.is-ocupada { border-style: dashed; color: var(--muted); background: transparent; cursor: default; }
.chamada-linha { display: flex; align-items: stretch; gap: .35rem; margin-bottom: .4rem; }
.chamada-linha > form { margin: 0; display: flex; min-width: 0; }
.chamada-linha > form:first-child, .chamada-linha > .chamada-espera { flex: 1 1 auto; min-width: 0; }
.chamada-linha > form:not(:first-child) { flex: none; }
.chamada-toque {
  width: 100%; max-width: 100%; min-width: 0; min-height: 64px;
  flex-wrap: wrap; align-items: flex-start; align-content: center; justify-content: flex-start;
  gap: .22rem .4rem; font-size: 1.02rem; padding: .55rem .75rem; text-align: left;
  overflow: hidden;
}
.chamada-toque > span:first-child {
  flex: 1 0 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.chamada-toque .badge,
.chamada-toque .chamada-ok {
  flex: 0 1 auto; min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.chamada-toque .badge { font-size: .72rem; padding: .1rem .42rem; }
.chamada-toque.is-presente { background: var(--pine); color: white; border-color: var(--pine); }
.chamada-ok { font-size: .78rem; font-weight: 700; opacity: .9; white-space: nowrap; }
.chamada-linha.is-justificada .chamada-toque { background: var(--amber-soft); border-color: var(--amber); }
.chamada-justificar {
  flex: none; width: 4.6rem; min-height: 64px; height: 100%; padding: .25rem .3rem;
  font-size: .72rem; line-height: 1.15; white-space: normal;
}
.chamada-justificar.is-on { background: var(--amber-soft); border-color: var(--amber); }
.chamada-tirar {
  flex: none; width: 3.4rem; min-height: 64px; height: 100%; padding: .25rem .3rem; font-size: .72rem;
}
.chamada-espera { cursor: default; }
.treino-acoes { display: flex; gap: .5rem; margin-bottom: .8rem; }
.treino-acoes .btn { flex: 1; }
.semana-dias {
  display: flex; align-items: stretch; gap: .3rem; margin: 0 0 .75rem;
}
.semana-seta { flex: none; align-self: center; min-width: 36px; min-height: 52px; padding: .3rem; }
.dia-card {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .05rem; min-height: 56px; padding: .25rem .1rem;
  border: 1px solid var(--line); border-radius: 14px; background: white;
  text-decoration: none; color: var(--ink);
}
.dia-card small { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.dia-card strong { font-family: var(--display); font-size: 1.05rem; line-height: 1.1; }
.dia-card.is-hoje:not(.is-on) { border-color: var(--pine); }
.dia-card.is-on { background: var(--ink); border-color: var(--ink); color: white; }
.dia-card.is-on small { color: rgba(255,255,255,.72); }
.painel-dia { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: 0 0 .55rem; }
.painel-dia strong { font-family: var(--display); font-size: 1.25rem; text-transform: capitalize; }
.painel-dia span, .painel-dia a { color: var(--muted); font-size: .9rem; }
.painel-horas {
  background: white; border: 1px solid var(--line); border-radius: 18px;
  padding: .75rem .75rem .55rem; margin-bottom: .75rem;
}
.aula-resumo { display: flex; justify-content: space-between; align-items: flex-end; gap: .8rem; margin-top: .35rem; }
.aula-resumo strong { display: block; font-family: var(--display); font-size: 1.35rem; }
.aula-resumo span { color: var(--muted); font-size: .9rem; }
.aula-resumo b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.turma-aluno {
  display: flex; align-items: center; gap: .7rem;
  border: 1px solid var(--line); border-radius: 14px; background: white;
  padding: .75rem .85rem; margin-bottom: .4rem; font-weight: 650;
}
.turma-aluno input { width: 1.15rem; height: 1.15rem; flex: none; }
.turma-aluno .badge { margin-left: auto; }
.turma-aluno:has(input:checked) { border-color: var(--pine); background: var(--leaf); }
.bolinhas { display: flex; flex-wrap: wrap; gap: 5px; margin: .35rem 0 .2rem; }
.bolinha { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.bolinha-presente { background: var(--pine); }
.bolinha-falta { background: transparent; box-shadow: inset 0 0 0 2px #c4b8a4; }
.bolinha-justificada { background: var(--amber); }
.bolinha-agora { background: transparent; box-shadow: inset 0 0 0 2px var(--pine); }
.tabela.tabela-treino { min-width: 0; }
.tabela-wrap-treino { max-height: calc(100vh - 220px); }
.tabela-treino .btn { white-space: nowrap; min-height: 40px; }
@media (max-width: 959px) {
  .nav-link { padding: .4rem .5rem; }
}
