/* Agiota do Bem: cartão de plástico + carnê de parcelas.
   Azul de caneta sobre papel frio; verde de carimbo para o que foi pago. */

:root {
  --paper: #eef1f6;
  --surface: #ffffff;
  --ink: #1b2340;
  --ink-2: #5b6482;
  --line: #dce1ec;
  --pen: #2f4be0;
  --pen-ink: #ffffff;
  --pen-soft: #e4e9ff;
  --paid: #1f8a5b;
  --wait: #a86a12;
  --late: #c2261c;
  --card-a: #23307a;
  --card-b: #3b5bfd;
  --cash-a: #12614a;
  --cash-b: #2a9d74;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}
/* Tema escuro: automático pelo sistema, a não ser que a pessoa escolha Claro em Conta. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --paper: #10142a;
    --surface: #1a2038;
    --ink: #e8ebf7;
    --ink-2: #9aa3c2;
    --line: #2a3150;
    --pen: #8aa0ff;
    --pen-ink: #0d1330;
    --pen-soft: #252e57;
    --paid: #4fcf95;
    --wait: #f0b552;
    --late: #ff7b6f;
  }
}
:root[data-theme=dark] {
  --paper: #10142a;
  --surface: #1a2038;
  --ink: #e8ebf7;
  --ink-2: #9aa3c2;
  --line: #2a3150;
  --pen: #8aa0ff;
  --pen-ink: #0d1330;
  --pen-soft: #252e57;
  --paid: #4fcf95;
  --wait: #f0b552;
  --late: #ff7b6f;
  color-scheme: dark;
}
:root[data-theme=light] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}
body.logged { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
a { color: var(--pen); text-decoration: none; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; border-radius: 6px; }

h1, h2, .money, .brand { font-family: var(--display); }
h1 { font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; margin: 2rem 0 .75rem; }
.money { font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.mt { margin-top: .75rem; }

.wrap { max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }

/* ---------- Topo ---------- */
.top {
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 6px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pen-soft); color: var(--pen); font: 700 .95rem var(--display);
}
.back { display: inline-block; color: var(--ink-2); font-size: .9rem; margin: 4px 0 12px; }

/* ---------- Saldo ---------- */
.balance {
  display: grid; grid-template-columns: 1fr 1fr; background: var(--surface);
  border-radius: 20px; position: relative; overflow: hidden;
}
.balance > * { padding: 16px 18px 18px; }
.balance > * + * { border-left: 2px dashed var(--line); }
.balance span { display: block; color: var(--ink-2); font-size: .875rem; }
.balance strong { display: block; font-size: 1.45rem; margin-top: 2px; }
.balance .owed strong { color: var(--pen); }

/* ---------- Listas ---------- */
.list { background: var(--surface); border-radius: 20px; overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; color: inherit; }
.item:active, .task:active { background: var(--pen-soft); }
.item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item-top strong { font-weight: 600; }
.item-sub { color: var(--ink-2); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: .85rem; color: var(--ink-2); }
.empty { background: var(--surface); border-radius: 20px; padding: 18px; color: var(--ink-2); }
.empty a { font-weight: 600; }

/* Mini cartão / cédula que identifica a dívida */
.chip {
  width: 52px; height: 36px; border-radius: 7px; position: relative; color: #fff;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 3px 5px;
  font: 600 .7rem var(--text); font-variant-numeric: tabular-nums; margin-top: 2px;
}
.chip-card { background: linear-gradient(135deg, var(--card-a), var(--card-b)); }
.chip-card i { position: absolute; left: 6px; top: 7px; width: 11px; height: 8px; border-radius: 2px; background: #e9c46a; }
.chip-cash { background: linear-gradient(135deg, var(--cash-a), var(--cash-b)); justify-content: center; align-items: center; font-size: .8rem; }

/* Progresso: um ponto por parcela */
.dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line); }
.dots i.paga { background: var(--paid); border-color: var(--paid); }
.dots i.informada { background: var(--wait); border-color: var(--wait); }
.bar { height: 6px; border-radius: 99px; background: var(--line); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--paid); }
.late { color: var(--late); font-weight: 600; }

