/* ===== Paleta azul/roxo reluzente (tema existente) ===== */
:root{
  --bg-deep:#0b1030;
  --bg-dark:#160b35;
  --glow-blue:#4f7dff;
  --glow-purple:#b678ff;
  --text:#eaf0ff;
  --muted:#a7b0d9;
  --card:#0f1330;
  --stroke:rgba(255,255,255,0.10);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; color:var(--text);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:
    radial-gradient(1200px 800px at 120% -10%, #1b1160 0%, transparent 60%),
    radial-gradient(1200px 800px at -20% 110%, #0e1650 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-deep), var(--bg-dark));
  overflow-x:hidden;
}

/* brilho suave global */
.bg-glow{
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(600px 400px at 20% 30%, rgba(79,125,255,.25), transparent 60%),
    radial-gradient(700px 450px at 80% 70%, rgba(182,120,255,.25), transparent 65%);
  filter:blur(8px);
}

/* ===== Layout geral (mantido) ===== */
.container{ width:100%; max-width:1300px; margin:0 auto; padding:20px }
.site-header{ position:sticky; top:0; z-index:5;
  background:linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0));
  backdrop-filter:saturate(1.1) blur(6px);
  border-bottom:1px solid var(--stroke);
}
.site-title{ margin:0; font-weight:800; letter-spacing:.3px }

/* ===== Sidebar e cartões genéricos ===== */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border:1px solid var(--stroke);
  border-radius:14px; padding:12px;
}

/* ===== CHAT (mantido) ===== */
.chat-card{background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border:1px solid var(--stroke); border-radius:14px; padding:10px; margin-top:12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);}
.chat-title{ margin:0 0 8px 0; font-size:16px; font-weight:800 }
.chat-sub{ margin:-4px 0 10px; color:var(--muted); font-size:12px }
.chat-board{ height:260px; overflow-y:auto; border:1px solid var(--stroke); border-radius:12px;
  background:linear-gradient(180deg, rgba(79,125,255,.06), rgba(182,120,255,.06)); padding:10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.chat-msg{ background:#12163c; border:1px solid rgba(182,120,255,.22); border-radius:10px;
  padding:8px 10px; margin:6px 0; line-height:1.35; white-space:pre-wrap; word-wrap:break-word }
.chat-meta{ font-size:11px; color:var(--muted); margin-bottom:3px }
.chat-composer{ display:flex; gap:6px; margin-top:8px; align-items:flex-end }
.chat-composer textarea{ flex:1; min-height:60px; max-height:160px; resize:vertical;
  background:#0e1240; color:var(--text); border:1px solid var(--stroke); border-radius:12px; padding:10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); }
.chat-send, .chat-clear{ border:1px solid var(--stroke); border-radius:10px; cursor:pointer;
  background:linear-gradient(120deg, #2a3270, #481a86); color:#d9d6ff; height:38px; min-width:56px; }
.chat-clear{ min-width:40px; }
.chat-status{ font-size:12px; color:var(--muted); margin-top:6px; text-align:right; min-height:1em }

/* ===== LOGIN Melhorado ===== */
.login-shell{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:24px;
  position:relative;
}
.login-card{
  position:relative;
  width:100%; max-width:520px;
  padding:28px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(120% 100% at 120% 0%, rgba(79,125,255,.12), transparent 55%),
    radial-gradient(120% 100% at -20% 100%, rgba(182,120,255,.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow:
    0 30px 80px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(8px) saturate(120%);
}
.login-brand{
  display:flex; align-items:center; gap:12px; margin-bottom:12px;
}
.login-logo{
  width:46px; height:46px; border-radius:12px;
  background:linear-gradient(135deg,#2b2f60,#171a40);
  border:1px solid rgba(255,255,255,.15);
  box-shadow: 0 6px 20px rgba(79,125,255,.35);
}
.login-title{ margin:0; font-size:22px; font-weight:900; letter-spacing:.3px }
.login-sub{ margin:2px 0 8px; color:var(--muted) }

.login-form{ margin-top:10px }
.field{
  display:flex; flex-direction:column; gap:8px; margin-top:14px;
}
.input{
  width:100%; height:52px; padding:0 14px; font-size:16px; color:var(--text);
  background:linear-gradient(180deg, rgba(10,12,40,.85), rgba(13,10,42,.85));
  border:1px solid rgba(255,255,255,.16); border-radius:14px;
  outline:none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 8px 26px rgba(0,0,0,.35);
}
.input:focus{
  border-color: rgba(140,170,255,.75);
  box-shadow:
    0 0 0 3px rgba(140,170,255,.15),
    inset 0 0 0 1px rgba(255,255,255,.06);
}
.btn-primary{
  width:100%; height:52px; margin-top:14px;
  border-radius:14px; border:1px solid rgba(255,255,255,.16);
  background:
    linear-gradient(120deg, #3a4bff, #9a42ff);
  color:#fff; font-weight:900; letter-spacing:.4px; cursor:pointer;
  position:relative; overflow:hidden;
  box-shadow: 0 12px 28px rgba(58,75,255,.35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 14px 34px rgba(154,66,255,.45); }
.btn-primary:active{ transform: translateY(0); box-shadow: 0 8px 18px rgba(58,75,255,.35); }
.btn-sheen::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.25) 35%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 3.2s ease-in-out infinite;
}
@keyframes sheen{ 0%{ transform: translateX(-120%);} 60%{ transform: translateX(120%);} 100%{ transform: translateX(120%);} }

.login-footer{ margin-top:10px; color:var(--muted); font-size:12px; text-align:center }
.err{ color:#ff9aa2; font-weight:700; margin-top:8px; text-align:center }
