/* ═══════════════════════════════════════════════════════════════
   Vorty Finanças — design system
   inspirado em vorty.pages.dev (top nav pill + hero + sections)
   adaptado pra paleta dourada original (#C9A961)
═══════════════════════════════════════════════════════════════ */

:root {
  /* Paleta */
  --bg: #0A0A0A;
  --bg-elev: #14141B;
  --bg-surface: #1C1C26;
  --border: #26262F;
  --border-strong: #3A3A46;

  --fg: #F5F2EC;
  --fg-muted: #C9C6CF;
  --fg-subtle: #8E8B96;

  --gold: #C9A961;
  --gold-light: #E0C078;
  --gold-deep: #8B7440;

  --success: #4ADE80;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;

  --grad: linear-gradient(90deg, #C9A961 0%, #E0C078 100%);
  --grad-d: linear-gradient(135deg, #C9A961 0%, #E0C078 50%, #8B7440 100%);
  --grad-vortex: linear-gradient(115deg, #8B7440 0%, #C9A961 35%, #E0C078 70%, #C9A961 100%);
  --grad-line-top: linear-gradient(90deg, transparent 0%, rgba(224, 192, 120, 0.95) 50%, transparent 100%);

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --f-display: 'Manrope', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-full: 999px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 8px 32px rgba(201, 169, 97, 0.15);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv02', 'cv03', 'cv11';
  overflow-x: hidden;
  min-height: 100dvh;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

main, .app-shell { max-width: 100vw; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; color: inherit; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.hidden { display: none !important; }
.muted { color: var(--fg-muted); }
.text-green { color: var(--success); }
.text-red { color: var(--danger); }
.text-yellow { color: var(--warning); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   AMBIENT BACKGROUND — animado
═══════════════════════════════════════════════════════════════ */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient::before,
.ambient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.ambient::before {
  top: -25%;
  right: -15%;
  width: 85vmin;
  height: 85vmin;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.55) 0%, rgba(201, 169, 97, 0.18) 35%, transparent 72%);
  animation: ambient-float-1 24s var(--ease-soft) infinite;
}

.ambient::after {
  bottom: -15%;
  left: -15%;
  width: 75vmin;
  height: 75vmin;
  background: radial-gradient(circle, rgba(224, 192, 120, 0.45) 0%, rgba(139, 116, 64, 0.16) 40%, transparent 75%);
  animation: ambient-float-2 32s var(--ease-soft) infinite;
}

@keyframes ambient-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  33% { transform: translate(-8vw, 4vh) scale(1.1); opacity: 1; }
  66% { transform: translate(4vw, -6vh) scale(0.95); opacity: 0.85; }
}

@keyframes ambient-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  50% { transform: translate(6vw, -4vh) scale(1.15); opacity: 1; }
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(201, 169, 97, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 169, 97, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 80%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ═══════════════════════════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════════════════════════ */

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* ═══════════════════════════════════════════════════════════════
   SCREENS
═══════════════════════════════════════════════════════════════ */

.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════════════ */

#screen-login {
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container {
  position: relative;
  background: rgba(20, 20, 27, 0.65);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(201, 169, 97, 0.10);
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--grad-line-top);
  opacity: 0.95;
  box-shadow: 0 0 16px rgba(224, 192, 120, 0.5);
}

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 {
  font-family: var(--f-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: 0.02em;
  margin-top: 16px;
}
.login-sub {
  color: var(--fg-muted);
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 6px;
}

.logo-mark {
  width: 60px; height: 60px;
  margin: 0 auto;
  background: var(--grad-d);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 30px; font-weight: 800;
  color: #1A1408;
  box-shadow: 0 8px 28px rgba(201, 169, 97, 0.40);
  position: relative;
  animation: logo-pulse 3.5s var(--ease-soft) infinite;
}

@keyframes logo-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(201, 169, 97, 0.30); }
  50% { box-shadow: 0 12px 40px rgba(201, 169, 97, 0.55); }
}

.logo-mark::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.logo-mark-sm {
  width: 32px; height: 32px;
  font-size: 16px; border-radius: 9px;
  margin: 0;
  animation: none;
  box-shadow: 0 4px 14px rgba(201, 169, 97, 0.30);
}

.login-label {
  color: var(--fg-subtle);
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.login-users { margin: 24px 0; }
.login-users-list { display: flex; gap: 8px; }

.login-user-btn {
  flex: 1;
  padding: 14px;
  background: rgba(28, 28, 38, 0.5);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--fg);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--ease-soft);
}

.login-user-btn:hover { border-color: var(--border-strong); background: var(--bg-surface); }

.login-user-btn.active {
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.10);
  color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.12);
}

