/* Goiano Cloud: o app de entradas, no padrão visual do iOS (pedido do dono em 05/11: "cara de aplicativo, não de
   web"): títulos grandes que encolhem na barra ao rolar, listas agrupadas como nos Ajustes do iPhone, barra de abas
   com desfoque, controle segmentado, alertas e folhas do sistema. Escuro e neutro; cor só onde informa. */
:root {
  --fundo: #000;
  --grupo: #1c1c1e;
  --grupo2: #2c2c2e;
  --sep: rgba(84, 84, 88, 0.55);
  --texto: #fff;
  --texto2: rgba(235, 235, 245, 0.6);
  --texto3: rgba(235, 235, 245, 0.3);
  --tinta: #fff;
  --verde: #30d158;
  --vermelho: #ff453a;
  --laranja: #ff9f0a;
  --seguro-topo: env(safe-area-inset-top, 0px);
  --seguro-baixo: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; color: var(--texto); overscroll-behavior: none; }
body { font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input { -webkit-user-select: text; user-select: text; font: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.tela { position: relative; margin: 0 auto; width: 100%; max-width: 430px; height: 100dvh; overflow: hidden; background: var(--fundo); }
@media (min-width: 520px) {
  body { display: grid; place-items: center; background: #111; }
  .tela { height: min(880px, 96dvh); border-radius: 48px; box-shadow: 0 0 0 11px #1a1a1a, 0 0 0 12px #333, 0 40px 100px rgba(0, 0, 0, 0.8); }
}

/* abertura */
.abertura { position: absolute; inset: 0; display: grid; place-items: center; }
.abertura-logo { width: 110px; height: 110px; border-radius: 25px; animation: aparece .5s ease; }
@keyframes aparece { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

/* entrar */
.entrar { position: absolute; inset: 0; overflow-y: auto; padding: calc(var(--seguro-topo) + 56px) 16px calc(var(--seguro-baixo) + 24px); }
.entrar-topo { text-align: center; padding: 0 12px; }
.entrar-logo { width: 88px; height: 88px; border-radius: 20px; }
.entrar-topo h1 { margin: 16px 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.entrar-topo p { margin: 0 auto 28px; max-width: 300px; color: var(--texto2); font-size: 15px; line-height: 1.35; }
.entrar-links { margin-top: 10px; display: grid; gap: 2px; text-align: center; }

/* barra de cima: o título pequeno aparece quando o grande sai da tela */
.app { position: absolute; inset: 0; }
.barra { position: absolute; left: 0; right: 0; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(var(--seguro-topo) + 6px) 16px 8px; transition: background .2s, border-color .2s; border-bottom: 0.5px solid transparent; }
.barra.rolou { background: rgba(22, 22, 24, 0.82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom-color: var(--sep); }
.barra-titulo { font-size: 17px; font-weight: 600; opacity: 0; transition: opacity .2s; }
.barra.rolou .barra-titulo { opacity: 1; }
.barra-lado { display: flex; }
.barra-lado.direita { justify-content: flex-end; }
.pilula { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--grupo2); font-size: 14px; font-weight: 600; }
.pilula .ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--verde); }
.pilula.demo .ponto { background: var(--laranja); }
.conteudo { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(var(--seguro-topo) + 44px) 16px calc(var(--seguro-baixo) + 100px); }
.vista { animation: entra .22s ease; }
@keyframes entra { from { opacity: 0; } to { opacity: 1; } }
.titulo-grande { margin: 6px 4px 14px; font-size: 34px; font-weight: 700; letter-spacing: 0.01em; }

/* grupos e células (como nos Ajustes do iOS) */
.grupo { background: var(--grupo); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.cabeca-grupo { margin: 26px 16px 7px; font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--texto2); letter-spacing: 0; }
.cabeca-grupo.com-acao { display: flex; justify-content: space-between; align-items: baseline; }
.cabeca-grupo h2 { margin: 0; font: inherit; }
.cabeca-grupo .acao { text-transform: none; font-size: 15px; color: var(--tinta); font-weight: 500; }
.rodape-grupo { margin: -2px 16px 16px; color: var(--texto2); font-size: 13px; line-height: 1.35; }
.rodape-grupo b { color: var(--texto); font-weight: 600; }
.celula { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 16px; text-align: left; background: none; }
.grupo > .celula + .celula::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.celula:active:is(button, a) { background: var(--grupo2); }
.celula .rotulo { flex: 1; min-width: 0; }
.celula .valor { font-weight: 400; color: var(--texto); font-variant-numeric: tabular-nums; white-space: nowrap; }
.celula .valor.fraco { color: var(--texto2); max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.celula .valor em { font-style: normal; }
.celula.coluna { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px; }
.celula.coluna .rotulo { font-size: 15px; color: var(--texto2); }
.celula.centro { justify-content: center; }
.celula.perigo { color: var(--vermelho); }
.seta-direita::after { content: ""; width: 8px; height: 8px; border-top: 2px solid var(--texto3); border-right: 2px solid var(--texto3); transform: rotate(45deg); margin-right: 2px; }
.campo-celula > span { width: 110px; flex-shrink: 0; }
.campo-celula input { flex: 1; min-width: 0; height: 26px; border: 0; outline: none; background: none; color: var(--texto); font-size: 17px; padding: 0; }
.campo-celula input.direita { text-align: right; }
.campo-celula input::placeholder { color: var(--texto3); }
.campo-celula .un { font-style: normal; color: var(--texto2); }
.verde, .celula .valor.verde { color: var(--verde); } .vermelho, .celula .valor.vermelho { color: var(--vermelho); }

/* botões */
.botao-cheio { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin: 18px 0 6px; border-radius: 14px; background: var(--tinta); color: #000; font-size: 17px; font-weight: 600; transition: opacity .15s; }
.botao-cheio:active { opacity: 0.7; }
.botao-cheio:disabled { opacity: 0.4; pointer-events: none; }
.botao-texto { display: block; padding: 12px; font-size: 17px; color: var(--tinta); }
.botao-texto.fraco { color: var(--texto2); font-size: 15px; }
.olho { width: 32px; height: 32px; display: grid; place-items: center; color: var(--texto2); flex-shrink: 0; }
.olho::before { content: ""; width: 19px; height: 19px; background: currentColor; -webkit-mask: var(--icone-olho) center/contain no-repeat; mask: var(--icone-olho) center/contain no-repeat; }
:root { --icone-olho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.girando::before { content: ""; width: 17px; height: 17px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.25); border-top-color: #000; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* saldo */
.saldo { padding: 16px; }
.saldo-topo { display: flex; justify-content: space-between; align-items: center; color: var(--texto2); font-size: 15px; }
.saldo-valor { margin: 2px 0 6px; font-size: 38px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.saldo-rodape { display: flex; gap: 6px; color: var(--texto2); font-size: 14px; }

/* robô: o botão redondo de ligar (como o da Central de Controle) */
.robo { display: flex; flex-direction: column; align-items: center; padding: 24px 16px 20px; text-align: center; }
.energia { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--grupo2); color: var(--texto2); transition: background .25s, color .25s, transform .12s; }
.energia:active { transform: scale(0.94); }
.energia:disabled { opacity: 0.6; }
.energia svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.energia.ligado { background: var(--verde); color: #fff; box-shadow: 0 0 0 6px rgba(48, 209, 88, 0.16); animation: pulsa 2.4s ease-in-out infinite; }
@keyframes pulsa { 50% { box-shadow: 0 0 0 12px rgba(48, 209, 88, 0.08); } }
.robo-titulo { margin-top: 14px; font-size: 20px; font-weight: 600; }
.robo-sub { margin-top: 4px; color: var(--texto2); font-size: 15px; line-height: 1.35; max-width: 290px; }
.aviso { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 159, 10, 0.14); color: #ffd60a; font-size: 14px; }

/* operações */
.op { min-height: 64px; }
.grupo > .op + .op::before { left: 68px; }
.op-meio { flex: 1; min-width: 0; }
.op-meio b { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 500; }
.op-meio span { display: block; margin-top: 2px; color: var(--texto2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seta { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 5px; border-radius: 5px; }
.seta.call { color: var(--verde); background: rgba(48, 209, 88, 0.15); }
.seta.put { color: var(--vermelho); background: rgba(255, 69, 58, 0.15); }
.op-fim { text-align: right; }
.op-fim b { display: block; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.selo { display: block; margin-top: 2px; font-size: 13px; color: var(--texto2); }
.selo.win { color: var(--verde); } .selo.loss { color: var(--vermelho); }
.vazio { padding: 22px 16px; text-align: center; color: var(--texto2); font-size: 15px; }

/* ícone do ativo */
.ativo { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.ativo img { position: absolute; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--grupo); background: var(--grupo2); }
.ativo img:first-child { left: 0; top: 0; }
.ativo img:nth-child(2) { right: 0; bottom: 0; }
.ativo.um img { position: static; width: 40px; height: 40px; border: 0; background: none; }
.ativo .letras { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--grupo2); color: var(--texto2); font-size: 11px; font-weight: 700; }
.ativo .otc { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); padding: 0 4px; border-radius: 4px; background: #48484a; color: #fff; font-size: 8px; font-weight: 700; line-height: 12px; }

/* controles do iOS */
.segmento { display: flex; flex: 1; padding: 2px; border-radius: 9px; background: rgba(118, 118, 128, 0.24); }
.segmento button { flex: 1; height: 30px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--texto); transition: background .2s; }
.segmento button.ativo { background: #636366; font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); }
.contador { display: flex; align-items: center; border-radius: 9px; background: rgba(118, 118, 128, 0.24); }
.contador button { width: 46px; height: 32px; font-size: 22px; font-weight: 400; color: var(--texto); }
.contador b { min-width: 26px; text-align: center; font-size: 17px; font-weight: 600; border-left: 0.5px solid var(--sep); border-right: 0.5px solid var(--sep); line-height: 18px; }
.erro { margin: 4px 16px 0; color: var(--vermelho); font-size: 14px; }
.rodape-legal { margin: 20px 16px 0; text-align: center; color: var(--texto3); font-size: 12px; }

/* barra de abas */
.abas { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; padding: 7px 8px calc(var(--seguro-baixo) + 4px); background: rgba(22, 22, 24, 0.85); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 0.5px solid var(--sep); }
.abas button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8e8e93; font-size: 10px; font-weight: 500; letter-spacing: 0.01em; }
.abas svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.abas button.ativa { color: var(--tinta); }
.abas button.ativa svg { stroke-width: 2.2; }

/* alerta e folha do sistema (action sheet do iOS) */
.folha-fundo { position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.5); animation: entra .2s; }
.folha { position: absolute; left: 8px; right: 8px; bottom: calc(var(--seguro-baixo) + 8px); z-index: 21; animation: sobe .28s cubic-bezier(.2, .9, .3, 1); }
.folha .alerta { overflow: hidden; border-radius: 14px; background: rgba(44, 44, 46, 0.96); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); text-align: center; }
.folha .alerta-texto { padding: 16px 16px 14px; }
.folha h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--texto2); }
.folha p { margin: 0; font-size: 13px; color: var(--texto2); line-height: 1.35; }
.folha p b { color: var(--texto); }
.folha .opcao { display: block; width: 100%; height: 56px; border-top: 0.5px solid var(--sep); font-size: 20px; color: var(--tinta); }
.folha .opcao.verde { color: var(--verde); }
.folha .opcao.perigo { color: var(--vermelho); }
.folha .cancelar { display: block; width: 100%; height: 56px; margin-top: 8px; border-radius: 14px; background: #2c2c2e; font-size: 20px; font-weight: 600; color: var(--tinta); }
.folha .passo { display: flex; align-items: center; gap: 12px; padding: 10px 16px 0; text-align: left; font-size: 15px; color: var(--texto); }
.folha .passo:last-child { padding-bottom: 6px; }
.folha .passo i { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 13px; background: #48484a; font-style: normal; font-weight: 600; font-size: 13px; }
@keyframes sobe { from { transform: translateY(110%); } to { transform: none; } }
.aviso-rapido { position: absolute; left: 50%; top: calc(var(--seguro-topo) + 10px); z-index: 30; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 22px; background: rgba(58, 58, 60, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 15px; font-weight: 500; text-align: center; animation: desce .3s cubic-bezier(.2, .9, .3, 1); }
.aviso-rapido.ruim { color: #ff6961; }
@keyframes desce { from { transform: translate(-50%, -30px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- mais cor (pedido do dono em 05/11: "tá funcional, mas básico") ---------- */

/* saldo com o azul e o roxo da arte do robô */
.saldo { position: relative; overflow: hidden; background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%); }
.saldo::after { content: ""; position: absolute; right: -50px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, 0.45), transparent 70%); pointer-events: none; }
.saldo .saldo-topo, .saldo .saldo-rodape { color: rgba(255, 255, 255, 0.75); }
.saldo .olho { color: rgba(255, 255, 255, 0.8); }

/* carrossel de banners */
.carrossel { position: relative; margin: 0 -16px 14px; }
.trilho { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.trilho::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 100%; aspect-ratio: 1280 / 706; border-radius: 16px; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.banner-arte img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-azul { background: radial-gradient(120% 120% at 100% 0%, #38bdf8 0%, #1d4ed8 45%, #0b1b4d 100%); }
.banner-roxo { background: radial-gradient(120% 120% at 100% 0%, #c084fc 0%, #7c3aed 45%, #2e1065 100%); }
.banner-verde { background: radial-gradient(120% 120% at 100% 0%, #4ade80 0%, #059669 45%, #052e1c 100%); }
.banner-texto { position: absolute; left: 16px; top: 16px; bottom: 16px; width: 62%; display: flex; flex-direction: column; justify-content: center; gap: 4px; z-index: 1; }
.banner-texto small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.75); }
.banner-texto b { font-size: 21px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.banner-texto span { font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, 0.85); }
.banner-texto button { align-self: flex-start; margin-top: 8px; height: 32px; padding: 0 14px; border-radius: 16px; background: #fff; color: #000; font-size: 14px; font-weight: 700; }
.banner-robo { position: absolute; right: -14px; bottom: -10px; width: 46%; border-radius: 50%; mask-image: radial-gradient(circle, #000 55%, transparent 72%); -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); }
.banner-icone { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.banner-icone svg { width: 48px; height: 48px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pontos-carrossel { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.pontos-carrossel i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); transition: width .25s, background .25s; }
.pontos-carrossel i.ativo { width: 18px; background: #fff; }

/* atalhos com ícone colorido (como os apps do iPhone) */
.atalhos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 12px; }
.atalhos button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 14px; background: var(--grupo); font-size: 12px; font-weight: 500; color: var(--texto); transition: transform .1s; }
.atalhos button:active { transform: scale(0.95); }
.ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.ic svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-azul { background: linear-gradient(180deg, #3b9bff, #0a6cff); }
.ic-laranja { background: linear-gradient(180deg, #ffb340, #ff8a00); }
.ic-verde { background: linear-gradient(180deg, #4cd964, #1fa83a); }
.ic-roxo { background: linear-gradient(180deg, #c27bff, #8e3cf7); }

/* robô ligado com o verde em degradê */
.energia.ligado { background: linear-gradient(160deg, #4cd964, #13a538); }
.robo.ligado { background: linear-gradient(180deg, rgba(48, 209, 88, 0.12), var(--grupo) 55%); }

/* gráfico do resultado do dia */
.grafico { height: 92px; padding: 12px 16px 0; }
.grafico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.grafico .vazio-grafico { height: 100%; display: grid; place-items: center; color: var(--texto3); font-size: 13px; }

/* ativos abertos */
.faixa-ativos { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 4px; padding: 0 16px 4px; scrollbar-width: none; }
.faixa-ativos::-webkit-scrollbar { display: none; }
.ativo-chip { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; padding: 12px 4px 10px; border-radius: 14px; background: var(--grupo); }
.ativo-chip b { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ativo-chip small { font-size: 10px; font-weight: 700; color: var(--laranja); margin-top: -4px; }
.carregando-chip { height: 86px; background: linear-gradient(90deg, var(--grupo) 0%, var(--grupo2) 50%, var(--grupo) 100%); background-size: 200% 100%; animation: brilho-chip 1.2s linear infinite; }
@keyframes brilho-chip { to { background-position: -200% 0; } }
.acao.fraca { color: var(--texto2); font-size: 13px; }

/* abas com a cor da marca na aba ativa */
.abas button.ativa { color: #3b9bff; }
.cabeca-grupo .acao { color: #3b9bff; }
.banner-azul .banner-texto { width: 54%; }
