/* ==========================================================================
   Guard Finance — tema do aplicativo (PWA cliente)
   Carregado DEPOIS de style.css: sobrescreve o template Finapp com a
   identidade do site guardfinance.com.br (navy + dourado, fonte Inter).
   Direção estética: "private banking" — superfícies navy profundas,
   dourado como acento raro, números tabulares grandes.
   ========================================================================== */

:root {
  /* Marca */
  --gf-navy-950: #071a30;
  --gf-navy-900: #0e243a;
  --gf-navy-800: #17385c;
  --gf-navy-700: #243b53;
  --gf-navy-600: #334e68;
  --gf-navy-500: #486581;
  --gf-navy-400: #627d98;
  --gf-navy-300: #829ab1;
  --gf-navy-200: #bccbdc;
  --gf-navy-100: #d9e2ec;
  --gf-navy-50:  #f0f4f8;

  --gf-gold-700: #c17d29;
  --gf-gold-500: #f2a649;
  --gf-gold-300: #ffd08a;
  --gf-gold-gradient: linear-gradient(135deg, #c17d29 0%, #f2a649 48%, #ffd08a 100%);
  --gf-navy-gradient: linear-gradient(160deg, #17385c 0%, #0e243a 55%, #071a30 100%);

  /* Semântico */
  --gf-bg: #eef2f7;
  --gf-surface: #ffffff;
  --gf-surface-2: #f6f8fb;
  --gf-line: #dfe6ee;
  --gf-heading: #0e243a;
  --gf-text: #4a5b6e;
  --gf-muted: #8194a8;
  --gf-primary: #17385c;
  --gf-accent: #c17d29;
  --gf-success: #1f9d5a;
  --gf-danger: #d64545;
  --gf-warning: #e39a1c;

  --gf-radius: 14px;
  --gf-radius-lg: 22px;
  --gf-shadow: 0 1px 2px rgba(14, 36, 58, .06), 0 8px 24px -12px rgba(14, 36, 58, .18);
  --gf-shadow-hero: 0 24px 48px -20px rgba(7, 26, 48, .55);

  --gf-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--gf-font);
  background: var(--gf-bg);
  color: var(--gf-text);
  font-size: 15px;
  letter-spacing: 0;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
  font-family: var(--gf-font);
  color: var(--gf-heading);
  letter-spacing: -0.02em;
}

a, a:hover, a:active, a:focus { color: var(--gf-primary); }

.text-primary { color: var(--gf-primary) !important; }
.text-success { color: var(--gf-success) !important; }
.text-danger  { color: var(--gf-danger)  !important; }
.text-gold    { color: var(--gf-accent)  !important; }
.text-muted   { color: var(--gf-muted)   !important; }

/* Números financeiros sempre alinhados */
.gf-num, .price, .stat-box .value, .gf-balance {
  font-variant-numeric: tabular-nums;
}

#loader { background: var(--gf-navy-900); }

::selection { background: var(--gf-gold-300); color: var(--gf-navy-900); }

:focus-visible {
  outline: 2px solid var(--gf-gold-500);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Layout: cabeçalho de página
   -------------------------------------------------------------------------- */
/* Mesmo navy do hero da tela inicial; os elementos ficam em branco/translúcido */
.appHeader {
  background: var(--gf-navy-gradient);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  height: 56px;
  box-shadow: 0 8px 20px -14px rgba(7, 26, 48, .6);
}
.appHeader .pageTitle {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #fff;
}
.appHeader .left .headerButton,
.appHeader .right .headerButton {
  color: #fff;
  min-width: 40px;
}
.appHeader .headerButton.gf-back {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 4px;
  transition: background .18s ease;
}
.appHeader .headerButton.gf-back:active { background: rgba(255, 255, 255, .18); }
.appHeader .headerButton.gf-back ion-icon { font-size: 20px; }
.appHeader .gf-brand-mark { height: 24px; width: auto; display: block; margin-right: 4px; opacity: .95; }

/* Conteúdo */
#appCapsule { padding-bottom: 96px; }
/* o template soma margin-top 80px em .top-80; o cabeçalho fixo tem 56px */
#appCapsule.top-80 { margin-top: 0 !important; padding-top: calc(72px + env(safe-area-inset-top)); }

.section-title {
  color: var(--gf-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 0 10px;
}
.section-heading .title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gf-heading);
}
.section-heading .link {
  color: var(--gf-accent);
  font-weight: 600;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Layout: menu inferior
   -------------------------------------------------------------------------- */
.appBottomMenu {
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--gf-line);
  min-height: 60px;
}
.appBottomMenu .item {
  color: var(--gf-muted);
  height: 60px;
  position: relative;
}
.appBottomMenu .item .col ion-icon {
  font-size: 22px;
  color: inherit;
  margin-bottom: 4px;
  transition: transform .18s ease;
}
.appBottomMenu .item strong {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  color: inherit;
}
.appBottomMenu .item.active { color: var(--gf-primary); }
.appBottomMenu .item.active .col ion-icon,
.appBottomMenu .item.active .col strong { color: var(--gf-primary) !important; }
.appBottomMenu .item.active .col ion-icon { transform: translateY(-1px); }
.appBottomMenu .item:before { display: none !important; }
.appBottomMenu .item.active:after {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 22px; height: 3px;
  transform: translateX(-50%);
  border-radius: 0 0 3px 3px;
  background: var(--gf-gold-gradient);
}

/* Ação central destacada (Simulador) */
.appBottomMenu .item .gf-fab {
  width: 50px; height: 50px;
  border-radius: 16px;
  background: var(--gf-navy-gradient);
  color: var(--gf-gold-300);
  display: inline-flex; align-items: center; justify-content: center;
  margin: -22px auto 4px;
  box-shadow: 0 10px 20px -8px rgba(14, 36, 58, .6), inset 0 0 0 1px rgba(255, 208, 138, .25);
}
.appBottomMenu .item .gf-fab ion-icon { font-size: 24px; margin: 0; }
.appBottomMenu .item.active .gf-fab,
.appBottomMenu .item.active .gf-fab ion-icon { color: var(--gf-gold-300) !important; transform: none; }
.appBottomMenu .item.gf-center.active:after { display: none; }

/* --------------------------------------------------------------------------
   Home: hero / cartão de saldo
   -------------------------------------------------------------------------- */
.gf-hero {
  position: relative;
  background: var(--gf-navy-gradient);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 18px) 16px 92px;
  overflow: hidden;
  isolation: isolate;
}
/* símbolo do escudo como marca d'água: o "anchor" visual da marca */
.gf-hero::before {
  content: "";
  position: absolute;
  right: -60px; top: -30px;
  width: 260px; height: 290px;
  background: url("../img/brand/symbol-outline.svg") no-repeat center / contain;
  opacity: .28;
  z-index: -1;
  pointer-events: none;
}
.gf-hero::after {
  content: "";
  position: absolute;
  left: -80px; bottom: -120px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(193, 125, 41, .35), transparent);
  z-index: -1;
  pointer-events: none;
}