.pin-display {
  display: flex; gap: 12px; justify-content: center; margin: 16px 0 20px;
}

.pin-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  transition: all 0.18s var(--ease-spring);
}

.pin-dot.filled {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(201, 169, 97, 0.6);
  transform: scale(1.15);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pin-btn {
  background: rgba(28, 28, 38, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 0;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  transition: all 0.12s var(--ease-soft);
}

.pin-btn:hover { background: var(--bg-surface); border-color: var(--border-strong); }
.pin-btn:active { transform: scale(0.95); background: rgba(201, 169, 97, 0.10); border-color: rgba(201, 169, 97, 0.4); }
.pin-btn-aux { color: var(--fg-muted); font-size: 18px; }

.login-error {
  color: var(--danger);
  font-family: var(--f-mono);
  font-size: 12px;
  text-align: center;
  margin-top: 14px;
  min-height: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   NAV — pílula glass top
═══════════════════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 16px;
  z-index: 50;
  align-self: start;
  margin: 16px auto 0;
  width: calc(100% - 32px);
  max-width: 1320px;
  padding: 6px 8px 6px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  background: rgba(20, 20, 27, 0.75);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(38, 38, 47, 0.7);
  border-radius: var(--r-full);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(201, 169, 97, 0.04);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav__brand-icon { display: flex; flex-shrink: 0; }

.nav__center {
  display: flex;
  justify-content: center;
  gap: 4px;
  align-items: center;
  position: relative;
}

.nav__link {
  font-family: var(--f-display);
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-full);
  letter-spacing: -0.005em;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
}

.nav__link:hover { color: var(--fg); background: var(--bg-surface); }

.nav__link.is-active {
  color: var(--gold-light);
  background: rgba(201, 169, 97, 0.10);
}

.nav__link-naturezas { display: flex; align-items: center; gap: 6px; }
.nav__link-naturezas .chevron { font-size: 9px; opacity: 0.7; transition: transform 0.2s; }
.nav__link-naturezas[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.nav__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: rgba(20, 20, 27, 0.92);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 6px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(201, 169, 97, 0.06);
  z-index: 60;
  animation: dropdown-in 0.2s var(--ease-spring);
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav__dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--fg-muted);
  transition: all 0.12s var(--ease-soft);
  text-align: left;
}

.nav__dropdown-item:hover { background: var(--bg-surface); color: var(--fg); }
.nav__dropdown-item.is-active { background: rgba(201, 169, 97, 0.08); color: var(--gold-light); }
.nav__dropdown-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.nav__dropdown-divider { height: 1px; background: var(--border); margin: 4px 6px; }

.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logout {
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-full);
  transition: color 0.2s, background 0.2s;
}

.nav__logout:hover { color: var(--gold-light); background: var(--bg-surface); }

.month-picker {
  display: flex; align-items: center; gap: 2px;
  background: rgba(28, 28, 38, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px 4px;
}

.month-picker span {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 0 8px;
  min-width: 78px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--fg-muted);
  transition: all 0.12s var(--ease-soft);
}
.btn-icon:hover { background: var(--bg-surface); color: var(--fg); }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 13px;
  padding: 4px 10px 4px 4px;
  background: rgba(28, 28, 38, 0.6);
  border-radius: var(--r-full);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #1A1408;
  font-family: var(--f-display);
  background: var(--grad-d);
}

