/* ==========================================================================
   CONTROLE DESCOMPLICADO — Design System & Multiplatform Stylesheet
   Paleta: Verde Esmeralda (#059669 / #10B981) & Azul Profundo (#0B192C / #0F2942)
   ========================================================================== */

:root {
  --bg: #F0F4F8;
  --sf: #FFFFFF;
  --sf2: #F8FAFC;
  --ink: #0B192C;
  --mut: #475569;
  --ln: #DCE4EC;
  --ac: #059669;
  --ac-h: #047857;
  --ac-soft: rgba(5, 150, 105, 0.12);
  --navy: #0B192C;
  --navy-2: #0F2942;
  --ok: #059669;
  --wn: #D97706;
  --bad: #DC2626;
  --bx: #E2E8F0;
  --bt: #FFFFFF;
  --sh-sm: 0 2px 8px rgba(11, 25, 44, 0.05);
  --sh-md: 0 8px 24px rgba(11, 25, 44, 0.09);
  --radius: 16px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  --bg: #08121E;
  --sf: #0F2133;
  --sf2: #152B40;
  --ink: #F1F5F9;
  --mut: #94A3B8;
  --ln: #1E3852;
  --ac: #10B981;
  --ac-h: #34D399;
  --ac-soft: rgba(16, 185, 129, 0.16);
  --navy: #060E18;
  --navy-2: #0F2942;
  --ok: #34D399;
  --wn: #FBBF24;
  --bad: #F87171;
  --bx: #1E3852;
  --bt: #042016;
  --sh-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --sh-md: 0 10px 28px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 "Plus Jakarta Sans", "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

main {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 18px)) 12px calc(165px + var(--android-inset-bottom, env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
}

/* Brand Header */
.brand-hdr {
  background: linear-gradient(135deg, #0B192C 0%, #0F2942 60%, #064E3B 100%);
  color: #F8FAFC;
  border-radius: 16px;
  padding: 12px 12px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(11, 25, 44, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.25);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.brand-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.brand-id {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.brand-id img,
.brand-id svg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.brand-title {
  font-size: clamp(0.86rem, 3.7vw, 1.02rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: clamp(0.75rem, 2.8vw, 0.8rem);
  color: #6EE7B7;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.brand-actions button {
  background: rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 8px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.85rem;
  backdrop-filter: blur(6px);
  width: auto;
  margin: 0;
}

.brand-actions button:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34D399;
}

/* Period Bar (Year & Month Selector) */
.period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.yr-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.yr-switch button {
  background: transparent;
  color: #A7F3D0;
  padding: 6px 10px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 8px;
}

.yr-switch span {
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0 6px;
  color: #FFFFFF;
}

.period-bar select {
  margin: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
  font-size: 0.88rem;
  width: auto;
  flex: 1;
  max-width: 190px;
}

.period-bar select option {
  background: var(--sf);
  color: var(--ink);
}

/* Typography */
h1 {
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 12px;
}

h2 {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Cards & Alerts */
.c {
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: var(--radius);
  padding: 13px;
  margin-bottom: 11px;
  box-shadow: var(--sh-sm);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.al {
  border-left: 5px solid var(--ok);
  border-radius: 13px;
  padding: 12px 14px;
  background: var(--sf);
  border-top: 1px solid var(--ln);
  border-right: 1px solid var(--ln);
  border-bottom: 1px solid var(--ln);
  margin-bottom: 10px;
  box-shadow: var(--sh-sm);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.al.wn {
  border-left-color: var(--wn);
}

.al.bad {
  border-left-color: var(--bad);
}

.al b {
  display: block;
  margin-bottom: 2px;
}

/* Grids & KPIs */
.g {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 11px;
  width: 100%;
  max-width: 100%;
}

.g > * {
  min-width: 0;
  max-width: 100%;
}

.g .c {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.k {
  color: var(--mut);
  font-size: 0.8rem;
}

.v {
  font-size: clamp(0.94rem, 3.8vw, 1.18rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 2px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  font-variant-numeric: tabular-nums;
}

.num-nowrap {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  font-variant-numeric: tabular-nums;
}

.neg {
  color: var(--bad) !important;
}

.pos {
  color: var(--ok) !important;
}

/* Charts & Maps */
.map {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scrollbar-width: thin;
  max-width: 100%;
}

.col {
  flex: 0 0 56px;
  text-align: center;
  font-size: 0.8rem;
}

.col.e {
  opacity: 0.42;
}

.tr {
  height: 108px;
  background: var(--bx);
  border-radius: 9px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.tr i {
  display: block;
  width: 100%;
  border-radius: 9px 9px 0 0;
  transition: height 0.25s ease;
}

.lv {
  color: var(--ok);
  font-weight: 700;
  min-height: 1.2em;
}

/* Rows & Lists */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ln);
  width: 100%;
  max-width: 100%;
}

.row > * {
  min-width: 0;
}

.row > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.row > :last-child:not(:first-child) {
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row:last-child {
  border-bottom: 0;
}

.row small {
  display: block;
  color: var(--mut);
  font-size: 0.8rem;
  margin-top: 1px;
}

/* Forms & Buttons — Alvos de toque de pelo menos 44px (WCAG 2.5.5 / Google Play Accessibility) */
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  font: inherit;
  color: var(--ink);
  background: var(--sf2);
  border: 1px solid var(--ln);
  border-radius: 11px;
  padding: 10px 12px;
  margin: 4px 0 9px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="checkbox"],
input[type="radio"] {
  min-height: 22px;
  min-width: 22px;
}

label {
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--mut);
  display: block;
  margin-top: 4px;
}

button {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  padding: 10px 15px;
  background: var(--ac);
  color: var(--bt);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease, opacity 0.15s ease;
}

button:active {
  transform: scale(0.98);
}

button.s {
  background: transparent;
  color: var(--bad);
  padding: 8px 10px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

button.o {
  background: var(--sf2);
  color: var(--ink);
  border: 1px solid var(--ln);
}

button.o.active-pill {
  background: var(--ac-soft);
  color: var(--ac);
  border-color: var(--ac);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}

/* Progress Bars */
.bar {
  height: 10px;
  background: var(--bx);
  border-radius: 99px;
  position: relative;
  margin: 5px 0 11px;
  overflow: hidden;
}

.bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  background: var(--ac);
  transition: width 0.3s ease;
}

.bar u {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: var(--ink);
  z-index: 2;
}

/* Bottom Navigation — Elevated Floating Dock (Protected from Android System Navigation Bar & Curved Corners) */
nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(14px + var(--android-inset-bottom, env(safe-area-inset-bottom, 0px)));
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 4px;
  background: var(--sf);
  border: 1.5px solid var(--ln);
  border-radius: 18px;
  padding: 6px 8px;
  z-index: 22;
  box-shadow: 0 10px 28px rgba(11, 25, 44, 0.24);
}

nav button {
  flex: 1 1 20%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  background: none;
  color: var(--mut);
  border-radius: 13px;
  padding: 8px 4px;
  font-size:.8rem;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  touch-action: manipulation;
}

nav button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

nav button.on {
  color: var(--ac);
  background: var(--ac-soft);
}

/* Helper / Tips */
.n {
  font-size: 0.81rem;
  color: var(--mut);
  margin-top: 14px;
}

.tp {
  margin: 6px 0 11px;
  border: 1px dashed var(--ln);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--sf2);
}

.tp summary {
  cursor: pointer;
  color: var(--ac);
  font-weight: 700;
  font-size: 0.86rem;
}

.tp p {
  margin: 6px 0 0;
  color: var(--mut);
  font-size: 0.86rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

table td,
table th {
  padding: 7px 4px;
  text-align: right;
  white-space: nowrap;
  word-break: keep-all;
  font-variant-numeric: tabular-nums;
}

table td:first-child,
table th:first-child {
  text-align: left;
  white-space: normal;
}

table tr {
  border-bottom: 1px solid var(--ln);
}

/* Floating Action Buttons */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(96px + var(--android-inset-bottom, env(safe-area-inset-bottom, 0px)));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.8rem;
  padding: 0;
  background: linear-gradient(135deg, #059669, #10B981);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.42);
  z-index: 20;
  display: grid;
  place-items: center;
}

.mic {
  position: fixed;
  right: 16px;
  bottom: calc(160px + var(--android-inset-bottom, env(safe-area-inset-bottom, 0px)));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.35rem;
  padding: 0;
  background: linear-gradient(135deg, #0B192C, #1E3A5F);
  color: #34D399;
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 6px 16px rgba(11, 25, 44, 0.35);
  z-index: 20;
  display: grid;
  place-items: center;
}

.mic.on {
  background: var(--bad);
  color: #fff;
  border-color: #fff;
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Modals / Bottom Sheets */
.ov {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 30, 0.58);
  backdrop-filter: blur(2px);
  z-index: 25;
}

.sh {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--sf);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--ln);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  max-height: 88vh;
  overflow: auto;
}

.sh button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
}

.bd {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--ln);
  border-radius: 20px;
  padding: 2px 9px;
  color: var(--mut);
  background: var(--sf2);
}

/* Calendar & Calculator */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  text-align: center;
}

.cal span.h {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mut);
  padding-bottom: 4px;
}

.cal button {
  padding: 6px 0;
  background: var(--sf2);
  color: var(--ink);
  border: 1px solid var(--ln);
  font-weight: 700;
  min-height: 46px;
  border-radius: 10px;
}

.cal button.on {
  background: var(--ac);
  color: var(--bt);
  border-color: var(--ac);
}

.cal button.hj {
  border-color: var(--ac);
  border-width: 2px;
}

.cal i {
  display: block;
  font-size:.8rem;
  line-height: 0.9;
  font-style: normal;
  height: 0.9em;
  margin-top: 2px;
}

.chips button,
.chip {
  margin: 0 6px 6px 0;
  padding: 8px 13px;
  min-height: 44px;
  min-width: 44px;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
}

.ut {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 99px;
  z-index: 50;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: var(--sh-md);
}

.ut button {
  background: transparent;
  color: #34D399;
  padding: 2px 6px;
}

#tt {
  position: fixed;
  z-index: 70;
  display: none;
  max-width: 260px;
  background: var(--navy);
  color: #F8FAFC;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.83rem;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: var(--sh-md);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

[data-tip] {
  -webkit-touch-callout: none;
}

.kg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.sh .kg button {
  text-align: center;
  margin: 0;
  padding: 14px 0;
}

.dc {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size:.8rem;
  font-weight: 800;
  color: #0B192C;
  flex: none;
}

/* Filter Bar in Month View */
.filter-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.filter-bar button {
  padding: 8px 14px;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  border-radius: 99px;
}

.filter-bar input {
  flex: 1;
  min-width: 140px;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 0.84rem;
}

.nav-desk-hdr,
.nav-desk-cat,
.nav-desk-only {
  display: none;
}

.desk-grid-2 {
  display: block;
}

/* Desktop Widescreen Layout (Estilo Minhas Finanças Desktop) */
@media (min-width: 820px) {
  body {
    background: var(--bg);
  }
  main {
    margin-left: 250px;
    margin-right: 0;
    width: calc(100vw - 250px);
    max-width: 1560px;
    min-height: 100vh;
    padding: 22px 28px 80px;
  }
  nav {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 250px;
    border-radius: 0;
    border-left: 0;
    border-bottom: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 18px 14px;
    gap: 4px;
    background: var(--sf);
    border-top: 0;
    border-right: 1px solid var(--ln);
    box-shadow: 4px 0 24px rgba(11, 25, 44, 0.06);
    overflow-y: auto;
  }
  .nav-desk-hdr {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--ln);
  }
  .nav-desk-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .nav-desk-brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .nav-desk-brand b {
    font-size: 0.94rem;
    line-height: 1.15;
    display: block;
    color: var(--ink);
  }
  .nav-desk-brand small {
    font-size:.8rem;
    color: var(--ac);
    font-weight: 700;
  }
  .nav-desk-cat {
    display: block;
    font-size:.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mut);
    padding: 12px 10px 4px;
  }
  .nav-desk-only {
    display: flex !important;
  }
  nav button {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    font-size: 0.86rem;
    font-weight: 700;
    border-radius: 11px;
    text-align: left;
    width: 100%;
  }
  nav button:hover {
    background: var(--sf2);
    color: var(--ink);
  }
  nav button.on {
    background: var(--ac-soft);
    color: var(--ac);
  }
  .g {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
  }
  .desk-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .fab {
    right: 28px;
    bottom: 28px;
  }
  .mic {
    right: 28px;
    bottom: 94px;
  }
  .sh {
    top: 50%;
    left: calc(50% + 125px);
    right: auto;
    bottom: auto;
    width: 540px;
    max-width: calc(100vw - 290px);
    max-height: 88vh;
    transform: translate(-50%, -50%);
    border-radius: 22px;
    border: 1px solid var(--ln);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  }
}

