/* cópia de app/public/app-ui.css (scripts/copiar-visual-app.js): edite no app e copie de novo */
/* Tela principal do ORION: conta no topo, engrenagem, módulos dentro da janela e novidades (cor de destaque do tema; ciano no tema ORION) */

/* ---------- engrenagem das configurações ---------- */
#btnSettings svg { color: var(--o-brand); transition: transform .7s cubic-bezier(.22, 1, .36, 1), filter .3s; }
#btnSettings:hover svg { transform: rotate(90deg); }
#btnSettings svg path, #btnSettings svg circle { stroke-width: 1.6; }

/* ---------- conta no topo ---------- */
.conta-chip { --h: 190; display: inline-flex; align-items: center; gap: 10px; height: 44px; max-width: 300px; padding: 0 8px 0 5px; border-radius: 999px; cursor: pointer; color: inherit; font: inherit; text-align: left;
  border: 1px solid rgba(var(--o-brand-rgb), .3); background: linear-gradient(180deg, rgba(var(--o-brand-rgb), .09), rgba(255, 255, 255, .02)); transition: border-color .25s, box-shadow .3s, transform .2s; }
.conta-chip:hover { border-color: rgba(var(--o-brand-rgb), .7); }
.conta-chip:focus-visible { outline: 2px solid var(--o-brand); outline-offset: 2px; }
.cc-av { display: grid; place-items: center; flex: none; width: 33px; height: 33px; border-radius: 50%; font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 75% 50%), hsl(calc(var(--h) + 40) 80% 36%)); box-shadow: 0 0 0 2px rgba(0, 0, 0, .6), 0 0 0 3px rgba(var(--o-brand-rgb), .45); }
.cc-txt { display: grid; min-width: 0; line-height: 1.15; }
.cc-email { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.cc-sub { font-size: 10.5px; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.cc-plano { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--o-link); border: 1px solid rgba(var(--o-brand-rgb), .45); background: rgba(var(--o-brand-rgb), .1); }
.conta-chip[data-plano="premium"] .cc-plano { color: var(--o-on-brand); border-color: transparent; background: var(--o-grad); }
.conta-chip[data-plano="basic"] .cc-plano { color: var(--o-link); border-color: rgba(59, 130, 246, .6); background: rgba(59, 130, 246, .14); }
.conta-chip[data-plano="free"] .cc-plano { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .04); }
@media (max-width: 1280px) { .cc-txt { display: none; } .conta-chip { padding-right: 5px; } }

/* ---------- módulos dentro da janela ---------- */
.mod-palco { position: fixed; left: 0; right: 0; bottom: 0; top: 104px; z-index: 900; display: grid; grid-template-rows: auto 1fr; background: var(--o-canvas); border-top: 1px solid rgba(var(--o-brand-rgb), .35);
  box-shadow: 0 -20px 60px -30px rgba(var(--o-brand-rgb), .6); }
