/* ===== Tema Enerzee Hub (enerzeehub.tech) aplicado ao superapp =====
   Verde profundo + lima, Space Grotesk nos títulos, Inter no texto,
   cartões planos com borda lima translúcida. Escuro é o padrão (como no Hub).
   Só sobrescreve tokens de css/tokens.css — o app.css original segue intacto. */

:root {
  --ez-lime: #c6f135;
  --ez-lime-soft: #d7ff5c;
  --ez-lime-text: #3f5510;
  --ez-forest-deep: #0c1a10;
  --ez-forest: #4d7c0f;
  --ez-brl: #4d7c0f;
  --ez-ok-ink: #3f5510;
  --ez-faixa-verde: #5f7d14;

  --ez-bg: #f4f7ef;
  --ez-bg-glow: radial-gradient(120% 80% at 50% -10%, rgba(198, 241, 53, 0.10), transparent 55%), #f4f7ef;
  --ez-header-bg: rgba(255, 255, 255, 0.86);
  --ez-tabbar-bg: rgba(255, 255, 255, 0.96);
  --ez-login-bg: #060d08;
  --ez-device-screen-bg: #060d08;
  --ez-surface: #ffffff;
  --ez-surface-solid: #ffffff;
  --ez-surface-secondary: #eef3e6;
  --ez-elevated-bg: #ffffff;
  --ez-elevated-bg-hover: #f8fbf3;
  --ez-soft-panel: #eef3e6;
  --ez-soft-panel-strong: #e4ecd7;
  --ez-mint: rgba(143, 174, 45, 0.12);
  --ez-mint-strong: rgba(143, 174, 45, 0.22);
  --ez-glass-border: rgba(40, 70, 20, 0.14);
  --ez-separator: rgba(40, 70, 20, 0.12);
  --ez-separator-strong: rgba(40, 70, 20, 0.24);

  --ez-ink: #0c1a10;
  --ez-ink-secondary: #5b6f5e;
  --ez-ink-tertiary: #7f9282;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", Inter, sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-card: 0 1px 2px 0 rgb(12 26 16 / 0.05);
  --shadow-float: 0 12px 32px rgb(12 26 16 / 0.14);
  --shadow-glow: 0 0 0 1px rgba(198, 241, 53, 0.28), 0 8px 24px rgba(198, 241, 53, 0.14);
}

