/* ============================================================
   WINDOWS SOS — ESTILOS
   Copyright © 2026 Fabio Roberto Madeira Mendes
   Todos os direitos reservados.
   ============================================================ */

/* ===== SPLASH SCREEN (TELA DE ABERTURA) ===== */
.splash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--fundo, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.splash.sair { opacity: 0; pointer-events: none; }
.splash-box {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  animation: splashEntrada 0.6s ease-out;
}
.splash-box .logo { animation: splashPulso 1.2s ease-in-out infinite; }
@keyframes splashEntrada {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashPulso {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --fundo: #0f172a;
  --fundo-2: #1e293b;
  --card: #1e293b;
  --card-hover: #273449;
  --texto: #e2e8f0;
  --texto-2: #94a3b8;
  --acento: #38bdf8;
  --acento-2: #6366f1;
  --borda: #334155;
  --verde: #4ade80;
  --amarelo: #fbbf24;
  --vermelho: #f87171;
  --fundo-rgb: 15, 23, 42;
  --grad-1: #1e3a5f;
  --grad-2: #312e81;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  overflow-x: hidden;
}

body {
  background: radial-gradient(1200px 600px at 80% -10%, var(--grad-1) 0%, transparent 60%),
              radial-gradient(800px 500px at -10% 110%, var(--grad-2) 0%, transparent 55%),
              var(--fundo);
  min-height: 100vh;
}

/* ===== TELAS ===== */
.tela { display: none; min-height: 100vh; flex-direction: column; }
.tela.ativa { display: flex; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== HEADER INICIAL ===== */
.header {
  padding: 24px 20px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(var(--fundo-rgb),0.98) 70%, rgba(var(--fundo-rgb),0));
  backdrop-filter: blur(8px);
}
.logo-area { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.logo {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(56,189,248,0.35);
}
.logo-area h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.logo-area h1 span { color: var(--acento); }
.subtitulo { color: var(--texto-2); font-size: 13px; margin-top: 2px; }

/* ===== BUSCA ===== */
.busca-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--fundo-2);
  border: 1px solid var(--borda);
  border-radius: 14px;
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.busca-box:focus-within {
  border-color: var(--acento);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}
.busca-icone { font-size: 16px; opacity: 0.7; }
.busca-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--texto); font-size: 15px;
}
.busca-box input::placeholder { color: var(--texto-2); }
.btn-limpar {
  background: none; border: none; color: var(--texto-2);
  font-size: 14px; cursor: pointer; padding: 4px 6px;
}

/* ===== CONTEÚDO ===== */
.conteudo { flex: 1; padding: 8px 20px 24px; }

/* ===== GRID DE CATEGORIAS ===== */
.grid-categorias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cat-card { background: var(--card);
  border: 1px solid var(--borda);
  border-radius: 16px;
  padding: 18px 14px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background 0.2s, box-shadow 0.25s;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px;
  position: relative; overflow: hidden;
}
.cat-card:active { transform: scale(0.96); box-shadow: 0 0 0 2px var(--acento), 0 8px 30px rgba(56,189,248,0.25); }
.cat-card:hover { background: var(--card-hover); border-color: var(--acento); }
.cat-card .cat-icone-grande {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
}
.cat-card .cat-nome { font-size: 14px; font-weight: 600; line-height: 1.3; }
.cat-card .cat-qtd { font-size: 11px; color: var(--texto-2); }

/* ===== RESULTADO DA BUSCA ===== */
.resultado-busca { margin-bottom: 16px; }
.resultado-busca h3 { font-size: 15px; color: var(--texto-2); margin-bottom: 12px; font-weight: 600; }
.resultado-busca h3 b { color: var(--acento); }
.item-busca {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.2s;
}
.item-busca:active { background: var(--card-hover); }
.item-busca .ib-titulo { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.item-busca .ib-cat { font-size: 12px; color: var(--texto-2); }
.item-busca .ib-cat span { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,0.08); }

/* ===== EFEITO RIPPLE + BRILHO AO CLICAR ===== */
.efeito-ripple { position: relative; overflow: hidden; }
.efeito-ripple .onda {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: var(--acento);
  opacity: 0.35;
  pointer-events: none;
  animation: ondaExpandir 0.6s ease-out forwards;
}
@keyframes ondaExpandir {
  to { transform: scale(2.5); opacity: 0; }
}
.efeito-ripple:active { transform: scale(0.97); box-shadow: 0 0 0 2px var(--acento), 0 8px 28px rgba(56,189,248,0.22); }
.efeito-ripple:active .cat-icone-grande,
.efeito-ripple:active .cat-icone { transform: scale(1.15) rotate(-6deg); }
.cat-icone-grande, .cat-icone { transition: transform 0.2s ease; }
.nav-item.efeito-ripple:active { transform: scale(0.92); box-shadow: none; }

