/* =====================================================================
   BI/Analytics Corp. — Login page
   ===================================================================== */

html, body { height: 100%; }
body {
  font-family: var(--bs-body-font-family);
  color: var(--bs-body-color);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 15% 20%, rgba(46,91,255,0.10) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(14,165,168,0.10) 0%, transparent 45%),
    linear-gradient(135deg, #F4F6FB 0%, #EDF1F8 100%);
  display: grid;
  place-items: center;
  padding: 20px;
}

/* Decorativi: blobs sullo sfondo */
body::before, body::after {
  content: "";
  position: fixed; pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: 0;
}
body::before {
  width: 400px; height: 400px;
  top: -120px; left: -120px;
  background: radial-gradient(circle, #6B8DFF 0%, transparent 70%);
}
body::after {
  width: 420px; height: 420px;
  bottom: -150px; right: -150px;
  background: radial-gradient(circle, #0EA5A8 0%, transparent 70%);
}

.login-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
}

.brand-top {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 22px;
}
.brand-logo {
  width: 44px; height: 44px; border-radius: 11px;
  background: linear-gradient(135deg, #2E5BFF 0%, #6B8DFF 100%);
  display: inline-grid; place-items: center;
  color: white; font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 20px rgba(46,91,255,0.32);
}
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.brand-name .slash { color: var(--brand); margin: 0 2px; }

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 34px 30px;
  box-shadow: 0 24px 60px rgba(15,31,58,0.10), 0 2px 6px rgba(15,31,58,0.04);
  border: 1px solid var(--border-soft);
}

h1.login-title {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.login-sub {
  font-size: 14px; color: var(--text-muted-2);
  margin: 0 0 26px;
}

.login-alert {
  background: #FDECF2;
  border: 1px solid #F5C7D4;
  color: #A42651;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-alert i { font-size: 16px; flex-shrink: 0; }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted-2);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-soft); font-size: 16px; pointer-events: none;
  transition: color 0.15s;
}
.input-icon-wrap .form-input:focus ~ i { color: var(--brand); }

.pwd-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-soft);
  border-radius: 7px;
  display: grid; place-items: center;
  padding: 0;
  transition: all 0.15s;
}
.pwd-toggle i {
  position: static;
  font-size: 15px;
  line-height: 1;
  color: inherit;
  pointer-events: none;
}
.pwd-toggle:hover { color: var(--brand); background: var(--brand-soft); }
.pwd-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
#password.form-input { padding-right: 48px; }

.form-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 14px;
  background: #F8FAFD;
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--bs-body-color);
}
.form-input::placeholder { color: var(--text-soft); }
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46,91,255,0.10);
}
.form-input.invalid {
  border-color: #C7335F;
  background: #FDF4F7;
  box-shadow: 0 0 0 4px rgba(199,51,95,0.08);
}

.field-error {
  font-size: 12px; color: #C7335F; font-weight: 600;
  margin-top: 6px; display: none; align-items: center; gap: 4px;
}
.field-error.show { display: flex; }

.options-row {
  display: flex; justify-content: space-between; align-items: center;
  margin: -6px 0 22px;
  font-size: 13px;
}
.remember {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted-2); font-weight: 500;
  cursor: pointer; user-select: none;
}
.remember input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--brand);
  cursor: pointer;
}

.btn-login {
  width: 100%;
  background: var(--brand);
  color: white;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: 0 4px 14px rgba(46,91,255,0.28);
}
.btn-login:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(46,91,255,0.36);
}
.btn-login:active { transform: translateY(0); }
.btn-login .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-login.loading .spinner { display: inline-block; }
.btn-login.loading .btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer-sign {
  text-align: center;
  font-size: 12px; color: var(--text-soft);
  margin-top: 24px; padding: 0 10px;
}

@media (max-width: 520px) {
  .login-card { padding: 28px 22px 24px; }
  h1.login-title { font-size: 20px; }
}