.nav__burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--border);
}

.nav__burger span {
  width: 16px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: all 0.3s var(--ease-soft);
}

.nav__burger--open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__burger--open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.nav__mobile-menu {
  position: fixed;
  top: 0;
  left: 16px;
  right: 16px;
  z-index: 49;
  background: linear-gradient(180deg, rgba(28, 21, 8, 0.98) 0%, rgba(15, 12, 5, 0.98) 50%, rgba(10, 10, 10, 0.98) 100%);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(201, 169, 97, 0.30);
  border-radius: 28px;
  padding: 80px 12px 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.45s var(--ease-soft), opacity 0.3s, visibility 0.3s, padding 0.45s var(--ease-soft);
  box-shadow: 0 20px 80px rgba(201, 169, 97, 0.20), 0 0 0 1px rgba(201, 169, 97, 0.20);
}

.nav__mobile-menu--open {
  max-height: calc(100vh - 32px);
  opacity: 1;
  visibility: visible;
  padding: 80px 12px 20px;
}

.nav__mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.nav__mobile-menu a {
  display: block;
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  padding: 14px 18px;
  border-radius: 12px;
  letter-spacing: -0.01em;
  transition: background 0.2s, color 0.2s;
}

.nav__mobile-menu a:hover,
.nav__mobile-menu a:active {
  background: rgba(201, 169, 97, 0.15);
  color: var(--gold-light);
}

.nav-section-mobile {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 14px 18px 4px;
}

@media (max-width: 980px) {
  .nav__center { display: none; }
  .nav__logout, .user-chip { display: none; }
  .nav__burger { display: flex; }
  .nav { padding: 6px; grid-template-columns: auto 1fr auto; gap: 8px; }
  .month-picker { flex-shrink: 0; }
  .month-picker span { min-width: 60px; font-size: 10px; padding: 0 4px; }
  .nav__brand-text { font-size: 13px; }
}

@media (min-width: 981px) {
  .nav__burger { display: none !important; }
  .nav__mobile-menu { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   PERIOD BAR
═══════════════════════════════════════════════════════════════ */

.period-bar {
  position: sticky;
  top: 84px;
  z-index: 30;
  margin: 16px auto 0;
  width: calc(100% - 32px);
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px;
  background: rgba(20, 20, 27, 0.65);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(38, 38, 47, 0.7);
  border-radius: var(--r-full);
  flex-wrap: wrap;
}

.period-tabs {
  display: flex;
  gap: 2px;
  background: rgba(28, 28, 38, 0.5);
  border-radius: var(--r-full);
  padding: 3px;
}

.period-tab {
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  padding: 6px 14px;
  border-radius: var(--r-full);
  transition: all 0.15s var(--ease-soft);
}

.period-tab:hover { color: var(--fg); }

.period-tab.is-active {
  background: var(--grad-d);
  color: #1A1408;
  box-shadow: 0 2px 10px rgba(201, 169, 97, 0.30);
}

.period-nav {
  display: flex; align-items: center; gap: 4px;
  padding: 0 6px;
}

.period-label {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 0 10px;
  min-width: 90px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN
═══════════════════════════════════════════════════════════════ */

main { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   VIEW (cada seção do app)
═══════════════════════════════════════════════════════════════ */

.view { display: none; }
.view.active { display: block; animation: view-in 0.4s var(--ease-soft); }

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  padding: clamp(28px, 5vh, 56px) clamp(20px, 4vw, 48px) clamp(20px, 3vh, 32px);
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  overflow: visible;
}

.hero__bars {
  position: absolute;
  right: 4%;
  top: 50%;
  width: min(34vmin, 320px);
  height: min(34vmin, 320px);
  transform: translateY(-50%);
  opacity: 0.92;
  filter: drop-shadow(0 0 60px rgba(255, 240, 200, 0.35)) drop-shadow(0 0 22px rgba(201, 169, 97, 0.30));
  pointer-events: none;
  z-index: 0;
  animation: bars-float 14s var(--ease-soft) infinite;
}

@keyframes bars-float {
  0%, 100% { transform: translateY(-50%) rotate(0deg) scale(1); }
  50% { transform: translateY(-52%) rotate(1.5deg) scale(1.03); }
}

.hero__bars img, .hero__bars svg { width: 100%; height: 100%; }

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  border: 1px solid rgba(201, 169, 97, 0.30);
  background: rgba(201, 169, 97, 0.06);
  border-radius: var(--r-full);
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  margin-bottom: 22px;
}

.hero__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: dot-pulse 2.4s var(--ease-soft) infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.hero__sub {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--fg-muted);
  max-width: 540px;
  line-height: 1.55;
  margin-bottom: 28px;
}

.hero__sub strong { color: var(--fg); font-weight: 600; }

.hero__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

@media (min-width: 720px) {
  .hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 44px;
  }
}

