:root {
  color-scheme: light;
  --bg: #F2EFE6;
  --bg-soft: #EAE6DA;
  --card: #FFFDF8;
  --ink: #1F2620;
  --ink-soft: #5D665B;
  --ink-faint: #8A9187;
  --line: #DCD6C6;
  --line-soft: #EBE6D9;
  --pos: #2A6A4B;
  --neg: #A23E2C;
  --accent: #2F6B4F;
  --accent-strong: #24553E;
  --accent-ink: #FFFDF8;
  --accent-soft: #E3EDE6;
  --paid: #2A5B8C;
  --paid-soft: #E3ECF5;
  --neg-soft: #F6E4DF;
  --urgent-bg: #FBEDE9;
  --urgent-line: #EFCFC6;
  --warn-bg: #FBF0DD;
  --warn-line: #E8C98F;
  --warn-ink: #7A5212;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid: #ECE7DA;
  --shadow: 0 1px 2px rgba(31, 38, 32, .05), 0 4px 14px rgba(31, 38, 32, .05);
  --shadow-lg: 0 10px 30px rgba(31, 38, 32, .14);
  --radius: 12px;
  --radius-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131714; --bg-soft: #1A1F1B; --card: #1C221D; --ink: #E8E5DA; --ink-soft: #A2A99B; --ink-faint: #737A6F;
    --line: #313830; --line-soft: #262C26; --pos: #74C29A; --neg: #E78D7A; --accent: #6FBE94; --accent-strong: #8AD0AA;
    --accent-ink: #10201A; --accent-soft: #1F3328; --paid: #86B6E3; --paid-soft: #1D2B3A; --neg-soft: #3A2420;
    --urgent-bg: #2C1E1B; --urgent-line: #4A2D27; --warn-bg: #2E2717; --warn-line: #5E4B26; --warn-ink: #E9C887;
    --series-1: #3987e5; --series-2: #d95926; --grid: #262C26;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131714; --bg-soft: #1A1F1B; --card: #1C221D; --ink: #E8E5DA; --ink-soft: #A2A99B; --ink-faint: #737A6F;
  --line: #313830; --line-soft: #262C26; --pos: #74C29A; --neg: #E78D7A; --accent: #6FBE94; --accent-strong: #8AD0AA;
  --accent-ink: #10201A; --accent-soft: #1F3328; --paid: #86B6E3; --paid-soft: #1D2B3A; --neg-soft: #3A2420;
  --urgent-bg: #2C1E1B; --urgent-line: #4A2D27; --warn-bg: #2E2717; --warn-line: #5E4B26; --warn-ink: #E9C887;
  --series-1: #3987e5; --series-2: #d95926; --grid: #262C26;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.num, .card .value, table td.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 24px 80px; }

/* ---------- Header ---------- */
header.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 10px; box-shadow: var(--shadow); }
header.top h1 { font-size: 24px; line-height: 1.15; }
.sub { color: var(--ink-soft); font-size: 12.5px; }
.who { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.who-line { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.who-links { display: flex; gap: 6px; font-size: 12.5px; color: var(--ink-faint); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 600; }

/* ---------- Controls ---------- */
select, input, button, textarea, .btn {
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 11px; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.btn { display: inline-block; text-decoration: none; cursor: pointer; }
button { cursor: pointer; }
button:hover, .btn:hover { border-color: var(--ink-faint); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
button.ghost, .btn.ghost { background: transparent; }
button.ghost:hover, .btn.ghost:hover { background: var(--card); }
button.danger { color: var(--neg); }
button.primary.danger { background: var(--neg); border-color: var(--neg); color: var(--card); }
button.small, .btn.small { padding: 6px 11px; font-size: 12.5px; }
button.link { background: none; border: none; padding: 0; color: var(--ink-soft); font-size: inherit; border-radius: 3px; }
button.link:hover { color: var(--ink); text-decoration: underline; }
button.icon { width: 38px; height: 38px; padding: 0; font-size: 20px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; background: var(--card); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Due-date warning ---------- */
.aviso { display: flex; gap: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; font-size: 13.5px; }
.aviso .ico { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--warn-line); color: var(--warn-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.aviso b { font-weight: 600; color: var(--warn-ink); }
.aviso ul { margin: 4px 0 0; padding-left: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.aviso li { white-space: nowrap; }
.aviso .vencido { color: var(--neg); font-weight: 600; }

/* ---------- Month bar ---------- */
.month-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.month-nav { display: flex; align-items: center; gap: 6px; }
select#monthSelect { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; font-weight: 600; padding: 6px 12px; min-width: 200px; height: 38px; }
.month-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.saved { font-size: 12px; color: var(--ink-faint); margin-right: 6px; }
.saved.erro { color: var(--neg); font-weight: 600; }

/* ---------- Summary cards ---------- */
.cards { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 10px; margin-bottom: 22px; }
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.card .label { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.card .label i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; background: var(--line); }
.card .value { font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 600; margin-top: 4px; line-height: 1.2; white-space: nowrap; }
.card .meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.card .value.neg { color: var(--neg); }
.card .value.pos { color: var(--pos); }
.card.hero { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card.hero .label, .card.hero .meta { color: var(--accent-ink); opacity: .82; }
.card.hero .value { font-size: 30px; color: var(--accent-ink); }
.card.hero.neg { background: var(--neg); border-color: var(--neg); }

/* ---------- Tabs ---------- */
nav.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs button { flex: 0 0 auto; border: none; border-radius: 9px; background: transparent; padding: 8px 13px; font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }
nav.tabs button:hover { color: var(--ink); background: rgba(127, 127, 127, .08); }
nav.tabs button.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
nav.tabs .sep { flex: 1 0 8px; }

/* ---------- Panel ---------- */
section.panel h2 { font-size: 20px; margin-bottom: 2px; }
section.panel h2.mt { margin-top: 34px; }
section.panel .hint { color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; }
section.panel .hint b { color: var(--ink); }

.progress { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 0 0 14px; }
.progress .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.progress .row b { color: var(--ink); font-weight: 600; }
.progress .bar { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.progress .bar span { display: block; height: 100%; border-radius: 99px; background: var(--paid); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table th, table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 500; background: var(--bg-soft); }
table tbody tr { transition: background-color .12s; }
table tbody tr:hover { background: rgba(127, 127, 127, .04); }
table tbody tr:last-child td { border-bottom: none; }
table td.col-actions { width: 1%; text-align: right; white-space: nowrap; }
table td.col-por { width: 44px; }
table tfoot td { border-top: 1px solid var(--line); border-bottom: none; font-weight: 600; padding: 11px 12px; background: var(--bg-soft); font-variant-numeric: tabular-nums; }
.up { color: var(--neg); } .down { color: var(--pos); }

/* Inputs inside tables look like text until hovered or focused (like a spreadsheet) */
table input[type=text], table input[type=number], table input[type=date] {
  width: 100%; min-width: 80px; padding: 6px 8px; background: transparent; border-color: transparent; border-radius: 6px;
}
table input[type=number] { font-variant-numeric: tabular-nums; }
table tr:hover input[type=text], table tr:hover input[type=number], table tr:hover input[type=date] { border-color: var(--line); background: var(--card); }
table input:focus { background: var(--card) !important; }
input.salvando { border-color: var(--accent) !important; }
input.erro { border-color: var(--neg) !important; background: var(--neg-soft) !important; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.pago { background: var(--paid-soft); color: var(--paid); }
.pill.aberto { background: var(--neg-soft); color: var(--neg); }

/* Unpaid bill due in 10 days or less (or overdue) */
table tbody tr.venc-urgente { background: var(--urgent-bg); }
table tbody tr.venc-urgente:hover { background: var(--urgent-bg); }
table tbody tr.venc-urgente td { border-bottom-color: var(--urgent-line); }
table tbody tr.venc-urgente td:first-child { box-shadow: inset 3px 0 0 var(--neg); }
table tbody tr.venc-urgente td.venc-cell, table tbody tr.venc-urgente td.venc-cell input { color: var(--neg); font-weight: 600; }

/* Who last changed the line */
.por { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11.5px; font-weight: 600; background: var(--bg-soft); color: var(--ink-soft); cursor: help; }
.por.u0 { background: color-mix(in srgb, var(--series-1) 16%, transparent); color: var(--series-1); }
.por.u1 { background: color-mix(in srgb, var(--series-2) 16%, transparent); color: var(--series-2); }

button[data-del] { border-color: transparent; background: transparent; color: var(--ink-faint); width: 30px; height: 30px; padding: 0; }
button[data-del]:hover { color: var(--neg); background: var(--neg-soft); border-color: transparent; }
button[data-pagou] { border-radius: 99px; }

/* Add row */
.addrow { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; padding: 12px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.addrow .f-nome { flex: 2; min-width: 140px; }
.addrow .f-valor { width: 120px; }
.addrow .f-data { width: 160px; }
.addrow .f-desc { flex: 2; min-width: 140px; }
.addrow.plain { padding: 0; background: none; border: none; }

.empty { color: var(--ink-faint); font-style: italic; padding: 22px 6px; text-align: center; }
.check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* ---------- Charts ---------- */
.chart { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 10px; margin-bottom: 8px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: 'IBM Plex Sans', sans-serif; fill: var(--ink-soft); font-size: 11.5px; }
.chart text.val { fill: var(--ink); font-weight: 500; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .s1 { fill: var(--series-1); } .chart .s2 { fill: var(--series-2); } .chart .s0 { fill: var(--accent); }
.chart .hit { fill: transparent; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-soft); margin: 0 0 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .l1 i { background: var(--series-1); } .legend .l2 i { background: var(--series-2); }
details.tabela { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-soft); }
details.tabela summary { cursor: pointer; }
details.tabela table { margin-top: 8px; }
.tooltip { position: fixed; z-index: 1100; pointer-events: none; background: var(--ink); color: var(--card); padding: 8px 11px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; max-width: 240px; box-shadow: var(--shadow-lg); }

/* ---------- History ---------- */
.hist { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.hist li:last-child { border-bottom: none; }
.hist .quando { color: var(--ink-faint); font-size: 12.5px; white-space: nowrap; min-width: 86px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.hist .txt { flex: 1; padding-top: 2px; }
.hist .txt b { font-weight: 600; }
.hist .desfeito { color: var(--ink-faint); font-size: 12px; font-style: italic; }
.hist-filtro { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------- Backup screen ---------- */
.box { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.box h3 { font-size: 16px; margin-bottom: 4px; }
.box p { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; }
.box .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

footer.note { margin-top: 36px; font-size: 12px; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.login-box { background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 30px 28px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.login-logo { border-radius: 12px; align-self: flex-start; }
.login-box h1 { font-size: 26px; }
.login-box .sub { margin: -10px 0 4px; }
.login-box label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.login-box input { font-size: 15px; min-height: 44px; }
.login-box button { min-height: 46px; font-size: 15px; margin-top: 4px; }
.login-erro { color: var(--neg); font-size: 13px; margin: 0; min-height: 1em; }

/* ---------- Modal ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 20, 16, 0.45); backdrop-filter: blur(2px); align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--card); border: 1px solid var(--line-soft); border-radius: 14px; padding: 22px; max-width: 400px; width: 100%; box-shadow: var(--shadow-lg); }
.modal-box h3 { font-size: 17px; margin-bottom: 8px; }
.modal-box p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.55; }
.modal-box input { width: 100%; margin-bottom: 16px; min-height: 42px; font-size: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions button { min-height: 40px; padding: 8px 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 10px 18px; border-radius: 10px; font-size: 13.5px; z-index: 1200; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.toast.erro { background: var(--neg); }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card.hero { grid-column: span 3; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
  .card.hero .value { margin: 0; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .wrap { padding: 14px 16px 64px; }
  header.top { padding-bottom: 14px; margin-bottom: 14px; }
  .brand img { width: 34px; height: 34px; }
  header.top h1 { font-size: 20px; }
  header.top .brand .sub { display: none; }
  .who-line #meNome { display: none; }
  .aviso ul { flex-direction: column; gap: 2px; }
  .aviso li { white-space: normal; }
  .month-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .month-nav select { flex: 1; min-width: 0; }
  button.icon { width: 44px; height: 44px; }
  select#monthSelect { height: 44px; }
  .month-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .hide-sm { display: none; }
  .month-actions .saved { grid-column: 1 / -1; text-align: center; margin: 0; }
  .month-actions button, .month-actions .btn { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 6px 4px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 18px; }
  .card.hero { grid-column: span 2; }
  .card { padding: 12px; }
  .card .label { font-size: 10.5px; }
  .card .value { font-size: 18px; }
  .card.hero .value { font-size: 26px; }
  nav.tabs { margin: 0 -16px 16px; border-radius: 0; border-left: none; border-right: none; padding: 6px 12px; }
  nav.tabs button { padding: 10px 14px; min-height: 42px; }
  nav.tabs .sep { display: none; }
  section.panel h2 { font-size: 18px; }

  /* Tables become one card per line */
  .panel table:not(.plain), .panel table:not(.plain) thead, .panel table:not(.plain) tbody, .panel table:not(.plain) tfoot,
  .panel table:not(.plain) tr, .panel table:not(.plain) td { display: block; width: 100%; }
  .panel table:not(.plain) { background: transparent; border: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .panel table:not(.plain) thead { display: none; }
  .panel table:not(.plain) tbody tr { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 14px; margin-bottom: 10px; }
  .panel table:not(.plain) tbody tr.venc-urgente { background: var(--urgent-bg); border-color: var(--urgent-line); box-shadow: inset 4px 0 0 var(--neg), var(--shadow); }
  .panel table:not(.plain) tbody tr.venc-urgente td:first-child { box-shadow: none; }
  .panel table:not(.plain) tbody td { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); text-align: right; min-height: 44px; }
  .panel table:not(.plain) tbody tr td:last-child { border-bottom: none; }
  .panel table:not(.plain) tbody td::before { content: attr(data-label); flex: 0 0 auto; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 500; }
  .panel table:not(.plain) tbody td.col-por:empty { display: none; }
  .panel table:not(.plain) tbody td.col-actions { justify-content: flex-end; gap: 8px; }
  .panel table:not(.plain) tbody td.col-actions::before { content: none; }
  .panel table:not(.plain) tbody td.col-actions button { min-height: 40px; min-width: 40px; }
  .panel table:not(.plain) input[type=text], .panel table:not(.plain) input[type=number], .panel table:not(.plain) input[type=date] {
    width: auto; max-width: 64%; min-height: 40px; font-size: 15px; text-align: right; background: var(--bg-soft); border-color: transparent; }
  .panel table:not(.plain) tbody td.empty { display: block; text-align: center; min-height: 0; }
  .panel table:not(.plain) tbody td.empty::before { content: none; }
  .panel table:not(.plain) tfoot tr { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
  .panel table:not(.plain) tfoot td { display: block; border: none; padding: 0; width: auto; background: none; }
  .addrow { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 14px; }
  .addrow input { width: 100% !important; min-height: 44px; font-size: 15px; }
  .addrow button.primary { width: 100%; min-height: 46px; font-size: 15px; }
  .addrow.plain button { width: auto; }
  .hist li { flex-wrap: wrap; gap: 8px 10px; }
  .hist .quando { min-width: 0; }
  .hist .txt { flex-basis: 100%; }
  .box .row > * { flex: 1 1 100%; text-align: center; min-height: 44px; }
  footer.note { font-size: 11.5px; }
}
