:root {
  --navy:          #050a18;
  --dark:          #080d1f;
  --blue-deep:     #0a1535;
  --blue-mid:      #0d2060;
  --accent:        #1a6cff;
  --accent-bright: #3d8bff;
  --accent-glow:   rgba(26,108,255,.38);
  --white:         #f0f4ff;
  --gray:          #8899bb;
  --line:          #0d2060;
  --border:        rgba(26,108,255,.18);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Syne', sans-serif;
  background: #050a18;
  color: var(--white);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: none;
  position: relative;
}

/* ── Canvas partículas (fundo) ── */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Cursor ── */
.cursor {
  width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .3s, height .3s;
  mix-blend-mode: screen;
}
.cursor-ring {
  width: 40px; height: 40px;
  border: 1px solid var(--accent); border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .3s, height .3s; opacity: .5;
}

/* ── Wrapper ── */
.login-wrap {
  position: relative; z-index: 10;
  width: 100%; max-width: 460px; padding: 16px;
  animation: fadeUp .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(36px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Card ── */
.card {
  background: rgba(8,13,31,.88);
  border: 1px solid var(--border);
  border-radius: 4px;
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 0 0 1px rgba(26,108,255,.07) inset, 0 32px 80px rgba(0,0,0,.6), 0 0 60px rgba(26,108,255,.06);
  overflow: hidden;
}

/* Barra topo */
.top-bar {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent-bright) 60%, transparent);
}

.card-body { padding: 40px 40px 36px; }

/* ── Logo ── */
.logo-area { text-align: center; margin-bottom: 32px; }

.logo-svg-wrap {
  display: inline-block; margin-bottom: 10px;
  filter:
    drop-shadow(0 0 20px rgba(26,108,255,.75))
    drop-shadow(0 0 8px rgba(61,139,255,.95));
  animation: logoPulse 3.5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { filter: drop-shadow(0 0 20px rgba(26,108,255,.75)) drop-shadow(0 0 8px rgba(61,139,255,.9)); }
  50%     { filter: drop-shadow(0 0 32px rgba(26,108,255,1))   drop-shadow(0 0 14px rgba(61,139,255,1)); }
}

.logo-sub {
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gray);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 0 24px;
}

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(26,108,255,.08); border: 1px solid rgba(26,108,255,.2);
  padding: .32rem .85rem; border-radius: 2px;
  font-family: 'Space Mono', monospace;
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 24px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }

/* ── Alerta ── */
.alerta {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(220,50,50,.09);
  border: 1px solid rgba(220,50,50,.22);
  border-left: 3px solid #e05555;
  border-radius: 2px; padding: 11px 14px;
  font-size: 13px; color: #ff9090;
  margin-bottom: 20px; line-height: 1.5;
}

/* ── Fields ── */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 8px;
}
.input-wrap { position: relative; }
.input-wrap .ico {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray); pointer-events: none; transition: color .2s;
}
.input-wrap:focus-within .ico { color: var(--accent-bright); }
.field input {
  width: 100%; padding: 13px 14px 13px 42px;
  background: rgba(26,108,255,.05);
  border: 1px solid rgba(26,108,255,.2);
  border-radius: 2px; color: var(--white);
  font-family: 'Syne', sans-serif; font-size: 15px;
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.field input::placeholder { color: rgba(136,153,187,.38); }
.field input:focus {
  border-color: var(--accent);
  background: rgba(26,108,255,.09);
  box-shadow: 0 0 0 3px rgba(26,108,255,.14);
}
.toggle-pass {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--gray); cursor: none; padding: 0;
  display: flex; transition: color .2s;
}
.toggle-pass:hover { color: var(--white); }

/* ── Botão ── */
.btn-login {
  width: 100%; padding: 14px; margin-top: 6px;
  background: var(--accent); border: none; border-radius: 2px;
  color: #fff; font-family: 'Syne', sans-serif;
  font-size: .88rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: none; transition: background .3s, box-shadow .3s, transform .15s;
  box-shadow: 0 4px 24px var(--accent-glow);
  position: relative; overflow: hidden;
}
.btn-login::before {
  content: ''; position: absolute; top:0; left:-100%;
  width:100%; height:100%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent);
  transition: left .5s;
}
.btn-login:hover::before { left:100%; }
.btn-login:hover { background: var(--accent-bright); box-shadow: 0 0 40px var(--accent-glow); transform: translateY(-2px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .55; transform: none; }

.spinner {
  display: inline-block; width:14px; height:14px;
  border: 2px solid rgba(255,255,255,.3); border-top-color:#fff;
  border-radius:50%; animation: spin .6s linear infinite;
  vertical-align: middle; margin-right: 7px;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Footer ── */
.card-footer {
  border-top: 1px solid var(--border);
  padding: 13px 40px;
  display: flex; align-items: center; justify-content: center; gap:.5rem;
  font-family: 'Space Mono', monospace; font-size: .6rem;
  letter-spacing: .14em; color: rgba(136,153,187,.35);
  text-transform: uppercase;
}
.card-footer::before, .card-footer::after {
  content:''; flex:1; height:1px;
  background: linear-gradient(to right, transparent, var(--border));
}
.card-footer::after { background: linear-gradient(to left, transparent, var(--border)); }

.copy {
  text-align: center; margin-top: 18px;
  font-family: 'Space Mono', monospace;
  font-size: .58rem; color: rgba(136,153,187,.28); letter-spacing: .1em;
}

/* ── Botão ajuda ── */
.help-btn {
  position: absolute; top: -13px; right: -13px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue-deep); border: 1px solid var(--border);
  color: var(--gray); cursor: none;
  font-family: 'Space Mono', monospace; font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s, box-shadow .2s; z-index: 20;
}
.help-btn:hover { border-color: var(--accent); color: var(--white); box-shadow: 0 0 14px var(--accent-glow); }

/* ── Modal ── */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(5,10,24,.82); backdrop-filter: blur(8px);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-box {
  background: var(--dark); border: 1px solid var(--border);
  border-radius: 4px; max-width: 460px; width: 90%; padding: 34px;
  position: relative; box-shadow: 0 24px 80px rgba(0,0,0,.75);
  animation: fadeUp .4s ease both;
}
.modal-box h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.modal-box h3 span { color: var(--accent); }
.modal-box p  { color: var(--gray); font-size: .86rem; line-height: 1.7; margin-bottom: 10px; }
.modal-box ul { margin-left: 1rem; margin-bottom: 12px; }
.modal-box li { color: var(--gray); font-size: .83rem; margin-bottom: 4px; line-height: 1.6; }
.modal-box strong { color: var(--white); }
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: var(--gray);
  font-size: 22px; cursor: none; transition: color .2s;
}
.modal-close:hover { color: var(--white); }
.btn-fechar {
  margin-top: 16px; padding: .65rem 1.6rem;
  background: var(--accent); border: none; border-radius: 2px;
  color: #fff; font-family: 'Syne', sans-serif;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  cursor: none; transition: background .2s;
}
.btn-fechar:hover { background: var(--accent-bright); }

@media (max-width: 500px) {
  .card-body { padding: 28px 20px 24px; }
  .card-footer { padding: 12px 20px; }
}