.gf-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gf-hero-top .gf-logo { height: 26px; width: auto; display: block; }
.gf-hero-top .gf-icon-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px;
  transition: background .18s ease;
}
.gf-hero-top .gf-icon-btn:active { background: rgba(255, 255, 255, .18); }

.gf-greeting {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.gf-avatar {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--gf-gold-gradient);
  color: var(--gf-navy-900);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 6px 14px -6px rgba(193, 125, 41, .7);
}
.gf-greeting .gf-hello {
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  margin: 0;
  line-height: 1.3;
}
.gf-greeting .gf-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62vw;
}

/* Cartão de saldo, sobreposto ao hero */
.gf-balance-card {
  position: relative;
  margin: -72px 16px 0;
  background: var(--gf-surface);
  border-radius: var(--gf-radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--gf-shadow-hero);
  z-index: 2;
}
.gf-balance-card::before {
  /* fio dourado no topo, sutil e único */
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gf-gold-gradient);
}
.gf-balance-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gf-muted);
}
.gf-balance-label .gf-period {
  background: var(--gf-navy-50);
  color: var(--gf-navy-600);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: none;
}
.gf-balance {
  margin: 10px 0 0;
  font-size: 36px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--gf-heading);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.gf-balance .gf-currency {
  font-size: 16px;
  font-weight: 600;
  color: var(--gf-accent);
  letter-spacing: 0;
}
.gf-balance-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--gf-muted);
}
.gf-balance-sub strong { color: var(--gf-text); font-weight: 600; }
.gf-balance-hint {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--gf-line);
  font-size: 11px;
  color: var(--gf-muted);
}
.gf-balance-card { padding-bottom: 16px; }
.gf-hero { padding-bottom: 84px; }