/* ===== HEADER DE CATEGORIA/SOLUÇÃO ===== */
.header-categoria {
  padding: 20px 20px 14px;
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(var(--fundo-rgb),0.98) 70%, rgba(var(--fundo-rgb),0));
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 14px;
}
.btn-voltar {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--fundo-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  color: var(--texto);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-voltar:active { transform: scale(0.92); background: var(--card-hover); }
.cat-titulo-area { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cat-icone {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
}
.cat-titulo-area h2 { font-size: 18px; font-weight: 700; line-height: 1.2; }
.cat-descricao { font-size: 12px; color: var(--texto-2); margin-top: 2px; }

/* ===== LISTA DE PROBLEMAS ===== */
.lista-problemas { display: flex; flex-direction: column; gap: 10px; }
.problema-card {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.2s, transform 0.1s;
}
.problema-card:active { transform: scale(0.98); background: var(--card-hover); }
.problema-card:hover { border-color: var(--acento); }
.problema-card .p-titulo { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.problema-card .p-titulo::after { content: '›'; margin-left: auto; color: var(--texto-2); font-size: 20px; }
.problema-card .p-sintomas { font-size: 12.5px; color: var(--texto-2); margin-top: 6px; line-height: 1.4; }

/* ===== TELA DE SOLUÇÃO ===== */
.sol-conteudo { display: flex; flex-direction: column; gap: 16px; }
.sol-bloco {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: 14px;
  padding: 18px;
}
.sol-bloco h3 {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sol-bloco.sintomas h3 { color: var(--amarelo); }
.sol-bloco.passos h3 { color: var(--verde); }
.sol-bloco.dica h3 { color: var(--acento); }
.sol-bloco.sintomas p { font-size: 14px; color: var(--texto); line-height: 1.5; }

.passo {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.passo:last-child { border-bottom: none; }
.passo-num {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff; font-size: 13px; font-weight: 700;
  border-radius: 50%;
  margin-top: 1px;
}
.passo-texto { font-size: 14px; line-height: 1.5; color: var(--texto); }
.passo-texto code {
  background: rgba(56,189,248,0.12);
  color: #7dd3fc;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  word-break: break-all;
}

.dica-box {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 12px;
  padding: 14px;
}
.dica-box .dica-icone { font-size: 20px; }
.dica-box p { font-size: 13.5px; line-height: 1.5; color: var(--texto); }

/* ===== RODAPÉ ===== */
.rodape {
  padding: 16px 20px 24px;
  text-align: center;
  color: var(--texto-2);
  font-size: 12px;
}

/* ===== MENU INFERIOR (BOTTOM NAV) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  margin: 0 auto;
  max-width: 720px;
  display: flex;
  justify-content: center;
  gap: 8px;
  background: rgba(var(--fundo-rgb), 0.97);
  border-top: 1px solid var(--borda);
  border-radius: 16px 16px 0 0;
  backdrop-filter: blur(12px);
  z-index: 100;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
}
.nav-item {
  flex: 0 1 86px;
  max-width: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 8px 10px 6px;
  background: none; border: none;
  border-radius: 12px;
  color: var(--texto-2);
  cursor: pointer;
  transition: color 0.2s, transform 0.1s, background 0.2s;
  position: relative;
}
.nav-item:active { transform: scale(0.94); }
.nav-item:hover { background: rgba(255,255,255,0.04); }
.nav-item .nav-icone { font-size: 20px; line-height: 1; }
.nav-item .nav-label { font-size: 10.5px; font-weight: 600; }
.nav-item.ativo { color: var(--acento); background: rgba(56,189,248,0.08); }
.nav-item.ativo::before {
  content: '';
  position: absolute;
  top: -6px; left: 30%; right: 30%;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  border-radius: 0 0 4px 4px;
}
.nav-item.ativo .nav-icone { transform: translateY(-1px); }

/* Espaço para o menu não cobrir o conteúdo */
body { padding-bottom: 64px; }
.tela { min-height: calc(100vh - 64px); }

/* ===== TELA SOBRE ===== */
.sobre-stats {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 6px;
}
.stat {
  flex: 1; max-width: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.stat b { font-size: 20px; color: var(--acento); }
.stat span { font-size: 11px; color: var(--texto-2); }

/* ===== ESTADO VAZIO ===== */
.vazio {
  text-align: center;
  padding: 40px 20px;
  color: var(--texto-2);
}
.vazio .vazio-icone { font-size: 40px; margin-bottom: 12px; }
.vazio p { font-size: 14px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--borda); border-radius: 3px; }

/* ===== RESPONSIVO ===== */
@media (min-width: 600px) {
  .grid-categorias { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .conteudo { max-width: 720px; margin: 0 auto; width: 100%; }
  .header, .header-categoria { max-width: 720px; margin: 0 auto; width: 100%; }
}

/* ===== TEMAS VISUAIS ===== */
/* Tema: Claro */
body.tema-claro {
  --fundo: #f1f5f9;
  --fundo-2: #ffffff;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --texto: #0f172a;
  --texto-2: #64748b;
  --acento: #0284c7;
  --acento-2: #4f46e5;
  --borda: #e2e8f0;
  --verde: #16a34a;
  --amarelo: #d97706;
  --vermelho: #dc2626;
  --fundo-rgb: 241, 245, 249;
  --grad-1: #bae6fd;
  --grad-2: #c7d2fe;
}
body.tema-claro .logo { box-shadow: 0 8px 24px rgba(2,132,199,0.25); }
body.tema-claro .passo { border-bottom: 1px solid rgba(15,23,42,0.06); }
body.tema-claro .dica-box { background: rgba(2,132,199,0.08); border-color: rgba(2,132,199,0.25); }
body.tema-claro .passo-texto code { background: rgba(2,132,199,0.1); color: #0369a1; }
body.tema-claro .cat-card .cat-icone-grande { background: rgba(15,23,42,0.05); }
body.tema-claro .item-busca .ib-cat span { background: rgba(15,23,42,0.06); }
body.tema-claro .stat { background: rgba(15,23,42,0.04); border-color: var(--borda); }

/* Tema: Roxo Profundo */
body.tema-roxo {
  --fundo: #1e1029;
  --fundo-2: #2d1b3d;
  --card: #2d1b3d;
  --card-hover: #3a2450;
  --texto: #f3e8ff;
  --texto-2: #b8a6d9;
  --acento: #c084fc;
  --acento-2: #8b5cf6;
  --borda: #4a2d66;
  --verde: #86efac;
  --amarelo: #fcd34d;
  --vermelho: #fca5a5;
  --fundo-rgb: 30, 16, 41;
  --grad-1: #4c1d95;
  --grad-2: #7e22ce;
}
body.tema-roxo .logo { background: linear-gradient(135deg, #c084fc, #8b5cf6); box-shadow: 0 8px 24px rgba(192,132,252,0.35); }
body.tema-roxo .nav-item.ativo::before { background: linear-gradient(90deg, #c084fc, #8b5cf6); }
body.tema-roxo .nav-item.ativo { color: #c084fc; background: rgba(192,132,252,0.1); }
body.tema-roxo .passo-num { background: linear-gradient(135deg, #c084fc, #8b5cf6); }
body.tema-roxo .passo-texto code { background: rgba(192,132,252,0.15); color: #d8b4fe; }
body.tema-roxo .dica-box { background: rgba(192,132,252,0.1); border-color: rgba(192,132,252,0.3); }
body.tema-roxo .stat b { color: #c084fc; }

/* Tema: Esmeralda */
body.tema-esmeralda {
  --fundo: #0b1f1a;
  --fundo-2: #12332a;
  --card: #12332a;
  --card-hover: #17402f;
  --texto: #d1fae5;
  --texto-2: #8fb8a8;
  --acento: #34d399;
  --acento-2: #10b981;
  --borda: #1f4d3d;
  --verde: #6ee7b7;
  --amarelo: #fbbf24;
  --vermelho: #f87171;
  --fundo-rgb: 11, 31, 26;
  --grad-1: #065f46;
  --grad-2: #0f766e;
}
body.tema-esmeralda .logo { background: linear-gradient(135deg, #34d399, #10b981); box-shadow: 0 8px 24px rgba(52,211,153,0.35); }
body.tema-esmeralda .nav-item.ativo::before { background: linear-gradient(90deg, #34d399, #10b981); }
body.tema-esmeralda .nav-item.ativo { color: #34d399; background: rgba(52,211,153,0.1); }
body.tema-esmeralda .passo-num { background: linear-gradient(135deg, #34d399, #10b981); }
body.tema-esmeralda .passo-texto code { background: rgba(52,211,153,0.15); color: #6ee7b7; }
body.tema-esmeralda .dica-box { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.3); }
body.tema-esmeralda .stat b { color: #34d399; }

/* Tema: Vinho */
body.tema-vinho {
  --fundo: #1f0f14;
  --fundo-2: #331820;
  --card: #331820;
  --card-hover: #421f2a;
  --texto: #fce7f3;
  --texto-2: #c9a0ad;
  --acento: #fb7185;
  --acento-2: #e11d48;
  --borda: #55222f;
  --verde: #86efac;
  --amarelo: #fcd34d;
  --vermelho: #fda4af;
  --fundo-rgb: 31, 15, 20;
  --grad-1: #881337;
  --grad-2: #9f1239;
}
body.tema-vinho .logo { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 8px 24px rgba(251,113,133,0.35); }
body.tema-vinho .nav-item.ativo::before { background: linear-gradient(90deg, #fb7185, #e11d48); }
body.tema-vinho .nav-item.ativo { color: #fb7185; background: rgba(251,113,133,0.1); }
body.tema-vinho .passo-num { background: linear-gradient(135deg, #fb7185, #e11d48); }
body.tema-vinho .passo-texto code { background: rgba(251,113,133,0.15); color: #fda4af; }
body.tema-vinho .dica-box { background: rgba(251,113,133,0.1); border-color: rgba(251,113,133,0.3); }
body.tema-vinho .stat b { color: #fb7185; }

/* Tema: Slate (cinza moderno) */
body.tema-slate {
  --fundo: #0f172a;
  --fundo-2: #1e293b;
  --card: #1e293b;
  --card-hover: #2b3a52;
  --texto: #f1f5f9;
  --texto-2: #94a3b8;
  --acento: #94a3b8;
  --acento-2: #64748b;
  --borda: #334155;
  --verde: #4ade80;
  --amarelo: #fbbf24;
  --vermelho: #f87171;
  --fundo-rgb: 15, 23, 42;
  --grad-1: #334155;
  --grad-2: #1e293b;
}
body.tema-slate .logo { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: 0 8px 24px rgba(148,163,184,0.3); }
body.tema-slate .nav-item.ativo::before { background: linear-gradient(90deg, #94a3b8, #64748b); }
body.tema-slate .nav-item.ativo { color: #cbd5e1; background: rgba(148,163,184,0.1); }
body.tema-slate .passo-num { background: linear-gradient(135deg, #94a3b8, #64748b); }
body.tema-slate .passo-texto code { background: rgba(148,163,184,0.15); color: #cbd5e1; }
body.tema-slate .dica-box { background: rgba(148,163,184,0.1); border-color: rgba(148,163,184,0.3); }
body.tema-slate .stat b { color: #cbd5e1; }

/* Tema: Âmbar (laranja quente) */
body.tema-ambar {
  --fundo: #1c1508;
  --fundo-2: #2e2410;
  --card: #2e2410;
  --card-hover: #3d3015;
  --texto: #fef3c7;
  --texto-2: #c9b27e;
  --acento: #fbbf24;
  --acento-2: #f59e0b;
  --borda: #4d3d1a;
  --verde: #86efac;
  --amarelo: #fde68a;
  --vermelho: #fca5a5;
  --fundo-rgb: 28, 21, 8;
  --grad-1: #92400e;
  --grad-2: #b45309;
}
body.tema-ambar .logo { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 8px 24px rgba(251,191,36,0.35); }
body.tema-ambar .nav-item.ativo::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
body.tema-ambar .nav-item.ativo { color: #fbbf24; background: rgba(251,191,36,0.1); }
body.tema-ambar .passo-num { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
body.tema-ambar .passo-texto code { background: rgba(251,191,36,0.15); color: #fde68a; }
body.tema-ambar .dica-box { background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.3); }
body.tema-ambar .stat b { color: #fbbf24; }

/* ===== SELEÇÃO DE TEMAS ===== */
.btn-tema {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--fundo-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.btn-tema:active { transform: scale(0.92); background: var(--card-hover); }
.header .logo-area { justify-content: space-between; }
.header .logo-area .logo-grupo { display: flex; align-items: center; gap: 14px; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.aberto { display: flex; }
.modal-temas {
  width: 100%; max-width: 720px;
  background: var(--fundo-2);
  border: 1px solid var(--borda);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-temas h3 { font-size: 16px; margin-bottom: 4px; }
.modal-temas .modal-sub { font-size: 12px; color: var(--texto-2); margin-bottom: 16px; }
.grid-temas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.tema-card {
  background: var(--card);
  border: 2px solid var(--borda);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
  text-align: left;
}
.tema-card:active { transform: scale(0.96); }
.tema-card.selecionado { border-color: var(--acento); }
.tema-card .tema-preview {
  height: 44px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.tema-card .tema-nome { font-size: 12.5px; font-weight: 600; }
.tema-card .tema-check { float: right; color: var(--acento); font-size: 13px; }
.modal-fechar {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: 12px;
  color: var(--texto);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.modal-fechar:active { background: var(--card-hover); }

/* ===== PALETA DE CORES ===== */
.paleta-cores { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 12px; }
.cor-swatch {
  aspect-ratio: 1;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.cor-swatch:hover { transform: scale(1.1); }
.cor-swatch.selecionado { border-color: #fff; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px currentColor; }
.cor-swatch .cor-check {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.cor-personalizada {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--borda); border-radius: 10px;
  padding: 8px 12px; margin-bottom: 16px;
}
.cor-personalizada label { font-size: 12px; color: var(--texto-2); }
.cor-personalizada input[type="color"] {
  width: 48px; height: 34px; border: none; border-radius: 8px;
  background: none; cursor: pointer; padding: 0;
}

/* ===== SELETOR DE BORDAS ===== */
.grid-bordas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.borda-card { background: var(--card-bg); border: 1px solid var(--borda); border-radius: 10px; padding: 10px 6px; text-align: center; cursor: pointer; transition: all 0.2s; }
.borda-card:hover { border-color: var(--acento); }
.borda-card.selecionado { border-color: var(--acento); background: rgba(56,189,248,0.08); }
.borda-preview { width: 100%; height: 34px; background: var(--acento); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.borda-nome { font-size: 11px; color: var(--texto-2); }

/* ===== SELETOR DE ÍCONES ===== */
.grid-icones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.icone-card { background: var(--card-bg); border: 1px solid var(--borda); border-radius: 10px; padding: 10px 8px; text-align: center; cursor: pointer; transition: all 0.2s; }
.icone-card:hover { border-color: var(--acento); }
.icone-card.selecionado { border-color: var(--acento); background: rgba(56,189,248,0.08); }
.icone-preview { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; min-height: 32px; align-items: center; }
.icone-amostra { font-size: 20px; line-height: 1; }
.icone-card .fa-solid { font-size: 18px; }
.icone-nome { font-size: 12px; font-weight: 700; color: var(--texto); }
.icone-desc { font-size: 10px; color: var(--texto-2); margin-top: 2px; }

/* ===== EFEITO NEON FUTURISTA (ícones brilhantes) ===== */
body.icones-neon .cat-icone-grande i,
body.icones-neon .cat-icone i {
  background: linear-gradient(135deg, #22d3ee, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(34,211,238,0.6));
  font-size: 26px;
}
body.icones-neon .cat-icone-grande { background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(168,85,247,0.12)); }
body.icones-neon .icone-amostra i { color: #22d3ee; text-shadow: 0 0 10px rgba(34,211,238,0.8); }

/* ===== EFEITO HOLOGRÁFICO (leve, com brilho suave) ===== */
body.icones-holo .cat-icone-grande i,
body.icones-holo .cat-icone i {
  color: var(--acento);
  text-shadow: 0 0 12px var(--acento);
  font-size: 24px;
}
body.icones-holo .cat-icone-grande { background: linear-gradient(135deg, rgba(56,189,248,0.06), rgba(99,102,241,0.06)); }
body.icones-holo .icone-amostra i { color: var(--acento); opacity: 0.9; }

/* ===== VARIAÇÕES DE BORDA DOS CARDS ===== */
/* Longa — cantos bem arredondados */
body.borda-longa .cat-card,
body.borda-longa .problema-card,
body.borda-longa .sol-bloco,
body.borda-longa .busca-box,
body.borda-longa .item-busca,
body.borda-longa .resultado-busca,
body.borda-longa .stat,
body.borda-longa .passo-num,
body.borda-longa .btn-voltar,
body.borda-longa .btn-tema,
body.borda-longa .logo,
body.borda-longa .bottom-nav { border-radius: 20px; }
body.borda-longa .cat-card .cat-icone-grande { border-radius: 16px; }

/* Semi longa — arredondamento médio (padrão) */
body.borda-semi .cat-card,
body.borda-semi .problema-card,
body.borda-semi .sol-bloco,
body.borda-semi .busca-box,
body.borda-semi .item-busca,
body.borda-semi .resultado-busca,
body.borda-semi .stat,
body.borda-semi .passo-num,
body.borda-semi .btn-voltar,
body.borda-semi .btn-tema,
body.borda-semi .logo,
body.borda-semi .bottom-nav { border-radius: 12px; }
body.borda-semi .cat-card .cat-icone-grande { border-radius: 10px; }

/* Leve — cantos discretos */
body.borda-leve .cat-card,
body.borda-leve .problema-card,
body.borda-leve .sol-bloco,
body.borda-leve .busca-box,
body.borda-leve .item-busca,
body.borda-leve .resultado-busca,
body.borda-leve .stat,
body.borda-leve .passo-num,
body.borda-leve .btn-voltar,
body.borda-leve .btn-tema,
body.borda-leve .logo,
body.borda-leve .bottom-nav { border-radius: 6px; }
body.borda-leve .cat-card .cat-icone-grande { border-radius: 5px; }

/* Sem borda — cantos retos */
body.borda-sem .cat-card,
body.borda-sem .problema-card,
body.borda-sem .sol-bloco,
body.borda-sem .busca-box,
body.borda-sem .item-busca,
body.borda-sem .resultado-busca,
body.borda-sem .stat,
body.borda-sem .passo-num,
body.borda-sem .btn-voltar,
body.borda-sem .btn-tema,
body.borda-sem .logo,
body.borda-sem .bottom-nav { border-radius: 0; }
body.borda-sem .cat-card .cat-icone-grande { border-radius: 0; }

/* ===== TELA DE NOTAS (bloco de notas) ===== */
.notas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.notas-info { font-size: 12px; color: var(--texto-2); }
.notas-botoes { display: flex; gap: 8px; }
.notas-btn { background: var(--card-bg); border: 1px solid var(--borda); color: var(--texto); padding: 8px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.notas-btn:hover { border-color: var(--acento); }
.notas-btn:active { transform: scale(0.95); }
.notas-btn-perigo:hover { border-color: #ef4444; color: #ef4444; }
.notas-textarea { width: 100%; min-height: 55vh; background: var(--card-bg); border: 1px solid var(--borda); border-radius: 12px; color: var(--texto); font-family: 'Consolas', 'Courier New', monospace; font-size: 14px; line-height: 1.6; padding: 14px; resize: vertical; outline: none; transition: border-color 0.2s; }
.notas-textarea:focus { border-color: var(--acento); }
.notas-textarea::placeholder { color: var(--texto-2); opacity: 0.6; }
.notas-rodape { margin-top: 10px; }
.notas-rodape p { font-size: 11px; color: var(--texto-2); text-align: center; }

/* ===== MOSTRADOR DE DATA NO CABEÇALHO ===== */
.data-area { display: flex; align-items: center; justify-content: flex-end; padding: 6px 0 0; }
.data-texto { font-size: 12px; color: var(--texto-2); background: var(--card-bg); padding: 4px 12px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; position: relative; right: -10px; }

/* ===== LAYOUTS POR TEMA (cada tema muda o layout, não só a cor) ===== */

/* ☀️ CLARO — layout flat minimalista (cards retos, grid denso) */
body.tema-claro .header { padding: 16px 20px 12px; }
body.tema-claro .logo { border-radius: 12px; }
body.tema-claro .grid-categorias { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
body.tema-claro .cat-card { border-radius: 10px; padding: 14px 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
body.tema-claro .cat-card .cat-icone-grande { border-radius: 10px; }
body.tema-claro .cat-card .cat-nome { font-size: 13px; }
body.tema-claro .problema-card { border-radius: 10px; }
body.tema-claro .sol-bloco { border-radius: 10px; }
body.tema-claro .busca-box { border-radius: 10px; }
body.tema-claro .bottom-nav { border-radius: 12px 12px 0 0; }

/* 🔮 ROXO — layout glassmorphism (cards translúcidos com blur) */
body.tema-roxo .cat-card { background: rgba(45,27,61,0.55); backdrop-filter: blur(10px); border: 1px solid rgba(192,132,252,0.2); border-radius: 20px; }
body.tema-roxo .cat-card:hover { border-color: rgba(192,132,252,0.6); }
body.tema-roxo .cat-card .cat-icone-grande { background: rgba(192,132,252,0.15); border-radius: 16px; }
body.tema-roxo .problema-card { background: rgba(45,27,61,0.55); backdrop-filter: blur(10px); border-radius: 18px; }
body.tema-roxo .sol-bloco { background: rgba(45,27,61,0.55); backdrop-filter: blur(10px); border-radius: 18px; }
body.tema-roxo .busca-box { background: rgba(45,27,61,0.55); backdrop-filter: blur(10px); border-radius: 16px; }
body.tema-roxo .bottom-nav { background: rgba(30,16,41,0.85); }
body.tema-roxo .item-busca { background: rgba(45,27,61,0.55); backdrop-filter: blur(10px); border-radius: 16px; }
body.tema-roxo .passo { border-bottom: 1px solid rgba(192,132,252,0.1); }

/* 💚 ESMERALDA — layout lista horizontal (cards grandes em 1 coluna) */
body.tema-esmeralda .grid-categorias { grid-template-columns: 1fr; gap: 10px; }
body.tema-esmeralda .cat-card { flex-direction: row; text-align: left; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; }
body.tema-esmeralda .cat-card .cat-icone-grande { width: 48px; height: 48px; font-size: 24px; flex-shrink: 0; }
body.tema-esmeralda .cat-card .cat-nome { font-size: 15px; }
body.tema-esmeralda .cat-card .cat-qtd { font-size: 12px; }
body.tema-esmeralda .header { padding: 20px 20px 14px; }
body.tema-esmeralda .logo { border-radius: 14px; }
body.tema-esmeralda .problema-card { border-radius: 16px; }
body.tema-esmeralda .sol-bloco { border-radius: 16px; }

/* 🍷 VINHO — layout elegante (header centralizado, borda lateral colorida) */
body.tema-vinho .header-categoria { justify-content: center; text-align: center; position: relative; }
body.tema-vinho .header-categoria .btn-voltar { position: absolute; left: 16px; top: 20px; }
body.tema-vinho .logo-area { justify-content: center; position: relative; }
body.tema-vinho .logo-grupo { flex-direction: column; text-align: center; }
body.tema-vinho .btn-tema { position: absolute; right: 0; top: 0; }
body.tema-vinho .cat-card { border-left: 4px solid var(--acento); border-radius: 10px; }
body.tema-vinho .cat-card .cat-icone-grande { border-radius: 10px; }
body.tema-vinho .problema-card { border-left: 4px solid var(--acento); border-radius: 10px; }
body.tema-vinho .sol-bloco { border-radius: 10px; }
body.tema-vinho .passo-num { border-radius: 8px; }

/* 🩶 SLATE — layout compacto (cards densos, grid apertado) */
body.tema-slate .header { padding: 16px 20px 12px; }
body.tema-slate .logo { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; }
body.tema-slate .logo-area h1 { font-size: 22px; }
body.tema-slate .grid-categorias { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
body.tema-slate .cat-card { padding: 12px 8px; border-radius: 10px; gap: 6px; }
body.tema-slate .cat-card .cat-icone-grande { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
body.tema-slate .cat-card .cat-nome { font-size: 12px; }
body.tema-slate .cat-card .cat-qtd { font-size: 10px; }
body.tema-slate .problema-card { padding: 12px; border-radius: 10px; }
body.tema-slate .sol-bloco { padding: 14px; border-radius: 10px; }
body.tema-slate .passo { padding: 8px 0; }

/* 🔥 ÂMBAR — layout retro (cantos retos, bordas grossas, header sólido) */
body.tema-ambar .header { border-bottom: 2px solid var(--borda); }
body.tema-ambar .logo { border-radius: 8px; }
body.tema-ambar .cat-card { border-radius: 6px; border: 2px solid var(--borda); }
body.tema-ambar .cat-card .cat-icone-grande { border-radius: 6px; }
body.tema-ambar .problema-card { border-radius: 6px; border: 2px solid var(--borda); }
body.tema-ambar .sol-bloco { border-radius: 6px; }
body.tema-ambar .busca-box { border-radius: 8px; }
body.tema-ambar .bottom-nav { border-radius: 0; }
body.tema-ambar .passo-num { border-radius: 4px; }
body.tema-ambar .btn-voltar { border-radius: 8px; }
/* ===== TELA DE CHAT ===== */
.chat-conteudo { padding-bottom: 8px; }
.chat-login { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 20px; }
.chat-login-box { background: var(--card); border: 1px solid var(--borda); border-radius: 20px; padding: 28px 24px; text-align: center; max-width: 320px; width: 100%; }
.chat-login-icone { font-size: 42px; margin-bottom: 10px; }
.chat-login-box h3 { font-size: 18px; margin-bottom: 6px; }
.chat-login-box p { font-size: 13px; color: var(--texto-2); margin-bottom: 18px; line-height: 1.5; }
.chat-input-login { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--borda); background: var(--fundo-2); color: var(--texto); font-size: 15px; margin-bottom: 12px; outline: none; }
.chat-input-login:focus { border-color: var(--acento); }
.chat-btn-entrar { width: 100%; padding: 13px; border: none; border-radius: 12px; background: var(--acento); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.chat-btn-entrar:active { transform: scale(0.97); }

.chat-area { display: flex; flex-direction: column; height: calc(100vh - 190px); }
.chat-mensagens { flex: 1; overflow-y: auto; padding: 10px 4px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; position: relative; word-wrap: break-word; animation: fadeIn 0.2s ease; }
.chat-msg.minha { align-self: flex-end; background: var(--acento); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.outra { align-self: flex-start; background: var(--card); border: 1px solid var(--borda); border-bottom-left-radius: 4px; }
.chat-msg .msg-autor { font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.chat-msg.minha .msg-autor { color: rgba(255,255,255,0.85); }
.chat-msg.outra .msg-autor { color: var(--acento); }
.chat-msg .msg-hora { font-size: 10px; opacity: 0.7; margin-top: 4px; text-align: right; }
.chat-msg-sistema { align-self: center; font-size: 11px; color: var(--texto-2); background: rgba(255,255,255,0.05); padding: 4px 12px; border-radius: 20px; }

.chat-input-area { display: flex; gap: 8px; padding: 10px 0; position: sticky; bottom: 0; background: var(--fundo); }
.chat-input-msg { flex: 1; padding: 12px 16px; border-radius: 24px; border: 1px solid var(--borda); background: var(--card); color: var(--texto); font-size: 14px; outline: none; }
.chat-input-msg:focus { border-color: var(--acento); }
.chat-btn-enviar { width: 46px; height: 46px; border: none; border-radius: 50%; background: var(--acento); color: #fff; font-size: 17px; cursor: pointer; flex-shrink: 0; }
.chat-btn-enviar:active { transform: scale(0.92); }
.chat-msg .chat-msg-avatar { display: none; }
.chat-status-online { color: var(--verde); font-size: 11px; }

/* ===== CHAT � LISTA DE CONVERSAS ===== */
.chat-btn-secundario { width: 100%; padding: 12px; border: 1px solid var(--borda); border-radius: 12px; background: var(--card); color: var(--texto); font-size: 13px; cursor: pointer; margin-top: 8px; }
.chat-btn-secundario:active { background: var(--card-hover); }
.chat-login-erro { color: var(--vermelho); font-size: 12px; margin-top: 10px; min-height: 14px; }

.chat-conversas { padding: 4px 0; }
.chat-conversa-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--borda); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s, transform 0.1s; }
.chat-conversa-item:active { transform: scale(0.98); border-color: var(--acento); }
.chat-conversa-item.grupo { border-left: 4px solid var(--acento); }
.chat-conversa-item.sair { border-color: rgba(239,68,68,0.4); }
.chat-conversa-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(56,189,248,0.12); flex-shrink: 0; }
.chat-conversa-info { flex: 1; min-width: 0; }
.chat-conversa-nome { font-size: 14px; font-weight: 700; }
.chat-conversa-preview { font-size: 12px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conversa-setinha { font-size: 20px; color: var(--texto-2); }
.chat-divisor { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--texto-2); margin: 14px 4px 8px; }
.chat-conversa-item .chat-status { font-size: 10px; color: var(--verde); }

.chat-area-topo { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--borda); margin-bottom: 8px; }
.chat-btn-voltar { width: 38px; height: 38px; border: 1px solid var(--borda); border-radius: 10px; background: var(--card); color: var(--texto); font-size: 16px; cursor: pointer; flex-shrink: 0; }
.chat-btn-voltar:active { background: var(--card-hover); }
.chat-area-titulo { font-size: 15px; font-weight: 700; }

.chat-codigo-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--borda); }
.chat-codigo-dica { font-size: 11px; color: var(--texto-2); margin-bottom: 8px; line-height: 1.4; }
.chat-codigo-dica b { color: var(--acento); }

/* ===== PAINEL DO ADMIN ===== */
.painel-bloco { background: var(--card); border: 1px solid var(--borda); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.painel-bloco h3 { font-size: 15px; margin-bottom: 4px; }
.painel-dica { font-size: 12px; color: var(--texto-2); margin-bottom: 12px; line-height: 1.4; }
.painel-codigo-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.painel-codigo { font-size: 18px; font-weight: 800; color: var(--acento); background: rgba(56,189,248,0.1); padding: 8px 14px; border-radius: 10px; letter-spacing: 1px; }
.painel-carregando { font-size: 13px; color: var(--texto-2); }
.painel-membro { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.painel-membro:last-child { border-bottom: none; }
.painel-membro-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.painel-membro-info { min-width: 0; }
.painel-membro-nome { font-size: 14px; font-weight: 600; }
.painel-membro-email { font-size: 12px; color: var(--texto-2); word-break: break-all; }
.painel-badge-admin { font-size: 10px; font-weight: 800; color: #facc15; background: rgba(250,204,21,0.15); padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