.mod-palco[hidden] { display: none; }
.mod-palco.entra { animation: mod-entra .5s cubic-bezier(.22, 1, .36, 1) both; }
.mod-topo { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); background: linear-gradient(180deg, rgba(var(--o-brand-rgb), .07), transparent); }
.mod-tit { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .02em; }
.mod-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--o-brand); border: 1px solid rgba(var(--o-brand-rgb), .45); background: rgba(var(--o-brand-rgb), .1); }
.mod-ic .ic { width: 16px; height: 16px; }
.mod-sp { flex: 1; }
.mod-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .03); color: inherit; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .2s, background .2s; }
.mod-btn .ic { width: 15px; height: 15px; color: var(--o-brand); }
.mod-btn:hover { border-color: rgba(var(--o-brand-rgb), .6); background: rgba(var(--o-brand-rgb), .1); }
.mod-voltar { border-color: rgba(var(--o-brand-rgb), .45); }
.mod-quadros { position: relative; min-height: 0; }
.mod-quadro { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--o-canvas); }
.mod-quadro[hidden] { display: none; }
.modulos-barra a.on { color: var(--o-on-brand) !important; background: var(--o-grad) !important; border-color: transparent !important; }
.modulos-barra a.on .ic { color: var(--o-on-brand) !important; }
@keyframes mod-entra { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- versão e aviso de versão antiga ---------- */
.brand-ver { opacity: .7; }
.at-fundo { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 20px; background: rgba(1, 5, 9, .8); backdrop-filter: blur(6px); }
.at-caixa { width: min(560px, 100%); padding: 26px 26px 22px; border-radius: 20px; border: 1px solid rgba(var(--o-warn-rgb), .5); background: linear-gradient(180deg, var(--o-s2), var(--o-s2)); box-shadow: var(--o-lift); animation: mod-entra .45s cubic-bezier(.22, 1, .36, 1) both; }
.at-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--o-warn); border: 1px solid rgba(var(--o-warn-rgb), .5); background: rgba(var(--o-warn-rgb), .1); margin-bottom: 12px; }
.at-ic .ic { width: 22px; height: 22px; }
.at-caixa h2 { margin: 0 0 8px; font-size: 20px; }
.at-caixa p { margin: 0 0 12px; line-height: 1.55; opacity: .88; }
.at-caixa b { color: #fff; }
.at-msg { min-height: 1.2em; font-size: 13.5px; }
.at-msg.erro { color: var(--o-bad); } .at-msg.ok { color: var(--o-ok); }
.at-barra { height: 6px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .08); margin-bottom: 14px; }
.at-barra[hidden] { display: none; }
.at-barra i { display: block; width: 0; height: 100%; background: var(--o-grad-h); transition: width .4s; }
.at-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.at-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.at-btn .ic { width: 16px; height: 16px; }
.at-btn.at-p { color: var(--o-on-brand); border-color: transparent; background: var(--o-grad); }
.at-btn.at-leve { opacity: .75; }
.at-btn:disabled { opacity: .5; cursor: wait; }
/* Controle do PC: Permitir / Negar */
.cf-fundo { z-index: 13000; }
.cf-caixa { border-color: rgba(var(--o-brand-rgb), .5); box-shadow: var(--o-lift); max-height: calc(100vh - 40px); overflow: auto; }
.cf-caixa .cf-ic { color: var(--o-brand); border-color: rgba(var(--o-brand-rgb), .5); background: rgba(var(--o-brand-rgb), .1); }
.cf-caixa.cf-perigo { border-color: rgba(var(--o-warn-rgb), .6); box-shadow: var(--o-lift); }
.cf-caixa.cf-perigo .cf-ic { color: var(--o-warn); border-color: rgba(var(--o-warn-rgb), .5); background: rgba(var(--o-warn-rgb), .1); }
.cf-tit { margin: 0 0 6px; font-size: 19px; font-weight: 700; line-height: 1.3; color: #fff; }
.cf-sub { font-size: 13.5px; }
.cf-det { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .08); font: 12.5px/1.55 var(--o-mono); white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; }
.cf-termos { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(var(--o-brand-rgb), .3); background: rgba(var(--o-brand-rgb), .06); font-size: 13.5px; }
.cf-termos-tit { margin: 0 0 6px !important; font-weight: 700; opacity: 1 !important; color: #fff; }
.cf-termos ul { margin: 0 0 8px; padding-left: 18px; line-height: 1.5; }
.cf-termos li { margin: 0 0 3px; opacity: .88; }
.cf-link { color: var(--o-link); }
.cf-acoes { align-items: center; }
.cf-tempo { margin-left: auto; font-size: 12.5px; opacity: .6; font-variant-numeric: tabular-nums; }

/* ---------- novidades ---------- */
.novidades { margin: 4px 0 14px; }
.novidades h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nov-tit { display: inline-flex; align-items: center; gap: 8px; }
.nov-tit .ic { width: 16px; height: 16px; color: var(--o-brand); }
.nov-nav { display: inline-flex; gap: 4px; }
.nov-nav .mini-btn { font-size: 16px; line-height: 1; }
.nov-palco { position: relative; display: grid; perspective: 900px; min-height: 172px; }
.nov-card { grid-area: 1 / 1; display: grid; align-content: start; gap: 6px; padding: 12px 13px 13px; border-radius: 14px; border: 1px solid rgba(var(--o-brand-rgb), .3);
  background: radial-gradient(120% 90% at 100% 0, rgba(var(--o-brand-rgb), .16), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
  animation: nov-entra .35s ease-out both; }
.nov-card.sai { animation: nov-sai .45s ease forwards; pointer-events: none; }
.nov-topo { display: flex; align-items: center; justify-content: space-between; }
.nov-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--o-brand); border: 1px solid rgba(var(--o-brand-rgb), .5); background: rgba(var(--o-brand-rgb), .12); }
.nov-ic .ic { width: 18px; height: 18px; }
.nov-selo { padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: var(--o-on-brand); background: var(--o-grad); }
.nov-card b { font-size: 14px; }
.nov-card p { margin: 0; font-size: 12.5px; line-height: 1.45; opacity: .78; }
.nov-acao { justify-self: start; margin-top: 2px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(var(--o-brand-rgb), .5); background: rgba(var(--o-brand-rgb), .08); color: inherit; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .2s, box-shadow .25s; }
.nov-acao:hover { background: rgba(var(--o-brand-rgb), .2); }
.nov-pontos { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.nov-pontos button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .22); cursor: pointer; transition: background .3s, transform .3s; }
.nov-pontos button.on { background: var(--o-brand); transform: scale(1.3); box-shadow: 0 0 8px rgba(var(--o-brand-rgb), .9); }
@keyframes nov-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes nov-sai { to { opacity: 0; transform: rotateY(32deg) translateX(-14px); } }
@media (prefers-reduced-motion: reduce) { .nov-card, .nov-card.sai, .mod-palco.entra { animation: none; } #btnSettings svg { transition: none; } }

/* ---------- Configurações: abas numa coluna à esquerda (antes ficavam numa linha que estourava e não dava para chegar nas últimas) ---------- */
#dlgSettings.dlg-wide { max-width: 1060px; width: 94vw; }
#settingsForm { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: 'head head' 'nav body' 'foot foot'; }
#settingsForm > .dlg-head { grid-area: head; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
#settingsTabs { grid-area: nav; flex-direction: column; gap: 3px; padding: 12px 10px; border-bottom: 0; border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
#settingsTabs button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; white-space: nowrap; border: 0; border-left: 2px solid transparent; border-radius: 9px; padding: 10px 12px; font-size: 14px; letter-spacing: .01em; }
#settingsTabs button:hover { color: var(--text); background: rgba(var(--accent-rgb), .06); }
#settingsTabs button.active { color: var(--text); border-left-color: var(--accent); background: rgba(var(--accent-rgb), .12); }
#settingsTabs button .ic { width: 17px; height: 17px; flex: none; }
#settingsForm > .tab-body { grid-area: body; min-height: 0; }
#settingsForm > .dlg-foot { grid-area: foot; }
@media (max-width: 760px) {
  #settingsForm { grid-template-columns: 1fr; grid-template-areas: 'head' 'nav' 'body' 'foot'; }
  #settingsTabs { flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  #settingsTabs button { width: auto; border-left: 0; border-bottom: 2px solid transparent; }
  #settingsTabs button.active { border-bottom-color: var(--accent); }
}

/* módulo abrindo (ou demorando) — some sozinho quando a página do módulo carrega */
.mod-espera { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: var(--o-ink); background: var(--o-canvas); }
.mod-espera[hidden] { display: none; }
.mod-espera b { font-size: 15px; }
.mod-espera p { max-width: 380px; margin: 0; font-size: 13px; color: var(--o-ink-3); }
.mod-giro { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(var(--o-brand-rgb), .2); border-top-color: var(--o-brand); animation: mod-gira .9s linear infinite; }
@keyframes mod-gira { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .mod-giro { animation-duration: 3s; } }