.hero__stat { flex: 0 0 auto; min-width: 0; }

.hero__stat-num {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero__stat-num small {
  font-size: 0.5em;
  font-weight: 600;
  color: var(--fg-muted);
}

.hero__stat-label {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-subtle);
}

@media (max-width: 600px) {
  .hero__bars { right: -25%; opacity: 0.30; width: min(70vw, 320px); height: min(70vw, 320px); }
  .hero__title { font-size: clamp(28px, 9vw, 42px); }
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════════════════ */

.section {
  position: relative;
  z-index: 1;
  padding: clamp(14px, 2.5vh, 24px) clamp(20px, 4vw, 48px);
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.section__head {
  margin: 0 auto clamp(20px, 3vh, 32px);
  max-width: 720px;
  text-align: center;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid rgba(201, 169, 97, 0.30);
  background: rgba(201, 169, 97, 0.06);
  border-radius: var(--r-full);
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.section__eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.section__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.section__sub {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: clamp(15px, 1.4vw, 16px);
  line-height: 1.6;
}

/* View padding pra views sem .hero (custos, recorrencias, config, natureza) */
#view-custos, #view-recorrencias, #view-config, #view-natureza {
  padding: clamp(28px, 5vh, 48px) clamp(20px, 4vw, 48px) 60px;
  max-width: 1320px;
  margin: 0 auto;
}

#view-custos > .section__head,
#view-recorrencias > .section__head,
#view-config > .section__head,
#view-natureza > .section__head {
  margin-bottom: clamp(24px, 3vh, 36px);
}

/* ═══════════════════════════════════════════════════════════════
   BIG NUMBERS
═══════════════════════════════════════════════════════════════ */

.big-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.big-card {
  position: relative;
  background: rgba(20, 20, 27, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  overflow: hidden;
  transition: all 0.3s var(--ease-soft);
}

.big-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--grad-line-top);
  opacity: 0.85;
  transition: opacity 0.3s;
  box-shadow: 0 0 12px rgba(224, 192, 120, 0.45);
}

.big-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.big-card:hover::before { opacity: 1; }

.big-label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

.big-value {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.5vw, 26px);
  font-weight: 800;
  margin-top: 8px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ═══════════════════════════════════════════════════════════════
   HEALTH CARDS
═══════════════════════════════════════════════════════════════ */

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.health-card {
  position: relative;
  background: rgba(20, 20, 27, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--fg-subtle);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s var(--ease-soft);
  overflow: hidden;
}

.health-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.05;
  transform: translate(40%, -40%);
  pointer-events: none;
}

.health-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }

.health-card.good { border-left-color: var(--success); color: var(--success); }
.health-card.warn { border-left-color: var(--warning); color: var(--warning); }
.health-card.bad  { border-left-color: var(--danger); color: var(--danger); }

