/* Alecrim (verde acinzentado, não bandeira), azul-marinho da logo e o lilás da flor do alecrim. */
:root {
  --alecrim: #5b6e52; --alecrim-fundo: #3e4c38; --salvia: #aebea5; --nevoa: #eef1eb; --papel: #fcfdfb;
  --noite: #324a78; --texto: #26332d; --suave: #5b6b62; --linha: #dde3d8; --lavanda: #7a83b5; --argila: #9a5240; --areia: #f1ead9;
  --forte: var(--noite); --acao: var(--alecrim-fundo); --campo: #fff; --chip: #e8ede4; --destaque: #e0e7da;
  --r: 28px; --r-in: 18px;
  /* vidro: superfície translúcida, borda luminosa e brilho no topo */
  --vidro: rgb(255 255 255 / .6); --vidro-borda: rgb(255 255 255 / .8); --brilho: rgb(255 255 255 / .95); --solido: rgb(250 252 253 / .94);
  --acento: linear-gradient(135deg, #55684f, #324a78); --fita2: var(--noite);
  --luz1: rgb(50 74 120 / .26); --luz2: rgb(174 190 165 / .55); --luz3: rgb(110 128 170 / .2); --sombra: 0 18px 40px -28px rgb(40 52 70 / .42);
  --titulo: 'Marcellus', Georgia, serif; --corpo: 'Figtree', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--nevoa); }
body { font: 400 16px/1.55 var(--corpo); color: var(--texto); min-height: 100vh; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 55% at 8% 4%, var(--luz2), transparent 70%), radial-gradient(55% 60% at 96% 14%, var(--luz1), transparent 70%), radial-gradient(70% 60% at 65% 105%, var(--luz3), transparent 70%), var(--nevoa); }
h1, h2 { font-family: var(--titulo); font-weight: 400; color: var(--forte); line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4vw, 2.35rem); }
h2 { font-size: 1.3rem; margin-bottom: 1rem; }
h3 { font-size: 1rem; color: var(--forte); margin: 1.4rem 0 .6rem; }
h4 { font-size: .85rem; color: var(--suave); margin: .9rem 0 .35rem; }
a { color: var(--acao); }
img { max-width: 100%; }
.muted { color: var(--suave); }
.pre { white-space: pre-wrap; }
.pos { color: var(--alecrim); font-weight: 600; }
.neg { color: var(--argila); font-weight: 600; }
:focus-visible { outline: 3px solid var(--lavanda); outline-offset: 2px; }

/* botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .65rem 1.35rem; border: 1px solid transparent; border-radius: 999px; background: var(--acento) border-box; color: #fff; font: 600 .95rem var(--corpo); text-decoration: none; cursor: pointer; box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 10px 22px -14px rgb(20 35 75 / .7); transition: filter .2s, background-color .2s, transform .12s; }
.btn:hover { filter: brightness(1.14); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: var(--campo); color: var(--acao); border-color: var(--linha); box-shadow: inset 0 1px 0 var(--brilho); }
.btn.ghost:hover { background: var(--chip); border-color: var(--salvia); }
.btn.small { min-height: 36px; padding: .3rem .85rem; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--argila); border-color: var(--argila); box-shadow: none; margin-top: .8rem; }
.btn.whatsapp { background: #1d6b48; border-color: #1d6b48; }
.icon { background: none; border: 0; font-size: 1.1rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--suave); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; align-items: center; }
.actions.spread { justify-content: space-between; }
.stack { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; align-content: start; }
.field > span, legend { font-weight: 600; font-size: .9rem; color: var(--forte); }
.field small { color: var(--suave); font-size: .8rem; }
input:not([type=radio], [type=checkbox]), select, textarea { width: 100%; min-height: 48px; padding: .7rem .95rem; border: 1px solid var(--linha); border-radius: 16px; background: var(--campo); font: 400 1rem var(--corpo); color: var(--texto); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--alecrim); }
input[type=month], .page-head input[type=date] { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.wide { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { margin-bottom: .55rem; }
.questions { display: grid; gap: 1.5rem; }
.questions fieldset .field { margin-top: .8rem; }
.pills, .checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .55rem 1.1rem; border: 1px solid var(--linha); border-radius: 999px; background: var(--campo); font-size: .93rem; }
.pills .choice span { justify-content: center; min-width: 88px; }
.pills.scale .choice span { min-width: 44px; padding: .4rem; }
.checks .choice span { border-radius: 14px; height: 100%; }
.checks .choice span::before { content: ''; flex: none; width: 20px; height: 20px; border: 1.5px solid var(--salvia); border-radius: 7px; }
.choice input:checked + span { background: var(--acento) border-box; border-color: transparent; color: #fff; }
.checks .choice input:checked + span { background: var(--destaque); color: var(--forte); border-color: var(--salvia); }
.checks .choice input:checked + span::before { content: '✓'; background: var(--alecrim-fundo); border-color: var(--alecrim-fundo); color: #fff; display: grid; place-items: center; font-size: .8rem; }
.choice input:focus-visible + span { outline: 3px solid var(--lavanda); outline-offset: 2px; }
.agree { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; }
.agree input { width: 22px; height: 22px; flex: none; accent-color: var(--alecrim-fundo); }

/* superfícies */
.card { border-radius: var(--r); padding: clamp(1.1rem, 3vw, 1.8rem); min-width: 0; }
.content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-content: start; min-width: 0; }
.grid.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1.25rem; }
.badge { display: inline-block; padding: .18rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--nevoa); color: var(--forte); white-space: nowrap; }
.badge.paga, .badge.ativo { background: #e1e9da; color: #3a4c32; }
.badge.atrasada { background: #f6e1da; color: #843f2e; }
.badge.em_analise { background: #e5e7f5; color: #3c4580; }
.badge.aberta { background: var(--areia); color: #6a5420; }
.badge.inativo, .badge.cancelada { background: #e8e9e8; color: #555; }
.list { list-style: none; padding: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem 0; border-top: 1px solid var(--linha); }
.list li:first-child { border-top: 0; }
.grow { flex: 1 1 180px; min-width: 0; text-decoration: none; color: inherit; }
.grow b, .grow small { display: block; }
.grow b { font-weight: 600; }
.grow small { color: var(--suave); font-size: .84rem; }
.list li .actions { margin: 0; }
.person { display: flex; align-items: center; gap: .9rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
h1 .avatar { display: inline-grid; vertical-align: middle; margin-right: .7rem; }
.card > .avatar { width: 84px; height: 102px; border-radius: 42px 42px 18px 18px; margin-bottom: .9rem; }
.avatar { flex: none; width: 46px; height: 56px; border-radius: 23px 23px 12px 12px; display: grid; place-items: center; background: var(--destaque); color: var(--acao); font: 1.3rem var(--titulo); }
.search { margin-bottom: .6rem; }
.empty { text-align: center; padding: 1.8rem 1rem; color: var(--suave); display: grid; gap: .5rem; justify-items: center; }
.empty strong { color: var(--forte); font: 1.15rem var(--titulo); }
.notice { background: var(--areia); border-radius: var(--r-in); padding: .9rem 1.1rem; }
.notice.action { display: grid; text-decoration: none; color: var(--forte); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span { background: var(--chip); border-radius: 999px; padding: .25rem .75rem; font-size: .84rem; }
.pain { font-weight: 600; color: var(--acao); font-variant-numeric: tabular-nums; white-space: nowrap; }
details { border-top: 1px solid var(--linha); padding: .8rem 0; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
details[open] > summary { margin-bottom: .7rem; }
.session summary span { float: right; }
.answers div { padding: .5rem 0; border-top: 1px solid var(--linha); }
.answers dt { color: var(--suave); font-size: .84rem; }
.answers dd { white-space: pre-wrap; }
code { display: block; word-break: break-all; background: var(--nevoa); padding: .8rem; border-radius: 12px; margin-top: .5rem; user-select: all; }
progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: var(--linha); }
progress::-webkit-progress-bar { background: var(--linha); }
progress::-webkit-progress-value { background: var(--alecrim); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--alecrim); }
.bars { list-style: none; padding: 0; display: grid; gap: .9rem; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; }
.bars progress { grid-column: 1 / -1; grid-row: 2; }
.bars small { color: var(--suave); }

/* agenda e sessão anterior */
.class + .class { border-top: 1px solid var(--linha); margin-top: 1.2rem; }
.class h3 { font: 1.35rem var(--titulo); }
.tags span button { background: none; border: 0; margin-left: .2rem; padding: .2rem .35rem; cursor: pointer; color: var(--suave); }
.previous { background: var(--nevoa); border-radius: 14px; padding: .9rem 1.1rem; }
.previous h3 { margin-top: 0; }
.badge.presente, .badge.reposta, .badge.abatida { background: #e1e9da; color: #3a4c32; }
.badge.falta { background: #f6e1da; color: #843f2e; }
.badge.compensar { background: var(--areia); color: #6a5420; }

/* gráficos */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font: 12px var(--corpo); fill: var(--suave); }
.chart .mid { text-anchor: middle; }
.chart .grid { stroke: var(--linha); }
.chart .before, .chart .after { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.chart .before { stroke: var(--lavanda); stroke-dasharray: 5 5; }
.chart .after { stroke: var(--alecrim-fundo); }
.chart .area { fill: var(--salvia); opacity: .28; }
.chart .dot-before { fill: var(--lavanda); }
.chart .dot-after { fill: var(--alecrim-fundo); }
.chart rect.in { fill: var(--alecrim); }
.chart rect.out { fill: #c99b8c; }
.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .84rem; color: var(--suave); margin-top: .6rem; }
.k::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .4rem; vertical-align: -1px; }
.k.before::before { background: var(--lavanda); } .k.after::before { background: var(--alecrim-fundo); }
.k.in::before { background: var(--alecrim); } .k.out::before { background: #c99b8c; }
.cycle { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; margin-top: .7rem; }
.cycle li { text-align: center; padding: .7rem 0 .5rem; border-radius: 999px 999px 12px 12px; border: 1px dashed var(--salvia); color: var(--suave); }
.cycle li.done { background: var(--acento) border-box; border: 1px solid transparent; color: #fff; }
.cycle b { display: block; font: 1.15rem var(--titulo); }
.cycle small { font-size: .7rem; }

/* fita da logo */
.ribbon { display: block; width: 100%; height: 56px; }
.ribbon .r1 { fill: #aebea5; } .ribbon .r2 { fill: var(--fita2); opacity: .75; }
/* entrada */
/* A tela inteira é uma cena só; o formulário vem primeiro no HTML e no celular. */
.auth { --mx: 70%; --my: 30%; position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: grid; align-items: center; padding: 4.2rem clamp(1rem, 5vw, 4rem) 3.5rem; background: linear-gradient(158deg, #f7f9f5 0%, #e3eade 46%, #d5ddea 100%); }
.auth::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgb(255 255 255 / .75), transparent 70%); }
.waves { position: absolute; inset: auto 0 0; z-index: -1; width: 100%; height: clamp(150px, 27vh, 260px); pointer-events: none; }
.waves path { animation: drift 16s ease-in-out infinite alternate; }
.waves .w1 { fill: #aebea5; opacity: .5; }
.waves .w2 { fill: #324a78; opacity: .62; animation-duration: 21s; animation-direction: alternate-reverse; }
.waves .w3 { fill: #324a78; animation-duration: 26s; }
@keyframes drift { from { transform: translateX(-70px); } to { transform: translateX(90px); } }
.auth-grid { width: min(100%, 1120px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 430px); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.auth-box { grid-area: 1 / 2; width: 100%; display: grid; gap: .65rem; text-align: center; padding: clamp(1.4rem, 2.6vw, 2rem); border-radius: 44px; animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.auth-box > .logo { justify-self: center; }
.auth-box > .logo img { width: clamp(120px, 19vh, 176px); }
.auth-box form { text-align: left; margin-top: .6rem; }
.auth-box input:not([type=checkbox]) { min-height: 52px; transition: border-color .25s, box-shadow .25s; }
.auth-box input:not([type=checkbox]):focus { border-color: #324a78; box-shadow: 0 0 0 4px rgb(174 190 165 / .5); }
.auth-box form .btn:not(.ghost) { min-height: 54px; font-size: 1.02rem; background: linear-gradient(135deg, #3d578a, #2b406b) border-box; }
.pw { position: relative; display: block; }
.pw input { padding-right: 6rem; }
.reveal { position: absolute; right: .45rem; top: 50%; translate: 0 -50%; min-height: 38px; padding: 0 .8rem; border: 0; border-radius: 999px; background: var(--chip); color: var(--forte); font: 600 .78rem var(--corpo); cursor: pointer; }
.trust { font-size: .76rem; color: var(--suave); text-wrap: balance; }
.trust svg { width: 15px; height: 15px; margin-right: .35rem; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.breath { grid-area: 1 / 1; position: relative; display: grid; place-items: center; min-height: min(560px, 68vh); text-align: center; }
.orb, .orb i { position: absolute; border-radius: 50%; }
.orb { width: min(100%, 520px); aspect-ratio: 1; animation: inhale 12s ease-in-out infinite; }
.orb i { inset: 0; border: 1px solid rgb(50 74 120 / .16); }
.orb i:nth-child(2) { inset: 9%; background: rgb(174 190 165 / .22); border-color: rgb(255 255 255 / .8); }
.orb i:nth-child(3) { inset: 16%; background: radial-gradient(circle at 35% 28%, rgb(255 255 255 / .95), rgb(174 190 165 / .55) 75%); border-color: rgb(255 255 255 / .9); box-shadow: 0 40px 70px -40px rgb(50 74 120 / .5); }
@keyframes inhale { 0%, 100% { transform: scale(.92); } 45%, 55% { transform: scale(1.04); } }
.mantra { position: relative; display: grid; gap: .2rem; max-width: 12ch; font: clamp(1.5rem, 2.4vw, 2.15rem)/1.32 var(--titulo); color: #24365a; }
.mantra span { animation: word 12s ease-in-out infinite; }
.mantra span:nth-child(2) { animation-delay: 2s; }
.mantra span:nth-child(3) { animation-delay: 4s; font-size: .72em; margin-top: .5rem; }
@keyframes word { 0%, 100% { opacity: .78; } 18% { opacity: 1; } 45% { opacity: .78; } }
.logo { display: inline-block; line-height: 0; }
.logo img { height: auto; }
.logo .on-dark, :root[data-theme=dark] .logo .on-light { display: none; }
:root[data-theme=dark] .logo .on-dark { display: inline; }
.theme-corner { position: absolute; z-index: 1; top: calc(1rem + env(safe-area-inset-top)); right: 1rem; }

/* painel */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px; border-radius: var(--r); padding: 1.2rem .8rem; display: flex; flex-direction: column; gap: .3rem; overflow-y: auto; }
.side > .logo { align-self: center; margin-bottom: 1.2rem; }
.side .side-theme { margin-top: auto; justify-content: center; }
.side a, .side .quiet { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-radius: 999px; text-decoration: none; color: var(--texto); font: 500 .95rem var(--corpo); }
.side a:hover { background: var(--chip); }
.side a[aria-current] { background: var(--acento); color: #fff; }
.side .quiet { justify-content: center; background: none; border: 0; cursor: pointer; color: var(--suave); }
.side svg, .dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shell .content { padding: clamp(1rem, 3vw, 2.4rem); max-width: 1240px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.page-head .actions { margin: 0; }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 2rem; padding: clamp(1.4rem, 3.5vw, 2.4rem); border-radius: 120px var(--r) var(--r) var(--r); background: linear-gradient(135deg, #566850, #425769 50%, #324a78); color: #fff; border: 1px solid rgb(255 255 255 / .16); box-shadow: var(--sombra), inset 0 1px 0 rgb(255 255 255 / .2); }
.hero > div { padding-left: clamp(0rem, 3vw, 2.5rem); }
.hero strong { display: block; font: 400 clamp(2.4rem, 5vw, 3.6rem)/1.15 var(--titulo); margin: .3rem 0; }
.hero progress { margin-top: .9rem; background: rgb(255 255 255 / .2); }
.hero progress::-webkit-progress-bar { background: rgb(255 255 255 / .2); }
.hero progress::-webkit-progress-value { background: #d3ddcd; }
.hero dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-content: center; }
.hero dt { font-size: .85rem; color: #e2e9dd; }
.hero dd { font: 1.5rem var(--titulo); }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.totals div { border-radius: var(--r); padding: 1.1rem 1.3rem; }
.totals dt { color: var(--suave); font-size: .84rem; }
.totals dd { font: 1.6rem var(--titulo); color: var(--forte); }
.totals dd.neg { color: var(--argila); }
.tabs { display: flex; gap: .3rem; overflow-x: auto; padding: .3rem; border-radius: 999px; justify-self: start; max-width: 100%; }
.tabs a { padding: .55rem 1.15rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a[aria-selected=true] { background: var(--acento); color: #fff; }
.steps { display: flex; gap: .4rem; list-style: none; padding: 0; }
.steps li { flex: 1; border-top: 4px solid var(--salvia); padding-top: .4rem; font-size: .76rem; color: var(--suave); }
.steps li.done { border-color: var(--alecrim); }
.steps li.now { border-color: var(--noite); color: var(--forte); font-weight: 600; }
.wizard { max-width: 860px; }
.invite pre { white-space: pre-wrap; word-break: break-word; font: .95rem/1.6 var(--corpo); background: var(--chip); border-radius: 6px 18px 18px 18px; padding: 1.1rem 1.25rem; max-width: 520px; }

/* modal e avisos */
.modal { width: min(94vw, 480px); max-height: 92vh; margin: auto; border: 1px solid var(--vidro-borda); border-radius: 32px; padding: 1.4rem; background: var(--solido); color: var(--texto); box-shadow: 0 40px 90px -24px rgb(8 14 40 / .6), inset 0 1px 0 var(--brilho); }
.modal.large { width: min(96vw, 780px); }
.modal::backdrop { background: rgb(14 24 52 / .45); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.modal header h2 { margin: 0; }
.modal ol { padding-left: 1.2rem; }
.code { font-family: ui-monospace, monospace; font-size: .8rem !important; word-break: break-all; }
.toasts { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 50; display: grid; gap: .5rem; width: min(92vw, 440px); pointer-events: none; }
.toast { background: rgb(20 35 75 / .94); color: #fff; padding: .85rem 1.1rem; border-radius: var(--r-in); text-align: center; font-size: .93rem; }
.toast.bad { background: #843f2e; }
.modal .toasts { bottom: 20px; }

/* portal do aluno */
.portal { min-height: 100vh; padding-bottom: 106px; }
.portal .content { width: min(100%, 760px); margin: 0 auto; padding: 1.1rem; }
.portal.sem-menu { padding: 0 0 2rem; }
.dock { position: fixed; z-index: 10; inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px; display: flex; justify-content: space-around; border-radius: var(--r); padding: .4rem .25rem; }
.dock .logo { display: none; }
.dock a { display: grid; justify-items: center; gap: .15rem; padding: .35rem .2rem; border-radius: 20px; text-decoration: none; color: var(--suave); font-size: .66rem; font-weight: 600; min-width: 44px; }
.dock a[aria-current] { background: var(--acento); color: #fff; }
.welcome { background: linear-gradient(170deg, var(--destaque), var(--vidro) 85%); border-radius: 140px 140px var(--r) var(--r); text-align: center; padding: 3rem 1.2rem 0; overflow: hidden; }
.welcome p { color: var(--suave); max-width: 34ch; margin: .5rem auto 1.4rem; }
.welcome .ribbon { width: calc(100% + 2.4rem); margin: 0 -1.2rem; }
.due { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.due strong { font: 400 2.3rem var(--titulo); color: var(--forte); }
blockquote { font: 1.2rem/1.5 var(--titulo); color: var(--acao); white-space: pre-wrap; }
.paper { --forte: var(--noite); --suave: #5b6b62; --linha: #dde3d8; --acao: var(--alecrim-fundo); color: #26332d; color-scheme: light; background: #fff; border: 1px solid var(--linha); border-radius: var(--r); padding: clamp(1.2rem, 4vw, 2.6rem); max-width: 760px; }
.paper > img { display: block; margin: 0 auto .6rem; }
.paper h2 { text-align: center; }
.paper p { margin-bottom: .8rem; font-size: .95rem; white-space: pre-wrap; }
.signature { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--linha); display: grid; justify-items: center; text-align: center; }
.signature img { width: min(100%, 320px); }
.signature small { color: var(--suave); }
.hash { word-break: break-all; font-size: .7rem; }
.pad { width: 100%; aspect-ratio: 800 / 260; background: #fff; border: 1.5px dashed var(--alecrim); border-radius: 14px; touch-action: none; cursor: crosshair; }

/* vidro */
.card, .totals div, .tabs, .side, .dock, .auth-box { background: var(--vidro); border: 1px solid var(--vidro-borda); box-shadow: var(--sombra), inset 0 1px 0 var(--brilho); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%); }

/* tema escuro: só na tela, a impressão continua clara */
@media screen {
  :root[data-theme=dark] {
    color-scheme: dark;
    --nevoa: #0b1126; --papel: #17213d; --campo: rgb(7 13 34 / .42); --texto: #e2e9f6; --suave: #aebbd6; --linha: rgb(165 192 245 / .18); --salvia: #74896d;
    --forte: #f2f6fd; --acao: #c5d3bc; --chip: rgb(118 158 228 / .18); --destaque: rgb(122 144 112 / .32); --areia: rgb(168 134 48 / .26); --lavanda: #b0baf5; --argila: #f0ac99;
    --vidro: rgb(42 60 106 / .42); --vidro-borda: rgb(176 204 255 / .16); --brilho: rgb(255 255 255 / .1); --solido: rgb(23 33 64 / .95);
    --acento: linear-gradient(135deg, #44619a, #5a6e53); --fita2: #7d97cc;
    --luz1: rgb(70 102 168 / .55); --luz2: rgb(132 154 120 / .3); --luz3: rgb(78 100 158 / .32);
    --sombra: 0 24px 50px -30px rgb(0 0 8 / .85);
  }
  :root[data-theme=dark] .auth { background: linear-gradient(158deg, #0e1529 0%, #1c2b4d 52%, #2b3a38 100%); }
  :root[data-theme=dark] .auth::before { background: radial-gradient(440px circle at var(--mx) var(--my), rgb(174 190 165 / .17), transparent 70%); }
  :root[data-theme=dark] .waves .w1 { opacity: .24; }
  :root[data-theme=dark] .waves .w2 { fill: #324a78; opacity: .7; }
  :root[data-theme=dark] .waves .w3 { fill: #0c1224; }
  :root[data-theme=dark] .orb i { border-color: rgb(174 190 165 / .2); }
  :root[data-theme=dark] .orb i:nth-child(2) { background: rgb(50 74 120 / .3); }
  :root[data-theme=dark] .orb i:nth-child(3) { background: radial-gradient(circle at 35% 28%, #4a6392, #253761 72%); border-color: rgb(174 190 165 / .4); box-shadow: 0 40px 80px -40px rgb(0 0 10 / .8); }
  :root[data-theme=dark] .mantra { color: #eef3ea; }
  :root[data-theme=dark] .auth-box input:not([type=checkbox]):focus { border-color: #aebea5; box-shadow: 0 0 0 4px rgb(174 190 165 / .22); }
  :root[data-theme=dark] .auth-box form .btn:not(.ghost) { background: #aebea5 border-box; color: #16233f; }
  :root[data-theme=dark] .hero { background: linear-gradient(135deg, #485b49, #2f466f 50%, #222a4e); }
  :root[data-theme=dark] .pos { color: #bccfb1; }
  :root[data-theme=dark] .badge { background: var(--chip); }
  :root[data-theme=dark] .badge:is(.paga, .ativo, .presente, .reposta, .abatida) { background: rgb(122 146 106 / .36); color: #dae7d2; }
  :root[data-theme=dark] .badge:is(.atrasada, .falta) { background: rgb(170 82 62 / .34); color: #f8cabd; }
  :root[data-theme=dark] .badge.em_analise { background: rgb(96 106 200 / .34); color: #d6dbff; }
  :root[data-theme=dark] .badge:is(.aberta, .compensar) { background: var(--areia); color: #f3dfa6; }
  :root[data-theme=dark] .badge:is(.inativo, .cancelada) { background: rgb(150 160 180 / .22); color: #d3d9e4; }
  :root[data-theme=dark] .chart .after { stroke: var(--acao); }
  :root[data-theme=dark] .chart .dot-after { fill: var(--acao); }
  :root[data-theme=dark] .k.after::before { background: var(--acao); }
  :root[data-theme=dark] .paper { --forte: var(--noite); --suave: #5b6b62; --linha: #dde3d8; --acao: var(--alecrim-fundo); }
}
/* sem desfoque disponível, ou com "reduzir transparência" ligado: superfícies sólidas */
@media (prefers-reduced-transparency: reduce) {
  :root, :root[data-theme=dark] { --vidro: var(--solido); }
  * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root, :root[data-theme=dark] { --vidro: var(--solido); }
}

@media (min-width: 900px) {
  .portal { padding: 0 0 2rem 132px; }
  .dock { inset: 14px auto 14px 14px; width: 108px; flex-direction: column; justify-content: flex-start; align-items: center; gap: .6rem; padding: 1.1rem .5rem; }
  .dock .logo { display: block; margin-bottom: 1rem; }
  .dock a { width: 100%; padding: .65rem .3rem; font-size: .72rem; }
  .toasts { bottom: 24px; }
}
@media (max-width: 860px) {
  .auth { align-content: center; padding: calc(3.7rem + env(safe-area-inset-top)) .9rem calc(52px + env(safe-area-inset-bottom)); }
  .auth-grid { grid-template-columns: minmax(0, 440px); justify-content: center; gap: .9rem; }
  .auth-box, .breath { grid-area: auto; }
  .auth-box { border-radius: 32px; gap: .45rem; padding: 1.1rem 1.15rem; }
  .auth-box h1 { font-size: 1.55rem; }
  .auth-box p { font-size: .87rem; line-height: 1.45; }
  .auth-box .stack { gap: .7rem; margin-top: .2rem; }
  .auth-box input:not([type=checkbox]), .auth-box form .btn { min-height: 48px; }
  .auth-box .trust { font-size: .72rem; }
  .auth-box > .logo img { width: 104px; }
  .breath { min-height: 0; }
  .breath .orb { display: none; }
  .mantra { display: block; max-width: 26ch; font-size: .98rem; line-height: 1.45; }
  .mantra span:nth-child(3) { display: block; font-size: 1em; margin: 0; }
  .waves { height: 64px; }
  .shell { display: block; padding-bottom: 96px; }
  .side { position: fixed; z-index: 10; inset: auto 8px calc(8px + env(safe-area-inset-bottom)) 8px; height: auto; margin: 0; flex-direction: row; justify-content: space-around; padding: .35rem .2rem; overflow: visible; }
  .side > .logo, .side .side-theme { display: none; }
  .side a, .side .quiet { flex-direction: column; gap: .15rem; padding: .35rem .4rem; border-radius: 20px; font-size: .7rem; }
  .side .quiet { margin: 0; justify-content: center; }
  .hero { border-radius: 64px var(--r) var(--r) var(--r); }
  .steps li span { display: none; }
}
@media (min-width: 861px) and (max-height: 840px) {
  .auth { padding-block: 1.5rem; }
  .auth-box { gap: .4rem; padding: 1.1rem 1.7rem; }
  .auth-box > .logo img { width: 112px; }
  .auth-box h1 { font-size: 1.7rem; }
  .auth-box p { font-size: .86rem; line-height: 1.4; }
  .auth-box .stack { gap: .65rem; margin-top: .2rem; }
  .auth-box input:not([type=checkbox]), .auth-box form .btn { min-height: 46px; }
  .breath { min-height: 0; height: min(520px, 76vh); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  html { background: #fff; }
  body::before { display: none; }
  .side, .dock, .no-print, .page-head, .tabs, .content > h1, .toasts { display: none !important; }
  .shell, .portal { display: block; padding: 0; }
  .content { display: block; padding: 0 !important; }
  .card { background: none; border: 0; box-shadow: none; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .paper { border: 0; padding: 0; max-width: none; }
  .signature { break-inside: avoid; }
}