/* Ações rápidas */
.gf-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 18px -6px 0;
}
.gf-actions .item {
  text-align: center;
  color: var(--gf-heading);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 0;
  border-radius: 12px;
  transition: transform .15s ease, background .15s ease;
}
.gf-actions .item:active { transform: scale(.95); background: var(--gf-surface-2); }
.gf-actions .iconbox {
  width: 48px; height: 48px;
  margin: 0 auto 8px;
  border-radius: 15px;
  background: var(--gf-navy-50);
  color: var(--gf-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.gf-actions .item.gf-accent .iconbox {
  background: var(--gf-navy-gradient);
  color: var(--gf-gold-300);
}

/* Estatísticas */
.stat-box {
  background: var(--gf-surface);
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
  padding: 16px 18px;
  position: relative;
}
.stat-box .title {
  color: var(--gf-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stat-box .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--gf-heading);
  letter-spacing: -0.02em;
}
.stat-box .gf-stat-icon {
  position: absolute;
  right: 14px; top: 14px;
  width: 30px; height: 30px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--gf-navy-50);
  color: var(--gf-primary);
}
.stat-box.gf-stat-success .gf-stat-icon { background: #e6f5ec; color: var(--gf-success); }

/* --------------------------------------------------------------------------
   Listas de transações
   -------------------------------------------------------------------------- */
.transactions .item {
  background: var(--gf-surface);
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: transform .15s ease;
}
.transactions .item:active { transform: scale(.985); }
.transactions .item .detail .image-block {
  margin-right: 14px;
  border-radius: 10px;
  background: var(--gf-surface-2);
  padding: 4px;
}
.transactions .item .detail strong {
  color: var(--gf-heading);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.transactions .item p {
  color: var(--gf-muted);
  font-size: 12px;
  font-weight: 500;
}
.transactions .item .right .price {
  color: var(--gf-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.transactions .item .right .price.text-success { color: var(--gf-success) !important; }

.gf-empty {
  background: var(--gf-surface);
  border: 1px dashed var(--gf-line);
  border-radius: var(--gf-radius);
  padding: 28px 16px;
  text-align: center;
  color: var(--gf-muted);
  font-size: 13px;
}
.gf-empty ion-icon { font-size: 28px; color: var(--gf-navy-300); display: block; margin: 0 auto 8px; }

/* Bandeira sem logo cadastrado (ex.: PIX) */
.gf-logo-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  color: var(--gf-primary);
  font-size: 22px;
  background: var(--gf-navy-50);
  border-radius: 10px;
}
.gf-logo-fallback.w32 { width: 32px; height: 32px; font-size: 16px; }

/* Mensagem em pílula (login, filtros) */
.gf-msg {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Cards, listas, acordeões, tabelas
   -------------------------------------------------------------------------- */
.card {
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
}
.listview > li,
.listview.simple-listview > li {
  color: var(--gf-text);
  border-color: var(--gf-line);
}
.listview.simple-listview > li strong { color: var(--gf-heading); font-weight: 500; }
.listview.simple-listview > li span { color: var(--gf-heading); font-weight: 600; font-variant-numeric: tabular-nums; }
.listview.simple-listview > li span.h4 { color: var(--gf-success); font-weight: 700; }
.listview-title { color: var(--gf-muted); }
.listed-detail .icon-wrapper .image-block { border-radius: 14px; background: var(--gf-surface); padding: 6px; box-shadow: var(--gf-shadow); }
.listed-detail h3 { font-size: 17px; font-weight: 600; }

.accordion .accordion-item { border-color: var(--gf-line); }
.accordion .accordion-button {
  color: var(--gf-heading);
  font-family: var(--gf-font);
  background: var(--gf-surface);
  box-shadow: none;
  padding: 14px 16px;
}
.accordion .accordion-button:not(.collapsed) { background: var(--gf-surface); color: var(--gf-heading); }
.accordion .accordion-button::after { color: var(--gf-muted); }
.accordion .accordion-button h4 { font-size: 13px; font-weight: 500; color: var(--gf-text); line-height: 1.45; }
.accordion .accordion-button h4 .content-header { color: var(--gf-heading); font-weight: 600; font-size: 14px; }
.accordion .accordion-button .image-block { border-radius: 12px; background: var(--gf-surface-2); padding: 4px; }
.br10 { border-radius: var(--gf-radius) !important; overflow: hidden; }

.table { color: var(--gf-text); }
.table > :not(caption) > * > * { border-bottom-color: var(--gf-line); }
.table thead th {
  color: var(--gf-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--gf-line);
}
.table th[scope="row"] { color: var(--gf-heading); font-weight: 500; }
.table .text-primary { color: var(--gf-heading) !important; }

/* Badges */
.badge { font-family: var(--gf-font); font-weight: 600; border-radius: 999px; }
.badge-success, .badge.bg-success { background: #e6f5ec !important; color: var(--gf-success) !important; }
.badge-danger,  .badge.bg-danger  { background: #fbe9e9 !important; color: var(--gf-danger) !important; }
.badge-warning  { background: #fff4e0 !important; color: var(--gf-warning) !important; }
.badge-light    { background: var(--gf-navy-50) !important; color: var(--gf-navy-600) !important; }
.badge-secondary{ background: var(--gf-navy-50) !important; color: var(--gf-navy-600) !important; }
.badge-dark, .newbadge.badge-dark {
  background: var(--gf-navy-900) !important;
  color: var(--gf-gold-300) !important;
}
.newbadge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btn {
  font-family: var(--gf-font);
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 12px;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:active { transform: scale(.98); }
.btn-lg { height: 52px; font-size: 15px; border-radius: 14px; }

.btn-primary, .btn-dark {
  background: var(--gf-navy-gradient) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 10px 20px -10px rgba(14, 36, 58, .65);
}
/* Todos os estados (o tema original pintava o toque de roxo) */
.btn-primary:hover, .btn-dark:hover,
.btn-primary:focus, .btn-dark:focus,
.btn-primary:focus-visible, .btn-dark:focus-visible,
.btn-primary:active, .btn-dark:active,
.btn-primary.active, .btn-dark.active,
.btn-primary:not(:disabled):not(.disabled):active, .btn-dark:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active, .btn-dark:not(:disabled):not(.disabled).active {
  background: var(--gf-navy-gradient) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 10px 20px -10px rgba(14, 36, 58, .65) !important;
}

.btn-gold {
  background: var(--gf-gold-gradient) !important;
  color: var(--gf-navy-900) !important;
  border: 0 !important;
  box-shadow: 0 10px 20px -10px rgba(193, 125, 41, .7);
}
.btn-whatsapp {
  background: #25d366 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 10px 20px -10px rgba(37, 211, 102, .7);
}
.btn-whatsapp:hover, .btn-whatsapp:focus { color: #fff !important; background: #1ebe5d !important; }
.btn-whatsapp ion-icon { font-size: 20px; }
.btn-secondary {
  background: var(--gf-navy-50) !important;
  border: 0 !important;
  color: var(--gf-primary) !important;
}
.btn-success { background: var(--gf-success) !important; border-color: var(--gf-success) !important; }
.btn-outline-secondary { border-color: var(--gf-line) !important; color: var(--gf-text) !important; background: var(--gf-surface) !important; }
.btn-outline-white { border-color: rgba(255, 255, 255, .35) !important; color: #fff !important; }
.btn-text-primary { color: var(--gf-primary) !important; }
.btn-text-secondary { color: var(--gf-muted) !important; }
.btn-icon { border-radius: 12px; }

/* --------------------------------------------------------------------------
   Formulários
   -------------------------------------------------------------------------- */
.form-group.basic .label { color: var(--gf-muted); font-weight: 600; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.form-group.basic .form-control,
.form-group.basic .custom-select {
  font-family: var(--gf-font);
  color: var(--gf-heading);
  border-bottom-color: var(--gf-line);
}
.form-group.basic .form-control:focus { border-bottom-color: var(--gf-accent); }
.form-control {
  font-family: var(--gf-font);
  color: var(--gf-heading);
}
.search-form label:not(.gf-chip) {
  display: block;
  color: var(--gf-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 12px 0 4px;
}
.search-form .form-control {
  height: 48px;
  border: 1px solid var(--gf-line);
  border-radius: 12px;
  background: var(--gf-surface);
  padding: 0 14px;
}
.search-form .form-control:focus { border-color: var(--gf-accent); box-shadow: 0 0 0 3px rgba(193, 125, 41, .15); }

.gf-form-card { background: var(--gf-surface); border-radius: var(--gf-radius-lg); box-shadow: var(--gf-shadow); padding: 18px 18px 8px; }

/* Simulador: campo de valor grande */
.exchange-group .currency {
  color: var(--gf-accent);
  font-weight: 700;
  font-size: 22px;
}
.exchange-group input { color: var(--gf-heading); font-weight: 700; }
.exchange-heading .group-label { color: var(--gf-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

/* Chips de seleção (bandeira): radios escondidos, labels como pílulas roláveis */
.gf-chips {
  display: flex; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 6px;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px; /* rola até a borda da tela */
  scroll-snap-type: x proximity;
}
.gf-form-card .gf-chips, .card .gf-chips { margin: 0; padding-left: 0; padding-right: 0; }
.gf-chips::-webkit-scrollbar { display: none; }
.gf-chips input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.gf-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--gf-line);
  background: var(--gf-surface);
  color: var(--gf-text);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.gf-chip:active { transform: scale(.96); }
.gf-chip img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; background: var(--gf-surface-2); }
.gf-chip ion-icon { font-size: 18px; color: var(--gf-navy-400); margin-left: 4px; }
.gf-chips input[type=radio]:checked + .gf-chip {
  background: var(--gf-navy-900);
  border-color: var(--gf-navy-900);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(14, 36, 58, .7);
}
.gf-chips input[type=radio]:checked + .gf-chip ion-icon { color: var(--gf-gold-300); }
.gf-chips input[type=radio]:focus-visible + .gf-chip { outline: 2px solid var(--gf-gold-500); outline-offset: 2px; }
/* Grupo desativado (bandeiras quando a modalidade é Pix) */
.gf-chips.desabilitado { opacity: .45; filter: grayscale(1); pointer-events: none; }
.gf-chips.desabilitado input[type=radio]:checked + .gf-chip { background: var(--gf-navy-100); border-color: var(--gf-navy-100); color: var(--gf-navy-600); box-shadow: none; }

/* Barra de refiltro no resultado do relatório */
.gf-refiltro {
  background: var(--gf-surface);
  border-radius: var(--gf-radius);
  box-shadow: var(--gf-shadow);
  padding: 12px 16px 6px;
}
.gf-refiltro .gf-chips { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.gf-refiltro-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px;
}
.gf-refiltro-periodo {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--gf-heading);
  font-variant-numeric: tabular-nums;
}
.gf-refiltro-periodo ion-icon { color: var(--gf-accent); font-size: 16px; }
.gf-refiltro .link { color: var(--gf-accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.gf-refiltro-label {
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gf-muted); margin: 2px 0 6px;
}
.gf-refiltro .gf-chips + .gf-refiltro-label { margin-top: 4px; }

/* Exportação do relatório */
.gf-export {
  background: var(--gf-surface); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow);
  padding: 14px 16px;
}
.gf-export-info { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.gf-export-info > ion-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; padding: 10px;
  background: var(--gf-navy-50); color: var(--gf-primary); font-size: 20px; box-sizing: border-box;
}
.gf-export-info strong { display: block; font-size: 14px; font-weight: 600; color: var(--gf-heading); }
.gf-export-info small { font-size: 12px; color: var(--gf-muted); }
.gf-export-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gf-export-btn {
  height: 44px; border-radius: 12px; border: 1px solid var(--gf-line);
  background: var(--gf-surface-2); color: var(--gf-primary); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .12s ease, background .15s ease;
}
.gf-export-btn:active { transform: scale(.97); }
.gf-export-btn ion-icon { font-size: 18px; }
.gf-export-btn.gf-export-pdf { background: var(--gf-navy-gradient); color: #fff; border: 0; }
.gf-export-btn.gf-export-pdf:hover, .gf-export-btn.gf-export-pdf:focus { color: #fff; }

/* Paginação */
.gf-paginacao { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 16px; }
.gf-pag-btn, .gf-pag-num {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gf-surface); border: 1px solid var(--gf-line);
  color: var(--gf-primary); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.gf-pag-btn ion-icon { font-size: 18px; }
.gf-pag-num.ativo { background: var(--gf-navy-900); border-color: var(--gf-navy-900); color: #fff; }
.gf-pag-btn.desativado { opacity: .4; pointer-events: none; }
.gf-pag-info { text-align: center; font-size: 11px; color: var(--gf-muted); margin: 8px 0 0; }

/* Controle deslizante duplo (parcelas) */
.gf-range { padding: 2px 4px 0; }
.gf-range-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.gf-range-head .label {
  color: var(--gf-muted); font-weight: 600; font-size: 11px;
  letter-spacing: .05em; text-transform: uppercase;
}
.gf-range-value {
  background: var(--gf-navy-900); color: var(--gf-gold-300);
  border-radius: 999px; padding: 3px 12px;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.gf-range-track {
  position: relative; height: 28px;
}
.gf-range-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 6px; margin-top: -3px; border-radius: 3px;
  background: var(--gf-navy-100);
}
.gf-range-fill {
  position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px;
  background: var(--gf-gold-gradient);
  pointer-events: none;
}
.gf-range-track input[type=range] {
  -webkit-appearance: none; appearance: none;
  position: absolute; left: 0; top: 0; width: 100%; height: 28px; margin: 0;
  background: transparent; pointer-events: none; outline: 0;
}
.gf-range-track input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 28px; }
.gf-range-track input[type=range]::-moz-range-track { background: transparent; height: 28px; }
.gf-range-track input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  pointer-events: auto;
  width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gf-navy-800);
  box-shadow: 0 2px 8px rgba(14, 36, 58, .35);
  cursor: pointer;
}
.gf-range-track input[type=range]::-moz-range-thumb {
  pointer-events: auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gf-navy-800);
  box-shadow: 0 2px 8px rgba(14, 36, 58, .35);
  cursor: pointer;
}
.gf-range-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--gf-gold-500); outline-offset: 2px; }
.gf-range-track input[type=range][data-range-min] { z-index: 3; }
.gf-range-track input[type=range][data-range-max] { z-index: 2; }
.gf-range-scale {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--gf-muted); font-weight: 600; margin-top: 2px;
}

.nav-tabs.capsuled {
  background: var(--gf-navy-100);
  border-radius: 14px;
  padding: 4px;
}
.nav-tabs.capsuled .nav-link {
  color: var(--gf-navy-600);
  border-radius: 11px;
  font-weight: 600;
  font-size: 13px;
  height: 40px;
}
.nav-tabs.capsuled .nav-link.active {
  background: var(--gf-surface);
  color: var(--gf-heading);
  box-shadow: 0 2px 8px -2px rgba(14, 36, 58, .2);
}

.fixed-bar { background: transparent; padding-bottom: calc(env(safe-area-inset-bottom) + 68px); min-height: 0; }

/* --------------------------------------------------------------------------
   Modais / dialogs
   -------------------------------------------------------------------------- */
.dialogbox .modal-content { border-radius: var(--gf-radius-lg); font-family: var(--gf-font); }
.dialogbox .modal-title { color: var(--gf-heading); font-weight: 600; }
.dialogbox .modal-icon { color: var(--gf-primary); }
.dialogbox .btn-inline .btn { font-weight: 600; }

/* --------------------------------------------------------------------------
   Login (cliente/index.php)
   -------------------------------------------------------------------------- */
.gf-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--gf-navy-gradient);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.gf-login::before {
  content: "";
  position: absolute;
  right: -90px; top: -40px;
  width: 340px; height: 380px;
  background: url("../img/brand/symbol-outline.svg") no-repeat center / contain;
  opacity: .25;
  z-index: -1;
}
.gf-login-brand {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 48px) 24px 40px;
  text-align: center;
  color: #fff;
}
.gf-login-brand img { width: min(240px, 68vw); height: auto; }
.gf-login-brand p { margin: 18px 0 0; font-size: 13px; color: rgba(255, 255, 255, .62); max-width: 280px; line-height: 1.5; }

.gf-login-sheet {
  background: var(--gf-surface);
  border-radius: 28px 28px 0 0;
  padding: 26px 22px calc(env(safe-area-inset-bottom) + 28px);
  box-shadow: 0 -20px 40px -24px rgba(0, 0, 0, .5);
}
.gf-login-sheet h1 { font-size: 20px; font-weight: 700; margin: 0 0 2px; }
.gf-login-sheet .gf-lead { font-size: 13px; color: var(--gf-muted); margin: 0 0 18px; }
.gf-login-sheet .gf-msg {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.gf-field { margin-bottom: 14px; }
.gf-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gf-muted);
  margin-bottom: 6px;
}
.gf-input {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--gf-line);
  border-radius: 14px;
  background: var(--gf-surface-2);
  height: 52px;
  padding: 0 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.gf-input:focus-within { border-color: var(--gf-accent); box-shadow: 0 0 0 3px rgba(193, 125, 41, .15); background: var(--gf-surface); }
.gf-input ion-icon { font-size: 20px; color: var(--gf-navy-400); margin-right: 10px; flex: 0 0 auto; }
.gf-input input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: 0;
  font-family: var(--gf-font);
  font-size: 15px;
  color: var(--gf-heading);
  height: 100%;
}
.gf-input input::placeholder { color: var(--gf-muted); }
.gf-input .gf-toggle {
  border: 0; background: transparent; padding: 4px; margin-right: -4px;
  color: var(--gf-navy-400); display: inline-flex; font-size: 20px; cursor: pointer;
}
.gf-input .gf-toggle ion-icon { margin: 0; }
.gf-login-sheet .btn-lg { width: 100%; margin-top: 6px; }
.gf-login-foot { text-align: center; font-size: 11px; color: var(--gf-muted); margin-top: 18px; }

/* Entrada suave: única animação de página */
@keyframes gf-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.gf-balance-card, .gf-login-sheet { animation: gf-rise .45s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .gf-balance-card, .gf-login-sheet { animation: none; }
  .btn, .transactions .item, .gf-actions .item { transition: none; }
}

/* --------------------------------------------------------------------------
   Linha de navegação secundária (home → máquinas)
   -------------------------------------------------------------------------- */
.gf-row-link {
  display: flex; align-items: center; gap: 12px;
  background: var(--gf-surface); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow);
  padding: 12px 14px; color: var(--gf-heading);
}
.gf-row-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  background: var(--gf-navy-50); color: var(--gf-primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.gf-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gf-row-text strong { font-size: 14px; font-weight: 600; }
.gf-row-text small { font-size: 12px; color: var(--gf-muted); }
.gf-row-chevron { color: var(--gf-navy-300); font-size: 18px; }

/* --------------------------------------------------------------------------
   Links de pagamento
   -------------------------------------------------------------------------- */
.gf-datas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gf-datas > div { min-width: 0; }
.gf-datas label { margin-top: 0 !important; }
.gf-datas .form-control { width: 100%; min-width: 0; padding: 0 10px; font-size: 14px; }
.gf-datas .btn { grid-column: 1 / -1; height: 44px; }
.gf-legenda { font-size: 11px; color: var(--gf-muted); display: inline-flex; align-items: center; gap: 4px; }
.gf-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.gf-dot.pago { background: var(--gf-success); }
.gf-dot.pendente { background: var(--gf-warning); }

.gf-links { display: flex; flex-direction: column; gap: 10px; }
.gf-link-item {
  background: var(--gf-surface); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow);
  padding: 14px 16px 12px; border-left: 4px solid var(--gf-navy-200);
}
.gf-link-item.status-pago { border-left-color: var(--gf-success); }
.gf-link-item.status-pendente { border-left-color: var(--gf-warning); }
.gf-link-item.status-analise { border-left-color: var(--gf-navy-400); }
.gf-link-item.status-expirado, .gf-link-item.status-falha { border-left-color: var(--gf-line); opacity: .8; }
.gf-link-main { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.gf-link-info { min-width: 0; flex: 1 1 auto; }
.gf-link-info strong { display: block; font-size: 14px; font-weight: 600; color: var(--gf-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-link-info p { margin: 2px 0 0; font-size: 12px; color: var(--gf-muted); }
.gf-link-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.gf-link-meta span { display: inline-flex; align-items: center; gap: 3px; }
.gf-link-meta ion-icon { font-size: 13px; }
.gf-link-right { text-align: right; flex: 0 0 auto; }
.gf-link-right .price { font-size: 15px; font-weight: 700; color: var(--gf-heading); font-variant-numeric: tabular-nums; }
.gf-link-liquido { font-size: 11px; color: var(--gf-muted); margin-top: 2px; }
.gf-link-liquido strong { color: var(--gf-success); font-weight: 700; }
.gf-status {
  display: inline-block; margin-top: 4px; border-radius: 999px; padding: 2px 9px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--gf-navy-50); color: var(--gf-navy-600);
}
.gf-status.pago { background: #e6f5ec; color: var(--gf-success); }
.gf-status.pendente { background: #fff4e0; color: var(--gf-warning); }
.gf-status.expirado, .gf-status.falha { background: #f1f3f6; color: var(--gf-muted); }
.gf-link-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--gf-line); }
.gf-link-btn {
  flex: 1 1 0; height: 38px; border-radius: 10px; border: 1px solid var(--gf-line);
  background: var(--gf-surface-2); color: var(--gf-primary); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}
.gf-link-btn:active { transform: scale(.97); }
.gf-link-btn ion-icon { font-size: 16px; }
.gf-link-btn.gf-link-wa { color: #fff; background: #25d366; border-color: #25d366; }
.gf-link-btn.copiado { background: #e6f5ec; color: var(--gf-success); border-color: transparent; }

/* Folha inferior (bottom sheet) */
.gf-sheet { position: fixed; inset: 0; z-index: 1050; }
.gf-sheet[hidden] { display: none; }
.gf-sheet-backdrop { position: absolute; inset: 0; background: rgba(7, 26, 48, .55); backdrop-filter: blur(2px); animation: gf-fade .2s ease both; }
.gf-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92vh; max-height: 92dvh;
  background: var(--gf-surface); border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column;
  box-shadow: 0 -20px 40px -24px rgba(0, 0, 0, .5);
  animation: gf-slide-up .3s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes gf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gf-slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.gf-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--gf-navy-100); margin: 10px auto 0; flex: 0 0 auto; }
.gf-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px 6px; flex: 0 0 auto; }
.gf-sheet-head h2 { font-size: 17px; font-weight: 700; margin: 0; }
.gf-sheet-close { border: 0; background: var(--gf-navy-50); color: var(--gf-primary); width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.gf-sheet-body { padding: 8px 20px calc(env(safe-area-inset-bottom) + 24px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.gf-sheet-body[hidden] { display: none; }
.gf-sheet .gf-field label { display: flex; justify-content: space-between; align-items: baseline; }
.gf-opcional { font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--gf-navy-300); }
.gf-input-valor .gf-prefixo { color: var(--gf-accent); font-weight: 700; font-size: 18px; margin-right: 10px; }
.gf-input-valor input { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gf-input.invalido { border-color: var(--gf-danger); box-shadow: 0 0 0 3px rgba(214, 69, 69, .12); }
.gf-erro { display: block; color: var(--gf-danger); font-size: 11px; font-weight: 600; margin-top: 4px; min-height: 0; }
.gf-erro:empty { display: none; }
.gf-fieldset { border: 1px solid var(--gf-line); border-radius: 16px; padding: 12px 14px 4px; margin: 0 0 14px; }
.gf-fieldset legend { float: none; width: auto; padding: 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gf-muted); }
.gf-fieldset .gf-field:last-child { margin-bottom: 8px; }

.gf-switch { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; margin: 0; }
.gf-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.gf-switch-track { width: 46px; height: 26px; border-radius: 13px; background: var(--gf-navy-100); position: relative; flex: 0 0 auto; transition: background .2s ease; }
.gf-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.gf-switch input:checked + .gf-switch-track { background: var(--gf-navy-800); }
.gf-switch input:checked + .gf-switch-track::after { transform: translateX(20px); background: var(--gf-gold-300); }
.gf-switch input:focus-visible + .gf-switch-track { outline: 2px solid var(--gf-gold-500); outline-offset: 2px; }
.gf-switch-text { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--gf-heading); }
.gf-switch-text ion-icon { font-size: 18px; color: var(--gf-navy-400); }

.gf-parcelas { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 10px 58px; }
.gf-parcelas[hidden] { display: none; }
.gf-parcelas label { font-size: 12px; color: var(--gf-muted); font-weight: 600; margin: 0; }
.gf-stepper { display: inline-flex; align-items: center; gap: 4px; }
.gf-step { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--gf-line); background: var(--gf-surface); color: var(--gf-primary); font-size: 18px; font-weight: 700; }
.gf-stepper input { width: 48px; height: 34px; text-align: center; border: 1px solid var(--gf-line); border-radius: 10px; font-weight: 700; color: var(--gf-heading); font-family: var(--gf-font); -moz-appearance: textfield; }
.gf-stepper input::-webkit-outer-spin-button, .gf-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gf-stepper-sufixo { font-weight: 700; color: var(--gf-muted); }

.gf-alert { border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; gap: 8px; align-items: flex-start; }
.gf-alert[hidden] { display: none; }
.gf-alert-erro { background: #fbe9e9; color: var(--gf-danger); }
.gf-hint { font-size: 11px; color: var(--gf-muted); text-align: center; margin: 12px 0 0; }
.btn[disabled] { opacity: .65; }

.gf-sucesso-icone { text-align: center; font-size: 56px; color: var(--gf-success); line-height: 1; margin-top: 4px; }
#gf-link-sucesso h3 { text-align: center; font-size: 20px; font-weight: 700; margin: 8px 0 2px; }
.gf-sucesso-valor { text-align: center; color: var(--gf-muted); font-size: 13px; margin: 0 0 14px; }
.gf-link-box input {
  width: 100%; height: 48px; border: 1px dashed var(--gf-navy-300); border-radius: 12px; background: var(--gf-navy-50);
  padding: 0 14px; font-family: var(--gf-font); font-size: 13px; font-weight: 600; color: var(--gf-heading); text-overflow: ellipsis;
}
.gf-sucesso-acoes { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.gf-sucesso-acoes .btn { width: 100%; }
body.gf-sheet-open { overflow: hidden; }

/* Rodapé de versão */
.appFooter { color: var(--gf-muted); font-size: 11px; background: transparent; border: 0; }
.appFooter .gf-foot-logo { height: 18px; opacity: .55; display: block; margin: 0 auto 6px; }

/* Simulador: cabeçalho de origem (maquineta / link de pagamento) */
.gf-sim-origem {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--gf-navy-900);
  color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.gf-sim-origem ion-icon { font-size: 18px; color: var(--gf-gold-300); }
.gf-sim-origem:first-child { margin-top: 4px; }
.gf-empty-compacto { padding: 14px; font-size: 12px; }