/* Etiquetas de status */
.tag {
  display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  background: var(--line); color: var(--ink-2); white-space: nowrap;
}
.tag-ativa, .tag-pendente { background: var(--pen-soft); color: var(--pen); }
.tag-aguardando, .tag-informada { background: color-mix(in srgb, var(--wait) 16%, transparent); color: var(--wait); }
.tag-quitada, .tag-paga { background: color-mix(in srgb, var(--paid) 16%, transparent); color: var(--paid); }
.tag-recusada, .tag-atrasada { background: color-mix(in srgb, var(--late) 14%, transparent); color: var(--late); }

/* ---------- Pendências ---------- */
.task { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px; color: inherit; }
.task-ico {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--wait) 16%, transparent); color: var(--wait);
}
.task-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.task p { margin: 0; }
.task .money { font-size: 1.1rem; }
.task .note { color: var(--ink-2); font-size: .9rem; font-style: italic; margin-top: 2px; }

/* ---------- Cartão de plástico (detalhe) ---------- */
.plastic {
  aspect-ratio: 1.586; max-height: 230px; width: 100%; border-radius: 18px; padding: 20px 22px;
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.22), transparent 55%),
    linear-gradient(135deg, var(--card-a), var(--card-b));
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--card-a) 80%, transparent);
}
.plastic.dinheiro {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 9px),
    linear-gradient(135deg, var(--cash-a), var(--cash-b));
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--cash-a) 80%, transparent);
}
.plastic-top { display: flex; justify-content: space-between; align-items: flex-start; }
.emv { width: 42px; height: 31px; border-radius: 6px; background: linear-gradient(135deg, #f1d58a, #c9a24a); position: relative; }
.emv::after { content: ""; position: absolute; inset: 7px 10px; border: 1.5px solid rgba(0,0,0,.18); border-radius: 3px; }
.plastic .tag { background: rgba(255,255,255,.2); color: #fff; }
.plastic-num { font: 600 1.35rem var(--display); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.plastic.dinheiro .plastic-num { letter-spacing: 0; font-size: 1.6rem; }
.plastic-foot { display: flex; justify-content: space-between; font-size: .85rem; opacity: .9; }

.summary { margin: 20px 2px 0; }
.summary h1 { margin-bottom: 4px; font-size: 1.4rem; }
.summary .remaining { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.summary .remaining .money { font-size: 2rem; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-2); font-size: .9rem; margin-top: 4px; }
.notes { background: var(--surface); border-radius: 14px; padding: 12px 14px; margin-top: 14px; font-size: .95rem; }

.decide { background: var(--surface); border-radius: 20px; padding: 16px; margin-top: 18px; }
.decide p { margin: 0 0 12px; }

/* ---------- Carnê ---------- */
.carne { display: grid; gap: 10px; }
.stub {
  display: grid; grid-template-columns: 64px 1fr; background: var(--surface); border-radius: 16px;
  position: relative; overflow: hidden;
}
.stub-num {
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 0;
  border-right: 2px dashed var(--line); position: relative;
}
/* picote: meia-lua em cima e embaixo da linha */
.stub-num::before, .stub-num::after {
  content: ""; position: absolute; right: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper);
}
.stub-num::before { top: -8px; }
.stub-num::after { bottom: -8px; }
.stub-num b { font: 700 1.5rem/1 var(--display); }
.stub-num span { font-size: .75rem; color: var(--ink-2); margin-top: 2px; }
.stub-body { padding: 14px 16px; min-width: 0; }
.stub-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stub-top .money { font-size: 1.15rem; }
.stub .when { color: var(--ink-2); font-size: .875rem; }
.stub .note { color: var(--ink-2); font-size: .875rem; font-style: italic; }
.stub.paga .stub-num b, .stub.paga .stub-top .money { color: var(--ink-2); }
.stub.paga .stub-body { padding-right: 112px; }

/* Carimbo de pago */
.stamp {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(-9deg);
  border: 2.5px solid var(--paid); color: var(--paid); border-radius: 8px; padding: 2px 10px 3px;
  font: 800 1.05rem/1.1 var(--display); text-align: center; opacity: .88; pointer-events: none;
}
.stamp small { display: block; font: 600 .68rem var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .stamp.fresh { animation: stamp .35s cubic-bezier(.2, 1.6, .4, 1) both; }
  @keyframes stamp { from { transform: translateY(-50%) rotate(-9deg) scale(1.8); opacity: 0; } }
}

/* ---------- Ações ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  min-height: 48px; padding: 12px 18px; font: 600 1rem var(--text); text-align: center;
  color: var(--pen-ink); background: var(--pen); border: 0; border-radius: 14px; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--pen-soft); color: var(--pen); }
.btn-plain { background: transparent; color: var(--ink-2); }
.btn-danger { background: var(--late); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: .925rem; border-radius: 12px; width: auto; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions > * { flex: 1; margin: 0; }
.actions .btn { width: 100%; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.reveal > summary {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--pen); font-weight: 600; font-size: .925rem;
}
.reveal > summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); margin-left: 4px; transition: transform .15s; }
.reveal[open] > summary::after { transform: rotate(-135deg) translateX(-2px); }
.reveal.quiet > summary { color: var(--ink-2); font-weight: 500; }
.reveal .form { margin-top: 12px; }

.closed > summary { color: var(--ink-2); font-weight: 600; margin: 2rem 0 .75rem; }
.closed[open] > summary { margin-bottom: .75rem; }

/* ---------- Formulários ---------- */
.form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 14px; }
.form input:not([type=radio]):not([type=checkbox]), .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: 400 16px var(--text);
  color: var(--ink); background: var(--paper); border: 1.5px solid transparent; border-radius: 12px;
  -webkit-appearance: none; appearance: none;
}
.form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--pen); background: var(--surface); }
.form .check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.form .check input { width: 20px; height: 20px; accent-color: var(--pen); }
.panel { background: var(--surface); border-radius: 20px; padding: 18px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.form input { min-width: 0; }
.form input[type=date] { min-height: 50px; padding-left: 10px; padding-right: 8px; }
.hint { color: var(--ink-2); font-size: .85rem; font-weight: 400; margin: -6px 0 14px; }
.money-input input { font: 650 1.4rem var(--display) !important; font-variant-numeric: tabular-nums; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--paper); border-radius: 14px; margin-bottom: 16px; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 35, 64, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--pen); }
form:has(input[value=dinheiro]:checked) .only-card { display: none; }

