/* Controle Financeiro — estilos. Cores por papel (tokens), tema claro/escuro via [data-theme]. */
/* Paleta e fontes do Axis.
   Cores oficiais: cobre #93532F / cobre claro #C2845A (destaque), grafite #1F1F1F, carvão #2E2E2E,
   branco #FFFFFF, bege claro #F2F0ED, fundo escuro #181818, painel escuro #232323, texto claro #ECE9E5,
   cinza discreto #6E6A66, linha clara #DDDAD6, verde #4F7A52 (ok), vermelho #B4483C (erro).
   Os demais tons abaixo são derivados dessas cores (hover, fundos suaves e versões legíveis no tema escuro). */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2-variations");
}
:root {
  --bg: #f2f0ed; --surface: #ffffff; --surface-2: #e9e6e1; --text: #1f1f1f; --text-2: #6e6a66; --border: #dddad6;
  --primary: #93532f; --primary-strong: #7c4526; --primary-ink: #ffffff; --primary-soft: #f1e4da;
  --income: #4f7a52; --expense: #b4483c; --warn: #96650f; --good: #4f7a52; --crit: #b4483c;
  --series-1: #93532f; --track: #e6e2dd; --shadow: 0 1px 2px rgba(31, 31, 31, .05), 0 1px 3px rgba(31, 31, 31, .07);
  --fab-shadow: 0 6px 16px rgba(147, 83, 47, .35);
  --radius: 16px; --nav-h: 64px;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #181818; --surface: #232323; --surface-2: #2e2e2e; --text: #ece9e5; --text-2: #a8a39d; --border: #3a3836;
  --primary: #c2845a; --primary-strong: #b37549; --primary-ink: #181818; --primary-soft: #3a2b20;
  --income: #86b489; --expense: #df8176; --warn: #d9a441; --good: #86b489; --crit: #df8176;
  --series-1: #c2845a; --track: #353331; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --fab-shadow: 0 6px 16px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, b, th { font-weight: 600; }
h1 { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 16px; display: flex; align-items: center; gap: 6px; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.i { flex: none; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money.pos, .pos { color: var(--income); }
.money.neg, .neg { color: var(--expense); }
.hide-values .money { filter: blur(7px); user-select: none; }
.muted { color: var(--text-2); }
.late { color: var(--crit) !important; font-weight: 600; }

/* ---------- Estrutura ---------- */
.app { min-height: 100dvh; }
.side { display: none; }
#view { outline: none; padding: 16px 16px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); max-width: 1040px; margin: 0 auto; }
.view { display: flex; flex-direction: column; gap: 14px; }
.bottom { position: fixed; inset: auto 0 0 0; z-index: 20; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: var(--surface); border-top: 1px solid var(--border); }
.bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text-2); padding: 8px 0; }
.bottom a.on { color: var(--primary); font-weight: 600; }
.fab { justify-self: center; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; margin-top: -26px; box-shadow: var(--fab-shadow); }
.fab:active { transform: scale(.96); }
.desk-only { display: none !important; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100dvh; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
  .brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-size: 15px; }
  .brand img { border-radius: 9px; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
  .side nav a:hover { background: var(--surface-2); color: var(--text); }
  .side nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
  .bottom { display: none; }
  #view { padding: 28px 32px 56px; width: 100%; }
  .desk-only { display: inline-flex !important; }
}

/* ---------- Blocos ---------- */
.topbar { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.topbar h1 { flex: 1; min-width: 0; }
.topbar > div:first-child { flex: 1; }
.topbar-actions { display: flex; gap: 8px; flex: none !important; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.card.pad { display: flex; flex-direction: column; gap: 10px; }
ul.card { padding: 4px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head.spaced { margin: 8px 2px 0; }
.card-head small { color: var(--text-2); }
.card-head a { font-size: 13px; font-weight: 600; }
.grid2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section-title { font-size: 13px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 6px 2px -4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-strong); }
.btn.danger { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn.danger-text { color: var(--crit); }
.btn.has-filter { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); flex: none; }
.iconbtn:hover { background: var(--surface-2); color: var(--text); }

.monthnav { display: flex; align-items: center; justify-content: center; gap: 4px; }
.monthnav-label { border: 0; background: transparent; font-weight: 600; font-size: 16px; min-width: 190px; padding: 8px; border-radius: 10px; }
.monthnav-label:hover { background: var(--surface-2); }

.hero { display: flex; flex-direction: column; gap: 12px; }
.hero-main { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: var(--primary-ink); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.hero-main > span { opacity: .9; font-size: 13px; }
.hero-main strong { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; }
.hero-main small { opacity: .92; font-size: 13px; }
.hero.slim .hero-main strong { font-size: 26px; }
.hero-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 2px; color: var(--text); min-width: 0; }
.tile span { font-size: 12px; color: var(--text-2); }
.tile strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.tile small { font-size: 11px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); }
.dot.in { background: var(--income); } .dot.out { background: var(--expense); }
@media (min-width: 600px) { .tile { padding: 14px 16px; } .tile strong { font-size: 19px; } }

.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--border); }
.row-item, .tx { display: flex; align-items: center; gap: 12px; padding: 11px 0; min-width: 0; }
.row-item[role="button"], .tx { cursor: pointer; }
.row-item.col { flex-direction: column; align-items: stretch; gap: 8px; }
.row-item.sub { padding-left: 28px; }
.row-item.archived { opacity: .55; }
.rowlink { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-main span { font-size: 12.500px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-right { display: flex; align-items: center; gap: 8px; flex: none; font-weight: 600; }
.tx-right small { font-weight: 400; font-size: 12px; }
.row-item .tx-right:has(small) { flex-direction: column; align-items: flex-end; gap: 0; }
.tx.unpaid .tx-main strong { font-weight: 500; }
.tx.unpaid .money { opacity: .75; }
.ico { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.ico.plain { background: var(--surface-2); color: var(--text-2); }
.pill { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); margin-left: 4px; vertical-align: 1px; }
.paidbtn { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: transparent; color: transparent; display: grid; place-items: center; padding: 0; flex: none; }
.paidbtn.on { background: var(--good); border-color: var(--good); color: var(--surface); }
.day h3 { font-size: 12.500px; color: var(--text-2); font-weight: 600; margin: 4px 2px 6px; text-transform: capitalize; }

.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 99px; background: var(--primary); min-width: 0; }
.bar.good span { background: var(--good); } .bar.warn span { background: var(--warn); } .bar.crit span { background: var(--crit); }
.empty { text-align: center; padding: 26px 12px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty-ico { font-size: 32px; }
.empty strong { color: var(--text); }
.empty p { max-width: 36ch; font-size: 13.500px; }
.hint { font-size: 12.500px; color: var(--text-2); }
.hint.center { text-align: center; }
.lead { font-size: 15px; }

.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg-btn { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 10px; font-weight: 600; font-size: 13.500px; color: var(--text-2); white-space: nowrap; }
.seg-btn[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-btn.t-expense[aria-selected="true"] { background: var(--expense); color: #fff; }
.seg-btn.t-income[aria-selected="true"] { background: var(--income); color: #fff; }
:root[data-theme="dark"] .seg-btn.t-expense[aria-selected="true"], :root[data-theme="dark"] .seg-btn.t-income[aria-selected="true"] { color: #181818; }
.seg.mini { padding: 2px; } .seg.mini .seg-btn { padding: 5px 12px; font-size: 12.500px; }
.filters-type { overflow-x: auto; }
.searchbar { display: flex; gap: 8px; }
.search { position: relative; flex: 1; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.search .input { padding-left: 38px; }
.filters { display: none; gap: 8px; flex-wrap: wrap; }
.filters.open { display: flex; }
.filters .input { flex: 1 1 180px; width: auto; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.totals > div { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; display: flex; flex-direction: column; font-weight: 600; min-width: 0; }
.totals span:first-child { font-size: 12px; color: var(--text-2); font-weight: 500; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.500px; font-weight: 600; color: var(--text-2); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.input { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 16px; }
textarea.input { resize: vertical; }
.input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.input.amount { font-size: 26px; font-weight: 600; text-align: center; letter-spacing: -.01em; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.inline { display: flex; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; }
.chip span, .chip-btn { display: inline-block; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.actions.left { justify-content: flex-start; }
.actions.wrap { flex-wrap: wrap; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--text); }
.emoji-row { display: flex; gap: 8px; align-items: flex-start; }
.emoji-input { width: 60px; text-align: center; font-size: 20px; flex: none; }
.emojis { display: flex; flex-wrap: wrap; gap: 2px; max-height: 92px; overflow-y: auto; }
.emoji { border: 0; background: transparent; font-size: 20px; width: 36px; height: 36px; border-radius: 8px; }
.emoji:hover { background: var(--surface-2); }
form[data-type="transfer"] .not-transfer, form:not([data-type="transfer"]) .only-transfer, form:not(.is-card) .only-card, form.is-card .not-card,
form:not([data-repeat="fixed"]) .rep-fixed, form:not([data-repeat="installments"]) .rep-inst { display: none; }
.repeat { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 120; background: rgba(10, 14, 20, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface); width: 100%; max-width: 520px; max-height: 92dvh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .18s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 20px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 640px) { .modal-wrap { align-items: center; padding: 24px; } .modal { border-radius: 20px; } }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.choice:hover { background: var(--surface-2); }
.choice span { font-size: 12.500px; color: var(--text-2); }
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 500; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 140; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.lock { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.lock-box { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; }
.lock-box img { border-radius: 16px; margin: 0 auto; }

/* ---------- Cartões, faturas, objetivos ---------- */
.cardgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.plastic { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 82%, #000), color-mix(in srgb, var(--c) 55%, #000)); box-shadow: var(--shadow); }
.plastic.archived { opacity: .55; }
.plastic-top, .plastic-mid { display: flex; flex-direction: column; }
.plastic-top strong { font-size: 17px; }
.plastic span, .plastic small { font-size: 12.500px; opacity: .92; }
.plastic-mid b { font-size: 24px; }
.plastic .bar { background: rgba(255, 255, 255, .28); } .plastic .bar span { background: #fff; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.kv span { display: block; font-size: 12px; color: var(--text-2); }
.kv strong { font-size: 15px; }
.invoice-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.invoice-head > div { display: flex; flex-direction: column; gap: 2px; }
.invoice-dates { font-size: 13px; color: var(--text-2); text-align: right; }
.invoice-dates b { color: var(--text); }
.big { font-size: 28px; letter-spacing: -.02em; }
.status { align-self: flex-start; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.status.good { color: var(--good); } .status.warn { color: var(--warn); } .status.crit { color: var(--crit); }
.goal { display: flex; flex-direction: column; gap: 8px; }
.goal .kv { margin: 2px 0; }

/* ---------- Gráficos ---------- */
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.legend-list { list-style: none; margin: 0; padding: 0; flex: 1 1 220px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.legend-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 38px; gap: 8px; align-items: center; font-size: 13.500px; }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; }
.legend-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-list em { font-style: normal; color: var(--text-2); text-align: right; font-size: 12.500px; font-variant-numeric: tabular-nums; }
.chart text { font-size: 11px; fill: var(--text-2); font-family: inherit; }
.chart text.c-strong { font-size: 15px; font-weight: 600; fill: var(--text); }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .zero { stroke: var(--text-2); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .col:hover .hit, .chart .pt:hover .hit { fill: var(--surface-2); opacity: .6; }
.chart .s-in { fill: var(--income); } .chart .s-out { fill: var(--expense); }
.chart .slice { stroke: var(--surface); stroke-width: 0; cursor: pointer; transition: opacity .12s; }
.chart.donut:hover .slice:not(:hover) { opacity: .55; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt circle { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; opacity: 0; }
.chart .pt .cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart .pt:hover circle, .chart .pt:hover .cross { opacity: 1; }
.chart .end { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.chart-scroll { overflow-x: auto; }
.legend { display: flex; gap: 16px; font-size: 12.500px; color: var(--text-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.k-in { background: var(--income); } .k-out { background: var(--expense); }
.tip { position: fixed; z-index: 130; display: none; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 10px; font-size: 12.500px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); min-width: 130px; }
.tip-row { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.tip-row i { width: 8px; height: 8px; border-radius: 2px; }
.tip-row span { flex: 1; opacity: .85; }
.tip-row b { font-variant-numeric: tabular-nums; }
.details { margin-top: 10px; }
.details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); padding: 6px 0; }
.table { width: 100%; border-collapse: collapse; font-size: 13.500px; }
.table th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.table td { padding: 8px 4px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .subrow td { color: var(--text-2); padding-left: 18px; font-size: 13px; }

/* ---------- Calendário ---------- */
.cal { padding: 10px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-week span { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-2); padding: 4px 0; }
.cal-cell { position: relative; min-height: 58px; border: 1px solid transparent; border-radius: 10px; background: var(--surface-2); padding: 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-size: 10.500px; line-height: 1.25; overflow: hidden; }
.cal-cell.blank { background: transparent; }
.cal-cell b { font-size: 13px; }
.cal-cell.today b { color: var(--primary); }
.cal-cell.sel { border-color: var(--primary); background: var(--primary-soft); }
.cal-cell .pend { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
@media (min-width: 600px) { .cal-cell { min-height: 76px; padding: 8px; font-size: 12px; } }

/* ---------- Anexos ---------- */
.file-chip { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; max-width: 100%; }
.file-chip button { border: 0; background: transparent; padding: 6px 10px; font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button:hover { background: var(--surface-2); }
.file-chip button + button { padding: 6px 10px 6px 6px; color: var(--text-2); font-size: 16px; line-height: 1; }
.attachment { display: block; max-width: 100%; max-height: 62dvh; margin: 0 auto; border-radius: 12px; }
.modal.wide { max-width: 760px; }

.recovery-code { display: block; text-align: center; font: 600 20px/1.3 var(--mono); letter-spacing: .06em; padding: 16px 10px; margin: 12px 0; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border); user-select: all; overflow-wrap: anywhere; }
.code-input { font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }

.remote { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.or { text-align: center; color: var(--text-2); font-size: 12.500px; margin: 12px 0; }
[hidden] { display: none !important; }