.health-icon {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.15));
}

.health-content { flex: 1; min-width: 0; color: var(--fg); }

.health-label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

.health-value {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
}

.health-card.good .health-value { color: var(--success); }
.health-card.warn .health-value { color: var(--warning); }
.health-card.bad .health-value { color: var(--danger); }

.health-meta {
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 6px;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════ */

.card {
  position: relative;
  background: rgba(20, 20, 27, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 22px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--grad-line-top);
  opacity: 0.85;
  box-shadow: 0 0 14px rgba(224, 192, 120, 0.45);
}

.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card h3 {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.grid-2-obs {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

#card-observacoes textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  font-family: var(--f-body);
  font-size: 13px;
  line-height: 1.65;
  padding: 14px;
  background: rgba(10, 10, 10, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

#card-observacoes textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.10);
  outline: none;
}

.obs-status { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }

/* ═══════════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════════ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--f-body);
}

.data-table thead { background: rgba(28, 28, 38, 0.5); }

.data-table th {
  text-align: left;
  padding: 11px 14px;
  font-family: var(--f-mono);
  font-weight: 500;
  color: var(--fg-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(38, 38, 47, 0.5);
}

.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: rgba(28, 28, 38, 0.4); }

.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.bar-track { flex: 1; height: 5px; background: rgba(28, 28, 38, 0.7); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.6s var(--ease-out); }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pago { background: rgba(74, 222, 128, 0.12); color: var(--success); }
.status-pendente { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.status-projetado { background: rgba(59, 130, 246, 0.12); color: var(--info); }
.status-cancelado { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.mom-table .var-up { color: var(--danger); font-family: var(--f-mono); font-weight: 500; }
.mom-table .var-down { color: var(--success); font-family: var(--f-mono); font-weight: 500; }
.mom-table .var-flat { color: var(--fg-muted); font-family: var(--f-mono); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.005em;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.25s var(--ease-soft);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn--primary, .btn-primary {
  background: var(--grad-d);
  color: #1A1408;
  box-shadow: 0 6px 20px rgba(201, 169, 97, 0.30);
  padding: 10px 18px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--r-full);
  transition: all 0.25s var(--ease-soft);
}

.btn--primary:hover, .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(201, 169, 97, 0.45);
}

.btn--primary:active, .btn-primary:active { transform: translateY(0) scale(0.98); }

.btn--ghost, .btn-ghost {
  color: var(--fg);
  border: 1px solid var(--border-strong);
  background: rgba(28, 28, 38, 0.5);
  padding: 10px 18px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--r-full);
  transition: all 0.2s var(--ease-soft);
}

.btn--ghost:hover, .btn-ghost:hover { background: var(--bg-surface); border-color: var(--fg-muted); }

.btn-danger {
  background: var(--danger);
  color: white;
  padding: 10px 18px;
  border-radius: var(--r-full);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════════ */

.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: rgba(20, 20, 27, 0.92);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(201, 169, 97, 0.08);
  animation: modal-in 0.25s var(--ease-spring);
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--grad-line-top);
  opacity: 0.95;
  box-shadow: 0 0 16px rgba(224, 192, 120, 0.5);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-body { padding: 20px 22px 22px; }

/* ═══════════════════════════════════════════════════════════════
   LANCAMENTO DETAIL MODAL
═══════════════════════════════════════════════════════════════ */

.lanc-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(38, 38, 47, 0.5);
  gap: 12px;
}
.lanc-detail-row:last-of-type { border-bottom: none; }
.lanc-detail-label {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-subtle);
  flex-shrink: 0;
}
.lanc-detail-value {
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--fg);
  text-align: right;
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   FORM
═══════════════════════════════════════════════════════════════ */

.form-grid { display: grid; gap: 14px; }