.flash { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: .95rem; font-weight: 500; }
.flash-ok { background: color-mix(in srgb, var(--paid) 14%, var(--surface)); color: var(--paid); }
.flash-erro { background: color-mix(in srgb, var(--late) 12%, var(--surface)); color: var(--late); }

/* ---------- Linha do tempo e avisos ---------- */
.timeline { list-style: none; padding: 0 0 0 4px; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; font-size: .95rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--pen); }
.timeline li.payment_confirmed::after, .timeline li.debt_settled::after, .timeline li.debt_accepted::after { border-color: var(--paid); background: var(--paid); }
.timeline li.payment_informed::after, .timeline li.debt_created::after { border-color: var(--wait); }
.timeline li.payment_rejected::after, .timeline li.debt_rejected::after { border-color: var(--late); }
.timeline time { display: block; color: var(--ink-2); font-size: .8rem; }
.timeline .where { color: var(--ink-2); font-size: .85rem; }

.note-item { display: block; padding: 14px 16px; color: inherit; position: relative; }
.note-item time { display: block; color: var(--ink-2); font-size: .8rem; margin-bottom: 2px; }
.note-item.unread { padding-left: 30px; }
.note-item.unread::before { content: ""; position: absolute; left: 13px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--pen); }

.profile { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 20px; padding: 16px; }
.profile .avatar { width: 48px; height: 48px; font-size: 1.2rem; }
.row-link { display: flex; justify-content: space-between; align-items: center; padding: 16px; color: var(--ink); font-weight: 600; }
.user-row { padding: 14px 16px; }
.user-row .reveal > summary { margin-top: 6px; }

