/* ══════════════════════════════════════════════════════════
   AMORA PAY — TEMA PROFISSIONAL (escuro refinado)
   Fonte: Inter (auto-hospedada em /fonts)
   Ícones: Lucide (sprite inline em /img/icons.svg)
   ══════════════════════════════════════════════════════════ */

/* ── FONTES ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/inter-800.woff2') format('woff2');
}

/* ── TOKENS ── */
:root {
  --primary: #e0447e;
  --primary-strong: #ff5f95;
  --secondary: #40112c;
  --bg: #0b0610;
  --surface: #1c1020;
  --surface-2: #251629;
  --surface-3: #2f1c34;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(205, 48, 93, 0.35);
  --text: #f7f0f4;
  --text-2: #b8a4b0;
  --text-3: #8a7484;
  --accent: #f7de43;
  --purple: #b96ef0;
  --purple-strong: #8a3fc0;
  --success: #4cc46f;
  --error: #ff6b7a;
  --glow: rgba(224, 68, 126, 0.16);
  --glass: rgba(18, 10, 20, 0.72);

  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 9px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 3px rgba(224, 68, 126, 0.28);

  --grad-primary: linear-gradient(135deg, #e0447e 0%, #b8235e 100%);
  --grad-hero: linear-gradient(150deg, #40112c 0%, #2a1633 45%, #191020 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
}

button { font-family: inherit; border: none; cursor: pointer; color: inherit; background: none; }
input, select, textarea { font-family: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; }
a { color: var(--primary); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs); }

/* Fundo ambiente (brilhos da marca) */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 88% -8%, rgba(224, 68, 126, 0.16), transparent 62%),
    radial-gradient(520px 420px at -8% 32%, rgba(185, 110, 240, 0.10), transparent 62%),
    radial-gradient(760px 520px at 50% 112%, rgba(64, 17, 44, 0.55), transparent 68%);
}

/* Ícones Lucide */
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.icon-xl { width: 34px; height: 34px; }

