/* THM Central — estilo do app único. Tokens da landing THM (DESIGN-SYSTEM.md). */
:root {
  --thm-navy: #0B1437; --thm-blue: #2563EB; --thm-blue-hi: #38BDF8;
  --ink-0: #f4f6fa; --ink-1: #dde3ee; --ink-2: #a8b1c2; --ink-3: #8d97a8; --ink-4: #44506a;
  --paper-0: #060b18; --paper-1: #0b1428; --paper-2: #0f1b35; --paper-3: #162447; --paper-4: #1f3160;
  --accent: #38BDF8; --accent-grad: linear-gradient(134deg, #38BDF8 22%, #2563EB 78%);
  --accent-soft: rgba(56, 189, 248, .14);
  --ok: #34d399; --aviso: #fbbf24; --alerta: #f87171;
  --receber: #34d399; --pagar: #fca5a5;
  --linha: hsla(0, 0%, 100%, .08); --linha-forte: hsla(0, 0%, 100%, .14);
  --vidro: linear-gradient(135deg, hsla(222, 45%, 20%, .55), hsla(222, 50%, 12%, .45));
  --bisel: inset 1px 1px 0 hsla(0, 0%, 100%, .06), inset -1px -1px 0 hsla(0, 0%, 0%, .3);
  --sombra: 0 10px 30px hsla(0, 0%, 0%, .35), 0 2px 8px hsla(0, 0%, 0%, .25);
  --f-corpo: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-titulo: 'Archivo', 'Inter', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r-2: .5rem; --r-3: .75rem; --r-4: 1rem; --r-5: 1.25rem;
  --suave: cubic-bezier(.16, 1, .3, 1);
  --lateral: 248px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(70% 45% at 60% -10%, rgba(56, 189, 248, .12), transparent 70%), radial-gradient(40% 40% at 100% 100%, rgba(37, 99, 235, .10), transparent 70%), var(--paper-0);
  background-attachment: fixed;
  color: var(--ink-0); font: 400 15px/1.5 var(--f-corpo); font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.txt-alerta { color: var(--alerta); } .txt-aviso { color: var(--aviso); } .txt-ok { color: var(--ok); }

/* ---------- ícones (máscara, herdam a cor) ---------- */
[class^="ico-"], [class*=" ico-"] { display: inline-block; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico-hoje { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.ico-compromisso { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ico-tarefa { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='17' height='17' rx='3.5'/%3E%3Cpath d='M8 12.5l2.8 2.8L16.5 9'/%3E%3C/svg%3E"); }
.ico-ideia { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.7.6 1.1 1.3 1.1 2.2h5c0-.9.4-1.6 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.ico-solucao { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4.5h10.5L19 8v11.5H5z'/%3E%3Cpath d='M15 4.5V8h4M8.5 13.5l2.2 2.2 4.8-4.8'/%3E%3C/svg%3E"); }
.ico-conta { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='3'/%3E%3Cpath d='M3 10.5h18M15.5 15h2'/%3E%3C/svg%3E"); }
.ico-busca { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E"); }
.ico-sair { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M10 16l-4-4 4-4M6 12h10'/%3E%3C/svg%3E"); }
.ico-mais { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E"); }

/* ---------- marca ---------- */
.marca line, .marca circle { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.marca__topo, .marca__no { stroke: var(--ink-0); } .marca__conv { stroke: var(--accent); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--r-3); border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: .92rem; text-decoration: none; transition: background .2s, border-color .2s, transform .2s var(--suave); white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: default; }
.btn--primario { background: var(--thm-blue); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .35); }
.btn--primario:hover:not(:disabled) { background: #1d4ed8; }
.btn--leve { background: hsla(0, 0%, 100%, .05); border-color: var(--linha-forte); color: var(--ink-1); }
.btn--leve:hover:not(:disabled) { border-color: rgba(56, 189, 248, .5); }
.btn--perigo { background: transparent; border-color: rgba(248, 113, 113, .4); color: var(--alerta); }
.btn--largo { width: 100%; }
.btn-icone { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-3); border: 1px solid var(--linha-forte); background: hsla(0, 0%, 100%, .04); cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--ink-1); }
.btn-icone:hover { border-color: rgba(56, 189, 248, .5); }
.btn-mini { border: 1px solid var(--linha-forte); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 5px 10px; font-size: .76rem; font-weight: 500; cursor: pointer; min-height: 30px; }
.btn-mini:hover { color: var(--ink-0); border-color: rgba(56, 189, 248, .5); }
kbd { font: 500 .68rem/1 var(--f-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--linha-forte); color: var(--ink-3); margin-left: auto; }

/* ---------- casca ---------- */
.casca { display: grid; grid-template-columns: var(--lateral) 1fr; min-height: 100vh; min-height: 100dvh; }
.lateral { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 20px 14px; border-right: 1px solid var(--linha); background: hsla(222, 60%, 5%, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.lateral__marca, .barra-topo__marca, .entrada__marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lateral__marca span, .entrada__marca span { display: flex; flex-direction: column; line-height: 1.05; }
.lateral__marca b, .entrada__marca b { font: 800 1.02rem/1 var(--f-titulo); letter-spacing: -0.014em; }
.lateral__marca em, .entrada__marca em { font: 500 .66rem/1 var(--f-mono); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--linha-forte); }
.lateral__marca { padding: 4px 8px 10px; }
.lateral ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.lateral ul a, .lateral__acao { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: var(--r-3); text-decoration: none; color: var(--ink-2); font-weight: 500; border: 0; background: none; cursor: pointer; text-align: left; position: relative; }
.lateral ul a:hover, .lateral__acao:hover { background: hsla(0, 0%, 100%, .04); color: var(--ink-0); }
.lateral ul a[aria-current] { background: var(--accent-soft); color: var(--ink-0); }
.lateral ul a[aria-current]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-grad); }
.lateral ul a[aria-current] [class^="ico-"] { color: var(--accent); }
.lateral__pe { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--linha); padding-top: 12px; }
.lateral__acao small { color: var(--ink-3); margin-left: auto; }
.barra-topo, .barra-baixo, .flutuante { display: none; }
.conteudo { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; outline: none; }
.tela { max-width: 1180px; margin: 0 auto; }
.tela[aria-busy] { opacity: .6; }

/* ---------- topo de tela ---------- */
.topo-tela { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sobre { margin: 0 0 6px; font: 500 .74rem/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.topo-tela h1 { margin: 0; font: 800 clamp(1.7rem, 2.4vw + .8rem, 2.6rem)/1.05 var(--f-titulo); letter-spacing: -0.024em; }
.topo-tela--hoje h1 { font-size: clamp(2rem, 3.4vw + .8rem, 3.2rem); }
.resumo { margin: 8px 0 0; color: var(--ink-2); }
.topo-tela__acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.navega { display: flex; align-items: center; gap: 6px; }
.filtro { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .85rem; }
.filtro select { min-height: 40px; border-radius: var(--r-3); border: 1px solid var(--linha-forte); background: var(--paper-2); padding: 0 10px; }

/* ---------- atalhos da Hoje ---------- */
.atalhos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.atalho { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: var(--r-4); border: 1px dashed hsla(199, 90%, 60%, .35); background: hsla(199, 90%, 50%, .05); cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-1); transition: background .2s, border-color .2s; }
.atalho:hover { background: var(--accent-soft); border-color: rgba(56, 189, 248, .6); }
.atalho [class^="ico-"] { color: var(--accent); width: 18px; height: 18px; }

/* ---------- painéis e listas ---------- */
.painel-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.painel { border: 1px solid var(--linha-forte); border-radius: var(--r-5); background: var(--vidro); box-shadow: var(--bisel), var(--sombra); padding: 18px; min-width: 0; }
.painel--alerta { border-color: rgba(248, 113, 113, .35); margin-bottom: 14px; }
.painel__topo { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.painel__topo h2 { margin: 0; font: 700 1.08rem/1.2 var(--f-titulo); letter-spacing: -0.01em; }
.painel__link { font-size: .82rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.painel__link:hover { text-decoration: underline; }
.painel__sub { margin: 14px 0 6px; font: 500 .7rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.painel__sub:first-of-type { margin-top: 4px; }
.lista { display: grid; gap: 4px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: var(--r-3); border: 1px solid transparent; background: none; text-align: left; cursor: pointer; }
.item:hover, .item:has(.item__corpo:hover) { background: hsla(0, 0%, 100%, .035); border-color: var(--linha); }
.item__hora { flex: none; min-width: 62px; font: 600 .82rem/1.2 var(--f-mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.item__corpo { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.item__corpo b { font-weight: 600; overflow-wrap: anywhere; }
.item__corpo small { color: var(--ink-2); font-size: .8rem; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.item--tarefa, .item--conta { cursor: default; }
.item--feito .item__corpo b { color: var(--ink-3); text-decoration: line-through; }
.marca-texto { color: var(--ink-3); }
input.marca { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; border: 1.5px solid var(--ink-4); cursor: pointer; display: grid; place-items: center; transition: background .2s, border-color .2s; }
input.marca::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .25s var(--suave); }
input.marca:checked { background: var(--thm-blue); border-color: var(--thm-blue); }
input.marca:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
input.marca:hover { border-color: var(--accent); }
.valor { flex: none; font: 600 .9rem/1 var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.valor--pagar { color: var(--pagar); } .valor--receber { color: var(--receber); }
.rec { color: var(--accent); font-weight: 400; }
.selo { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--linha-forte); font-size: .72rem; color: var(--ink-1); line-height: 1.5; }
.selo--alta { border-color: rgba(248, 113, 113, .5); color: #fecaca; background: rgba(248, 113, 113, .1); }
.selo--media { border-color: rgba(251, 191, 36, .45); color: #fde68a; background: rgba(251, 191, 36, .08); }
.selo--baixa { border-color: rgba(56, 189, 248, .35); color: #bae6fd; }
.contador { font: 600 .76rem/1 var(--f-mono); color: var(--ink-2); padding: 4px 8px; border-radius: 999px; background: hsla(0, 0%, 100%, .06); }
.mais { display: inline-block; margin-top: 8px; font-size: .84rem; color: var(--accent); }
.vazio { padding: 14px 10px; color: var(--ink-3); font-size: .9rem; }
.vazio p { margin: 0 0 8px; }
.totais { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.totais div, .total { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r-3); background: hsla(222, 60%, 5%, .45); border: 1px solid var(--linha); }
.totais small, .total small { color: var(--ink-2); font-size: .78rem; }
.totais b, .total b { font: 700 1.2rem/1.1 var(--f-titulo); font-variant-numeric: tabular-nums; }
.total span { color: var(--ink-3); font-size: .78rem; }
.cards-totais { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.total--saldo { background: linear-gradient(145deg, rgba(37, 99, 235, .22), hsla(222, 60%, 6%, .5)); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linha-forte); background: transparent; color: var(--ink-2); cursor: pointer; font-size: .86rem; }
.chip:hover { color: var(--ink-0); }
.chip--on { background: var(--accent-soft); border-color: rgba(56, 189, 248, .55); color: var(--ink-0); }

/* ---------- captura e ideias ---------- */
.captura input, .captura textarea, .busca-local input, .busca__campo { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-3); border: 1px solid var(--linha-forte); background: hsla(222, 60%, 4%, .6); resize: vertical; }
.captura input:focus, .captura textarea:focus, .busca-local input:focus, .busca__campo:focus { border-color: rgba(56, 189, 248, .6); outline: none; box-shadow: 0 0 0 3px rgba(56, 189, 248, .15); }
.captura { margin-bottom: 12px; }
.captura--grande { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-5); border: 1px solid var(--linha-forte); background: var(--vidro); margin-bottom: 16px; }
.captura__linha { display: flex; gap: 10px; }
.captura__linha input { flex: 1; min-width: 0; }
.ideias { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ideias--compacta { grid-template-columns: 1fr; gap: 8px; }
.ideia { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-4); border: 1px solid var(--linha-forte); background: linear-gradient(160deg, hsla(199, 80%, 40%, .10), hsla(222, 60%, 8%, .5)); }
.ideia--arq { opacity: .7; }
.ideia__texto { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.ideias--compacta .ideia__texto { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ideia__pe { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ideia__pe small { color: var(--ink-3); font-size: .76rem; }
.ideia__acoes { display: flex; gap: 6px; }

/* ---------- agenda ---------- */
.agenda { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.calendario { border: 1px solid var(--linha-forte); border-radius: var(--r-5); background: var(--vidro); overflow: hidden; }
.calendario__semana { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--linha); }
.calendario__semana span { padding: 10px 8px; font: 500 .7rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.calendario__grade { display: grid; grid-template-columns: repeat(7, 1fr); }
.dia { position: relative; min-height: 104px; padding: 6px; border: 0; border-right: 1px solid var(--linha); border-bottom: 1px solid var(--linha); background: transparent; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dia:nth-child(7n) { border-right: 0; }
.dia:hover { background: hsla(0, 0%, 100%, .03); }
.dia--fora { opacity: .4; }
.dia__num { font: 600 .84rem/1 var(--f-titulo); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.dia--hoje .dia__num { background: var(--accent-grad); color: #fff; }
.dia--sel { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px rgba(56, 189, 248, .55); }
.dia__itens { display: grid; gap: 2px; min-width: 0; }
.dia__chip { font-size: .7rem; line-height: 1.3; padding: 2px 5px; border-radius: 5px; background: rgba(37, 99, 235, .25); color: var(--ink-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dia__mais { font-size: .68rem; color: var(--ink-3); padding-left: 4px; }
.dia__ponto { display: none; }
.agenda__dia { position: sticky; top: 20px; }
.agenda__dia .btn { margin-top: 10px; }

/* ---------- quadro de tarefas ---------- */
.quadro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.coluna { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-5); border: 1px solid var(--linha-forte); background: hsla(222, 55%, 9%, .55); min-width: 0; }
.coluna__topo { display: flex; align-items: center; justify-content: space-between; }
.coluna__topo h2 { margin: 0; font: 700 1rem/1 var(--f-titulo); }
.coluna__lista { display: grid; gap: 8px; min-height: 60px; border-radius: var(--r-3); transition: background .2s; }
.coluna__lista.solta-aqui { background: var(--accent-soft); outline: 1.5px dashed rgba(56, 189, 248, .6); }
.coluna__vazia { margin: 8px 4px; color: var(--ink-3); font-size: .86rem; }
.cartao { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-3); border: 1px solid var(--linha-forte); background: var(--paper-2); cursor: grab; }
.cartao.arrastando { opacity: .4; }
.cartao--feito .cartao__abre b { color: var(--ink-3); text-decoration: line-through; }
.cartao__abre { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.cartao__abre b { font-weight: 600; overflow-wrap: anywhere; }
.cartao__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cartao__meta small { color: var(--ink-2); font-size: .78rem; }
.cartao__move { justify-self: start; }

/* ---------- soluções ---------- */
.busca-local { display: block; margin-bottom: 14px; }
.solucoes { display: grid; gap: 10px; }
.solucao { border: 1px solid var(--linha-forte); border-radius: var(--r-4); background: var(--vidro); overflow: hidden; }
.solucao--aberta { border-color: rgba(56, 189, 248, .45); }
.solucao__topo { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; cursor: pointer; }
.solucao__topo b { font: 700 1rem/1.3 var(--f-titulo); }
.solucao__topo small { color: var(--ink-3); font-size: .78rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.solucao__corpo { padding: 0 16px 16px; border-top: 1px solid var(--linha); }
.solucao__corpo h3 { margin: 14px 0 6px; font: 500 .7rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.texto-livre { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-1); line-height: 1.6; }

/* ---------- janela (formulários, busca, escolha) ---------- */
#janela { padding: 0; border: 1px solid var(--linha-forte); border-radius: var(--r-5); background: var(--paper-1); color: var(--ink-0); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
#janela::backdrop { background: rgba(3, 6, 14, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#janela[open] { animation: sobe .35s var(--suave); }
@keyframes sobe { from { opacity: 0; transform: translateY(14px); } }
.form { display: flex; flex-direction: column; max-height: calc(100dvh - 50px); }
.form__topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--linha); }
.form__topo h2 { margin: 0; font: 700 1.15rem/1.2 var(--f-titulo); }
.form__campos { display: grid; gap: 12px; padding: 16px 18px; overflow-y: auto; }
.campo { display: grid; gap: 6px; }
.campo > span { font-size: .82rem; color: var(--ink-2); font-weight: 500; }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-3); border: 1px solid var(--linha-forte); background: var(--paper-0); }
.campo textarea { resize: vertical; line-height: 1.5; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: rgba(56, 189, 248, .6); outline: none; box-shadow: 0 0 0 3px rgba(56, 189, 248, .15); }
.campo--caixa { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.campo--caixa input { width: 20px; height: 20px; min-height: 0; accent-color: var(--thm-blue); }
.campo--caixa span { font-size: .92rem; color: var(--ink-1); }
.form__erro { margin: 0 18px; padding: 10px 12px; border-radius: var(--r-3); background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .35); color: #fecaca; font-size: .88rem; }
.form__rodape { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--linha); }
.form__acoes { display: flex; gap: 8px; }
.escolha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 18px 18px; }
.escolha__item { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-4); border: 1px solid var(--linha-forte); background: hsla(222, 55%, 10%, .6); text-align: left; cursor: pointer; text-decoration: none; }
.escolha__item:hover { border-color: rgba(56, 189, 248, .55); background: var(--accent-soft); }
.escolha__ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-grad); -webkit-mask: none; mask: none; position: relative; }
.escolha__ico::after { content: ""; position: absolute; inset: 9px; background: #fff; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.escolha__item b { font-weight: 700; }
.escolha__item small { color: var(--ink-2); font-size: .8rem; }
.busca__campo { margin: 14px 18px 0; width: calc(100% - 36px); }
.busca__res { padding: 8px 18px 18px; overflow-y: auto; min-height: 120px; }
.busca__res h3 { margin: 14px 0 4px; font: 500 .7rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.busca__dica { color: var(--ink-3); font-size: .9rem; }

/* ---------- entrada ---------- */
.entrada { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.entrada__caixa { width: min(420px, 100%); padding: 28px; border-radius: var(--r-5); border: 1px solid var(--linha-forte); background: var(--vidro); box-shadow: var(--bisel), var(--sombra); }
.entrada__marca { margin-bottom: 26px; }
.entrada h1 { margin: 0 0 6px; font: 800 1.8rem/1.1 var(--f-titulo); letter-spacing: -0.02em; }
.entrada__sub { margin: 0 0 20px; color: var(--ink-2); }
.form-entrada { display: grid; gap: 12px; }
.form-entrada .form__erro { margin: 0; }
.entrada__dica { margin: -4px 0 0; color: var(--ink-3); font-size: .8rem; }
.link-troca { margin-top: 16px; border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px 0; font-size: .9rem; }
.link-troca:hover { text-decoration: underline; }

/* ---------- aviso ---------- */
#aviso { position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 999px; background: var(--paper-3); border: 1px solid var(--linha-forte); box-shadow: var(--sombra); font-weight: 500; font-size: .92rem; transition: all .35s var(--suave); max-width: calc(100vw - 32px); text-align: center; }
#aviso.mostra { opacity: 1; transform: translate(-50%, 0); }
#aviso[data-tipo="erro"] { border-color: rgba(248, 113, 113, .5); color: #fecaca; }

/* ---------- telas médias ---------- */
@media (max-width: 1100px) {
  .agenda { grid-template-columns: 1fr; }
  .agenda__dia { position: static; }
  .atalhos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- celular ---------- */
@media (max-width: 860px) {
  body { font-size: 15px; }
  .casca { display: block; padding-top: 58px; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .lateral { display: none; }
  .barra-topo { display: flex; position: fixed; inset: 0 0 auto 0; z-index: 20; height: 58px; align-items: center; justify-content: space-between; padding: 0 16px; background: hsla(222, 60%, 5%, .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--linha); }
  .barra-topo__marca b { font: 800 1.05rem/1 var(--f-titulo); }
  .barra-baixo { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 20; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: hsla(222, 60%, 5%, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--linha); }
  .barra-baixo a, .barra-baixo button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; min-height: 52px; border: 0; background: none; color: var(--ink-3); text-decoration: none; font-size: .7rem; font-weight: 500; cursor: pointer; border-radius: 10px; }
  .barra-baixo [aria-current] { color: var(--ink-0); }
  .barra-baixo [aria-current] [class^="ico-"] { color: var(--accent); }
  .flutuante { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 21; width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent-grad); color: #fff; font-size: 1.8rem; line-height: 1; box-shadow: 0 10px 28px rgba(37, 99, 235, .5); cursor: pointer; }
  .conteudo { padding: 20px 16px 24px; }
  .topo-tela { align-items: flex-start; }
  .topo-tela__acoes { width: 100%; }
  .topo-tela__acoes > .btn--primario { margin-left: auto; }
  .atalhos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
  .atalhos::-webkit-scrollbar { display: none; }
  .atalho { flex: none; padding: 0 16px; scroll-snap-align: start; }
  .painel-grade { grid-template-columns: 1fr; gap: 12px; }
  .painel { padding: 14px; }
  .cards-totais { grid-template-columns: 1fr 1fr; }
  .total--saldo { grid-column: span 2; }
  .quadro { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 0 16px 8px; }
  .coluna { flex: 0 0 86%; scroll-snap-align: start; }
  .dia { min-height: 54px; padding: 4px; align-items: center; }
  .dia__itens { display: none; }
  .dia__ponto { display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--thm-blue); color: #fff; font: 600 .62rem/1 var(--f-mono); }
  .ideias { grid-template-columns: 1fr; }
  .escolha { grid-template-columns: 1fr; }
  .captura__linha { flex-direction: column; }
  #janela { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .form { max-height: 92dvh; }
  .form__rodape { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  kbd { display: none; }
}
@media (max-width: 400px) {
  .cards-totais { grid-template-columns: 1fr; }
  .total--saldo { grid-column: auto; }
  .item__hora { min-width: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