/* ---------- Entrada (login / primeiro acesso) ---------- */
body.guest .wrap { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
.gate { text-align: center; }
.gate .form { text-align: left; }
.gate-mark { display: block; width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px; }
.gate h1 { font-size: 2rem; margin-bottom: 6px; }
.gate > p { color: var(--ink-2); margin: 0 0 22px; }

/* ---------- Barra inferior ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; font-size: .72rem; font-weight: 500; color: var(--ink-2); }
.tabs a.on { color: var(--pen); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs .new span {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; margin-top: -18px;
  background: var(--pen); color: var(--pen-ink); box-shadow: 0 8px 18px -8px var(--pen);
}
.tabs .new svg { stroke-width: 2.4; }
.badge {
  position: absolute; top: 0; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--late); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--surface); box-sizing: content-box;
}

/* Mostrar senha */
.pw { position: relative; display: block; margin-top: 6px; }
.form .pw input { margin-top: 0; padding-right: 50px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 10px; color: var(--ink-2); cursor: pointer;
}
.pw-toggle:hover, .pw-toggle[aria-pressed=true] { color: var(--pen); }
.pw-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Filtro por pessoa no histórico: rola na horizontal no celular */
.filters {
  display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 18px; padding: 4px 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filters a {
  flex: none; padding: 8px 14px; border-radius: 99px; background: var(--surface); color: var(--ink-2);
  font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.filters a.on { background: var(--pen); color: var(--pen-ink); }

/* Ações do topo: conta e sair */
.top-actions { display: flex; align-items: center; gap: 6px; }
.top-actions form { margin: 0; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  background: none; border: 0; border-radius: 50%; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--late); background: color-mix(in srgb, var(--late) 10%, transparent); }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn:disabled { opacity: .45; cursor: default; }

/* Caixa de confirmação */
.sheet {
  width: min(400px, calc(100% - 32px)); margin: auto; padding: 20px; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 48px -16px rgba(10, 14, 40, .45);
}
.sheet::backdrop { background: rgba(10, 14, 40, .5); }
.sheet p { margin: 0 0 4px; font: 600 1.1rem/1.35 var(--display); }
.sheet .actions { margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in .16s ease-out; }
  @keyframes sheet-in { from { transform: translateY(8px) scale(.98); opacity: 0; } }
}
.seg.seg-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.seg.seg-3 span { padding: 10px 4px; font-size: .925rem; }

/* Página de todas as dívidas */
.seg-links { margin-bottom: 4px; }
.seg-links a { display: block; text-align: center; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.seg-links a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 35, 64, .12); }
h2 .count { color: var(--ink-2); font: 500 .95rem var(--text); margin-left: 4px; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; text-align: right; }
.sum dd.paid { color: var(--paid); }
.sum.by-person { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-size: .95rem; }
.grand {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-top: 2px dashed var(--line); margin-top: 14px; padding-top: 14px;
}
.grand span { font-weight: 600; }
.grand strong { font-size: 1.75rem; color: var(--pen); }
a.balance-link { color: inherit; display: block; }
a.balance-link:active { background: var(--pen-soft); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head a { font-size: .9rem; font-weight: 600; }
.item-foot > span:first-child { white-space: nowrap; }

/* Tentativas de login (admin) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-radius: 20px; }
.stats > div { padding: 14px 12px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats strong { display: block; font-size: 1.5rem; }
.stats span { color: var(--ink-2); font-size: .8rem; }
.attempt { padding: 12px 16px; }

/* Faixa de novidade em tempo real */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  width: min(528px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 16px; border-radius: 16px; background: var(--ink); color: var(--paper);
  box-shadow: 0 14px 30px -12px rgba(10, 14, 40, .5); font-size: .95rem;
}
.toast span { flex: 1; }
.toast-action {
  flex: none; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--pen); color: var(--pen-ink);
  font: 600 .9rem var(--text); cursor: pointer;
}
.toast.out { opacity: 0; transition: opacity .3s; }
@media (prefers-reduced-motion: no-preference) {
  .toast:not(.out) { animation: toast-in .2s ease-out; }
  @keyframes toast-in { from { transform: translate(-50%, 12px); } }
}
.timeline li.debt_edited::after { border-color: var(--wait); }
.edit-note { margin: -6px 0 16px; font-size: .925rem; }