/* Avatares de iniciais */
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  flex: 0 0 auto;
}
.avatar-d { background: linear-gradient(135deg, #ff5f95, #b8235e); box-shadow: 0 4px 12px rgba(224, 68, 126, 0.4); }
.avatar-i { background: linear-gradient(135deg, #c67cf5, #8a3fc0); box-shadow: 0 4px 12px rgba(185, 110, 240, 0.4); }
.avatar-xs { width: 22px; height: 22px; font-size: 11px; }

/* ── SCREENS ── */
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.28s ease; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── LOGIN ── */
#screen-login.active {
  position: fixed;
  inset: 0;
  overflow: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}

.login-logo { width: 218px; margin-bottom: 6px; filter: drop-shadow(0 14px 40px rgba(224, 68, 126, 0.35)); }
.login-logo img { width: 100%; height: auto; display: block; }

.login-title { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: 0.5px; }
.login-title b { color: var(--primary); font-weight: 800; }
.login-sub { color: var(--text-2); font-size: 13px; margin: 4px 0 26px; }

.login-box {
  width: 100%;
  max-width: 384px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px 20px;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--shadow-lg);
}

.user-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.chip {
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.chip:hover { border-color: var(--border-strong); }
.chip:active { transform: scale(0.97); }
.chip.selected { background: var(--grad-primary); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgba(224, 68, 126, 0.45); }
.chip.selected .avatar-d { background: rgba(255, 255, 255, 0.22); box-shadow: none; }
.chip.selected .avatar-i { background: rgba(255, 255, 255, 0.22); box-shadow: none; }

.login-faceid {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(224, 68, 126, 0.4);
  transition: transform 0.16s ease, filter 0.16s ease;
}
.login-faceid:hover { filter: brightness(1.08); }
.login-faceid:active { transform: scale(0.98); }
.login-faceid:disabled { opacity: 0.5; }

.login-pin-link {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.login-pin-link:hover { border-color: var(--border-strong); background: var(--surface-2); }
.login-pin-link:active { transform: scale(0.98); }

.login-msg { min-height: 20px; text-align: center; font-size: 13px; color: var(--error); margin: 4px 0 8px; }
.login-msg.ok { color: var(--success); }

/* ── KEYPAD ── */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 6px; }
.keypad-btn {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.keypad-btn:hover { background: var(--surface-2); }
.keypad-btn:active { transform: scale(0.92); background: var(--primary); border-color: var(--primary); color: #fff; }
.keypad-btn.del { font-size: 18px; color: var(--text-2); }
.keypad-btn.del .icon { color: var(--text-2); }
.keypad-btn.del:active { color: #fff; }

.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 8px 0 4px; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); background: transparent; transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease; }
.pin-dot.filled { background: var(--primary); border-color: var(--primary); transform: scale(1.05); }

/* ── APP SHELL ── */
#screen-app { display: none; }
#screen-app.active { display: block; min-height: 100dvh; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 6, 16, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--border);
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.app-header-title { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; justify-self: start; }
.app-header-logo { height: 34px; width: auto; justify-self: center; }
.app-header-right { display: flex; align-items: center; gap: 10px; justify-self: end; }
.header-user { font-size: 13px; color: var(--text-2); font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.icon-btn:active { transform: scale(0.92); }

.app-main { padding: 16px 16px calc(132px + env(safe-area-inset-bottom)); max-width: 920px; margin: 0 auto; }

/* ── BOTTOM NAV (dock flutuante) ── */
.app-nav {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 480px);
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr 1fr;
  align-items: end;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-item .nav-ico { display: flex; align-items: center; justify-content: center; }
.nav-item .nav-ico .icon { width: 22px; height: 22px; }
.nav-item:hover { color: var(--text-2); }
.nav-item.active { color: var(--primary); font-weight: 700; background: var(--glow); }
.nav-item:active { transform: scale(0.94); }
.nav-fab {
  width: 52px; height: 52px;
  margin: -24px auto 0;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(224, 68, 126, 0.5);
  transition: transform 0.16s ease, filter 0.16s ease;
}
.nav-fab:hover { filter: brightness(1.08); }
.nav-fab:active { transform: scale(0.94); }
.nav-fab .icon { width: 26px; height: 26px; }

/* ── COMPONENTES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: 0 6px 18px rgba(224, 68, 126, 0.35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-surface { background: var(--surface-3); border: 1px solid var(--border); color: var(--text); }
.btn-surface:hover { background: var(--surface-2); }
.btn-danger { background: linear-gradient(135deg, #ff6b7a, #e03e52); color: #fff; box-shadow: 0 6px 18px rgba(255, 107, 122, 0.3); }
.btn-danger:hover { filter: brightness(1.06); }
.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; border-radius: var(--radius-xs); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card-title { font-size: 12px; color: var(--text-2); font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.7px; display: flex; align-items: center; gap: 7px; }
.card-title .icon { width: 16px; height: 16px; color: var(--primary); }

/* CAMPOS */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; margin-bottom: 7px; }
.input, .select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .select:focus { border-color: var(--primary); box-shadow: var(--ring); }
.input::placeholder { color: var(--text-3); }
select.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a7484' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
textarea.input { resize: vertical; min-height: 68px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* TOGGLE (quem pagou) */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px;
}
.seg-btn {
  padding: 10px;
  border-radius: var(--radius-xs);
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--grad-primary); color: #fff; box-shadow: 0 4px 12px rgba(224, 68, 126, 0.35); }
.seg-btn.active .avatar-d, .seg-btn.active .avatar-i { background: rgba(255, 255, 255, 0.22); box-shadow: none; }

/* BADGES / TAG */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge-primary { background: var(--glow); color: var(--primary-strong); border: 1px solid rgba(224, 68, 126, 0.3); }
.badge-accent { background: rgba(247, 222, 67, 0.12); color: var(--accent); border: 1px solid rgba(247, 222, 67, 0.3); }
.badge-purple { background: rgba(185, 110, 240, 0.12); color: var(--purple); border: 1px solid rgba(185, 110, 240, 0.32); }

/* ── PAINEL ── */
.month-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 8px; }
.month-nav {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.month-nav:hover { background: var(--surface-3); color: var(--text); }
.month-nav:active { transform: scale(0.92); background: var(--primary); color: #fff; }
.month-label { font-weight: 700; font-size: 15px; letter-spacing: 0.2px; }

.painel-saldo {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}
.painel-saldo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at 92% -10%, rgba(224, 68, 126, 0.4), transparent 62%);
  pointer-events: none;
}
.painel-saldo .ps-label { font-size: 12px; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; display: flex; align-items: center; gap: 6px; }
.painel-saldo .ps-label .icon { width: 15px; height: 15px; }
.painel-saldo .ps-valor { font-size: 36px; font-weight: 800; margin-top: 6px; color: var(--text); letter-spacing: -0.6px; }
.painel-saldo .ps-valor.daniel-deve { color: var(--accent); }
.painel-saldo .ps-valor.izabela-deve { color: var(--success); }
.painel-saldo .ps-valor.zero { color: var(--text-2); }
.painel-saldo .ps-extra { font-size: 12px; color: var(--text-3); margin-top: 6px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}
.stat:hover { border-color: var(--border-strong); }
.stat .st-label { font-size: 11.5px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; display: flex; align-items: center; gap: 6px; }
.stat .st-valor { font-size: 20px; font-weight: 800; margin-top: 6px; letter-spacing: -0.3px; }

/* lista por categoria */
.cat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cat-row:last-child { border-bottom: none; }
.cat-name { font-size: 14px; font-weight: 600; }
.cat-val { font-size: 14px; font-weight: 700; color: var(--text); }
.cat-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 7px; }
.cat-bar span { display: block; height: 100%; background: var(--grad-primary); border-radius: 999px; transition: width 0.5s ease; }

/* ── GRÁFICOS DO PAINEL (SVG puro) ── */
.chart-wrap { min-height: 40px; }
.chart-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 10px 0; }

.donut-chart { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-chart svg { width: 128px; height: 128px; flex: 0 0 auto; overflow: visible; }
.donut-total-value { font-size: 16px; font-weight: 800; fill: var(--text); }
.donut-total-label { font-size: 9px; fill: var(--text-3); letter-spacing: 0.4px; }

.chart-legend { display: flex; flex-direction: column; gap: 10px; flex: 1 1 130px; min-width: 130px; }
.chart-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.chart-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.chart-legend-value { margin-left: auto; font-weight: 700; color: var(--text); font-size: 13px; }

.line-chart { position: relative; width: 100%; -webkit-tap-highlight-color: transparent; }
.line-chart svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.line-chart-axis-label { font-size: 9px; fill: var(--text-3); }
.line-chart-hit { fill: transparent; cursor: pointer; }
.line-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  white-space: nowrap;
  transform: translate(-50%, -112%);
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 5;
}
.line-chart-tooltip.visible { opacity: 1; }

/* ── LANÇAR ── */
.percent-preview {
  background: var(--glow);
  border: 1px dashed rgba(224, 68, 126, 0.5);
  border-radius: var(--radius-sm);
  padding: 13px;
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.percent-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.percent-controls button {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.percent-controls button:hover { background: var(--surface-2); color: var(--text); }
.percent-controls button:active { transform: scale(0.92); background: var(--primary); color: #fff; }
.percent-value { flex: 1; text-align: center; font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: -0.4px; }

/* ── CONTAS (lista) ── */
.filters { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters select, .filters input {
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filters select:hover, .filters input:hover { border-color: var(--border-strong); }
.filters select:focus, .filters input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.filters select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a7484' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.filters input { flex: 1 1 auto; min-width: 110px; }

.lanc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.lanc-item:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.lanc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lanc-desc { font-weight: 700; font-size: 15px; }
.lanc-val { font-weight: 800; font-size: 15px; letter-spacing: -0.2px; }
.lanc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--text-2); }
.lanc-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.lanc-meta .meta-item .icon { width: 13px; height: 13px; color: var(--text-3); }
.lanc-obs { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.lanc-obs .icon { width: 13px; height: 13px; color: var(--text-3); }

.lanc-item.acerto-item { cursor: default; border-left: 3px solid var(--purple); }
.lanc-item.acerto-item:hover { transform: none; border-color: var(--border); border-left-color: var(--purple); }
.lanc-item.acerto-item .lanc-desc { display: inline-flex; align-items: center; gap: 6px; color: var(--purple); }
.lanc-item.acerto-item .lanc-desc .icon { width: 15px; height: 15px; }

/* ── AJUSTES: card retrátil ── */
.card-title-toggle { width: 100%; background: none; border: none; cursor: pointer; justify-content: space-between; }
.card-title-toggle .chevron { margin-left: auto; transition: transform 0.18s ease; }
.card-title-toggle[aria-expanded="true"] .chevron { transform: rotate(90deg); }

.empty-state { text-align: center; color: var(--text-3); padding: 48px 0; }
.empty-state .es-ico { display: flex; justify-content: center; margin-bottom: 14px; color: var(--text-3); }
.empty-state .es-ico .icon { width: 44px; height: 44px; stroke-width: 1.5; }

/* ── AJUSTES ── */
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.list-item:last-child { border-bottom: none; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.list-item .li-title .icon { width: 17px; height: 17px; color: var(--primary); }
.list-item .li-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 3, 10, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  max-height: 86dvh;
  overflow-y: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal::-webkit-scrollbar { display: none; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
.modal-title .icon { width: 20px; height: 20px; color: var(--primary); }

/* ── TOAST ── */
.toast {
  position: fixed;
  left: 50%; bottom: calc(104px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  opacity: 0; pointer-events: none;
  z-index: 60;
  transition: opacity 0.24s ease, transform 0.24s ease;
  max-width: 92%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--error); color: var(--error); }
.toast.success { border-color: rgba(76, 196, 111, 0.6); color: var(--success); }

/* ── LOADING ── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(8, 3, 10, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
}
.loading-overlay.active { display: flex; }
.loading-spin {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 10%, var(--primary));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 0.8s linear infinite;
}
.loading-text { font-size: 13px; color: var(--text-2); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── VERSÃO / rodapé de tela ── */
.foot-note { text-align: center; color: var(--text-3); font-size: 11.5px; margin-top: 22px; }

/* ── DESKTOP ── */
@media (min-width: 601px) {
  .app-main { padding: 22px 28px calc(140px + env(safe-area-inset-bottom)); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .lanc-item { padding: 15px 18px; }
  .card { padding: 18px; }
  #screen-login.active { padding: 40px 24px; }
}

@media (min-width: 1024px) {
  .app-main { max-width: 960px; }
  .painel-saldo .ps-valor { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
