/* ==============================
   INOVARSOFT OS · Tela de Login
   Tema tecnológico azul
   ============================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --azul:        #2563eb;
  --azul-escuro: #1d4ed8;
  --azul-claro:  #38bdf8;
  --ciano:       #06b6d4;
  --bg:          #050a1a;
  --texto:       #e2e8f0;
}

html, body { height: 100%; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(ellipse at 50% -20%, #0d2148 0%, var(--bg) 65%);
  color: var(--texto);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Camadas de fundo ---- */
#particles {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
}

.grid-overlay {
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(56,189,248,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
}

.glow {
  position: fixed; border-radius: 50%;
  filter: blur(110px); z-index: 0; pointer-events: none;
  opacity: .5;
}
.glow-1 { width: 520px; height: 520px; background: #1d4ed8; top: -160px; left: -120px; animation: flutuar 9s ease-in-out infinite; }
.glow-2 { width: 420px; height: 420px; background: #0891b2; bottom: -140px; right: -100px; animation: flutuar 12s ease-in-out infinite reverse; }
@keyframes flutuar { 0%,100% { transform: translate(0,0); } 50% { transform: translate(45px, 35px); } }

/* ---- Card ---- */
.login-wrap {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%; max-width: 420px;
  background: rgba(13, 25, 48, .55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 24px;
  padding: 44px 38px 28px;
  box-shadow: 0 25px 60px rgba(2, 6, 23, .75), inset 0 1px 0 rgba(255,255,255,.06);
  animation: surgir .7s cubic-bezier(.22, 1, .36, 1);
}
@keyframes surgir {
  from { opacity: 0; transform: translateY(30px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* ---- Logo e título ---- */
.logo-area { text-align: center; margin-bottom: 32px; }

.logo {
  width: 76px; height: auto;
  filter: drop-shadow(0 0 16px rgba(37, 99, 235, .7));
  animation: pulsar 4s ease-in-out infinite;
}
@keyframes pulsar {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(37, 99, 235, .5)); }
  50%      { filter: drop-shadow(0 0 28px rgba(56, 189, 248, .95)); }
}

h1 {
  margin-top: 16px; font-size: 1.7rem; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(90deg, #fff, #93c5fd);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
h1 span {
  background: linear-gradient(90deg, var(--azul-claro), var(--ciano));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.subtitle {
  margin-top: 7px; color: #7d93b8; font-size: .78rem;
  letter-spacing: 3px; text-transform: uppercase;
}

/* ---- Campos ---- */
.field { margin-bottom: 20px; }
.field label {
  display: block; margin-bottom: 8px;
  font-size: .76rem; font-weight: 600; letter-spacing: .8px;
  color: #9fb3d1; text-transform: uppercase;
}

.input-group { position: relative; display: flex; align-items: center; }

.input-group input {
  width: 100%; padding: 13px 46px 13px 44px;
  background: rgba(3, 10, 26, .6);
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: 12px;
  color: #eaf2ff; font-size: .95rem; font-family: inherit;
  outline: none; transition: all .25s ease;
}
.input-group input::placeholder { color: #4a5f80; }
.input-group input:focus {
  border-color: var(--azul-claro);
  background: rgba(3, 10, 26, .85);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .14), 0 0 24px rgba(56, 189, 248, .18);
}

.input-group > svg {
  position: absolute; left: 14px; width: 17px; height: 17px;
  stroke: #5b7194; transition: stroke .25s; pointer-events: none;
}
.input-group input:focus ~ svg { stroke: var(--azul-claro); }

.ic-senha { left: auto !important; right: 44px !important; }

.toggle-senha {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  color: #5b7194; display: flex; padding: 4px; transition: color .2s;
}
.toggle-senha:hover, .toggle-senha.ativo { color: var(--azul-claro); }
.toggle-senha svg { width: 17px; height: 17px; }

/* ---- Botão ---- */
.btn-entrar {
  width: 100%; padding: 14px; margin-top: 8px;
  background: linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul) 55%, var(--ciano) 140%);
  border: none; border-radius: 12px;
  color: #fff; font-weight: 700; font-size: .92rem;
  letter-spacing: 1.6px; text-transform: uppercase;
  font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .4);
  transition: all .3s ease;
}
.btn-entrar svg { width: 17px; height: 17px; stroke: #fff; transition: transform .3s; }
.btn-entrar:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(37, 99, 235, .55);
  filter: brightness(1.08);
}
.btn-entrar:hover svg { transform: translateX(5px); }
.btn-entrar:active { transform: translateY(0); }

/* ---- Alertas ---- */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  font-size: .86rem; margin-bottom: 20px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-erro {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .4);
  color: #fca5a5;
  animation: tremer .4s ease;
}
.alert-ok {
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .4);
  color: #6ee7b7;
}
@keyframes tremer {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ---- Rodapé do card ---- */
.card-footer {
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid rgba(56, 189, 248, .12);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .74rem; color: #5b7194;
}
.badge-versao {
  background: rgba(56, 189, 248, .12);
  border: 1px solid rgba(56, 189, 248, .25);
  color: var(--azul-claro);
  padding: 3px 10px; border-radius: 20px; font-weight: 600;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .login-card { padding: 34px 24px 22px; border-radius: 18px; }
  .logo { width: 62px; }
  h1 { font-size: 1.45rem; }
}