/* ============================================
   LOGIN.CSS — Trang đăng nhập
   Mitalab Product Evaluation Tracker
   ============================================ */

/* Toàn trang login: nền gradient xanh */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1565C0 0%, #1976D2 50%, #42A5F5 100%);
  padding: 20px;
}

/* Card đăng nhập */
.login-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

/* Logo / Brand trong card */
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  background: #1976D2;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.login-brand-name {
  font-size: 22px;
  font-weight: 700;
  color: #1565C0;
  text-align: center;
  line-height: 1.2;
}

.login-brand-sub {
  font-size: 13px;
  color: #757575;
  text-align: center;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #424242;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #9E9E9E;
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 11px 12px 11px 40px;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  font-size: 14px;
  color: #212121;
  background: #FAFAFA;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}

.form-control:focus {
  border-color: #1976D2;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.form-control.error {
  border-color: #C62828;
}

/* Nút đăng nhập */
.btn-login {
  width: 100%;
  padding: 13px;
  background: #1976D2;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-login:hover:not(:disabled) {
  background: #1565C0;
}

.btn-login:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-login:disabled {
  background: #90CAF9;
  cursor: not-allowed;
}

/* Loading state trong nút */
.btn-login .btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error message */
.login-error {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #FFCDD2;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Footer card */
.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #9E9E9E;
}

/* Responsive */
@media (max-width: 440px) {
  .login-card {
    padding: 28px 20px;
  }

  .login-brand-name {
    font-size: 18px;
  }
}