/* Print / PDF Stylesheet */
@media print {
  body {
    background: #FFFFFF !important;
    color: #0B192C !important;
  }
  main {
    max-width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  nav,
  .fab,
  .mic,
  .ov,
  .sh,
  .tp,
  .brand-actions,
  button {
    display: none !important;
  }
  .c,
  .al {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
  }
}

/* ==========================================================================
   NOVOS COMPONENTES DE USABILIDADE: SAUDAÇÃO, AÇÕES RÁPIDAS, QUIZ E TOUR GUIADO
   ========================================================================== */

.user-greet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 12px;
  padding: 8px 12px;
  margin-top: 10px;
}

.user-greet-txt {
  font-size: 0.92rem;
  color: #F8FAFC;
  font-weight: 600;
}

.user-greet-txt b {
  color: #34D399;
  font-weight: 800;
}

.user-greet button {
  background: rgba(255, 255, 255, 0.12);
  color: #A7F3D0;
  padding: 4px 9px;
  font-size:.8rem;
  border-radius: 8px;
}

/* Barra de Ações Intuitivas para Iniciantes */
.easy-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 520px) {
  .easy-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.easy-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 11px 6px;
  border-radius: 14px;
  background: var(--sf);
  color: var(--ink);
  border: 1.5px solid var(--ln);
  box-shadow: var(--sh-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.easy-btn span.ic {
  font-size: 1.3rem;
  line-height: 1;
}

.easy-btn small {
  font-size:.8rem;
  color: var(--mut);
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.easy-btn.pri {
  background: var(--ac-soft);
  border-color: var(--ac);
  color: var(--ac);
}

/* Destaque do Tutorial Guiado Interativo (Spotlight Real + Mão Indicadora) */
.tour-highlight {
  z-index: 95 !important;
  outline: 3.5px solid #10B981 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  animation: tourPulse 1.1s infinite !important;
}

@keyframes tourPulse {
  0% {
    outline-color: #34D399;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.85), 0 8px 24px rgba(0, 0, 0, 0.45);
  }
  50% {
    outline-color: #FBBF24;
    box-shadow: 0 0 0 12px rgba(16, 185, 129, 0), 0 8px 28px rgba(0, 0, 0, 0.55);
  }
  100% {
    outline-color: #34D399;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

.tour-spotlight-ring {
  position: fixed;
  z-index: 90;
  border-radius: 14px;
  border: 3px solid #34D399;
  box-shadow: 0 0 0 9999px rgba(6, 15, 28, 0.74), 0 0 22px 4px rgba(16, 185, 129, 0.65);
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.25s ease;
  animation: tourRingPulse 1.2s infinite;
}

@keyframes tourRingPulse {
  0%, 100% { border-color: #34D399; }
  50% { border-color: #FBBF24; }
}

.tour-pointer {
  position: fixed;
  z-index: 98;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-weight: 800;
  font-size:.8rem;
  padding: 6px 11px;
  border-radius: 99px;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.55);
  border: 2px solid #FEF3C7;
  pointer-events: auto;
  cursor: pointer;
  max-width: calc(100vw - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: pointerBounce 0.9s ease-in-out infinite alternate;
}

@keyframes pointerBounce {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-6px); }
}

.tour-card {
  position: fixed;
  left: 10px;
  right: 10px;
  width: auto;
  max-width: calc(100vw - 20px);
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 99;
  background: linear-gradient(145deg, #0B192C, #0F2942);
  color: #F8FAFC;
  border: 2px solid #10B981;
  border-radius: 18px;
  padding: 13px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.tour-card.top {
  bottom: auto;
  top: calc(10px + env(safe-area-inset-top, 0px));
}

.tour-card button {
  width: auto;
  margin: 0;
}

/* Player de Vídeo Simulado (História da Família de 2 Salários Mínimos) */
.story-screen {
  background: linear-gradient(160deg, #0B192C 0%, #102A45 100%);
  color: #F8FAFC;
  border-radius: 16px;
  padding: 13px;
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.story-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
  width: 100%;
}

.story-kpi {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
  min-width: 0;
}

.story-kpi small {
  display: block;
  font-size:.8rem;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-kpi b {
  font-size: clamp(0.76rem, 3.2vw, 0.9rem);
  white-space: nowrap;
  word-break: keep-all;
  font-variant-numeric: tabular-nums;
}

.story-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid #10B981;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  animation: fadeSlideIn 0.35s ease-out;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cartões de Crédito Visuais e Seletor de Bancos */
.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 12px;
  width: 100%;
}

@media (min-width: 480px) {
  .bank-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.bank-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 2px solid var(--ln);
  background: var(--sf2);
  color: var(--ink);
  font-size:.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 0;
  text-align: center;
}

.bank-chip.on {
  border-color: var(--ac);
  background: var(--ac-soft);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.bank-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size:.8rem;
  letter-spacing: -0.5px;
}

.cc-visual {
  border-radius: 16px;
  padding: 13px;
  color: #FFFFFF;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  font-size:.8rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

@media (min-width: 720px) {
  .tour-card {
    left: 50%;
    right: auto;
    width: 450px;
    max-width: 450px;
    transform: translateX(-50%);
  }
}

/* Foco Visível para Navegação por Teclado e Leitores de Tela (WCAG 2.1 AA) */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ac) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px var(--ac-soft) !important;
}

/* Alvos de toque acessíveis em todos os dispositivos (Google Play Accessibility / WCAG 2.5.5 — mínimo 44x44px) */
button.s,
.ut button,
.row button,
.brand-actions button,
.bank-chip {
  min-height: 44px;
  min-width: 44px;
}

/* Seções recolhíveis da tela Início (.sec-collapse), Gasto Rápido em 3 Toques (.q3-cat-grid) e Balão de Dica Contextual (.tip-balloon) */
details.sec-collapse {
  padding: 0;
  overflow: hidden;
}

details.sec-collapse > summary {
  cursor: pointer;
  padding: 13px 15px;
  min-height: 48px;
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  background: var(--sf);
}

details.sec-collapse > summary::-webkit-details-marker {
  display: none;
}

details.sec-collapse > summary::after {
  content: "▼ Mostrar";
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ac);
  background: var(--ac-soft);
  padding: 4px 10px;
  border-radius: 99px;
  flex-shrink: 0;
}

details.sec-collapse[open] > summary {
  border-bottom: 1px solid var(--ln);
}

details.sec-collapse[open] > summary::after {
  content: "▲ Recolher";
}

details.sec-collapse > .sec-collapse-body {
  padding: 12px 13px;
}

.q3-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 12px;
}

@media (min-width: 420px) {
  .q3-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.q3-chip {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--ln);
  background: var(--sf2);
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100% !important;
  margin: 0 !important;
}

.q3-chip.on {
  border-color: var(--ac);
  background: var(--ac-soft);
  color: var(--ac);
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.2);
}

.tip-balloon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(2, 132, 199, 0.12));
  border: 1.5px solid var(--ac);
  border-radius: 14px;
  padding: 10px 13px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .tour-pointer,
  .tour-spotlight-ring,
  .story-item,
  .fab,
  .mic,
  .sh,
  .ov,
  .bar i,
  .tr i {
    animation: none !important;
    transition: none !important;
  }
}
