* { box-sizing: border-box; }
:root { --h: 54px; --rail: 66px; --rail-open: 200px; --panel: 330px; }
body { margin: 0; font: 15px/1.4 system-ui, sans-serif; background: #f4f5f7; color: #1a1a2e; }

header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1.25rem; min-height: var(--h);
  background: #12203a; color: #fff; flex-wrap: wrap;
}
header .logo {
  height: 30px; width: auto; filter: brightness(0) invert(1);
  position: absolute; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
header .spacer { flex: 1; }
@media (max-width: 620px) {
  header .logo { position: static; transform: none; }
}
.tag { font-size: .72rem; padding: .15rem .5rem; border-radius: 999px; background: #2e7d32; }
.tag.sim { background: #b26a00; }

/* indicador "vendo como" no topo (modo ghost do admin) */
#vendo { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem;
  background: #ffffff1f; border: 1px solid #ffffff33; border-radius: 999px; padding: .15rem .3rem .15rem .7rem; }
#vendo b { font-weight: 600; }
#vendo button { padding: .1rem .5rem; font-size: .72rem; border-radius: 999px; background: #ffffff2e; }

/* ícones (SVG line, herda a cor) */
svg.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }

button { padding: .5rem .8rem; border: 0; border-radius: 8px; background: #12203a; color: #fff; font: inherit; cursor: pointer; }
button.del { background: #c0392b; }
button.push { background: #2e7d32; }
button.push.mini { padding: .3rem .6rem; font-size: .85rem; }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: transparent; border: 1px solid #c8ccd4; color: #12203a; }
header button.ghost { border-color: #ffffff55; color: #fff; }

input { padding: .5rem .6rem; border: 1px solid #c8ccd4; border-radius: 8px; font: inherit; background: #fff; }

/* ---------- layout ---------- */
.wrap { display: flex; align-items: flex-start; }

#sidebar {
  position: sticky; top: var(--h); align-self: flex-start;
  height: calc(100vh - var(--h)); display: flex; z-index: 10;
}
.rail {
  width: var(--rail); flex: none; background: #1b2c48; color: #fff;
  display: flex; flex-direction: column; padding: .5rem .35rem;
  transition: width .18s ease; overflow: hidden;
}
#sidebar.expanded .rail { width: var(--rail-open); }
/* grupo de cima: rola sozinho se não couber (a barra fica travada) */
.rail-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: .25rem; scrollbar-width: thin; }
.rail-scroll::-webkit-scrollbar { width: 4px; }
.rail-scroll::-webkit-scrollbar-thumb { background: #ffffff33; border-radius: 4px; }
.rail-bottom { flex: none; display: flex; flex-direction: column; gap: .25rem;
  margin-top: .35rem; padding-top: .35rem; border-top: 1px solid #ffffff1a; }
.rail-btn {
  position: relative;
  display: flex; align-items: center; gap: .65rem; width: 100%;
  background: transparent; color: #aeb9cc; padding: .58rem .5rem; border-radius: 8px;
  white-space: nowrap;
}
#sidebar:not(.expanded) .rail-btn { justify-content: center; padding: .58rem 0; }
.rail-btn:hover { background: #ffffff14; color: #e8edf5; }
.rail-btn.on { background: #2f8f46; color: #fff; }
.rail-btn .ic { width: 22px; height: 22px; flex: none; display: flex; align-items: center; justify-content: center; }
.rail-btn .ic svg.ic { width: 20px; height: 20px; }
#rail-foto svg.ic { stroke: currentColor; }
.rail-btn .lb { display: none; font-size: .88rem; }
#sidebar.expanded .rail-btn .lb { display: inline; }
/* contador: só no modo expandido fica na linha; recolhido vira selo no canto */
.rail-btn b {
  position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff22; border-radius: 999px; padding: 0 3px; font-size: .7rem; line-height: 1;
}
.rail-btn b.hot { background: #e8a33d; color: #12203a; }
.rail-btn b:not(.hot) { display: none; }
#sidebar.expanded .rail-btn b { position: static; margin-left: auto; height: auto; }
#toggle-ic { transition: transform .18s ease; transform: rotate(180deg); }
#sidebar.expanded #toggle-ic { transform: none; }

.panel {
  width: 0; overflow: hidden; background: #fff; border-right: 1px solid #e4e7ec;
  transition: width .2s ease; height: 100%; overflow-y: auto;
}
#sidebar.open .panel { width: var(--panel); padding: 1rem 1.1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.panel-head h2 { margin: 0; font-size: 1.05rem; }
.panel label { display: block; margin: .9rem 0 .35rem; font-weight: 600; font-size: .9rem; }
.panel label small { font-weight: 400; color: #889; }
.panel input { width: 100%; }
.panel hr { border: 0; border-top: 1px solid #e4e7ec; margin: 1.1rem 0 .2rem; }
.panel .row { display: flex; gap: .4rem; }
.panel .row input { flex: 1; }
.panel #salvar-config, .panel #enviar-pendentes { width: 100%; margin-top: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.chip { background: #eef1f5; border-radius: 999px; padding: .2rem .5rem .2rem .7rem; font-size: .85rem; cursor: pointer; }
.chip b { margin-left: .35rem; color: #c0392b; cursor: pointer; }
.hint { font-size: .82rem; color: #778; margin: .6rem 0; }
.ok { color: #2e7d32; font-weight: 600; }
.pend-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid #eef0f3; }
.pend-item span { flex: 1; }

.contato-link { display: flex; align-items: center; gap: .7rem; padding: .7rem .5rem; margin-top: .4rem;
  border: 1px solid #e4e7ec; border-radius: 10px; text-decoration: none; color: #12203a; }
.contato-link:hover { background: #f6f8fb; }
.contato-link svg.ic { width: 24px; height: 24px; color: #12203a; }
.contato-link b { display: block; font-size: .95rem; }
.contato-link small { color: #778; }

/* ---------- main ---------- */
main { flex: 1; min-width: 0; padding: 1.5rem 1.75rem; max-width: 1320px; }
#form { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
#form input { flex: 1 1 130px; }
#form #nome { flex: 2 1 240px; }
.busca { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.busca #q { flex: 1; }
.busca #conta { font-size: .82rem; color: #667; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px #0001; table-layout: fixed; }
th, td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid #eef0f3; }
th { background: #fafbfc; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #667; }
th:nth-child(1) { width: 26%; }          /* produto  */
th:nth-child(2) { width: 92px; }         /* preço    */
th:nth-child(3) { width: 22%; }          /* cód barras */
th:nth-child(4) { width: 17%; }          /* MAC      */
th:nth-child(5) { width: 116px; }        /* prévia   */
th:nth-child(6) { width: 190px; }        /* ações    */
td { position: relative; }
td input { width: 100%; }
td .e-nome, td .e-barcode, td .e-mac { text-overflow: ellipsis; }
td.acts { display: flex; gap: .3rem; white-space: nowrap; }
td.acts button { padding: .4rem .5rem; font-size: .85rem; }
@media (max-width: 900px) { table { table-layout: auto; } th { width: auto !important; } }
td img { border: 1px solid #ddd; border-radius: 4px; vertical-align: middle; background: #fff; cursor: zoom-in; }

#lightbox {
  position: fixed; inset: 0; z-index: 40; background: #000a;
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
#lightbox img {
  width: min(92vw, 900px); height: auto; background: #fff;
  border-radius: 8px; box-shadow: 0 12px 40px #0007;
  image-rendering: pixelated;
}
#lb-close {
  position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px;
  border-radius: 50%; background: #fff; color: #12203a; font-size: 1.1rem;
}
tr.pend td:first-child { box-shadow: inset 3px 0 0 #e8a33d; }
tr.falhou td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
.dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e8a33d; }
.dot.red { background: #c0392b; }

.falha-item { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid #eef0f3; }
.falha-item .fi-ic { font-size: 1.2rem; }
.falha-item .fi-txt { flex: 1; }
.falha-item .fi-txt b { display: block; font-size: .92rem; }
.falha-item .fi-txt small { color: #b3261e; }

#scrim { position: fixed; inset: var(--h) 0 0 0; background: #0005; z-index: 9; }

@media (max-width: 760px) {
  #sidebar { position: fixed; top: var(--h); left: 0; }
  #sidebar.open .panel { position: fixed; left: var(--rail); top: var(--h); bottom: 0;
    width: min(320px, calc(100vw - var(--rail))); }
  main { padding-left: calc(var(--rail) + 1rem); }
}

/* ---------- ghost bar ---------- */
#ghost-bar {
  position: sticky; top: var(--h); z-index: 15;
  background: #4a2c74; color: #fff; padding: .5rem 1.25rem;
  display: flex; align-items: center; gap: .5rem; font-size: .9rem;
}
#ghost-bar small { opacity: .8; }
#ghost-bar button { margin-left: auto; }
#ghost-bar button.ghost { border-color: #ffffff66; color: #fff; }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  display: flex; align-items: center; gap: .55rem;
  background: #12203a; color: #fff; padding: .7rem .9rem; border-radius: 10px;
  box-shadow: 0 8px 24px #0004; max-width: 340px; font-size: .9rem;
  transform: translateY(12px); opacity: 0; transition: all .22s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast.ok { background: #1e7d3c; }
.toast.err { background: #b3261e; }
.toast .t-ic { font-size: 1.1rem; }

/* ---------- confirm modal ---------- */
.modal { position: fixed; inset: 0; z-index: 55; background: #0007; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-box { background: #fff; border-radius: 14px; padding: 1.3rem 1.4rem; max-width: 380px; width: 100%; box-shadow: 0 20px 60px #0006; }
.modal-box h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.modal-box p { margin: 0 0 1.2rem; color: #445; }
.modal-acts { display: flex; gap: .6rem; justify-content: flex-end; }
button.danger { background: #c0392b; }

.rail-sep { height: 1px; background: #ffffff1f; margin: .4rem .3rem; flex: none; }

/* selects: mesma cara dos inputs */
select { padding: .5rem .55rem; border: 1px solid #c8ccd4; border-radius: 8px; font: inherit; background: #fff; }
.panel select { width: 100%; }

/* ---------- perfil ---------- */
.perfil-top { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.perfil-top > div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.perfil-top b { font-size: .95rem; word-break: break-all; }
.perfil-top small { color: #778; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #dfe3ea; flex: none; }
.avatar-sm { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.file-btn { display: inline-block; margin-top: .3rem; font-size: .82rem; color: #12203a;
  border: 1px solid #c8ccd4; border-radius: 8px; padding: .3rem .6rem; cursor: pointer; font-weight: 500; }
.file-btn:hover { background: #f2f4f7; }
#perfil #logout { width: 100%; margin-top: 1rem; }

/* card genérico dentro do painel */
.card-p { border: 1px solid #e6e9ef; border-radius: 14px; padding: .9rem; margin: .7rem 0;
  background: #ffffff; box-shadow: 0 4px 16px #12203a10; }
.card-p h3 { margin: 0 0 .5rem; font-size: .95rem; }
.card-p label { display: block; margin: .6rem 0 .3rem; font-weight: 600; font-size: .85rem; }
.card-p label small { font-weight: 400; color: #889; }
.card-p input, .card-p select { width: 100%; }
.card-p input + input { margin-top: .5rem; }
.card-p button { margin-top: .7rem; width: 100%; }

/* ---------- cards de loja (escolha / trocar) ---------- */
.loja-cards { display: flex; flex-direction: column; gap: .55rem; }
.loja-card { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left;
  background: #fff; border: 1px solid #e6e9ef; border-radius: 14px; padding: .7rem .8rem;
  color: #12203a; cursor: pointer; box-shadow: 0 4px 16px #12203a10;
  transition: transform .12s ease, box-shadow .12s ease; }
.loja-card:hover { transform: translateY(-1px); box-shadow: 0 10px 30px #12203a1f; }
.lc-foto { width: 46px; height: 46px; border-radius: 10px; flex: none; background: #eef1f5 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; color: #8b93a3; }
.lc-foto svg.ic { width: 22px; height: 22px; }
.loja-cards.grande .lc-foto svg.ic { width: 34px; height: 34px; }
.lc-info { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.lc-info b { font-size: .98rem; }
.lc-info small { color: #778; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-meta { color: #99a !important; }

.loja-cards.grande { max-width: 640px; }
.loja-cards.grande .loja-card { padding: 1rem 1.1rem; gap: 1.1rem; }
.loja-cards.grande .lc-foto { width: 84px; height: 84px; border-radius: 14px; font-size: 2rem; }
.loja-cards.grande .lc-info b { font-size: 1.25rem; }
.loja-cards.grande .lc-info small { font-size: .9rem; }

#escolha-loja { padding: 2.5rem 0; }
.escolha-titulo { font-size: 1.5rem; margin: 0 0 .3rem; }

/* ---------- gerenciar lojas ---------- */
.adm-loja { position: relative; }
.adm-loja input { width: 100%; margin-top: .45rem; }
.adm-loja input:first-of-type { margin-top: 0; }
.cfg-foto { margin-bottom: .3rem; }
.cfg-foto .row { margin-top: .4rem; }
.al-foto svg.ic { width: 28px; height: 28px; color: #8b93a3; }
.al-foto { width: 100%; height: 96px; border-radius: 10px; background: #eef1f5 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 2rem; position: relative; margin-bottom: .3rem; }
.al-cam { position: absolute; right: 6px; bottom: 6px; background: #fff; border: 1px solid #d5d9e0;
  border-radius: 8px; padding: .15rem .4rem; font-size: .95rem; cursor: pointer; }
.au-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; }
.au-head small { color: #778; font-size: .78rem; }
.mini { padding: .35rem .6rem !important; font-size: .82rem !important; width: auto !important; margin: 0 !important; }

/* ---------- acessos ---------- */
.adm-user .au-head b { font-size: .9rem; word-break: break-all; }
.badge { font-size: .72rem; padding: .12rem .5rem; border-radius: 999px; background: #e7ebf1; color: #445; white-space: nowrap; }
.badge.admin { background: #4a2c74; color: #fff; }
.au-acts { display: flex; gap: .4rem; margin-top: .5rem; }
.au-form { display: flex; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }
.au-form input { flex: 1 1 140px; margin: 0; }

.bg-preview { width: 100%; max-height: 150px; object-fit: cover; border-radius: 10px; margin-bottom: .5rem; }

/* ---------- logs ---------- */
#logs-filtro, #logs-q { width: 100%; }
.log-item { display: flex; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid #eef0f3; }
.li-ic { font-size: 1.05rem; flex: none; }
.li-txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.li-txt b { font-size: .86rem; font-weight: 500; }
.li-txt small { color: #889; font-size: .76rem; }
.li-user { color: #4a2c74 !important; font-weight: 600; }

/* ---------- recorte de foto ---------- */
#crop-stage { width: 260px; height: 260px; margin: 0 auto; }
#crop-canvas { display: block; background: #111; border-radius: 8px; touch-action: none; cursor: grab; }
#crop-canvas:active { cursor: grabbing; }

/* ---------- login (mesmo estilo do portal telemetria) ---------- */
.login-body { min-height: 100vh; background: #050810; color: #e6f7ff; }
#login-bg { position: fixed; inset: 0; background: #050810 center/cover no-repeat; z-index: 0; }
#login-bg::after { content: ""; position: absolute; inset: 0; background: #050810cc; }
.login-body.has-bg #login-bg::after { background: #050810b0; }

.wrapper-login { position: relative; z-index: 1; min-height: 100vh; display: flex;
  flex-direction: column; align-items: center; justify-content: center; padding: 20px; }

.card-login { width: 100%; max-width: 380px; background: #000;
  border: 1px solid rgba(0, 217, 255, 0.35); border-radius: 22px; padding: 40px 34px;
  box-shadow: 0 0 40px rgba(0, 217, 255, 0.10); text-align: center; }

.logo-login { display: block; margin: 0 auto 4px; width: 300px; max-width: 100%; height: 150px;
  object-fit: cover; object-position: center 42%; background: transparent; }

.subtitulo-login { font-family: "Orbitron", "Segoe UI", sans-serif; font-weight: 600;
  color: #00d9ff; font-size: 17px; letter-spacing: 3px; text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0,217,255,.35), 0 0 2px #00d9ff; margin: 6px 0 30px; }

.form-login { display: flex; flex-direction: column; align-items: stretch; text-align: left; }
.form-login label { font-size: 12px; color: #7fa7b8; letter-spacing: .5px; margin-bottom: 6px; display: block; }
.form-login input { display: block; width: 100%; height: 46px; padding: 0 14px; background: #0f1622;
  border: 1px solid rgba(0,217,255,.35); border-radius: 12px; color: #e6f7ff; font-size: 14px;
  margin: 0 0 20px; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.form-login input:focus { outline: none; border-color: #00d9ff; box-shadow: 0 0 0 3px rgba(0,217,255,.15); }
/* Chrome/Safari: neutraliza o autofill (deixava o campo de e-mail branco e "maior") */
.form-login input:-webkit-autofill,
.form-login input:-webkit-autofill:hover,
.form-login input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e6f7ff; caret-color: #e6f7ff;
  -webkit-box-shadow: 0 0 0 1000px #0f1622 inset;
  transition: background-color 9999s ease-in-out 0s;
}
.campo-senha { position: relative; margin-bottom: 20px; }
.campo-senha input { margin-bottom: 0; padding-right: 40px; }
.campo-senha input::-ms-reveal, .campo-senha input::-ms-clear { display: none; }
.olho-senha { position: absolute; right: 12px; top: 23px; transform: translateY(-50%);
  cursor: pointer; opacity: .7; user-select: none; font-size: 1.05rem; }
.olho-senha:hover { opacity: 1; }

.botao-ios { display: block; width: 100%; margin: 14px 0 0; padding: 14px; border: none; border-radius: 999px;
  background: linear-gradient(180deg, #00e5ff, #00a0d6); color: #001018; font-size: 16px;
  font-weight: 700; letter-spacing: .3px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,217,255,.35); transition: transform .15s, box-shadow .15s; }
.botao-ios:hover { box-shadow: 0 8px 26px rgba(0,217,255,.5); }
.botao-ios:active { transform: scale(.97); }
.botao-ios:disabled { opacity: .6; }

.login-erro { color: #ff9a90; font-size: .85rem; margin: .9rem 0 0; text-align: center; }

/* ---------- balões flutuantes de contato ---------- */
#contato-flutua { position: fixed; right: 16px; bottom: 16px; z-index: 45;
  display: flex; flex-direction: column; gap: .5rem; }
.cf-bolha { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 6px 20px #0003; transition: transform .12s ease; }
.cf-bolha:hover { transform: translateY(-2px) scale(1.05); }
.cf-bolha svg.ic { width: 24px; height: 24px; }
.cf-bolha.wa { background: #25d366; }
.cf-bolha.ig { background: linear-gradient(45deg, #f09433, #dc2743 45%, #bc1888); }
@media (max-width: 760px) { #contato-flutua { right: 10px; bottom: 10px; } .cf-bolha { width: 42px; height: 42px; } }

/* ============ TEMAS ============ */
/* claro = estilos base acima. Os blocos abaixo sobrescrevem as superfícies. */

/* ---- PRETO (padrão) ---- */
[data-tema="escuro"] body { background: #0d1420; color: #e8edf5; }
[data-tema="escuro"] header { background: #0a1120; }
[data-tema="escuro"] .rail { background: #0b1322; }
[data-tema="escuro"] .panel { background: #131c2b; border-right-color: #23304a; }
[data-tema="escuro"] .panel-head h2, [data-tema="escuro"] h1, [data-tema="escuro"] h2, [data-tema="escuro"] h3 { color: #eef2f8; }
[data-tema="escuro"] .panel label { color: #cdd6e5; }
[data-tema="escuro"] input, [data-tema="escuro"] select,
[data-tema="escuro"] .card-p input, [data-tema="escuro"] .card-p select {
  background: #0f1a29; border-color: #2a3958; color: #e8edf5; }
[data-tema="escuro"] input::placeholder { color: #6b7a92; }
[data-tema="escuro"] table { background: #131c2b; box-shadow: none; border: 1px solid #23304a; }
[data-tema="escuro"] th { background: #16202f; color: #9fb0c8; }
[data-tema="escuro"] td { border-bottom-color: #222f47; }
[data-tema="escuro"] main { color: #e8edf5; }
[data-tema="escuro"] .card-p { background: #16202f; border-color: #26324a; box-shadow: none; }
[data-tema="escuro"] .loja-card { background: #16202f; border-color: #2a3a57; color: #e8edf5; box-shadow: none; }
[data-tema="escuro"] .lc-foto, [data-tema="escuro"] .al-foto { background-color: #1c2a3e; color: #7f8ea6; }
[data-tema="escuro"] .contato-link { background: #16202f; border-color: #26324a; color: #e8edf5; }
[data-tema="escuro"] .contato-link:hover { background: #1c2a3e; }
[data-tema="escuro"] .contato-link svg.ic { color: #cdd6e5; }
[data-tema="escuro"] button.ghost { border-color: #34435f; color: #cdd6e5; }
[data-tema="escuro"] .modal-box { background: #16202f; color: #e8edf5; }
[data-tema="escuro"] .modal-box p { color: #b6c2d6; }
[data-tema="escuro"] .hint, [data-tema="escuro"] .texto-fraco { color: #8b98ac; }
[data-tema="escuro"] .log-item { border-bottom-color: #222f47; }
[data-tema="escuro"] .badge { background: #26324a; color: #cdd6e5; }
[data-tema="escuro"] .file-btn { border-color: #34435f; color: #cdd6e5; }
[data-tema="escuro"] .file-btn:hover { background: #1c2a3e; }
[data-tema="escuro"] .au-head { border-bottom-color: #222f47; }
[data-tema="escuro"] .busca #conta, [data-tema="escuro"] small { color: #8b98ac; }

/* ---- VIDRO (translúcido, SEM blur — blur trava a máquina) ---- */
[data-tema="vidro"] body { color: #eaf1fb;
  background: linear-gradient(160deg, #16233d, #0b1220 60%); }
[data-tema="vidro"] header { background: #101c33; }
[data-tema="vidro"] .rail { background: #0d1830; }
[data-tema="vidro"] .panel { background: #16243f; border-right-color: rgba(255,255,255,.12); }
[data-tema="vidro"] .panel-head h2, [data-tema="vidro"] h1, [data-tema="vidro"] h2, [data-tema="vidro"] h3 { color: #f2f7ff; }
[data-tema="vidro"] .panel label { color: #cfdcf0; }
[data-tema="vidro"] input, [data-tema="vidro"] select { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #eaf1fb; }
[data-tema="vidro"] input::placeholder { color: #ffffff66; }
[data-tema="vidro"] table { background: #16243f; box-shadow: none; border: 1px solid rgba(255,255,255,.1); }
[data-tema="vidro"] th { background: rgba(255,255,255,.05); color: #b8c6de; }
[data-tema="vidro"] td { border-bottom-color: rgba(255,255,255,.08); }
[data-tema="vidro"] main { color: #eaf1fb; }
[data-tema="vidro"] .card-p, [data-tema="vidro"] .loja-card, [data-tema="vidro"] .contato-link, [data-tema="vidro"] .modal-box {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #eaf1fb; box-shadow: 0 6px 22px #0005; }
[data-tema="vidro"] .lc-foto, [data-tema="vidro"] .al-foto { background-color: rgba(255,255,255,.1); color: #cfdcf0; }
[data-tema="vidro"] button.ghost, [data-tema="vidro"] .file-btn { border-color: rgba(255,255,255,.25); color: #eaf1fb; }
[data-tema="vidro"] .hint, [data-tema="vidro"] small, [data-tema="vidro"] .busca #conta { color: #9fb0c8; }
[data-tema="vidro"] .badge { background: rgba(255,255,255,.14); color: #eaf1fb; }
[data-tema="vidro"] .log-item, [data-tema="vidro"] .au-head { border-bottom-color: rgba(255,255,255,.1); }

/* ---- VERDE TECNOLÓGICO (estilo telemetria) ---- */
[data-tema="tec"] body { background: #050810; color: #e6f7ff; }
[data-tema="tec"] header { background: #080c14; border-bottom: 1px solid rgba(0,217,255,.2); }
[data-tema="tec"] .rail { background: #070b12; }
[data-tema="tec"] .rail-btn.on { background: rgba(0,217,255,.16); color: #00d9ff; }
[data-tema="tec"] .panel { background: #0b0f1a; border-right-color: rgba(0,217,255,.2); }
[data-tema="tec"] .panel-head h2, [data-tema="tec"] h1, [data-tema="tec"] h2, [data-tema="tec"] h3 { color: #e6f7ff; }
[data-tema="tec"] .panel label { color: #9fc7d6; }
[data-tema="tec"] input, [data-tema="tec"] select { background: #0f1622; border-color: rgba(0,217,255,.3); color: #e6f7ff; }
[data-tema="tec"] input:focus, [data-tema="tec"] select:focus { border-color: #00d9ff; box-shadow: 0 0 0 3px rgba(0,217,255,.15); }
[data-tema="tec"] input::placeholder { color: #5b7f8e; }
[data-tema="tec"] table { background: #0b0f1a; box-shadow: 0 0 24px rgba(0,217,255,.08); border: 1px solid rgba(0,217,255,.18); }
[data-tema="tec"] th { background: #0f1622; color: #7fa7b8; }
[data-tema="tec"] td { border-bottom-color: rgba(0,217,255,.12); }
[data-tema="tec"] main { color: #e6f7ff; }
[data-tema="tec"] .card-p, [data-tema="tec"] .loja-card, [data-tema="tec"] .contato-link, [data-tema="tec"] .modal-box {
  background: #0b0f1a; border: 1px solid rgba(0,217,255,.22); color: #e6f7ff; box-shadow: 0 0 22px rgba(0,217,255,.08); }
[data-tema="tec"] .lc-foto, [data-tema="tec"] .al-foto { background-color: #0f1a24; color: #4c8296; }
[data-tema="tec"] button.ghost, [data-tema="tec"] .file-btn { border-color: rgba(0,217,255,.4); color: #cdeef7; }
[data-tema="tec"] button.push, [data-tema="tec"] .botao-ios { background: linear-gradient(180deg,#00e5ff,#00a0d6); color: #001018; }
[data-tema="tec"] .rail-btn.on { background: rgba(0,217,255,.18); color: #00d9ff; }
[data-tema="tec"] .hint, [data-tema="tec"] small, [data-tema="tec"] .busca #conta { color: #7fa7b8; }
[data-tema="tec"] .badge { background: rgba(0,217,255,.16); color: #cdeef7; }
[data-tema="tec"] .log-item, [data-tema="tec"] .au-head { border-bottom-color: rgba(0,217,255,.12); }
[data-tema="tec"] .escolha-titulo, [data-tema="tec"] .subtitulo-login { color: #00d9ff; }

/* seletor de tema (Aparência / Perfil) */
.tema-grade { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: .3rem; }
.tema-opt { border: 2px solid transparent; border-radius: 12px; padding: .7rem .6rem; cursor: pointer;
  font-size: .85rem; font-weight: 600; text-align: center; color: #fff; }
.tema-opt.on { border-color: #2f8f46; box-shadow: 0 0 0 3px #2f8f4633; }
.tema-opt[data-t="escuro"] { background: #0d1420; }
.tema-opt[data-t="claro"] { background: #f4f5f7; color: #1a1a2e; border-color: #d7dbe2; }
.tema-opt[data-t="claro"].on { border-color: #2f8f46; }
.tema-opt[data-t="vidro"] { background: linear-gradient(135deg, #24406b, #101b30); }
.tema-opt[data-t="tec"] { background: #050810; color: #00d9ff; border: 2px solid rgba(0,217,255,.35); }
.tema-opt[data-t="tec"].on { border-color: #2f8f46; }

[hidden] { display: none !important; }