html.theme-dark {
  --ez-lime: #c6f135;
  --ez-lime-text: #c6f135;
  --ez-forest-deep: #f4f7ef;
  --ez-forest: #c6f135;
  --ez-leaf: #c6f135;
  --ez-brl: #c6f135;
  --ez-ok-ink: #c6f135;
  --ez-faixa-verde: #c6f135;
  --ez-on-accent-dark: #08150a;

  --ez-bg: #060d08;
  --ez-bg-glow: radial-gradient(100% 70% at 50% -12%, rgba(198, 241, 53, 0.08), transparent 56%), #060d08;
  --ez-dark-glow-a: rgba(198, 241, 53, 0.07);
  --ez-dark-glow-b: rgba(198, 241, 53, 0.03);
  --ez-dark-grad-base: linear-gradient(145deg, #0f1d13 0%, #13251a 100%);
  --ez-body-bg: #000000;
  --ez-device-screen-bg: #060d08;
  --ez-header-bg: rgba(8, 18, 9, 0.88);
  --ez-tabbar-bg: rgba(8, 18, 9, 0.96);
  --ez-login-bg: #060d08;
  --ez-glass-border: rgba(196, 255, 92, 0.14);
  --ez-elevated-bg: #0f1d13;
  --ez-elevated-bg-hover: #13251a;
  --ez-soft-panel: #0b170e;
  --ez-soft-panel-strong: #10200f;
  --ez-surface: #0f1d13;
  --ez-surface-solid: #0f1d13;
  --ez-surface-secondary: #0b170e;
  --ez-separator: rgba(196, 255, 92, 0.12);
  --ez-separator-strong: rgba(196, 255, 92, 0.26);
  --ez-mint: rgba(198, 241, 53, 0.10);
  --ez-mint-strong: rgba(198, 241, 53, 0.18);
  --ez-ok-bg: rgba(198, 241, 53, 0.10);
  --ez-ok-border: rgba(198, 241, 53, 0.28);
  --ez-faixa-verde-soft: rgba(198, 241, 53, 0.10);

  --ez-ink: #f4f7ef;
  --ez-ink-secondary: #9fb3a0;
  --ez-ink-tertiary: #6f8471;
  --ez-ink-on-brand: #08150a;

  --shadow-card: none;
  --shadow-float: 0 18px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(198, 241, 53, 0.22), 0 10px 30px rgba(198, 241, 53, 0.10);
}

/* Tipografia do Hub: títulos em Space Grotesk */
.h1, .h2, .h3, h1, h2, h3,
.app-header__title, .proposal-create__hero h1, .cadastro-title h1 {
  font-family: var(--font-head);
  letter-spacing: -0.01em;
}

/* ===================================================================
   Camada de componentes no padrão do Enerzee Hub
   =================================================================== */
:root {
  --hub-lime-dim: #5f7d14;
  --hub-border: rgba(40, 70, 20, 0.14);
  --hub-border-strong: rgba(40, 70, 20, 0.28);
  --hub-accent: rgba(143, 174, 45, 0.12);
  --hub-ink: #4d7c0f;
  --hub-tile: radial-gradient(circle at 30% 20%, #1a4024, #060d08 78%);
  --sidebar-w: 16.5rem;
}
html.theme-dark {
  --hub-lime-dim: #8fae2d;
  --hub-border: rgba(196, 255, 92, 0.14);
  --hub-border-strong: rgba(196, 255, 92, 0.28);
  --hub-accent: rgba(198, 241, 53, 0.10);
  --hub-ink: #c6f135;
}

body { font-size: 14.5px; }
::selection { background: #c6f135; color: #08150a; }
:focus-visible { outline: 2px solid var(--hub-ink); outline-offset: 2px; }
#app, .app-main { background: var(--ez-bg-glow); }

/* Títulos e rótulos ("kicker" do Hub) */
.h1 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; font-size: clamp(1.625rem, 3vw, 2.25rem); }
.h2, .app-header__title, .sidebar-brand__name { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.015em; }
.eyebrow { font-weight: 600; letter-spacing: 0.12em; color: var(--hub-lime-dim); }
.muted { color: var(--ez-ink-secondary); }
.money-lg, .money { font-family: var(--font-head); letter-spacing: -0.015em; }

/* Cartões planos com borda lima translúcida */
.card, .home-shortcut, .icon-btn, .filter-chip, .list--tiles .list-row {
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.card {
  background: var(--ez-surface-solid);
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease;
}
.card:hover { border-color: var(--hub-border-strong); }
html.theme-dark .card--ecash { border-color: color-mix(in srgb, var(--ez-ecash) 30%, transparent); }

/* Botões em pílula; primário lima chapado em Space Grotesk */
.btn { border-radius: 999px; font-weight: 600; transition: transform .12s ease, background .15s, border-color .15s, color .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn--primary, html.theme-dark .btn--primary, html.theme-dark .battery-card .btn--primary, .btn--lime, html.theme-dark .btn--lime {
  background: #c6f135; color: #08150a; box-shadow: none;
  font-family: var(--font-head); font-weight: 700;
}
.btn--primary:hover:not(:disabled), .btn--lime:hover:not(:disabled) { background: #d7ff5c; filter: none; }
.btn--ghost, .btn--secondary { border: 1px solid var(--hub-border-strong); background: transparent; }
.btn--ghost:hover:not(:disabled), .btn--secondary:hover:not(:disabled) { border-color: var(--hub-ink); color: var(--hub-ink); }

/* Cartão de saldo da Carteira: painel escuro com brilho lima (como o hero do Hub) */
.card--primary, html.theme-dark .card--primary {
  background: radial-gradient(120% 90% at 100% 0%, rgba(198, 241, 53, 0.16), transparent 60%), linear-gradient(160deg, #10200f, #060d08);
  color: #f4f7ef;
  border: 1px solid rgba(198, 241, 53, 0.28);
  box-shadow: none;
}
.card--primary .eyebrow { color: #8fae2d; }
.card--primary .money-lg { color: #c6f135; font-family: var(--font-head); }
.card--primary .btn--block, html.theme-dark .card--primary .btn--block {
  background: #c6f135; color: #08150a; border: 0; font-family: var(--font-head); font-weight: 700;
}
.card--primary .btn--block:hover:not(:disabled) { background: #d7ff5c; }

/* Campos */
.field input, .field select, .field textarea,
html.theme-dark .field input, html.theme-dark .field select, html.theme-dark .field textarea {
  border-radius: 10px; border-color: var(--hub-border-strong);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: transparent; box-shadow: 0 0 0 2px var(--hub-ink); }

/* Chips de filtro */
.filter-chip { border-color: var(--hub-border); background: transparent; }
.filter-chip.is-active, html.theme-dark .filter-chip.is-active {
  background: var(--hub-accent); border-color: var(--hub-border-strong); color: var(--hub-ink); font-weight: 600;
}

/* Pílulas */
.pill { border-radius: 999px; }

/* Header e barra inferior: vidro sobre o fundo, como o topbar do Hub */
.app-header, html.theme-dark .app-header {
  background: color-mix(in srgb, var(--ez-bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hub-border);
}
.tabbar, html.theme-dark .tabbar {
  background: color-mix(in srgb, var(--ez-bg) 92%, transparent);
  border-top: 1px solid var(--hub-border); box-shadow: none;
}
.tabbar__item.is-active, html.theme-dark .tabbar__item.is-active {
  background: var(--hub-accent); color: var(--hub-ink); border-color: transparent;
}
.tabbar__item--create, html.theme-dark .tabbar__item--create {
  background: #c6f135; color: #08150a; box-shadow: none; font-family: var(--font-head); font-weight: 700;
}
.icon-btn {
  background: transparent; border: 1px solid var(--hub-border); box-shadow: none; border-radius: 10px;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--hub-accent); border-color: var(--hub-border-strong); color: var(--hub-ink); }

/* Marca: ladrilho com o símbolo lima, igual ao brand-mark do Hub */
.app-header__mark {
  background: var(--hub-accent); border: 1px solid var(--hub-border-strong);
  box-shadow: none; border-radius: 10px; padding: 6px;
}
.app-header__mark--mobile { width: 36px; height: 36px; padding: 5px; }
.sidebar-brand__text { display: flex; flex-direction: column; min-width: 0; }
.sidebar-brand__tag { font-size: 11px; color: var(--ez-ink-secondary); white-space: nowrap; }

/* Atalhos da home: ícones em ladrilho escuro com brilho (launcher do Hub) */
.home-shortcut { background: var(--ez-surface-solid); border: 1px solid var(--hub-border); box-shadow: none; }
.home-shortcut:hover, .home-shortcut:focus-visible { border-color: var(--hub-border-strong); background: var(--ez-surface-solid); }
.home-shortcut__icon {
  color: #c6f135; background: var(--hub-tile);
  border: 1px solid rgba(198, 241, 53, 0.14); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Desktop: sidebar no estilo do Hub (16rem, itens compactos) */
@media (min-width: 900px) {
  html:not(.is-framed) .tabbar { background: var(--ez-surface-solid); border-right: 1px solid var(--hub-border); align-items: stretch; padding: .75rem .625rem 1.5rem; }
  html:not(.is-framed) .tabbar__group { text-align: left; padding: .875rem .625rem .375rem; }
  html:not(.is-framed) .tabbar__item { align-self: stretch; justify-content: flex-start; padding: .5rem .625rem; }
  html.theme-dark:not(.is-framed) .tabbar { background: #081209; }
  html:not(.is-framed) .sidebar-brand { gap: .75rem; padding: .25rem .5rem 1rem; margin-bottom: .25rem; border-bottom: 1px solid var(--hub-border); }
  html:not(.is-framed) .sidebar-brand__name { font-size: 1rem; color: var(--ez-ink); }
  html:not(.is-framed) .tabbar__group { font-size: 11px; }
  html:not(.is-framed) .tabbar__item {
    width: auto; min-height: 38px; font-size: .9375rem; border-radius: .5rem;
    color: var(--ez-ink-secondary);
  }
  html:not(.is-framed) .tabbar__item svg { width: 20px; height: 20px; opacity: .85; }
  html:not(.is-framed) .tabbar__item:hover { background: var(--hub-accent); color: var(--hub-ink); }
  html:not(.is-framed) .tabbar__item.is-active { background: var(--hub-accent); color: var(--hub-ink); font-weight: 600; }
  html:not(.is-framed) .app-header { background: color-mix(in srgb, var(--ez-bg) 86%, transparent); }
}

/* ===== Carteira (melhorias) ===== */
.carteira-aviso { margin-top: .625rem; font-size: .8125rem; color: #c9d6c3; opacity: .9; }
.carteira-bonus { width: 100%; text-align: left; align-items: stretch; padding: var(--space-4); cursor: pointer; color: inherit; }
.carteira-bonus__topo { width: 100%; }
.carteira-bonus__link { font-size: .8125rem; font-weight: 600; color: var(--hub-ink); }
.carteira-bonus__linhas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin-top: .375rem; font-size: .8125rem; color: var(--ez-ink-secondary); }
.carteira-bonus__linhas strong { color: var(--ez-ink); font-weight: 600; }
.saques-card { align-items: stretch; padding: var(--space-4); }
.saques-periodo { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.saques-periodo .field { margin: 0; }
.list-row[hidden] { display: none !important; }

/* ===== Relatório de bônus ===== */
.bonus-abas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.bonus-aba { display: flex; flex-direction: column; align-items: flex-start; gap: .125rem; padding: .625rem .75rem; border-radius: 12px; border: 1px solid var(--hub-border); background: var(--ez-surface-solid); text-align: left; color: var(--ez-ink-secondary); }
.bonus-aba__label { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.bonus-aba__valor { font-family: var(--font-head); font-weight: 600; font-size: .9375rem; color: var(--ez-ink); white-space: nowrap; }
.bonus-aba.is-active { border-color: var(--hub-ink); background: var(--hub-accent); color: var(--hub-ink); }
.bonus-total { align-items: stretch; padding: var(--space-4); }
.bonus-produto { width: 100%; text-align: left; color: inherit; cursor: pointer; }
.bonus-produto:hover { background: var(--hub-accent); }
.bonus-produto__barra { height: 6px; border-radius: 999px; background: var(--ez-surface-secondary); margin-top: .5rem; overflow: hidden; }
.bonus-produto__barra span { display: block; height: 100%; border-radius: inherit; background: #c6f135; }
.bonus-produto__acao { margin-top: .375rem; font-size: .75rem; font-weight: 600; color: var(--hub-ink); }

/* ===== Rede: cadastrar + busca com linha de patrocínio ===== */
.rede-acoes { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 620px) { .rede-acoes { grid-template-columns: 1fr auto; } }
.rede-busca { display: flex; gap: .5rem; align-items: center; }
.rede-busca__input {
  flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--hub-border-strong); background: var(--ez-surface-solid); color: var(--ez-ink); font: inherit;
}
.rede-busca__input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px var(--hub-ink); }
.rede-busca .btn { min-height: 44px; }
.link-btn { color: var(--hub-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.busca-resultados { display: grid; gap: .5rem; margin-top: .5rem; }
.busca-resultado { width: 100%; align-items: stretch; text-align: left; padding: .875rem 1rem; color: inherit; cursor: pointer; }
.busca-resultado__topo { align-items: flex-start; gap: .75rem; }
.busca-resultado__abrir { font-size: .75rem; font-weight: 600; color: var(--hub-ink); white-space: nowrap; }
.patrocinio { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .375rem; font-size: .75rem; color: var(--ez-ink-secondary); }
.patrocinio__no { padding: .125rem .5rem; border-radius: 999px; background: var(--ez-surface-secondary); white-space: nowrap; }
.patrocinio__no small { font-family: var(--font-mono); font-size: .6875rem; opacity: .8; }
.patrocinio__no--voce { background: var(--hub-accent); color: var(--hub-ink); font-weight: 600; }
.patrocinio__no--alvo { background: var(--hub-accent); color: var(--ez-ink); border: 1px solid var(--hub-border-strong); font-weight: 600; }
.patrocinio__sep { opacity: .6; }

/* ===== Bateria: histórico mensal ===== */
.battery-card__historico { align-self: flex-start; margin-top: .75rem; font-size: .8125rem; font-weight: 600; color: var(--hub-ink); }
.bat-hist { align-items: stretch; padding: var(--space-4); }
.bat-hist__grafico { display: grid; grid-template-columns: repeat(6, 1fr); gap: .375rem; align-items: end; }
.bat-hist__mes { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .375rem .125rem; border-radius: 10px; border: 1px solid transparent; color: var(--ez-ink-secondary); }
.bat-hist__mes:hover { background: var(--hub-accent); }
.bat-hist__mes.is-active { border-color: var(--hub-border-strong); background: var(--hub-accent); color: var(--hub-ink); }
.bat-hist__valor { font-family: var(--font-head); font-size: .75rem; font-weight: 600; color: var(--ez-ink); }
.bat-hist__trilho { position: relative; width: 100%; max-width: 34px; height: 96px; border-radius: 8px; background: var(--ez-surface-secondary); overflow: hidden; display: flex; align-items: flex-end; }
.bat-hist__barra { display: block; width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #d7ff5c, #8fae2d); }
.bat-hist__mes:not(.is-active) .bat-hist__barra { opacity: .7; }
.bat-hist__rotulo { font-size: .6875rem; font-weight: 600; text-transform: capitalize; }

/* ===== Menu de baixo flutuante (como no Instagram) — mesmo do Enerzee Hub =====
   Cápsula de vidro fosco, solta das bordas e presa ao pé da tela; o item ativo ganha
   uma pílula. Só no celular (de 900px em diante o menu vira a barra lateral). */
@media (max-width: 899px) {
  html:not(.is-framed) {
    --nav-gap: max(12px, env(safe-area-inset-bottom, 0px));
    --nav-h: 64px;
  }
  html:not(.is-framed) .tabbar,
  html.theme-dark:not(.is-framed) .tabbar {
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: var(--nav-gap);
    width: auto; max-width: 30rem; margin: 0 auto;
    height: var(--nav-h); min-height: 0;
    padding: 5px; column-gap: 0; align-items: stretch;
    border: 1px solid color-mix(in srgb, #c6f135 18%, rgba(255, 255, 255, .10));
    border-radius: 999px;
    background: color-mix(in srgb, var(--ez-surface-solid) 12%, transparent);
    backdrop-filter: blur(6px) saturate(150%); -webkit-backdrop-filter: blur(6px) saturate(150%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .08);
  }
  html:not(.is-framed) .tabbar__item {
    min-height: 0; height: 100%; justify-content: center; gap: 2px; padding: 0 1px;
    border-radius: 999px; font-size: 10px; letter-spacing: -.01em;
    -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s;
  }
  html:not(.is-framed) .tabbar__item svg { width: 21px; height: 21px; }
  html:not(.is-framed) .tabbar__item:active { transform: scale(.96); }
  html:not(.is-framed) .tabbar__item.is-active,
  html.theme-dark:not(.is-framed) .tabbar__item.is-active {
    background: color-mix(in srgb, #c6f135 20%, transparent); color: var(--hub-ink); font-weight: 600;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #c6f135 38%, transparent);
  }
  /* "Proposta" no meio: pílula lima dentro da cápsula */
  html:not(.is-framed) .tabbar__item--create,
  html.theme-dark:not(.is-framed) .tabbar__item--create {
    min-height: 0; height: 100%; justify-content: center; border-radius: 999px;
    background: #c6f135; color: #08150a; box-shadow: 0 4px 14px rgba(198, 241, 53, .25);
  }
  html:not(.theme-dark):not(.is-framed) .tabbar {
    background: color-mix(in srgb, #eef8d6 82%, transparent);
    border-color: rgba(77, 124, 15, .22);
    box-shadow: 0 10px 30px rgba(20, 40, 20, .16), inset 0 1px 0 rgba(255, 255, 255, .8);
  }
  html:not(.theme-dark):not(.is-framed) .tabbar__item.is-active {
    background: color-mix(in srgb, #c6f135 45%, transparent); color: #2f4208; box-shadow: none;
  }
  /* o conteúdo e o que flutua acima do menu acompanham a cápsula */
  html:not(.is-framed) .app-main { padding-bottom: calc(var(--nav-h) + var(--nav-gap) + 2rem); }
  html:not(.is-framed) .install-bar { position: fixed; bottom: calc(var(--nav-h) + var(--nav-gap) + 12px); }
}
@media (prefers-reduced-transparency: reduce) {
  html:not(.is-framed) .tabbar { background: var(--ez-surface-solid) !important; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ===== Selo verde (informação de destaque: o que falta, pódio…) ===== */
.selo-verde {
  display: flex; align-items: center; gap: .625rem; padding: .5rem .875rem .5rem .5rem;
  border-radius: 999px; border: 1px solid rgba(198, 241, 53, .45);
  background: linear-gradient(135deg, rgba(198, 241, 53, .18), rgba(63, 174, 63, .10));
  color: var(--ez-ink); font-size: .8125rem; font-weight: 600; line-height: 1.35; text-align: left;
}
.selo-verde__icone { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #c6f135; color: #08150a; }
html:not(.theme-dark) .selo-verde { border-color: rgba(77, 124, 15, .35); background: linear-gradient(135deg, rgba(198, 241, 53, .35), rgba(143, 174, 45, .14)); color: #1f3307; }
.grad-card__falta.selo-verde { margin-top: .75rem; align-self: center; }

/* ===== Bateria em uso: cor realista (verde → âmbar → vermelho), brilho e células ===== */
.battery-gauge__fill,
html.theme-dark .battery-gauge__fill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .10) 42%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .18) 100%),
    var(--bat-cor, #34c759);
  box-shadow: 0 0 14px color-mix(in srgb, var(--bat-cor, #34c759) 45%, transparent), inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.battery-gauge__fill--alta { --bat-cor: #bfef2e; --bat-claro: #ecff9e; --bat-escuro: #7fa80f; }
.battery-gauge__fill--media { --bat-cor: #ffd60a; --bat-claro: #fff3a6; --bat-escuro: #b89400; }
.battery-gauge__fill--baixa { --bat-cor: #ff453a; --bat-claro: #ff9d96; --bat-escuro: #b3160d; animation: bat-pulsa 1.6s ease-in-out infinite; }
@keyframes bat-pulsa { 50% { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .battery-gauge__fill--baixa { animation: none; } }
/* divisões de célula na carcaça (fixas, não encolhem com a carga) */
.battery-gauge__shell::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1.5px), rgba(0, 0, 0, .28) calc(20% - 1.5px) 20%);
}
.battery-gauge__pct { z-index: 1; }
.battery-gauge__pct--fora { color: var(--ez-ink) !important; }
.battery-gauge__pct:not(.battery-gauge__pct--fora) { color: #0b1a0c; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }

/* Preenchimento encaixado na carcaça (folga uniforme até a borda) com volume 3D */
.battery-gauge__fill,
html.theme-dark .battery-gauge__fill {
  inset: 4px auto 4px 4px;
  max-width: calc(100% - 8px);
  border-radius: calc(var(--radius-lg) - 6px);
  background:
    linear-gradient(180deg,
      var(--bat-claro, #ecff9e) 0%,
      var(--bat-cor, #bfef2e) 38%,
      var(--bat-cor, #bfef2e) 60%,
      var(--bat-escuro, #7fa80f) 100%);
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, .55),
    inset 0 -3px 4px rgba(0, 0, 0, .22),
    inset -2px 0 3px rgba(0, 0, 0, .12),
    0 0 12px color-mix(in srgb, var(--bat-cor, #bfef2e) 40%, transparent);
}
/* reflexo de vidro na metade de cima */
.battery-gauge__fill::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 32%;
  border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.battery-gauge__shell::after { inset: 4px; border-radius: calc(var(--radius-lg) - 6px); }

/* Tema claro: ícones e rótulos do menu de baixo com mais contraste sobre o verde claro */
@media (max-width: 899px) {
  html:not(.theme-dark):not(.is-framed) .tabbar__item { color: #3a5222; }
}

/* ===== Menu "Mais" (três pontinhos) em grade de ícones, como o launcher do Hub ===== */
.mais-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.125rem .5rem; margin-top: .75rem; }
@media (min-width: 620px) { .mais-grade { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.mais-tile { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .25rem .125rem; border-radius: 1rem; color: var(--ez-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.mais-tile__icone {
  width: 4.5rem; height: 4.5rem; border-radius: 1.35rem; display: grid; place-items: center;
  color: #c6f135; background: var(--hub-tile); border: 1px solid rgba(198, 241, 53, .16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25); transition: transform .12s ease;
}
.mais-tile__icone svg { width: 1.95rem; height: 1.95rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mais-tile:hover .mais-tile__icone { transform: translateY(-2px); }
.mais-tile:active .mais-tile__icone { transform: scale(.94); }
.mais-tile:focus-visible { outline: 2px solid var(--hub-ink); outline-offset: 2px; }
.mais-tile__label { font-size: .875rem; font-weight: 500; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
html:not(.theme-dark) .mais-tile__icone { box-shadow: 0 6px 14px rgba(20, 40, 20, .18); }


/* ===== Minhas propostas (nova UX) ===== */
.mp-topo { display: flex; justify-content: space-between; align-items: flex-end; gap: .75rem; }
.mp-busca { position: relative; display: flex; gap: .5rem; align-items: center; }
.mp-busca__lupa { position: absolute; left: 14px; width: 18px; height: 18px; fill: none; stroke: var(--ez-ink-tertiary); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.mp-busca__input {
  flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px 10px 40px; border-radius: 999px; font: inherit;
  border: 1px solid var(--hub-border-strong); background: var(--ez-surface-solid); color: var(--ez-ink);
}
.mp-busca__input:focus { outline: none; border-color: transparent; box-shadow: 0 0 0 2px var(--hub-ink); }
.mp-busca .btn { min-height: 46px; }
.mp-filtros { display: grid; gap: .5rem; }
.mp-filtro { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); align-items: center; gap: .5rem; }
.mp-filtro__rotulo { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hub-lime-dim); }
.mp-filtro .chips-scroll { margin: 0; }
.mp-dica { margin: 0 0 0 4.75rem; font-size: .75rem; color: var(--ez-ink-tertiary); }
.mp-datas { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; align-items: end; margin-left: 4.75rem; }
.mp-datas[hidden] { display: none; }
.mp-datas .field { margin: 0; }
@media (max-width: 420px) {
  .mp-filtro { grid-template-columns: 1fr; gap: .25rem; }
  .mp-dica, .mp-datas { margin-left: 0; }
  .mp-datas { grid-template-columns: 1fr 1fr; }
  .mp-datas .btn { grid-column: span 2; }
}
.mp-ativos { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.mp-ativo {
  display: inline-flex; align-items: center; gap: .375rem; padding: .3rem .4rem .3rem .75rem; border-radius: 999px;
  background: var(--hub-accent); border: 1px solid var(--hub-border-strong); color: var(--ez-ink); font-size: .8125rem; font-weight: 600;
}
.mp-ativo span { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: rgba(0, 0, 0, .18); font-size: .875rem; line-height: 1; }
.mp-lista { display: grid; gap: .625rem; }
@media (min-width: 900px) { .mp-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mp-card {
  position: relative; display: flex; overflow: hidden; border-radius: 14px; color: inherit; text-decoration: none;
  background: var(--ez-surface-solid); border: 1px solid var(--hub-border); transition: border-color .15s, transform .12s;
}
.mp-card--link:hover { border-color: var(--hub-border-strong); }
.mp-card--link:active { transform: scale(.99); }
.mp-card__barra { flex: none; width: 4px; background: var(--cor); }
.mp-card__corpo { flex: 1; min-width: 0; padding: .875rem 1rem; display: grid; gap: .25rem; }
.mp-card__topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.mp-card__topo .money { font-family: var(--font-head); font-size: 1rem; white-space: nowrap; }
.mp-card__nome { margin: .25rem 0 0; font-family: var(--font-head); font-size: 1.0625rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.mp-card__meta { font-size: .8125rem; color: var(--ez-ink-secondary); }
.mp-card__rodape { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .25rem; font-size: .75rem; color: var(--ez-ink-tertiary); }
.mp-card__abrir { font-weight: 600; color: var(--hub-ink); white-space: nowrap; }
.mp-paginas { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.mp-paginas__atual { font-size: .8125rem; color: var(--ez-ink-secondary); }

/* Cartões consolidadores de Minhas propostas */
.mp-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 900px) { .mp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mp-kpi {
  position: relative; display: flex; flex-direction: column; gap: .125rem; padding: .875rem 1rem; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--hub-border); background: var(--ez-surface-solid);
}
.mp-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kpi-cor); }
.mp-kpi--total { --kpi-cor: #8fae2d; background: radial-gradient(120% 90% at 100% 0%, rgba(198, 241, 53, .12), transparent 60%), var(--ez-surface-solid); }
.mp-kpi--andamento { --kpi-cor: #ffd60a; }
.mp-kpi--ganhas { --kpi-cor: #c6f135; }
.mp-kpi--perdidas { --kpi-cor: #ff6b5e; }
.mp-kpi__titulo { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ez-ink-secondary); }
.mp-kpi__qtd { font-family: var(--font-head); font-size: 1.75rem; line-height: 1.1; }
.mp-kpi__valor { font-family: var(--font-head); font-weight: 600; font-size: .9375rem; color: var(--hub-ink); }
.mp-kpi__extra { font-size: .6875rem; color: var(--ez-ink-tertiary); }
.mp-kpi__extra b { color: var(--ez-ink); }
.mp-funil { align-items: stretch; padding: var(--space-4); }
.mp-funil__lista { display: grid; gap: .125rem; }
.mp-status {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) 70px 2rem auto; align-items: center; gap: .5rem;
  width: 100%; padding: .5rem .375rem; border-radius: 10px; text-align: left; color: inherit; font-size: .8125rem;
}
.mp-status:hover, .mp-status.is-active { background: var(--hub-accent); }
.mp-status__ponto { width: 10px; height: 10px; border-radius: 50%; }
.mp-status__nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-status__barra { height: 6px; border-radius: 999px; background: var(--ez-surface-secondary); overflow: hidden; }
.mp-status__barra span { display: block; height: 100%; border-radius: inherit; }
.mp-status__qtd { text-align: right; font-weight: 700; }
.mp-status__valor { text-align: right; color: var(--ez-ink-secondary); font-size: .75rem; white-space: nowrap; }
@media (max-width: 420px) { .mp-status { grid-template-columns: 10px minmax(0, 1fr) 2rem auto; } .mp-status__barra { display: none; } }

/* ===== Painel de Vendas (nova UX) ===== */
.vd-mes { display: flex; align-items: center; gap: .375rem; margin-top: .125rem; }
.vd-mes .h1 { margin: 0; }
.vd-mes__seta { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--hub-border-strong); color: var(--hub-ink); font-size: 1.125rem; line-height: 1; }
.vd-mes__seta:disabled { opacity: .3; }
.mp-kpi--link { text-align: left; color: inherit; cursor: pointer; transition: border-color .15s, transform .12s; }
.mp-kpi--link:hover { border-color: var(--hub-border-strong); }
.mp-kpi--link:active { transform: scale(.98); }
.vd-bonus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.vd-bonus__valor { font-size: 1.0625rem !important; color: var(--ez-ink) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .vd-bonus { grid-template-columns: 1fr; } }
.vd-total { text-align: right; }
.vd-total span { display: block; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ez-ink-secondary); }
.vd-total strong { font-family: var(--font-head); font-size: 1.25rem; color: var(--hub-ink); }
.vd-produtos { display: grid; gap: .25rem; }
.vd-produto { display: grid; gap: .375rem; padding: .625rem .5rem; border-radius: 10px; color: inherit; text-decoration: none; }
.vd-produto:hover { background: var(--hub-accent); }
.vd-produto__topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.vd-produto__nome { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.vd-produto__barra { height: 6px; border-radius: 999px; background: var(--ez-surface-secondary); overflow: hidden; }
.vd-produto__barra span { display: block; height: 100%; border-radius: inherit; }
.vd-produto__rodape { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ez-ink-tertiary); }
.vd-produto__abrir { font-weight: 600; color: var(--hub-ink); }
.vd-mes .h1 { font-size: clamp(1.375rem, 5.5vw, 2rem); white-space: nowrap; }
.vd-nova { flex: none; align-self: center; }

/* =====================================================================
   Tema escuro mais leve (opção B · "Escuro suave" de opcoes-layout.html)
   Fundo grafite-esverdeado com brilho suave, cartões de vidro translúcido,
   bordas quase invisíveis e cantos mais arredondados. Só vale no escuro.
   ===================================================================== */
html.theme-dark {
  --ez-bg: #0d120e;
  --ez-bg-glow: radial-gradient(120% 55% at 50% -8%, #1b2a1d 0%, rgba(27, 42, 29, 0) 60%), #0d120e;
  --ez-surface-solid: #141b16;
  --ez-surface: #141b16;
  --ez-elevated-bg: #161e18;
  --ez-surface-secondary: rgba(255, 255, 255, .06);
  --ez-soft-panel: rgba(255, 255, 255, .04);
  --ez-ink-secondary: #a3b2a5;
  --ez-ink-tertiary: #7d8c7f;
  --hub-border: rgba(255, 255, 255, .07);
  --hub-border-strong: rgba(198, 241, 53, .26);
  --hub-accent: rgba(198, 241, 53, .10);
  --hub-lime-dim: #a3c45a;
  --ez-separator: rgba(255, 255, 255, .06);
  --ez-separator-strong: rgba(255, 255, 255, .10);
}
html.theme-dark body, html.theme-dark #app, html.theme-dark .app-main { background: var(--ez-bg-glow); background-attachment: fixed; }

/* cartões de vidro */
html.theme-dark .card,
html.theme-dark .mp-kpi,
html.theme-dark .mp-card,
html.theme-dark .home-shortcut,
html.theme-dark .bonus-aba,
html.theme-dark .carteira-bonus,
html.theme-dark .busca-resultado,
html.theme-dark .j7c {
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 18px;
  box-shadow: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
html.theme-dark .card:hover,
html.theme-dark .mp-card--link:hover,
html.theme-dark .mp-kpi--link:hover,
html.theme-dark .home-shortcut:hover { border-color: rgba(198, 241, 53, .22); }
html.theme-dark .mp-kpi--total, html.theme-dark .j7c {
  background: linear-gradient(140deg, rgba(198, 241, 53, .14), rgba(198, 241, 53, .03));
  border-color: rgba(198, 241, 53, .18);
}
/* faixa de cor dos consolidadores mais fina e suave */
html.theme-dark .mp-kpi::before { width: 3px; opacity: .85; }
/* cartão de saldo da Carteira: vidro com brilho lima, sem o bloco escuro pesado */
html.theme-dark .card--primary {
  background: linear-gradient(140deg, rgba(198, 241, 53, .20), rgba(198, 241, 53, .04));
  border: 1px solid rgba(198, 241, 53, .25);
}
/* chips e campos */
html.theme-dark .filter-chip { background: rgba(255, 255, 255, .06); border-color: transparent; color: #b8c6b9; }
html.theme-dark .filter-chip.is-active { background: #c6f135; color: #0d120e; border-color: #c6f135; }
html.theme-dark .mp-busca__input,
html.theme-dark .rede-busca__input,
html.theme-dark .field input, html.theme-dark .field select, html.theme-dark .field textarea {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08);
}
html.theme-dark .icon-btn { background: rgba(255, 255, 255, .06); border-color: transparent; }
/* topo, menu de baixo e lateral em vidro leve */
html.theme-dark .app-header { background: rgba(13, 18, 14, .72); border-bottom-color: rgba(255, 255, 255, .05); }
@media (max-width: 899px) {
  html.theme-dark:not(.is-framed) .tabbar { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .08); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
}
@media (min-width: 900px) {
  html.theme-dark:not(.is-framed) .tabbar { background: rgba(255, 255, 255, .025); border-right-color: rgba(255, 255, 255, .05); }
}
/* bateria e trilhos */
html.theme-dark .battery-gauge__shell { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .10); }
html.theme-dark .mp-status:hover, html.theme-dark .vd-produto:hover { background: rgba(255, 255, 255, .05); }
