/* ─── LOGIN VIEW ─── */
#login-view {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
#login-view.d-none {
  display: none;
}

/* ─── Login top accent line ─── */
.login-accent-line {
  width: 100%;
  height: 20px;
  background: var(--primary);
  flex-shrink: 0;
}

/* ─── Logo below accent line ─── */
.login-logo-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0 0.5rem;
  flex-shrink: 0;
}
.login-logo-top img {
  width: 90px;
  height: auto;
}

/* ─── Login body (centered) ─── */
.login-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  min-height: 0;
}

/* ─── Login card ─── */
.login-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(135deg, rgba(131,188,40,0.93) 0%, rgba(37,177,207,0.93) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  box-shadow:
    0 12px 40px rgba(37,177,207,0.25),
    0 4px 12px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2);
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
  backdrop-filter: blur(6px);
}

/* ─── User icon ─── */
.login-user-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  border: 2px solid rgba(255,255,255,0.3);
}
.login-user-icon i {
  font-size: 1.5rem;
  color: #fff;
}

/* ─── Login text ─── */
.login-title {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  letter-spacing: -0.3px;
}
.login-subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  font-weight: 300;
  margin-bottom: 1.25rem;
}

/* ─── Login form ─── */
.login-form .form-label {
  color: rgba(255,255,255,0.95);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  display: block;
  margin-bottom: 0.35rem;
}
.login-form .form-control {
  background: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  width: 100%;
  transition: box-shadow 0.2s ease;
}
.login-form .form-control::placeholder {
  color: var(--text-muted);
}
.login-form .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.35);
}
.login-form .input-group {
  margin-bottom: 1rem;
  flex-wrap: nowrap;
}
.login-form .input-group-text {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  border-radius: 10px 0 0 10px;
  padding: 0.7rem 0.85rem;
}
.login-form .input-group .form-control {
  border-radius: 0 10px 10px 0;
}
.login-form .input-group .form-control:focus + .input-group-text,
.login-form .input-group:has(.form-control:focus) .input-group-text {
  background: rgba(255,255,255,0.3);
}

/* ─── Password toggle ─── */
.btn-toggle-pw {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  border-radius: 0 10px 10px 0;
  padding: 0.7rem 0.85rem;
  transition: background 0.2s ease;
}
.btn-toggle-pw:hover {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* ─── Login button ─── */
.btn-entrar {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 10px;
  background: var(--primary);
  border: none;
  color: #fff;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-entrar:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
.btn-entrar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── Login footer ─── */
.login-footer {
  text-align: center;
  padding-bottom: 0.5rem;
}
.login-footer-line {
  width: 100%;
  height: var(--accent-line);
  background: var(--primary);
}
.login-footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 0.4rem;
}
.login-footer-logo {
  width: 40px;
  height: auto;
}
.login-footer-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 575.98px) {
  .login-body {
    padding: 0.75rem 1rem;
  }
  .login-card {
    padding: 1.5rem 1.25rem;
  }
  .login-title {
    font-size: 1.2rem;
  }
}