.form-grid label {
  display: flex; flex-direction: column; gap: 7px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.form-grid label input,
.form-grid label select,
.form-grid label textarea,
.form-grid input,
.form-grid select {
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--fg);
  background: rgba(10, 10, 10, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-grid label input:focus,
.form-grid label select:focus,
.form-grid input:focus, .form-grid select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.10);
}

.row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 27, 0.92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 13px 20px;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  z-index: 200;
  animation: toast-in 0.25s var(--ease-spring);
}

.toast.success { border-color: var(--success); box-shadow: 0 4px 24px rgba(74, 222, 128, 0.20); }
.toast.error   { border-color: var(--danger); box-shadow: 0 4px 24px rgba(239, 68, 68, 0.20); }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ═══════════════════════════════════════════════════════════════
   REVEAL ANIMATION (fade + slide up on appear)
═══════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.7s var(--ease-out) forwards;
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger pra cards seguidos */
.section .reveal:nth-child(2) { animation-delay: 0.05s; }
.section .reveal:nth-child(3) { animation-delay: 0.1s; }
.grid-2 .reveal:nth-child(2)  { animation-delay: 0.08s; }
.health-grid.reveal { animation-delay: 0.05s; }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ═══════════════════════════════════════════════════════════════
   MOBILE — fit-to-viewport + stacking
