:root {
  --wine: #8e1b1f;
  --wine-2: #b0282d;
  --wine-dark: #2e1210;
  --side: #3a1714;
  --paper: #fdf6ea;
  --paper-2: #f7ead5;
  --line: #ead8bd;
  --ink: #3b2620;
  --muted: #8a7065;
  --pink: #f8d3cf;
  --green: #e1ebcf;
  --gold: #f6e2b5;
  --hand: 'Caveat', cursive;
  --script: 'Dancing Script', cursive;
  --sans: 'Nunito', system-ui, sans-serif;
  --bg-glow: #5b2416;
  --side-1: #3e1916;
  --side-2: #2a0f0d;
  --side-ink: #f6e6d6;
  --sticky: #f9c9c3;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(40, 10, 5, .25);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--wine-dark) radial-gradient(circle at 70% 0%, var(--bg-glow), var(--wine-dark) 60%);
  min-height: 100vh;
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- Ã­cones ---------- */
.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--side-1), var(--side-2));
  color: var(--side-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.logo {
  background: var(--paper);
  margin: 0 0 18px;
  padding: 18px 18px 14px;
  color: var(--wine);
  transform: rotate(-1.5deg);
  box-shadow: var(--shadow);
  border-radius: 0 0 6px 0;
}
.logo-name { font-family: var(--script); font-size: 46px; line-height: 1; }
.logo-sub { letter-spacing: .45em; font-weight: 700; color: var(--ink); font-size: 15px; margin: 2px 0 6px 40px; }
.logo-tag { font-family: var(--hand); font-size: 18px; color: var(--ink); text-transform: uppercase; }

.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border-radius: 10px;
  font-size: 17px; text-align: left; color: var(--side-ink);
  transition: background .15s;
}
.nav-item .ic { width: 24px; height: 24px; }
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.active { background: var(--wine-2); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.3); }

.side-note {
  margin: auto 22px 26px; padding: 22px 16px;
  background: var(--paper-2); color: var(--ink);
  font-family: var(--hand); font-size: 23px; line-height: 1.15; text-transform: uppercase; text-align: center;
  transform: rotate(-6deg); box-shadow: var(--shadow);
}

.main { min-width: 0; }

/* ---------- hero ---------- */
/* um "papel de caderno" com as ilustraÃ§Ãµes botÃ¢nicas da Su */
.hero {
  position: relative; height: 270px; overflow: hidden;
  margin: 0 18px; border-radius: 0 0 22px 22px;
  background:
    radial-gradient(ellipse 70% 90% at 55% 10%, #fffaf1 0%, transparent 70%),
    linear-gradient(180deg, #fbf1e0 0%, #f6e6cc 100%);
  box-shadow: inset 0 -30px 40px -30px rgba(120, 60, 20, .25), 0 8px 24px rgba(0,0,0,.35);
}
.bot { position: absolute; pointer-events: none; user-select: none; }
/* faixa de flores do campo: cÃ³pias espelhadas lado a lado para nÃ£o aparecer emenda */
.bot-flores { position: absolute; left: 0; right: 0; bottom: -4px; height: 140px; display: flex; justify-content: center; overflow: hidden; pointer-events: none; }
.bot-flores img { height: 100%; width: auto; flex: none; margin: 0 -1px; }
.bot-flores .mirror { transform: scaleX(-1); }
.b-galho { width: 320px; left: 140px; top: -96px; transform: rotate(10deg); opacity: .95; }
.b-galho2 { width: 250px; right: -50px; top: 58px; transform: rotate(-12deg) scaleX(-1); opacity: .9; }
.b-jiboia { width: 118px; left: 16px; top: -22px; filter: drop-shadow(0 6px 6px rgba(80, 40, 10, .18)); }
.b-jiboia2 { width: 92px; left: 52%; top: -64px; transform: rotate(-3deg); filter: drop-shadow(0 6px 6px rgba(80, 40, 10, .18)); }
.sticky {
  position: absolute; padding: 12px 16px; font-family: var(--hand); font-size: 21px; line-height: 1.15;
  box-shadow: 0 6px 14px rgba(80, 30, 10, .25); color: var(--ink);
}
.s-pink { background: var(--sticky); left: 31%; top: 22px; transform: rotate(-5deg); }
.hero-quote {
  position: absolute; left: 59%; top: 30px; transform: rotate(-2deg);
  font-family: var(--script); font-size: 30px; line-height: 1.15; color: var(--wine);
  text-shadow: 0 1px 0 #fff8ec;
}
.hero-quote span { margin-left: 34px; }
.mobile-logo { display: none; }

.login-box { overflow: hidden; }
.login-flores { display: block; width: calc(100% + 52px); margin: 10px -26px -34px; pointer-events: none; }
.side-branch { width: 230px; margin: 22px 0 -40px -18px; transform: rotate(-16deg); opacity: .92; pointer-events: none; position: relative; z-index: 0; }
.side-note { position: relative; z-index: 1; }

.topbar { position: absolute; top: 14px; right: 18px; display: flex; gap: 12px; align-items: center; z-index: 5; }
.search { position: relative; }
.search > .ic { position: absolute; left: 12px; top: 10px; color: var(--ink); }
.search input {
  width: 240px; padding: 9px 12px 9px 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); outline: none;
}
.search input:focus { border-color: var(--wine-2); }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--wine); background: rgba(253, 246, 234, .85); box-shadow: 0 2px 6px rgba(80, 30, 10, .15); }
.icon-btn .ic { width: 24px; height: 24px; }
.icon-btn:hover { background: #fff; }
.badge {
  position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #d8262c; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.dropdown {
  position: absolute; top: 46px; right: 0; width: 320px; max-height: 360px; overflow: auto;
  background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 20;
}
.bell-dd { right: 52px; }
.dd-item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; font-size: 14px; width: 100%; text-align: left; }
.dd-item:hover { background: var(--paper-2); }
.dd-item small { color: var(--muted); margin-left: auto; }
.dd-empty { padding: 14px; color: var(--muted); font-size: 14px; }

