/* ==========================================================================
   FinApp — mini gerenciador financeiro dentro do tablet.
   Redesign premium: tokens em 3 camadas, tipografia com numerais tabulares,
   ícones monoline, hero grafite com acento de marca. Sem camada de vidro.
   Tema acompanha [data-theme="dark"] do site.
   ========================================================================== */

/* Palco que preenche a tela e escala o app (design fixo 390x520 = 3/4) */
.fa-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--fa-bg, #f2f3f5);
  line-height: normal;
  border-radius: inherit;
  -webkit-user-select: none;
  user-select: none;
}

.fa {
  /* ---- primitivos ---- */
  --c-red: #c61c1c;
  --c-red-2: #a00d24;
  --c-emerald: #0e9d68;
  --c-amber: #b98a2e;

  /* ---- semânticos (claro) ---- */
  --fa-bg: #f2f3f5;
  --fa-card: #ffffff;
  --fa-card-2: #fafbfc;
  --fa-text: #14161c;
  --fa-muted: #656b78;
  --fa-faint: #99a0ad;
  --fa-line: #e9ebef;
  --fa-hair: #eef0f3;
  --fa-chip: #f1f2f5;
  --fa-accent: #c61c1c;
  --fa-pos: #0e9d68;
  --fa-neg: #c94232;
  --fa-elev-1: 0 1px 2px rgba(20, 22, 30, .05), 0 1px 1px rgba(20, 22, 30, .04);
  --fa-elev-2: 0 8px 22px -12px rgba(20, 22, 30, .22), 0 2px 6px -2px rgba(20, 22, 30, .08);
  --fa-hero-1: #1c2028;
  --fa-hero-2: #0f1218;

  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 520px;
  transform-origin: top left;
  transform: scale(var(--fa-scale, 1));
  display: flex;
  flex-direction: column;
  background: var(--fa-bg);
  color: var(--fa-text);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.011em;
  font-variant-numeric: tabular-nums;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] .fa {
  --fa-bg: #0b0d11;
  --fa-card: #14171d;
  --fa-card-2: #171b22;
  --fa-text: #eceef2;
  --fa-muted: #9aa1ad;
  --fa-faint: #6b7280;
  --fa-line: #232830;
  --fa-hair: #1e232b;
  --fa-chip: #1d222a;
  --fa-accent: #ff5a5a;
  --fa-pos: #33c46e;
  --fa-neg: #f06a5b;
  --fa-elev-1: 0 1px 2px rgba(0, 0, 0, .4);
  --fa-elev-2: 0 10px 26px -12px rgba(0, 0, 0, .6);
  --fa-hero-1: #1a1e26;
  --fa-hero-2: #0e1116;
}

.fa *, .fa *::before, .fa *::after { box-sizing: border-box; }
.fa button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; letter-spacing: inherit; }
.fa-ic { width: 20px; height: 20px; display: block; }

/* Utilitário de números */
.fa-money { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ==========================================================================
   Cabeçalho
   ========================================================================== */
.fa-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px 8px;
}
.fa-top__id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.fa-avatar {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, #2a2f38, #14161c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.fa-avatar::after {
  content: ""; position: absolute;
}
.fa-top__txt { min-width: 0; }
.fa-top__txt strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.fa-top__txt span { display: block; font-size: 11.5px; color: var(--fa-muted); margin-top: -1px; }
.fa-top__add {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 13px 0 10px;
  border-radius: 11px;
  background: var(--fa-accent); color: #fff;
  font-size: 13px; font-weight: 650;
  box-shadow: 0 6px 16px -6px rgba(198, 28, 28, .6);
  transition: transform .16s ease, filter .16s ease;
}
.fa-top__add .fa-ic { width: 17px; height: 17px; stroke-width: 2.1; }
.fa-top__add:hover { transform: translateY(-1px); filter: brightness(1.05); }
.fa-top__add:active { transform: scale(.96); }

/* ==========================================================================
   Área rolável
   ========================================================================== */
.fa-main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 18px 18px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 146, 158, .4) transparent;
}
.fa-main::-webkit-scrollbar { width: 5px; }
.fa-main::-webkit-scrollbar-thumb { background: rgba(140, 146, 158, .4); border-radius: 999px; }
.fa-main::-webkit-scrollbar-track { background: transparent; }