═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  body { font-size: 14px; }

  /* Nav pill mais compacta — só logo + burger no mobile */
  .nav {
    margin: 10px auto 0;
    width: calc(100% - 20px);
    padding: 5px;
    gap: 8px;
    grid-template-columns: 1fr auto;
  }
  .nav__brand { gap: 8px; }
  .nav__brand-icon .logo-mark-sm { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
  .nav__brand-text { font-size: 12px; letter-spacing: 0.04em; }

  /* Period bar mobile — empilha */
  .period-bar {
    top: 72px;
    margin: 10px auto 0;
    width: calc(100% - 20px);
    flex-direction: column;
    border-radius: var(--r-lg);
    gap: 8px;
    padding: 8px;
  }
  .period-tabs { width: 100%; justify-content: space-around; }
  .period-tab { flex: 1; text-align: center; padding: 7px 8px; font-size: 11px; }
  .period-nav { width: 100%; justify-content: center; padding: 0; }
  .period-label { font-size: 11px; min-width: 110px; }

  /* Grids viram 1 coluna */
  .grid-2, .grid-2-obs { grid-template-columns: 1fr !important; gap: 14px; }

  /* Big numbers em 2 cols compactas */
  .big-numbers {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }
  .big-card { padding: 14px; }
  .big-label { font-size: 9px; letter-spacing: 0.10em; }
  .big-value { font-size: 18px; margin-top: 6px; }

  /* Health grid 1 coluna */
  .health-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .health-card { padding: 14px 16px; gap: 12px; }
  .health-icon { font-size: 24px; }
  .health-value { font-size: 18px; }

  /* Hero compacto */
  .hero { padding: 24px 20px 18px; }
  .hero__bars {
    width: min(50vmin, 220px);
    height: min(50vmin, 220px);
    right: -10%;
    opacity: 0.30;
    filter: drop-shadow(0 0 40px rgba(255, 240, 200, 0.25));
  }
  .hero__content { max-width: 100%; }
  .hero__title { font-size: clamp(26px, 8vw, 36px); margin-bottom: 12px; }
  .hero__sub { font-size: 13px; margin-bottom: 20px; }
  .hero__eyebrow { margin-bottom: 14px; padding: 5px 10px 5px 9px; font-size: 9px; }
  .hero__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 18px;
    padding-top: 20px;
  }
  .hero__stat-num { font-size: 22px; }
  .hero__stat-label { font-size: 9px; letter-spacing: 0.10em; }

  /* Section heads */
  .section { padding: 16px 20px; }
  .section__head { margin-bottom: 18px; }
  .section__title { font-size: 22px; }
  .section__sub { font-size: 13px; margin-top: 8px; }
  .section__eyebrow { font-size: 9px; padding: 4px 10px 4px 8px; margin-bottom: 12px; }

  /* Views (custos, recorrencias, config, natureza) */
  #view-custos, #view-recorrencias, #view-config, #view-natureza {
    padding: 28px 16px 60px;
  }

  /* Cards padding mobile */
  .card { padding: 16px; margin-bottom: 14px; border-radius: 14px; }
  .card-header { gap: 10px; margin-bottom: 14px; }
  .card h3 { font-size: 14px; }

  /* Tabelas mobile — viram card-list compacto, click abre detalhe */
  .card .data-table { display: block; }
  .card .data-table thead { display: none; }
  .card .data-table tbody { display: block; }
  .card .data-table tr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(28, 28, 38, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.12s var(--ease-soft);
  }
  .card .data-table tr:hover, .card .data-table tr:active {
    background: rgba(201, 169, 97, 0.06);
    border-color: rgba(201, 169, 97, 0.30);
  }
  .card .data-table td {
    display: none;
    padding: 0;
    border: none;
    font-size: 13px;
  }
  .card .data-table td.mobile-show { display: flex; align-items: center; gap: 8px; }
  .card .data-table td.mobile-primary { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
  .card .data-table td.mobile-primary .row-title { font-weight: 600; color: var(--fg); font-size: 13px; }
  .card .data-table td.mobile-primary .row-sub { font-family: var(--f-mono); font-size: 10px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.08em; }
  .card .data-table td.mobile-value { font-family: var(--f-display); font-weight: 700; font-size: 14px; }
  .card .data-table td.mobile-status { flex-shrink: 0; }
  .card .data-table td.mobile-actions { flex-shrink: 0; }

  /* MoM table — mantém formato tabela com scroll horizontal */
  .mom-table.data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mom-table.data-table thead { display: table-header-group; }
  .mom-table.data-table tbody { display: table-row-group; }
  .mom-table.data-table tr {
    display: table-row;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(38, 38, 47, 0.5);
    padding: 0;
    margin: 0;
    border-radius: 0;
  }
  .mom-table.data-table th, .mom-table.data-table td {
    display: table-cell;
    padding: 10px 12px;
    font-size: 11px;
    border: none;
  }
  .mom-table.data-table th { border-bottom: 1px solid var(--border); }

  /* Modal mobile */
  .modal { padding: 12px; }
  .modal-content { max-height: 90vh; border-radius: 16px; }
  .modal-header { padding: 14px 18px 12px; }
  .modal-body { padding: 16px 18px 18px; }

  /* Buttons compactos */
  .btn, .btn--primary, .btn--ghost, .btn-primary, .btn-ghost {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Login */
  .login-container { padding: 30px 22px; }
  .pin-keypad { gap: 8px; }
  .pin-btn { padding: 14px 0; font-size: 20px; }

  /* Charts containers — limitar altura pra não estourar */
  .card canvas { max-height: 240px !important; }

  /* Mom table — scroll horizontal */
  .mom-table { font-size: 11px; }
  .mom-table th, .mom-table td { padding: 9px 8px; }

  /* Observações textarea menor */
  #card-observacoes textarea { min-height: 200px; font-size: 13px; }
}

@media (max-width: 480px) {
  /* Big numbers em 1 coluna em telas muito pequenas */
  .big-numbers { grid-template-columns: 1fr; }

  /* Title hero menor */
  .hero__title { font-size: clamp(22px, 7vw, 30px); }
  .hero__bars { display: none; }

  /* Section title */
  .section__title { font-size: 20px; }

  /* Card actions empilham */
  .card-header { flex-direction: column; align-items: flex-start; }
  .card-actions { width: 100%; }
  .card-actions .btn { flex: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   PWA SAFE AREAS
═══════════════════════════════════════════════════════════════ */

@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}