/* ---------- views ---------- */
.view { padding: 0 18px 28px; margin-top: -24px; position: relative; display: grid; gap: 14px; }

.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 20px; min-width: 0;
}
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-h h2 { margin: 0; font-size: 19px; font-weight: 800; }
.card-h .ic { color: var(--wine); width: 26px; height: 26px; }
.card-h .link { margin-left: auto; color: var(--wine); font-weight: 700; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }
.card-h .link .ic { width: 16px; height: 16px; }

/* saudaÃ§Ã£o */
.greet-row { display: grid; grid-template-columns: 1fr 330px; gap: 14px; }
.greet { display: flex; align-items: center; gap: 22px; background: var(--paper-2); transform: rotate(-.4deg); }
.greet h1 { font-family: var(--script); color: var(--wine); font-size: 46px; margin: 0; line-height: 1.1; }
.greet p { margin: 6px 0 0; font-size: 16px; }
.focus {
  margin-left: auto; display: flex; gap: 14px; align-items: center; font-family: var(--hand); font-size: 20px;
}
.focus-tag { background: var(--gold); padding: 10px 14px; transform: rotate(4deg); box-shadow: 0 3px 8px rgba(0,0,0,.15); font-size: 24px; line-height: 1; text-align: center; }
.focus ul { list-style: none; margin: 0; padding: 0; }
.focus li::before { content: 'âœ“ '; }
.date-card { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; padding: 12px 16px; }
.date-card .dc { text-align: center; border-right: 1px solid var(--line); padding-right: 10px; }
.date-card .dc b { display: block; font-size: 54px; color: var(--wine); line-height: 1; margin: 2px 0; }
.date-card .dc span { font-size: 14px; }
.date-card .quote { font-family: var(--hand); font-size: 19px; line-height: 1.15; }

/* atalhos */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick-item { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 18px; transition: transform .15s; }
.quick-item:hover { transform: translateY(-2px); }
.quick-icon { width: 48px; height: 48px; border-radius: 10px; background: var(--pink); color: var(--wine); display: grid; place-items: center; flex: none; }
.quick-icon .ic { width: 28px; height: 28px; }
.quick-item b { display: block; font-size: 17px; }
.quick-item small { color: var(--muted); font-size: 14px; }
.quick-item > .ic { margin-left: auto; color: var(--wine); }

