/* Nodek OS — tela de login */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600&display=swap');

:root {
  --navy:      #0A1724;
  --navy-2:    #0C1D2D;
  --panel:     #0F2233;
  --line:      #1B3346;
  --border:    #2A4558;
  --blue:      #1E9BE0;
  --blue-txt:  #4FB4EC;
  --white:     #FFFFFF;
  --text:      #C9D6E2;
  --text-dim:  #9FB4C6;
  --text-faint:#7E95A8;
  --error:     #ff6b76;
  --warn:      #fbbf24;
}

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

html, body {
  min-height: 100%;
  background: var(--navy);
  color: var(--white);
  font-family: 'Lexend', system-ui, sans-serif;
}

/* rede de pontos ao fundo (desenhada pelo login.js) */
#plexo { position: fixed; inset: 0; z-index: 0; opacity: .35; pointer-events: none; }

.page {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-wrap: wrap;
}

/* ── Marca ── */
.brand {
  flex: 1 1 520px; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px;
  background: rgba(12, 29, 45, .82);
  border-right: 1px solid var(--line);
}
.brand-top { display: flex; align-items: center; gap: 12px; }
.brand-name { font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.brand-name span, .brand-main h1 span { color: var(--blue-txt); }
.brand-main { display: flex; flex-direction: column; gap: 22px; padding: 48px 0; max-width: 520px; }
.brand-main h1 { font-size: 34px; font-weight: 500; line-height: 1.3; letter-spacing: -.5px; }
.brand-main h1 span { font-weight: 600; }
.brand-main p { font-size: 17px; line-height: 1.6; color: var(--text-dim); }
.brand-foot { font-size: 14px; color: var(--text-faint); }

/* ── Formulário ── */
.right {
  flex: 1 1 420px; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
/* o login.js troca o display dos cards (block/none), então o espaçamento é por margem */
.login-card { width: 100%; max-width: 420px; }
.login-card > * + * { margin-top: 18px; }
.login-card h2 { font-size: 30px; font-weight: 600; letter-spacing: -.5px; }
.login-card > .sub { font-size: 15px; color: var(--text-dim); margin-top: 8px; line-height: 1.5; }
.login-card .btn-login { width: 100%; }
.aviso-titulo { color: var(--warn); }

.campo { display: flex; flex-direction: column; gap: 8px; }
.campo label { font-size: 14px; font-weight: 500; color: var(--text); }
.campo-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.campo input {
  width: 100%; height: 48px;
  padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--white);
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.campo input::placeholder { color: #6F8799; }
.campo input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,155,224,.25); }

.senha-wrap { position: relative; }
.senha-wrap input { padding-right: 52px; }
.olho {
  position: absolute; right: 2px; top: 2px;
  width: 44px; height: 44px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.olho:hover { color: var(--white); }

.forgot { font-size: 14px; color: var(--blue-txt); text-decoration: none; }
.forgot:hover { color: #8FD3FF; text-decoration: underline; }

.remember {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  font-size: 14px; color: var(--text); cursor: pointer;
}
.remember input { width: 18px; height: 18px; accent-color: var(--blue); }

.btn-login {
  height: 50px;
  border: 0; border-radius: 10px;
  background: var(--blue); color: #06121D;
  font: inherit; font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-login:hover { background: #3AAEEF; }
.btn-login:active { transform: scale(.99); }
.btn-login:disabled { cursor: wait; }

button:focus-visible, a:focus-visible, .remember input:focus-visible {
  outline: 3px solid #8FD3FF; outline-offset: 2px;
}

/* mensagens */
.login-error, .msg-erro {
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,107,118,.12); border: 1px solid rgba(255,107,118,.35);
  font-size: 14px; color: var(--error); text-align: center;
}
.login-error { display: none; }
.login-error.show { display: block; }

.card-footer {
  padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-faint); text-align: center;
}

/* primeiro acesso: requisitos e força da senha */
.requisitos {
  flex-direction: column; gap: 5px;
  padding: 10px 14px;
  background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.07); border-radius: 10px;
}
.login-card > .forca { margin-top: 10px; }
.forca-barras { display: flex; gap: 4px; margin-bottom: 4px; }
.forca-barras div { height: 3px; flex: 1; border-radius: 2px; background: var(--border); }
#forca-label { font-size: 12px; color: var(--text-dim); }

/* partículas flutuantes (criadas pelo login.js) */
.particle {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 0; opacity: 0;
  animation: float-up linear infinite;
}
@keyframes float-up {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: .5; }
  90%  { opacity: .2; }
  100% { transform: translateY(-100vh) scale(.4); opacity: 0; }
}

/* ── Celular: marca em cima, formulário embaixo ── */
@media (max-width: 960px) {
  .brand { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 24px; }
  .brand-main { padding: 24px 0 8px; gap: 14px; }
  .sym-grande { display: none; }
  .brand-main h1 { font-size: 26px; }
  .brand-main p { font-size: 15px; }
  .brand-foot { display: none; }
  .right { padding: 32px 20px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .particle { display: none; }
}
