/* Oficina Doce — mobile first.
   Identidade: o gradiente laranja→magenta da Oficina da Arte Personalizada,
   sobre tons de chocolate e creme próprios da doçaria. */

@font-face {
  font-family: 'Antic Didone';
  src: url('../fonts/AnticDidone-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #2B1A17;
  --ink-2: #5E4841;
  --ink-3: #87716A;
  --bg: #FBF6F1;
  --surface: #FFFFFF;
  --surface-2: #F6EEE7;
  --line: #EDE2D9;
  --line-strong: #DCCABD;
  --berry: #C2185B;
  --berry-strong: #9E1249;
  --berry-soft: #FCE8F1;
  --caramel-soft: #FFF2DF;
  --ok: #1B7A4E;
  --ok-soft: #E2F3E9;
  --warn: #8A5200;
  --warn-soft: #FFF0D4;
  --bad: #B42318;
  --bad-soft: #FDE8E6;
  --gradient: linear-gradient(100deg, #FFA41B 0%, #F2555A 52%, #E0109A 100%);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(43 26 23 / 5%), 0 3px 12px rgb(43 26 23 / 4%);
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --display: 'Antic Didone', Didot, 'Bodoni 72', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --focus: 0 0 0 3px rgb(194 24 91 / 22%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
h1 { font-family: var(--display); font-size: 1.9rem; line-height: 1.12; }
a { color: var(--berry); text-underline-offset: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.muted { color: var(--ink-3); }
.center { text-align: center; }
.note { font-size: .88rem; color: var(--ink-3); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* ------------------------------------------------------------ estrutura */

.brand-stripe { height: 4px; background: var(--gradient); }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 8px 0 16px;
  background: rgb(251 246 241 / 92%);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-size: 1.4rem; letter-spacing: .01em;
}
.brand img { width: 34px; height: 34px; }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--ink-2);
  cursor: pointer;
}
.icon-btn .icon { width: 21px; height: 21px; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn.is-danger { color: var(--bad); }
@media (hover: hover) { .icon-btn:not([disabled]):hover { background: var(--surface-2); } }

.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgb(43 26 23 / 5%);
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); text-decoration: none;
  font-size: .72rem; font-weight: 600;
}
.tab .icon { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--berry); }
.tab[aria-current="page"]::before {
  content: ''; position: absolute; top: 0;
  width: 32px; height: 3px; border-radius: 0 0 4px 4px;
  background: var(--gradient);
}

.page { max-width: 720px; margin: 0 auto; padding: 16px 16px 28px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.page-head-text { min-width: 0; }
.page-sub { margin-top: 4px; color: var(--ink-3); font-size: .92rem; }
.back {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 40px; margin: -6px 0 2px -8px; padding: 0 8px 0 4px;
  color: var(--ink-2); text-decoration: none; font-size: .95rem;
}
.form-title { margin-bottom: 16px; overflow-wrap: anywhere; }
.section-title {
  margin: 26px 0 10px;
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}

/* ------------------------------------------------------------ botões */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 13px;
  font: inherit; font-size: 1rem; font-weight: 650; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, transform .06s;
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 19px; height: 19px; }
.btn-primary { background: var(--berry); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-soft { background: var(--berry-soft); color: var(--berry-strong); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-ghost-danger { background: transparent; color: var(--bad); }
.btn-sm { min-height: 42px; padding: 0 14px; font-size: .94rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--berry-strong); }
  .btn-secondary:hover { background: var(--surface-2); }
  .btn-soft:hover { background: #F9D5E5; }
  .btn-ghost-danger:hover { background: var(--bad-soft); }
}
.btn-link {
  min-height: 40px; padding: 0 10px;
  border: 0; border-radius: 10px; background: none;
  font: inherit; font-weight: 700; color: var(--berry); cursor: pointer;
}
.btn-link[disabled] { color: var(--ink-3); opacity: .5; cursor: default; }

/* ------------------------------------------------------------ cartões e formulários */

.form > * + * { margin-top: 12px; }
.card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-title {
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.sub-title { font-family: var(--sans); font-size: .95rem; font-weight: 700; color: var(--ink); margin-top: 4px; }
.sub-title + .field-hint { margin-top: -10px; }
details.card > summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 28px; margin: -4px 0; padding: 4px 0;
  list-style: none; cursor: pointer;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after {
  content: ''; width: 9px; height: 9px; margin-right: 6px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
details.card[open] > summary::after { transform: rotate(225deg) translateY(-3px); }
.related { margin-top: 20px; }
.plain { margin: 0; padding-left: 18px; }
.plain li + li { margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 10px; }
.grid-wide { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; }

.field label, .field .label {
  display: block; margin-bottom: 6px;
  font-size: .87rem; font-weight: 650; color: var(--ink-2);
}
.optional { font-weight: 400; font-size: .8rem; color: var(--ink-3); }
.control { position: relative; display: flex; align-items: center; }
input[type="text"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px;
  padding: 11px 12px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #B6A49A; }
textarea { min-height: 92px; resize: vertical; line-height: 1.4; }
select {
  padding-right: 34px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2387716A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--berry); box-shadow: var(--focus); }
.has-suffix input { padding-right: 52px; }
.suffix { position: absolute; right: 12px; color: var(--ink-3); font-size: .9rem; pointer-events: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.field-error { margin-top: 6px; font-size: .85rem; color: var(--bad); }
.field-hint { margin-top: 6px; font-size: .85rem; color: var(--ink-3); }
.static-value { min-height: 48px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-2); }

.switch { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative; flex: none;
  width: 50px; height: 30px; border-radius: 999px;
  background: var(--line-strong); transition: background-color .2s;
}
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 22%);
  transition: transform .2s;
}
.switch input:checked + .switch-track { background: var(--berry); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--focus); }
.switch-label { display: flex; flex-direction: column; font-weight: 650; }
.switch-label small { font-weight: 400; font-size: .85rem; color: var(--ink-3); }

/* linhas repetidas: 1.ª fila escolhe o item, 2.ª tem quantidade, custo e remover */
.lines, .lines-list { display: flex; flex-direction: column; gap: 10px; }
.lines-list:empty { display: none; }
.line {
  display: grid; gap: 8px; align-items: center;
  grid-template-columns: 128px minmax(0, 1fr) 44px;
  grid-template-areas: "ref ref ref" "qty cost remove";
  padding: 10px; border-radius: 14px; background: var(--surface-2);
}
.line select { grid-area: ref; }
.line .control { grid-area: qty; }
.line-cost { grid-area: cost; text-align: right; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.line [data-remove-line] { grid-area: remove; }
.line .field-error { grid-column: 1 / -1; margin: 0; }
.line.has-error { box-shadow: inset 0 0 0 1.5px var(--bad); }
@media (min-width: 620px) {
  .line { grid-template-columns: minmax(0, 1fr) 128px 92px 44px; grid-template-areas: "ref qty cost remove"; }
}

/* resultados */
.summary { margin: 0; }
.sum-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.sum-row:last-child { border-bottom: 0; padding-bottom: 0; }
.sum-row dt { color: var(--ink-2); }
.sum-row dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-row.is-strong dt { color: var(--ink); font-weight: 700; }
.sum-row.is-strong dd { font-size: 1.22rem; font-weight: 750; }

.result {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
  padding: 12px 14px; border-radius: 14px; background: var(--caramel-soft);
}
.result-label { width: 100%; font-size: .8rem; font-weight: 700; color: var(--warn); }
.result strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.result small { color: var(--ink-2); font-variant-numeric: tabular-nums; }

.price-hint {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px 10px 14px; border-radius: 14px; background: var(--surface-2);
}
.price-hint-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.price-hint-text span { font-weight: 650; font-size: .93rem; }
.price-hint-text small { color: var(--ink-3); font-size: .8rem; }
.price-hint strong { font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--ink-2);
}
.badge[data-state="ok"] { background: var(--ok-soft); color: var(--ok); }
.badge[data-state="low"] { background: var(--warn-soft); color: var(--warn); }
.badge[data-state="loss"] { background: var(--bad-soft); color: var(--bad); }
.pill { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: .75rem; font-weight: 700; }

.warnings { display: flex; flex-direction: column; gap: 6px; }
.warnings:empty { display: none; }
.warnings p {
  padding: 10px 12px; border-radius: 12px;
  background: var(--warn-soft); color: var(--warn); font-size: .88rem;
  border-left: 3px solid #E7A23B;
}

/* barra fixa com os números principais e o botão guardar */
.form-actions {
  position: sticky; z-index: 20;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 8px 8px 8px 16px;
  background: rgb(255 255 255 / 95%);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 10px 30px rgb(43 26 23 / 14%);
}
.form-actions.no-figures { padding-left: 8px; }
.form-actions.no-figures .btn { flex: 1; }
.figures { flex: 1; min-width: 0; display: flex; gap: 16px; padding: 4px 0; }
.figure { display: flex; flex-direction: column; min-width: 0; }
.figure small { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.figure strong { font-size: 1.02rem; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.figure strong[data-state="ok"] { color: var(--ok); }
.figure strong[data-state="low"] { color: var(--warn); }
.figure strong[data-state="loss"] { color: var(--bad); }
.danger-zone { display: flex; justify-content: center; margin-top: 20px; }

/* ------------------------------------------------------------ listas */

.list {
  margin: 0; padding: 0; list-style: none; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.list > li + li { border-top: 1px solid var(--line); }
.item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 66px; padding: 11px 8px 11px 16px;
  color: inherit; text-decoration: none; text-align: left;
  font: inherit; background: none; border: 0; cursor: pointer;
}
.item:active { background: var(--surface-2); }
@media (hover: hover) { .item:hover { background: #FFFBF8; } }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.item-main strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-main small, .item-side small { font-size: .84rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; max-width: 45%; }
.item-side strong { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-chevron { width: 18px; height: 18px; color: var(--line-strong); }
.item.is-inactive .item-main strong { color: var(--ink-3); }
.item-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--berry-soft); color: var(--berry); }
.item-icon .icon { width: 21px; height: 21px; }
.item-icon.is-muted { background: var(--surface-2); color: var(--ink-2); }
.item-count { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.list.menu form { margin: 0; }

.search { position: relative; margin-bottom: 12px; }
.search .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 44px; border-radius: 999px; }
[data-filter-empty] { padding: 18px 0; }

.empty {
  padding: 32px 20px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 12px; border-radius: 50%; background: var(--berry-soft); color: var(--berry); }
.empty-icon .icon { width: 28px; height: 28px; }
.empty h2 { font-family: var(--display); font-size: 1.45rem; }
.empty p { max-width: 36ch; margin: 6px auto 18px; color: var(--ink-2); }

/* ------------------------------------------------------------ dashboard */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.stat {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit; text-decoration: none;
}
.stat-value { font-size: 1.6rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-2 .stat-value { font-size: 1.35rem; }
.stat-label { font-size: .8rem; font-weight: 650; color: var(--ink-3); }
.stat-note { font-size: .78rem; font-weight: 650; color: var(--warn); }

.cta {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 14px 14px 16px; border-radius: var(--radius);
  background: var(--ink); color: #FFF6EE; text-decoration: none;
  box-shadow: 0 10px 26px rgb(43 26 23 / 22%);
}
.cta-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--gradient); color: #fff; }
.cta-icon .icon { width: 24px; height: 24px; }
.cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cta-text strong { font-size: 1.08rem; }
.cta-text small { color: #D8C6BA; }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.shortcut {
  display: flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); text-decoration: none; font-weight: 650; font-size: .93rem; line-height: 1.2;
}
.shortcut .icon { width: 22px; height: 22px; color: var(--berry); }

.onboarding { margin-bottom: 14px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 6px; }
.steps li { counter-increment: step; }
.steps a { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; padding: 8px 0 8px 38px; position: relative; color: var(--ink); text-decoration: none; }
.steps a::before {
  content: counter(step); position: absolute; left: 0; top: 6px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-size: .82rem; font-weight: 700;
}
.steps small { color: var(--ink-3); }

/* ------------------------------------------------------------ categorias */

.cat-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cat-row { display: flex; align-items: center; gap: 4px; }
.cat-row input[type="text"] { flex: 1; min-width: 0; min-height: 44px; }
.cat-count { min-width: 26px; text-align: center; font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.cat-add { gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ mensagens e diálogo */

.toasts {
  position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(var(--topbar-h) + 12px);
  max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 6px 12px 14px; border-radius: 14px;
  background: var(--ink); color: #fff; pointer-events: auto;
  box-shadow: 0 12px 32px rgb(43 26 23 / 28%);
  animation: toast-in .25s ease-out;
  transition: opacity .25s, transform .25s;
}
.toast > .icon { margin-top: 2px; }
.toast[data-kind="success"] > .icon { color: #86E3B5; }
.toast[data-kind="error"] { background: var(--bad); }
.toast p { flex: 1; }
.toast-close { display: grid; place-items: center; width: 32px; height: 32px; margin: -5px 0; border: 0; background: none; color: inherit; opacity: .8; cursor: pointer; }
.toast.is-leaving { opacity: 0; transform: translateY(-8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

dialog.confirm {
  width: min(420px, calc(100vw - 32px)); padding: 0;
  border: 0; border-radius: 20px; color: var(--ink);
  box-shadow: 0 24px 60px rgb(43 26 23 / 30%);
}
dialog.confirm::backdrop { background: rgb(43 26 23 / 45%); }
dialog.confirm form { padding: 22px 20px 18px; }
.confirm-title { font-size: 1.1rem; font-weight: 700; overflow-wrap: anywhere; }
.confirm-sub { margin: 6px 0 20px; color: var(--ink-2); }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ------------------------------------------------------------ entrar */

body.is-auth { padding-bottom: 0; }
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(circle at 10% 0%, #FFE2BF 0, transparent 42%),
    radial-gradient(circle at 100% 100%, #F9D0E4 0, transparent 48%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 380px; text-align: center; }
.auth-card > img { width: 92px; height: 92px; }
.auth-card h1 { margin: 12px 0 4px; font-size: 2.4rem; }
.auth-card .lead { margin-bottom: 22px; color: var(--ink-2); }
.auth-card form, .auth-setup {
  display: flex; flex-direction: column; gap: 14px; padding: 20px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.alert { padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-size: .92rem; }
.alert.is-info { background: var(--caramel-soft); color: var(--warn); }

/* ------------------------------------------------------------ ecrãs grandes */

@media (max-width: 360px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > :first-child { grid-column: 1 / -1; }
  .figures { gap: 10px; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar {
    position: sticky; top: var(--topbar-h); bottom: auto; z-index: 29;
    display: flex; justify-content: center; gap: 4px;
    height: auto; padding: 6px 0;
    background: var(--bg); border-top: 0; border-bottom: 1px solid var(--line); box-shadow: none;
  }
  .tab { flex-direction: row; gap: 8px; padding: 9px 16px; border-radius: 11px; font-size: .95rem; }
  .tab .icon { width: 20px; height: 20px; }
  .tab[aria-current="page"] { background: var(--berry-soft); }
  .tab[aria-current="page"]::before { display: none; }
  .page { padding-top: 28px; }
  .form-actions { bottom: 16px; }
  .toasts { top: calc(var(--topbar-h) + 64px); }
}
