:root {
  --navy: #1A2238;
  --navy-2: #0F172A;
  --accent: #E48532;
  --accent-hover: #324369;
  --accent-active: #222D48;
}

* { box-sizing: border-box; }
html, body {
  height: 100%; margin: 0; overflow: hidden;
  font-family: "Nunito", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--navy); color: #fff;
}

.login-page { background: var(--navy); color: #fff; }

.login-shell { display: flex; height: 100vh; }

/* ---- Left / hero ---- */
.login-hero {
  position: relative; flex: 0 0 42%; max-width: 42%;
  background-image: linear-gradient(45deg, #1A2238 10%, #0F172A 100%);
  overflow: hidden;
}
#particles-web { position: absolute; inset: 0; z-index: 1; }
.hero-unit {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.hero-logo { width: 100%; max-width: 250px; height: auto; }
.hero-product { margin-top: 20px; font-size: 15px; letter-spacing: 6px; color: var(--accent); font-weight: 700; }

/* ---- Right / form ---- */
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-form { width: 340px; max-width: 100%; }
.login-form h3 { text-align: center; font-weight: 700; margin: 0 0 28px; font-size: 22px; color: #fff; }
.login-form h3 .accent { color: var(--accent); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 7px; color: #cdd3e0; }
.form-control {
  width: 100%; height: 44px; padding: 8px 14px; border-radius: 6px;
  border: 1px solid #33405e; background: #101828; color: #fff; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #7c869c; font-size: 14px; }
.form-control:focus { background: #fff; color: #1A2238; border-color: var(--accent); border-width: 2px; box-shadow: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 46px; margin-top: 14px; border: 1px solid transparent;
  border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.btn-primary:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
.btn-primary:active,
.btn-primary.active { background: var(--accent-active) !important; border-color: var(--accent-active) !important; }
.btn-primary:focus,
.btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 0.2rem rgba(228, 133, 50, 0.4); }
.btn[disabled] { opacity: .6; cursor: default; }

.login-error { color: #ff7676; font-size: 13px; min-height: 18px; margin-top: 12px; text-align: center; }

/* Alertas do servidor (Bootstrap) mantidos dentro da coluna do formulário. */
.login-form .alert { margin-top: 16px; text-align: left; }

/* Modal genérico de mensagens (texto escuro sobre fundo claro do Bootstrap). */
.modal-header { color: #555555; }
.modal-body { color: #555555; }

/* Overlay de carregamento. */
#loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11, 16, 30, 0.8);
}
.spinner {
  width: 50px; height: 50px;
  border: 5px solid #333333; border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .login-hero { display: none; }
}