.row3 { display: grid; grid-template-columns: 1.15fr 1fr 1.1fr; gap: 14px; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* tarefas */
.task { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.task:last-child { border-bottom: 0; }
.check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #7d6a62; flex: none; display: grid; place-items: center; }
.check.on { background: var(--wine-2); border-color: var(--wine-2); color: #fff; }
.check.on::after { content: 'âœ“'; font-size: 12px; font-weight: 800; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.p-alta { background: #e0484d; } .p-media { background: #7fa35a; } .p-baixa { background: #e3a43a; }
/* até 3 linhas; só textos muito longos ganham "..." */
.task-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.task-title { flex: 1; min-width: 0; overflow-wrap: break-word; line-height: 1.3; }
.task-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.task-meta:empty { display: none; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.chip { font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.chip-alta { background: #e0484d; color: #fff; }
.when { color: var(--muted); font-size: 13px; width: 72px; flex: none; }
.when.late { color: #c3262b; font-weight: 700; }
.mini-btn { color: var(--muted); padding: 4px; border-radius: 6px; display: inline-flex; }
.mini-btn:hover { color: var(--wine); background: var(--paper-2); }
.mini-btn .ic { width: 17px; height: 17px; }
.add-link { color: var(--wine); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; }
.add-link .ic { width: 18px; height: 18px; }

/* agenda */
.month-nav { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 6px; }
.month-nav button { color: var(--wine); padding: 4px; border-radius: 6px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 2px; margin-bottom: 10px; }
.week small { color: var(--muted); font-size: 13px; }
.day { width: 32px; height: 32px; margin: 2px auto 0; border-radius: 50%; font-weight: 700; display: grid; place-items: center; position: relative; }
.day:hover { background: var(--paper-2); }
.day.today { color: var(--wine); }
.day.sel { background: var(--wine-2); color: #fff; }
.day.has::after { content: ''; position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: var(--wine-2); }
.day.sel.has::after { background: #fff; }
.event { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; font-size: 14px; margin: 5px 0; }
.event .bar { padding: 3px 10px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-green { background: var(--green); } .c-pink { background: var(--pink); } .c-gold { background: var(--gold); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* finanÃ§as */
.fin { display: grid; grid-template-columns: 1fr 130px; gap: 14px; align-items: center; }
.fin-row { display: flex; align-items: center; gap: 8px; font-size: 15px; padding: 4px 0; }
.fin-row b { margin-left: auto; font-weight: 600; }
.fin-row .ic { width: 16px; height: 16px; }
.up { color: #5d8a3a; } .down { color: #c3262b; }
.saldo { background: var(--green); border-radius: 8px; padding: 6px 10px; font-weight: 800; font-size: 17px; }
.donut { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; }
.donut > div { width: 92px; height: 92px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; text-align: center; }
.donut b { font-size: 24px; display: block; }
.donut small { font-size: 11px; color: var(--muted); line-height: 1.1; }
.goal { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; align-items: center; margin-top: 12px; font-size: 14px; }
.goal .ic { width: 32px; height: 32px; color: var(--wine-2); grid-row: span 2; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > div { height: 100%; background: var(--wine-2); border-radius: 4px; }

/* projetos */
.proj { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; }
.proj-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--pink); color: var(--wine); display: grid; place-items: center; flex: none; }
.proj-ic .ic { width: 17px; height: 17px; }
.proj-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-andamento { background: var(--green); } .st-planejamento { background: var(--gold); }
.st-ideia { background: var(--paper-2); border: 1px solid var(--line); } .st-concluido { background: #cfe3e6; }
button.chip:hover { filter: brightness(.95); }

/* notas */
.notes-list { margin: 0; padding-left: 18px; font-family: var(--hand); font-size: 21px; line-height: 1.3; }
.notes-list li { cursor: default; }
.notes-list li:hover .mini-btn { opacity: 1; }
.notes-list .mini-btn { opacity: 0; vertical-align: middle; }

/* alertas */
.alert { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 15px; }
.alert-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--pink); color: var(--wine-2); display: grid; place-items: center; flex: none; }
.alert-ic .ic { width: 19px; height: 19px; }
.alert span:nth-child(2) { flex: 1; }

/* mensagem */
.msg-text { font-family: var(--hand); font-size: 22px; line-height: 1.2; min-height: 120px; }
.btn {
  background: var(--wine-2); color: #fff; padding: 10px 22px; border-radius: 10px; font-weight: 700;
  box-shadow: 0 3px 8px rgba(0,0,0,.2); display: inline-flex; gap: 8px; align-items: center;
}
.btn:hover { background: var(--wine); }
.btn.ghost { background: var(--paper-2); color: var(--ink); box-shadow: none; }
.btn .ic { width: 18px; height: 18px; }

/* pÃ¡ginas internas */
.page-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-size: 28px; color: var(--wine); font-family: var(--script); font-size: 38px; }
.page-h .btn { margin-left: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tab { padding: 6px 14px; border-radius: 999px; background: var(--paper-2); font-weight: 700; font-size: 14px; }
.tab.on { background: var(--wine-2); color: #fff; }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal small { color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal .day { width: 40px; height: 40px; }
.cal .day.out { color: #c9b8a8; }
.tx { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.tx small { color: var(--muted); display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat small { color: var(--muted); font-weight: 700; }
.stat b { display: block; font-size: 26px; margin-top: 4px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.note-card { background: var(--gold); padding: 16px; min-height: 140px; font-family: var(--hand); font-size: 22px; line-height: 1.2; box-shadow: var(--shadow); position: relative; white-space: pre-wrap; word-break: break-word; }
.note-card:nth-child(3n+2) { background: var(--pink); transform: rotate(1.5deg); }
.note-card:nth-child(3n) { background: var(--green); transform: rotate(-1.5deg); }
.note-card:nth-child(3n+1) { transform: rotate(-1deg); }
.note-card { cursor: pointer; }
.note-card .note-btns { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; }
.notes-list li { cursor: pointer; }
/* projetos */
.proj-open { text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.proj-open:hover { color: var(--wine); }
.proj-mini { display: flex; align-items: center; gap: 6px; }
.proj-mini .progress { flex: 1; max-width: 120px; height: 5px; }
.proj-mini .progress > span { display: block; height: 100%; background: var(--wine-2); border-radius: 4px; }
.proj-mini small, .proj-next { color: var(--muted); font-size: 12px; font-weight: 600; }
.proj-next { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-chip { background: var(--pink); color: var(--wine-2); max-width: 140px; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.back-link { color: var(--wine); font-weight: 700; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.back-link .ic { width: 16px; height: 16px; }
.proj-goal { font-size: 16px; margin: 10px 0 4px; white-space: pre-wrap; }
.proj-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 10px 0 8px; font-size: 15px; }
.proj-facts small { color: var(--muted); margin-left: 4px; }
.proj-facts small.late { color: #c3262b; font-weight: 700; }
.proj-bar { height: 10px; border-radius: 5px; }
.proj-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; margin-top: 14px; }
.proj-nextbox { background: var(--gold); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-size: 15px; }
.proj-notes { font-family: var(--hand); font-size: 21px; line-height: 1.3; white-space: pre-wrap; word-break: break-word; }
.proj-stats { grid-template-columns: repeat(2, 1fr); }
.proj-stats .stat b { font-size: 20px; }
@media (max-width: 820px) { .proj-cols { grid-template-columns: 1fr; } }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.soon { text-align: center; padding: 40px 20px; }
.soon p { color: var(--muted); max-width: 460px; margin: 10px auto 0; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--wine-2); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(30,8,6,.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--paper); border-radius: 16px; padding: 22px; width: 100%; max-width: 420px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal-box h3 { margin: 0 0 16px; font-family: var(--script); color: var(--wine); font-size: 32px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 80px); background: var(--wine-dark); color: #fff;
  padding: 10px 18px; border-radius: 10px; transition: transform .25s; z-index: 60; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }

.bottom-nav { display: none; }

/* login */
body.logged-out .app, body.logged-out .bottom-nav { display: none !important; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box {
  width: 100%; max-width: 380px; background: var(--paper); border-radius: 18px; padding: 28px 26px;
  box-shadow: var(--shadow); text-align: center;
}
.login-box .logo-name { font-family: var(--script); font-size: 56px; color: var(--wine); line-height: 1; }
.login-box .logo-sub { margin: 4px 0 0 0; }
.login-tag { font-family: var(--hand); font-size: 20px; margin: 4px 0 16px; }
.login-box h3 { margin: 0 0 14px; }
.login-box .field { text-align: left; }
.link-btn { color: var(--wine); font-weight: 700; margin-top: 12px; font-size: 14px; }
.login-msg { min-height: 20px; color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* google / sync */
.connect { background: var(--paper-2); border-radius: 12px; padding: 16px; text-align: center; }
.connect p { margin: 0 0 12px; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.sync-ic { display: inline-flex; }
.sync-ic .ic { width: 24px !important; height: 24px !important; }
.sync-ic.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
button:disabled { opacity: .6; cursor: wait; }

/* orÃ§amento */
.month-sw { gap: 6px !important; color: var(--ink) !important; }
.month-sw button { color: var(--wine); padding: 2px; border-radius: 6px; display: inline-flex; }
.bud-stats { margin: 6px 0 10px; }
.bud-stats .stat { background: var(--paper-2); border-radius: 12px; padding: 10px 12px; display: grid; }
.bud-stats .stat b { font-size: 20px; margin: 2px 0; }
.bud-stats .stat small { color: var(--muted); font-size: 12px; }
.bud-group { margin: 16px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--wine); }
.bud-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.bud-row .progress { grid-column: 1 / -1; height: 6px; }
.bud-row.over .bud-vals b { color: #c3262b; }
.progress-over > div { background: #c3262b; }

/* verificaÃ§Ã£o em duas etapas */
.mfa-steps { margin: 0 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.mfa-qr { display: block; width: 180px; height: 180px; margin: 8px auto; background: #fff; padding: 6px; border-radius: 8px; }
.mfa-secret { display: inline-block; margin-top: 4px; padding: 4px 8px; background: var(--paper-2); border-radius: 6px; font-size: 13px; word-break: break-all; user-select: all; }

/* card do InÃ­cio: barrinhas do orÃ§amento sem valores */
.home-bud { display: grid; gap: 10px; }
.hb-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: baseline; font-size: 14px; }
.hb-name { font-weight: 700; }
.hb-tag { font-size: 12px; color: var(--muted); }
.hb-bar { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 5px; background: var(--line); }
.hb-bar > div { height: 100%; border-radius: 5px; background: #8fa86a; }
.hb-bar > i { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--wine); border-radius: 1px; }
.hb-row.warn .hb-bar > div { background: #d9a441; }
.hb-row.warn .hb-tag { color: #a3741c; font-weight: 700; }
.hb-row.over .hb-bar > div { background: #c3262b; }
.hb-row.over .hb-tag { color: #c3262b; font-weight: 700; }
.hb-hint { margin: 0; font-size: 12px; }
.bud-name { text-align: left; font-weight: 600; }
.bud-name small { color: var(--muted); font-weight: 400; }
.bud-vals small { color: var(--muted); }
.bud-plan { color: var(--muted); text-decoration: underline dotted; }
.bud-plan:hover { color: var(--wine); }
.bud-detail { grid-column: 1 / -1; background: var(--paper-2); border-radius: 10px; padding: 8px 10px; margin-top: 4px; }
.bud-tx { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.bud-tx:last-child { border-bottom: 0; }
.bud-tx small { color: var(--muted); }
.bud-tx select { font-size: 12px; max-width: 110px; padding: 3px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.review-banner { width: 100%; text-align: left; background: var(--gold); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
@media (max-width: 820px) {
  .bud-tx { grid-template-columns: 40px 1fr auto; }
  .bud-tx select { grid-column: 2 / -1; max-width: none; }
}

/* bancos */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bank-card { background: var(--paper-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 3px; font-size: 14px; }
.bank-card small { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.bank-card > b { font-size: 16px; }

/* ---------- telas mÃ©dias ---------- */
@media (max-width: 1280px) {
  .quick { grid-template-columns: repeat(2, 1fr); }
  .row3 { grid-template-columns: 1fr 1fr; }
  .row3 > :last-child { grid-column: span 2; }
  .row4 { grid-template-columns: 1fr 1fr; }
  .greet-row { grid-template-columns: 1fr; }
  .focus { display: none; }
  .s-cream { display: none; }
}

/* ---------- celular ---------- */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero { height: 190px; margin: 0; border-radius: 0 0 20px 20px; }
  .sticky, .hero-quote, .b-galho2, .b-jiboia { display: none; }
  .bot-flores { height: 96px; }
  .b-galho { width: 190px; left: auto; right: -30px; top: 52px; transform: rotate(-18deg); }
  .b-jiboia2 { width: 70px; left: 46%; top: -96px; }
  .mobile-logo { display: block; position: absolute; left: 16px; top: 12px; font-family: var(--script); font-size: 38px; color: var(--wine); text-shadow: 0 1px 0 #fff8ec; }
  .topbar { right: 10px; top: 12px; gap: 6px; }
  .icon-btn { width: 36px; height: 36px; }
  .search input { width: 36px; height: 36px; padding: 0 0 0 36px; background: rgba(253, 246, 234, .85); border-color: transparent; border-radius: 50%; color: transparent; cursor: pointer; box-shadow: 0 2px 6px rgba(80, 30, 10, .15); }
  .search > .ic { color: var(--wine); left: 8px; top: 8px; }
  .search input:focus { width: calc(100vw - 120px); background: var(--paper); color: var(--ink); cursor: text; padding-right: 12px; }
  .search:focus-within > .ic { color: var(--ink); }
  .search .dropdown { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .bell-dd { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .view { padding: 0 12px 96px; }
  .quick, .row3, .row4, .two, .stats { grid-template-columns: 1fr; }
  .row3 > :last-child { grid-column: auto; }
  .quick-item { padding: 12px 14px; }
  .greet { flex-direction: column; align-items: flex-start; gap: 4px; }
  .greet h1 { font-size: 38px; }
  .date-card { grid-template-columns: 110px 1fr; }
  .fin { grid-template-columns: 1fr 120px; }
  .cal .day { width: 36px; height: 36px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--side-2); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around; box-shadow: 0 -4px 14px rgba(0,0,0,.35);
  }
  .bottom-nav .nav-item { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11px; flex: 1; align-items: center; }
  .bottom-nav .nav-item .ic { width: 22px; height: 22px; }
  .notes-list .mini-btn { opacity: 1; }
  .page-h .btn { margin-left: 0 !important; }
  .page-h h1 { width: 100%; }
}

/* ---------- compra por foto ---------- */
.receipt-btn { display: inline-flex; vertical-align: middle; color: var(--wine); padding: 2px; border-radius: 6px; }
.receipt-btn .ic { width: 15px; height: 15px; }
button.receipt-btn:hover { background: var(--pink); }
.photo-preview { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; font-size: 14px; }
.photo-preview > img { width: 96px; max-height: 128px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.receipt-items { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.receipt-items li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.receipt-view img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; background: #f6efe4; }

/* ---------- documentos ---------- */
.chip.exp-vencido { background: #e0484d; color: #fff; }
.chip.exp-vence { background: var(--gold); color: #7a4a00; }
.chip.exp-ok { background: var(--green); color: #3f5a1c; font-weight: 600; }
.doc .proj-open { min-width: 0; }
.doc-attention { border: 2px solid var(--gold); }
.empty-docs { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-docs p { max-width: 460px; margin: 6px 0 4px; }
.doc-view { max-width: 520px; }
.doc-view .modal-actions { flex-wrap: wrap; margin-top: 14px; }
.btn.danger { color: #c3262b; margin-right: auto; }
.doc-number { display: flex; align-items: center; gap: 10px; background: var(--paper-2); border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.doc-number span { color: var(--muted); font-size: 13px; }
.doc-number b { flex: 1; font-size: 17px; letter-spacing: .5px; word-break: break-all; user-select: all; }
.doc-notes { white-space: pre-wrap; font-size: 15px; margin: 8px 0; }
.doc-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.doc-file { position: relative; }
.doc-file img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f6efe4; display: block; }
.doc-file .mini-btn { position: absolute; top: 4px; right: 4px; background: rgba(253, 246, 234, .92); }
.doc-pdf { height: 140px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; text-align: center; color: var(--wine); font-size: 13px; }
.doc-pdf .ic { width: 34px; height: 34px; }
.doc-pdf span { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.doc-pdf small { font-weight: 800; }
.doc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.doc-sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.doc-sub .chip { font-size: 11px; padding: 1px 8px; }
.only-phone { display: none; }
@media (max-width: 820px) { .quick-item.only-phone { display: flex; } }

/* ---------- investimentos ---------- */
.invest-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.invest-top > div { background: var(--paper-2); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.invest-top small { color: var(--muted); font-size: 13px; }
.invest-top b { font-size: 21px; }
.invest-group { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 0; text-align: left; border-top: 1px solid var(--line); }
.invest-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.invest-name small, .invest-val small { color: var(--muted); font-size: 12px; font-weight: 600; }
.invest-val { display: flex; flex-direction: column; align-items: flex-end; }
.invest-val small.up { color: #3f7a1c; }
.invest-list { margin: 0 0 8px 40px; font-size: 14px; }
.invest-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.invest-list small { display: block; color: var(--muted); font-size: 12px; }
.bank-card > small:first-child { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bank-rename { padding: 2px; }
.bank-rename .ic { width: 14px; height: 14px; }
.bank-orig { color: var(--muted); font-size: 11px; margin-top: -2px; }
.bank-card span small { display: block; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); font-size: 11px; }
.bank-card .hint small { display: inline; }

/* ---------- abas dos bancos e contas escondidas ---------- */
.bank-tabs { align-items: center; margin: 4px 0 6px; }
.bank-tabs .show-hidden { margin-left: auto; color: var(--wine); font-weight: 700; font-size: 13px; }
.bank-sum { margin: 4px 0 10px; font-size: 15px; }
.bank-hide { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.bank-hide input { accent-color: var(--wine-2); width: 14px; height: 14px; margin: 0; }
.bank-card.is-hidden { opacity: .55; outline: 1px dashed var(--muted); }
.bank-when { color: var(--muted) !important; font-weight: 600; font-size: 13px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.bank-when b { color: var(--ink); }
.bank-when small { font-size: 11px; font-weight: 600; }
.bank-card .bank-orig { text-transform: none; }

/* ---------- fluxo de caixa ---------- */
.cashflow .card-h .tabs .tab { font-size: 13px; padding: 4px 12px; }
.cf-left { background: var(--green); border-radius: 12px; padding: 12px 16px; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 2px; }
.cf-left.neg { background: var(--pink); }
.cf-left b { font-size: 28px; }
.cf-left small { color: var(--muted); font-size: 13px; font-weight: 600; }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 22px; }
.cf-block h4 { display: flex; justify-content: space-between; margin: 4px 0 4px; font-size: 14px; color: var(--wine); border-bottom: 2px solid var(--line); padding-bottom: 3px; }
.cf-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.cf-item.done { color: var(--muted); }
.cf-day { color: var(--muted); font-size: 12px; }
.cf-name small { display: block; color: var(--muted); font-size: 11px; }
.cf-x { font-size: 11px; padding: 0 4px; opacity: .5; }
.cf-x:hover { opacity: 1; }
.bud-group { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bud-gtot { font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); }
.bud-gtot.over { color: #c3262b; }
.bud-gtot small { color: var(--muted); font-weight: 600; }
.bud-subs { margin: 2px 0 4px; }
.bud-row.bud-sub { margin-left: 18px; padding: 3px 0; border-left: 2px solid var(--line); padding-left: 10px; font-size: 14px; }
.bud-row.bud-sub .bud-vals small { color: var(--muted); }
.bud-more { color: var(--wine); font-weight: 700; }
/* ---------- data dd/mm/aaaa ---------- */
.date-field { position: relative; display: flex; align-items: center; gap: 6px; }
.date-field input[data-date] { flex: 1; }
.date-field .date-pick { color: var(--wine); }
.date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
/* rendimentos por conta */
.bud-acc { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 14px; text-align: left; }
.bud-acc small { color: var(--muted); }
.bud-acc-list { margin-left: 14px; }
/* calendário pequeno do Início */
.cal.mini { gap: 1px; }
.cal.mini small { font-size: 11px; padding: 2px 0; }
.cal.mini .day { width: 28px; height: 28px; font-size: 13px; margin-top: 0; }
.home-day { margin: 10px 0 2px; font-weight: 800; color: var(--wine); font-size: 14px; }
.month-sw button:disabled { opacity: .3; cursor: default; }
.month-today { font-size: 12px; font-weight: 700; color: var(--wine); background: var(--paper-2); border-radius: 999px; padding: 3px 10px; margin-left: 6px; }
.cp { color: var(--wine); font-weight: 700; }

/* =========================================================
   Temas (Personalização). "Jardim de Lápis" é o padrão (:root lá em cima).
   ========================================================= */
:root[data-theme="mare"] {
  --wine: #0f5c6e; --wine-2: #1a7f8f; --wine-dark: #0b2a33;
  --paper: #f5fafa; --paper-2: #e2efee; --line: #cde0de; --ink: #1d3236; --muted: #5d777b;
  --pink: #cbe7e8; --green: #dcefd6; --gold: #f5e6b8;
  --bg-glow: #14505c; --side-1: #123c46; --side-2: #0a242b; --side-ink: #e2f2f1; --sticky: #bfe2e5;
  --shadow: 0 6px 18px rgba(5, 30, 40, .25);
}
:root[data-theme="lavanda"] {
  --wine: #6b3fa0; --wine-2: #8a5cc2; --wine-dark: #241536;
  --paper: #fcf9fe; --paper-2: #f0e8f7; --line: #e2d5ee; --ink: #2e2338; --muted: #7a6a88;
  --pink: #ead9f6; --green: #e3efd9; --gold: #f6e7c1;
  --bg-glow: #4a2d6e; --side-1: #33204d; --side-2: #1e1230; --side-ink: #efe6f8; --sticky: #e2cdf3;
  --shadow: 0 6px 18px rgba(30, 10, 45, .25);
}
:root[data-theme="musgo"] {
  --wine: #3f6b3a; --wine-2: #568a4f; --wine-dark: #17241a;
  --paper: #f9f8f0; --paper-2: #ecebd9; --line: #dcdcc2; --ink: #2a2e22; --muted: #6f735f;
  --pink: #dfe9cd; --green: #e5eed2; --gold: #f3e3b0;
  --bg-glow: #2e4a2b; --side-1: #24361f; --side-2: #141f12; --side-ink: #e8efdf; --sticky: #d6e7bf;
  --shadow: 0 6px 18px rgba(15, 30, 10, .25);
}

/* página de personalização */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.theme-card { text-align: left; border-radius: 14px; padding: 10px; border: 2px solid var(--line); background: var(--paper); display: flex; flex-direction: column; gap: 8px; transition: transform .15s; }
.theme-card:hover { transform: translateY(-2px); }
.theme-card.on { border-color: var(--wine-2); box-shadow: 0 0 0 3px var(--pink); }
.theme-prev { height: 70px; border-radius: 10px; display: grid; grid-template-columns: 30% 1fr; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.theme-prev .tp-side { display: flex; flex-direction: column; gap: 5px; padding: 8px 6px; }
.theme-prev .tp-side i { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }
.theme-prev .tp-side i:first-child { background: var(--tp-accent); }
.theme-prev .tp-main { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.theme-prev .tp-main b { display: block; height: 10px; width: 60%; border-radius: 4px; }
.theme-prev .tp-main span { display: flex; gap: 5px; }
.theme-prev .tp-main span i { flex: 1; height: 18px; border-radius: 5px; }
.theme-card .tc-name { font-family: var(--script); font-size: 24px; color: var(--wine); line-height: 1; }
.theme-card small { color: var(--muted); font-size: 12px; }
.link-inline { color: var(--wine); font-weight: 700; text-decoration: underline; padding: 0; }

/* ---------- Sobre ---------- */
.side-about { text-align: center; font-size: 13px; color: var(--side-ink); opacity: .75; margin: -10px 0 18px; }
.side-about button, .side-about a { color: inherit; text-decoration: underline; font-size: 13px; }
.about { max-width: 520px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 22px; }
.about-logo .logo-name { font-family: var(--script); font-size: 64px; color: var(--wine); line-height: 1; }
.about-logo .logo-sub { margin: 4px 0 0; }
.about-tag { font-family: var(--hand); font-size: 22px; margin: 6px 0 0; }
.about-by { font-size: 17px; margin: 6px 0; }
.about a.btn { text-decoration: none; }
.about-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; margin: 8px 0 0; font-size: 14px; background: var(--paper-2); border-radius: 12px; padding: 12px 16px; }
.about-info dt { font-weight: 800; color: var(--wine); }
.about-info dd { margin: 0; }
.modal-box.about { position: relative; max-width: 460px; }
.about-x { position: absolute; top: 10px; right: 10px; font-size: 16px; }

/* =========================================================
   Tema "Vegetação" (teste): cores + desenhos (moldura, banner, rodapé, figurinhas)
   ========================================================= */
.theme-footer { display: none; }
:root[data-theme="vegetacao"] {
  --wine: #3e6b48; --wine-2: #5a8a5e; --wine-dark: #16261b;
  --paper: #fbfbf6; --paper-2: #eef2e6; --line: #dbe3cf; --ink: #26302a; --muted: #6b766c;
  --pink: #dcebd5; --green: #e6efdc; --gold: #f1ead0;
  --bg-glow: #2c4a33; --side-1: #22382a; --side-2: #132018; --side-ink: #e6efe3; --sticky: #d8e8c9;
  --shadow: 0 6px 18px rgba(10, 30, 15, .25);
}
/* logo dentro da moldura de folhagens */
:root[data-theme="vegetacao"] .logo {
  transform: none; border-radius: 0; box-shadow: none; text-align: center;
  background: url(img/temas/vegetacao/moldura.webp) center / 100% 100% no-repeat, var(--paper);
  padding: 34px 44px 30px; margin: 10px 6px 18px;
}
:root[data-theme="vegetacao"] .logo-name { font-size: 34px; }
:root[data-theme="vegetacao"] .logo-sub { margin: 2px 0 4px; font-size: 11px; letter-spacing: .3em; }
:root[data-theme="vegetacao"] .logo-tag { font-size: 14px; line-height: 1.1; }
/* banner do topo no lugar das plantas */
:root[data-theme="vegetacao"] .hero {
  background: url(img/temas/vegetacao/banner.webp) center bottom / cover no-repeat, linear-gradient(180deg, #fdfdf8, #f1f5ea);
}
:root[data-theme="vegetacao"] .hero .bot,
:root[data-theme="vegetacao"] .hero .bot-flores,
:root[data-theme="vegetacao"] .side-branch { display: none; }
/* rodapé de plantinhas no pé da página */
:root[data-theme="vegetacao"] .theme-footer {
  display: block; height: 130px; margin: 6px 18px 0; border-radius: 22px 22px 0 0;
  background: url(img/temas/vegetacao/rodape.webp) center bottom / auto 100% repeat-x, linear-gradient(180deg, #f1f5ea, #fbfbf6);
  box-shadow: 0 -8px 24px rgba(0,0,0,.25);
  pointer-events: none;
}
/* figurinhas espalhadas */
:root[data-theme="vegetacao"] .greet,
:root[data-theme="vegetacao"] .date-card,
:root[data-theme="vegetacao"] .side-note { position: relative; }
:root[data-theme="vegetacao"] .greet::after,
:root[data-theme="vegetacao"] .date-card::after,
:root[data-theme="vegetacao"] .side-note::before {
  content: ''; position: absolute; pointer-events: none; background: center / contain no-repeat;
}
:root[data-theme="vegetacao"] .greet::after { width: 64px; height: 64px; right: 10px; top: -22px; background-image: url(img/temas/vegetacao/fig4.webp); transform: rotate(12deg); }
:root[data-theme="vegetacao"] .date-card::after { width: 54px; height: 54px; right: -8px; bottom: -12px; background-image: url(img/temas/vegetacao/fig5.webp); }
:root[data-theme="vegetacao"] .side-note::before { width: 52px; height: 68px; right: -16px; bottom: -22px; transform: rotate(8deg); background-image: url(img/temas/vegetacao/fig6.webp); }
@media (max-width: 820px) {
  :root[data-theme="vegetacao"] .theme-footer { height: 90px; margin: 0 0 70px; border-radius: 20px 20px 0 0; }
  :root[data-theme="vegetacao"] .greet::after { width: 48px; height: 48px; top: -14px; }
}/* Vegetação: mais figurinhas, no cantinho de baixo dos cards (o canto de cima tem "Ver todas") */
:root[data-theme="vegetacao"] .row3 > .card,
:root[data-theme="vegetacao"] .row4 > .card,
:root[data-theme="vegetacao"] #view > section.card:first-child { position: relative; }
:root[data-theme="vegetacao"] .row3 > .card::after,
:root[data-theme="vegetacao"] .row4 > .card:nth-child(-n+2)::after,
:root[data-theme="vegetacao"] #view > section.card:first-child::after {
  content: ''; position: absolute; pointer-events: none; background: center / contain no-repeat;
  width: 58px; height: 58px; right: -10px; bottom: -14px; z-index: 1;
}
:root[data-theme="vegetacao"] .row3 > .card:nth-child(1)::after { background-image: url(img/temas/vegetacao/fig1.webp); transform: rotate(-18deg); }
:root[data-theme="vegetacao"] .row3 > .card:nth-child(2)::after { background-image: url(img/temas/vegetacao/fig3.webp); width: 48px; height: 66px; right: -6px; bottom: -18px; }
:root[data-theme="vegetacao"] .row3 > .card:nth-child(3)::after { background-image: url(img/temas/vegetacao/fig8.webp); width: 62px; height: 46px; bottom: -12px; }
:root[data-theme="vegetacao"] .row4 > .card:nth-child(1)::after { background-image: url(img/temas/vegetacao/fig7.webp); transform: rotate(20deg); }
:root[data-theme="vegetacao"] .row4 > .card:nth-child(2)::after { background-image: url(img/temas/vegetacao/fig2.webp); width: 50px; height: 50px; transform: rotate(-10deg); }
/* nas outras páginas: uma figurinha no card do título */
:root[data-theme="vegetacao"] #view > section.card:first-child::after { background-image: url(img/temas/vegetacao/fig2.webp); width: 54px; height: 54px; transform: rotate(14deg); }
@media (max-width: 820px) {
  :root[data-theme="vegetacao"] .row3 > .card::after,
  :root[data-theme="vegetacao"] .row4 > .card:nth-child(-n+2)::after,
  :root[data-theme="vegetacao"] #view > section.card:first-child::after { width: 44px; height: 44px; right: -4px; bottom: -10px; }
}
/* ---------- microfone ---------- */
.voice-wrap { position: relative; }
.voice-wrap > input, .voice-wrap > textarea { padding-right: 46px; }
.mic-btn { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--paper-2); color: var(--wine); font-size: 17px; cursor: pointer; display: grid; place-items: center; }
.mic-btn.on { background: var(--wine-2); color: #fff; animation: mic-pulse 1.2s infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(176, 40, 45, .45); } 50% { box-shadow: 0 0 0 8px rgba(176, 40, 45, 0); } }
.voice-live { margin: 14px 0 4px; min-height: 48px; font-size: 18px; text-align: center; color: var(--ink); }
.voice-live small { display: block; color: var(--muted); font-size: 14px; margin-top: 8px; }
.voice-big { width: 84px; height: 84px; font-size: 36px; position: static; margin: 6px auto 0; }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--wine-2); }

/* ---------- encomendas ---------- */
.pkg { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.pkg:last-child { border-bottom: 0; }
.pkg-title { font-weight: 700; overflow-wrap: anywhere; }
.pkg-sub { grid-column: 1; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pkg-code { font-family: ui-monospace, monospace; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; color: var(--ink); border: 0; cursor: pointer; font-size: 13px; }
.pkg-btns { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pkg-late { color: #c3262b; font-weight: 700; }
.pkg.arrived .pkg-title { color: var(--muted); }
.pkg-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.btn.small { padding: 6px 12px; font-size: 13.5px; }

/* tarefas no celular: o texto usa a linha toda; data e prioridade ficam embaixo; toca na tarefa para abrir (editar/excluir) */
@media (max-width: 820px) {
  .task { align-items: flex-start; padding: 10px 2px; }
  .task > .check { margin-top: 1px; }
  .task > .dot { margin-top: 7px; }
  .task-main { flex-direction: column; align-items: flex-start; gap: 3px; }
  .task-meta { gap: 6px; }
  .task-meta .when { width: auto; }
  .task-meta .chip { font-size: 11px; padding: 1px 8px; }
  .task > .mini-btn { display: none; }
}

/* orçamento: lápis para renomear o grupo */
.bud-gedit { width: 24px; height: 24px; padding: 3px; vertical-align: middle; opacity: .55; }
.bud-gedit:hover { opacity: 1; }
.tpl-list { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 14px; }
.tpl-group { border-bottom: 1px solid var(--line); padding: 8px 12px; }
.tpl-group:last-child { border-bottom: 0; }
.tpl-group summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.tpl-group summary::-webkit-details-marker { display: none; }
.tpl-group summary small { font-size: 12px; padding-left: 26px; }
.tpl-check { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.tpl-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--wine); }
.tpl-cats { padding: 6px 0 4px 26px; }
.tpl-cats input[type=text] { width: 100%; margin-top: 6px; }
.bud-gedit .ic { width: 14px; height: 14px; }