.fa-fade { animation: faFade .34s cubic-bezier(.22,.61,.36,1) both; }
@keyframes faFade { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* Eyebrow / rótulo de seção */
.fa-eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--fa-faint);
}
.fa-sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 20px 2px 11px;
}
.fa-sec-head h4 { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.fa-sec-head:first-child { margin-top: 8px; }
.fa-link {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 12px; color: var(--fa-accent); font-weight: 600;
}
.fa-link .fa-ic { width: 13px; height: 13px; stroke-width: 2.2; }

/* Segmented de período (topo da visão geral) */
.fa-seg {
  display: flex; gap: 3px;
  background: var(--fa-chip);
  border-radius: 11px; padding: 3px;
}
.fa-seg button {
  flex: 1; padding: 7px 0;
  font-size: 12.5px; font-weight: 600; color: var(--fa-muted);
  border-radius: 8px;
  transition: color .2s, background .2s, box-shadow .2s;
}
.fa-seg button.is-active {
  background: var(--fa-card); color: var(--fa-text);
  box-shadow: var(--fa-elev-1);
}

/* ==========================================================================
   HERO (saldo + proporção entradas x saídas)  — elemento-assinatura
   ========================================================================== */
.fa-hero {
  position: relative;
  margin-top: 12px;
  padding: 17px 18px 16px;
  border-radius: 20px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(130% 130% at 88% -25%, rgba(198, 28, 28, .30), transparent 52%),
    linear-gradient(158deg, var(--fa-hero-1), var(--fa-hero-2));
  box-shadow: 0 18px 34px -20px rgba(10, 12, 18, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.fa-hero__top { display: flex; align-items: flex-start; justify-content: space-between; }
.fa-hero__label { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .62); letter-spacing: .01em; }
.fa-hero__value { font-size: 33px; font-weight: 800; letter-spacing: -0.03em; margin-top: 3px; }
.fa-hero__delta {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(2px);
}
.fa-hero__delta .fa-ic { width: 13px; height: 13px; stroke-width: 2.3; }
.fa-hero__delta.pos { color: #6ff0ad; }
.fa-hero__delta.neg { color: #ff9a8f; }
.fa-hero__delta small { color: rgba(255, 255, 255, .55); font-weight: 500; }

.fa-hero__ratio { margin-top: 16px; }
.fa-hero__bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  display: flex; gap: 2px;
  background: rgba(255, 255, 255, .1);
}
.fa-hero__bar span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .7s cubic-bezier(.22,.61,.36,1); }
.fa-hero__bar .in  { background: linear-gradient(90deg, #17b877, #3fd694); }
.fa-hero__bar .out { background: linear-gradient(90deg, #d8574c, #e8756a); }
.fa-hero__legend { display: flex; gap: 18px; margin-top: 11px; }
.fa-hero__leg { display: flex; flex-direction: column; gap: 1px; }
.fa-hero__leg > span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255, 255, 255, .6); }
.fa-hero__leg i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.fa-hero__leg i.in { background: #3fd694; }
.fa-hero__leg i.out { background: #e8756a; }
.fa-hero__leg b { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin-left: 13px; }

/* ==========================================================================
   Card genérico
   ========================================================================== */
.fa-card {
  background: var(--fa-card);
  border: 1px solid var(--fa-hair);
  border-radius: 16px;
  padding: 15px 15px 14px;
  box-shadow: var(--fa-elev-1);
}
.fa-card + .fa-card { margin-top: 12px; }
.fa-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.fa-card__head h4 { font-size: 13.5px; font-weight: 700; letter-spacing: -0.02em; }
.fa-card__sub { font-size: 11px; color: var(--fa-faint); font-weight: 500; }

/* Tabs de texto (tipo de gráfico) */
.fa-tabs { display: flex; gap: 2px; background: var(--fa-chip); border-radius: 9px; padding: 3px; }
.fa-tabs button {
  padding: 5px 11px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  color: var(--fa-muted); transition: color .2s, background .2s, box-shadow .2s;
}
.fa-tabs button.is-active { background: var(--fa-card); color: var(--fa-text); box-shadow: var(--fa-elev-1); }
[data-theme="dark"] .fa-tabs button.is-active { background: #262c35; }

/* ==========================================================================
   Gráfico de fluxo
   ========================================================================== */
.fa-chart-wrap { position: relative; }
.fa-chart { width: 100%; height: 116px; color: var(--fa-accent); display: block; }
.fa-chart .fa-grid { stroke: var(--fa-line); stroke-width: 1; }
.fa-chart .fa-zero { stroke: var(--fa-faint); stroke-width: 1; stroke-dasharray: 2 3; opacity: .55; }
.fa-chart .fa-area { fill: url(#faArea); }
.fa-chart .fa-line { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fa-chart .fa-line-draw { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); animation: faDraw 1s ease forwards; }
@keyframes faDraw { to { stroke-dashoffset: 0; } }
.fa-chart .fa-dot { fill: var(--fa-card); stroke: currentColor; stroke-width: 2.3; }
.fa-chart .fa-bar { transition: height .55s cubic-bezier(.22,.61,.36,1), y .55s cubic-bezier(.22,.61,.36,1); }
.fa-chart .fa-bar--pos { fill: currentColor; }
.fa-chart .fa-bar--neg { fill: var(--fa-line); }
.fa-chart-x { display: flex; justify-content: space-between; margin-top: 8px; padding: 0 2px; }
.fa-chart-x span { font-size: 10px; color: var(--fa-faint); font-weight: 500; }
.fa-chart-tip {
  position: absolute; transform: translate(-50%, -125%);
  background: var(--fa-text); color: var(--fa-bg);
  font-size: 11px; font-weight: 650; padding: 4px 8px; border-radius: 8px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s ease; z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.fa-chart-tip.show { opacity: 1; }

/* ==========================================================================
   Distribuição por categoria
   ========================================================================== */
.fa-dist { display: flex; flex-direction: column; }
.fa-dist__row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center;
  column-gap: 11px; padding: 9px 2px; width: 100%; text-align: left;
  border-radius: 10px; transition: background .15s;
}
.fa-dist__row:hover { background: var(--fa-card-2); }
.fa-dist__row + .fa-dist__row { border-top: 1px solid var(--fa-hair); }
.fa-chip-ic {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.fa-chip-ic .fa-ic { width: 18px; height: 18px; }
.fa-dist__mid { min-width: 0; }
.fa-dist__name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.fa-dist__track { height: 5px; border-radius: 999px; background: var(--fa-chip); overflow: hidden; margin-top: 6px; }
.fa-dist__fill { height: 100%; border-radius: 999px; width: 0; transition: width .65s cubic-bezier(.22,.61,.36,1); }
.fa-dist__right { text-align: right; }
.fa-dist__val { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.fa-dist__pct { font-size: 10.5px; color: var(--fa-faint); font-weight: 600; margin-top: 1px; }

.fa-empty {
  text-align: center; color: var(--fa-faint); font-size: 12.5px; line-height: 1.5;
  padding: 24px 12px;
}
.fa-empty b { color: var(--fa-accent); }

/* ==========================================================================
   Transações
   ========================================================================== */
.fa-tx { display: flex; flex-direction: column; }
.fa-tx__item {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center;
  column-gap: 12px; padding: 9px 2px; width: 100%; text-align: left;
  border-radius: 11px; transition: background .14s;
}
.fa-tx__item:hover { background: var(--fa-card-2); }
.fa-tx__item + .fa-tx__item { border-top: 1px solid var(--fa-hair); }
.fa-tx__ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.fa-tx__ico .fa-ic { width: 20px; height: 20px; }
.fa-tx__body { min-width: 0; }
.fa-tx__desc { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-tx__meta { font-size: 11px; color: var(--fa-muted); margin-top: 1px; }
.fa-tx__amt { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; text-align: right; }
.fa-tx__amt.pos { color: var(--fa-pos); }

/* Busca + filtros */
.fa-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--fa-card); border: 1px solid var(--fa-line);
  border-radius: 13px; padding: 10px 13px; margin-top: 6px;
  transition: border-color .2s, box-shadow .2s;
}
.fa-search:focus-within { border-color: var(--fa-accent); box-shadow: 0 0 0 3px rgba(198, 28, 28, .1); }
.fa-search .fa-ic { width: 17px; height: 17px; color: var(--fa-faint); flex: 0 0 auto; }
.fa-search input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 13.5px; color: var(--fa-text); }
.fa-search input::placeholder { color: var(--fa-faint); }

.fa-filters { display: flex; gap: 7px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fa-filters::-webkit-scrollbar { display: none; }
.fa-fchip {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--fa-muted);
  background: var(--fa-chip); border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.fa-fchip.is-active { background: var(--fa-text); color: var(--fa-bg); }

.fa-daygroup__label {
  font-size: 10.5px; font-weight: 700; color: var(--fa-faint);
  text-transform: uppercase; letter-spacing: .06em; margin: 16px 2px 3px;
}
.fa-daygroup:first-child .fa-daygroup__label { margin-top: 14px; }

/* ==========================================================================
   Orçamento / Metas
   ========================================================================== */
.fa-budget-sum {
  margin-top: 12px; padding: 16px 17px; border-radius: 18px; color: #fff;
  background: linear-gradient(158deg, var(--fa-hero-1), var(--fa-hero-2));
  box-shadow: 0 16px 30px -20px rgba(10, 12, 18, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.fa-budget-sum__label { font-size: 11.5px; color: rgba(255, 255, 255, .62); font-weight: 600; }
.fa-budget-sum__val { font-size: 27px; font-weight: 800; letter-spacing: -0.03em; margin-top: 2px; }
.fa-budget-sum__bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 13px; }
.fa-budget-sum__fill { height: 100%; border-radius: 999px; width: 0; background: linear-gradient(90deg, #e8756a, #f0a03e); transition: width .7s cubic-bezier(.22,.61,.36,1); }
.fa-budget-sum__foot { display: flex; justify-content: space-between; margin-top: 9px; font-size: 11px; color: rgba(255, 255, 255, .6); }
.fa-budget-sum__foot b { color: #fff; font-weight: 650; }

.fa-goal {
  display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; row-gap: 8px;
  align-items: center;
  background: var(--fa-card); border: 1px solid var(--fa-hair);
  border-radius: 15px; padding: 13px 14px; margin-top: 10px; box-shadow: var(--fa-elev-1);
}
.fa-goal__ico { grid-row: span 2; align-self: start; }
.fa-goal__line { display: flex; align-items: baseline; justify-content: space-between; }
.fa-goal__name { font-size: 13px; font-weight: 650; letter-spacing: -0.01em; }
.fa-goal__num { font-size: 11.5px; color: var(--fa-muted); font-weight: 600; }
.fa-goal__num b { color: var(--fa-text); }
.fa-goal__num.over b { color: var(--fa-neg); }
.fa-goal__track { grid-column: 2; height: 6px; border-radius: 999px; background: var(--fa-chip); overflow: hidden; }
.fa-goal__fill { height: 100%; border-radius: 999px; width: 0; transition: width .65s cubic-bezier(.22,.61,.36,1); }

/* ==========================================================================
   Navegação inferior
   ========================================================================== */
.fa-nav {
  flex: 0 0 auto; display: flex;
  background: var(--fa-card);
  border-top: 1px solid var(--fa-hair);
  padding: 7px 10px calc(8px + env(safe-area-inset-bottom, 0px));
}
.fa-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 5px 0; color: var(--fa-faint);
  font-size: 10px; font-weight: 600; letter-spacing: -0.01em;
  transition: color .2s;
}
.fa-nav button .fa-ic { width: 21px; height: 21px; stroke-width: 1.8; }
.fa-nav button.is-active { color: var(--fa-accent); }

/* ==========================================================================
   Sheets (detalhe / formulário)
   ========================================================================== */
.fa-sheet { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; visibility: hidden; pointer-events: none; }
.fa-sheet.open { visibility: visible; pointer-events: auto; }
.fa-sheet__backdrop { position: absolute; inset: 0; background: rgba(8, 10, 15, .5); opacity: 0; transition: opacity .3s ease; backdrop-filter: blur(1px); }
.fa-sheet.open .fa-sheet__backdrop { opacity: 1; }
.fa-sheet__panel {
  position: relative; width: 100%; max-height: 93%; overflow-y: auto; scrollbar-width: none;
  background: var(--fa-bg); border-radius: 22px 22px 0 0;
  padding: 8px 20px 22px;
  transform: translateY(100%); transition: transform .36s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
}
.fa-sheet__panel::-webkit-scrollbar { display: none; }
.fa-sheet.open .fa-sheet__panel { transform: none; }
.fa-sheet__grab { width: 38px; height: 4px; border-radius: 999px; background: var(--fa-line); margin: 4px auto 14px; }
.fa-sheet__title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }

/* Detalhe */
.fa-detail { text-align: center; padding: 4px 0 2px; }
.fa-detail__ico { width: 60px; height: 60px; border-radius: 19px; margin: 0 auto 12px; display: grid; place-items: center; }
.fa-detail__ico .fa-ic { width: 28px; height: 28px; }
.fa-detail__amt { font-size: 27px; font-weight: 800; letter-spacing: -0.03em; }
.fa-detail__amt.pos { color: var(--fa-pos); }
.fa-detail__desc { font-size: 14px; font-weight: 600; margin-top: 3px; color: var(--fa-muted); }
.fa-detail__rows { margin: 18px 0 4px; text-align: left; background: var(--fa-card); border: 1px solid var(--fa-hair); border-radius: 14px; padding: 4px 14px; }
.fa-detail__row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 13px; }
.fa-detail__row + .fa-detail__row { border-top: 1px solid var(--fa-hair); }
.fa-detail__row span { color: var(--fa-muted); }
.fa-detail__row b { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.fa-detail__actions { display: flex; gap: 10px; margin-top: 16px; }

/* Formulário */
.fa-field { margin-bottom: 14px; }
.fa-field__label { font-size: 12px; font-weight: 600; color: var(--fa-muted); margin-bottom: 7px; display: block; }
.fa-input {
  width: 100%; border: 1px solid var(--fa-line); background: var(--fa-card);
  border-radius: 12px; padding: 12px 13px; font: inherit; font-size: 14px;
  color: var(--fa-text); outline: 0; transition: border-color .18s, box-shadow .18s;
}
.fa-input:focus { border-color: var(--fa-accent); box-shadow: 0 0 0 3px rgba(198, 28, 28, .1); }
.fa-amount-wrap { position: relative; }
.fa-amount-wrap::before { content: "R$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 600; color: var(--fa-faint); }
.fa-amount-wrap .fa-input { padding-left: 40px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

.fa-type { display: flex; gap: 9px; }
.fa-type button {
  flex: 1; padding: 12px 0; border-radius: 12px; font-weight: 650; font-size: 13px;
  background: var(--fa-chip); color: var(--fa-muted);
  border: 1.5px solid transparent; transition: all .18s ease;
}
.fa-type button.is-active[data-type="income"]  { background: rgba(14, 157, 104, .12); color: var(--fa-pos); border-color: var(--fa-pos); }
.fa-type button.is-active[data-type="expense"] { background: rgba(198, 28, 28, .1); color: var(--fa-accent); border-color: var(--fa-accent); }

.fa-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.fa-cat {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 600;
  background: var(--fa-chip); color: var(--fa-muted);
  border: 1.5px solid transparent; transition: all .16s ease;
}
.fa-cat .fa-ic { width: 15px; height: 15px; }
.fa-cat.is-active { border-color: currentColor; background: var(--fa-card); }

.fa-btn { width: 100%; padding: 14px; border-radius: 13px; font-weight: 700; font-size: 14px; letter-spacing: -0.01em; transition: transform .14s ease, filter .18s ease; }
.fa-btn:active { transform: scale(.98); }
.fa-btn--primary { background: var(--fa-accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(198, 28, 28, .7); }
.fa-btn--primary:hover { filter: brightness(1.05); }
.fa-btn--ghost { background: var(--fa-chip); color: var(--fa-text); }
.fa-btn--danger { background: rgba(198, 28, 28, .1); color: var(--fa-neg); }
.fa-btn[disabled] { opacity: .45; pointer-events: none; }
.fa-err { color: var(--fa-neg); font-size: 12px; margin: -4px 0 12px; font-weight: 500; }

/* Interação: ao passar o mouse/focar, o tablet se endireita e "acorda" */
.device-tablet { transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.device-scene:hover, .device-scene:focus-within { animation-play-state: paused; }
.device-scene:hover .device-tablet,
.device-scene:focus-within .device-tablet { transform: rotateX(5deg) scale(0.94) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fa-fade, .fa-chart .fa-line-draw { animation: none; }
  .device-tablet { transition: none; }
}
