/* MovingDoors Login Theme */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
  Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background-color: #f3f4f6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Image Layer */
.login-bg {
  position: fixed;
  inset: 0;
  background: url('../img/bg.webp') top center / cover no-repeat;
  filter: blur(4px);
  z-index: 0;
}

/* Layout */
.login-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  z-index: 1;
}

/* Card */
.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  padding: 56px 40px 64px;
}

/* Logo */
.login-logo {
  display: block;
  width: 200px;
  margin: 0 auto 28px;
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.login-header p {
  font-size: 14px;
  color: #6b7280;
  margin-top: 12px;
  line-height: 1.5;
}

/* Alert / Error Messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Form */
.login-form .form-group {
  margin-bottom: 24px;
}

.login-form .form-group > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #5b4dc0;
  margin-bottom: 8px;
}

.login-form input[type='text'],
.login-form input[type='password'],
.login-form input[type='email'] {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 0;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  background-color: transparent;
  border: none;
  border-bottom: 2px solid #d1d5db;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s ease;
}

.login-form input[type='text']:focus,
.login-form input[type='password']:focus,
.login-form input[type='email']:focus {
  border-bottom-color: #5b4dc0;
}

.login-form input[type='text'].input-error,
.login-form input[type='password'].input-error,
.login-form input[type='email'].input-error {
  border-bottom-color: #ef4444;
}

.login-form input::placeholder {
  color: #9ca3af;
}

/* Field-level error message */
.field-error {
  display: block;
  font-size: 12px;
  color: #ef4444;
  margin-top: 6px;
}

/* Password Wrapper */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover svg {
  stroke: #5b4dc0;
}

/* Remember me */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}

.remember-me input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: #5b4dc0;
  cursor: pointer;
}

.remember-me label {
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

/* Primary Button */
.btn-primary {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 16px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background-color: #5b4dc0;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background-color: #4a3da6;
}

.btn-primary:focus-visible {
  outline: 2px solid #5b4dc0;
  outline-offset: 2px;
}

/* Forgot password */
.forgot-password {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #6b7280;
}

.forgot-password a {
  color: #5b4dc0;
  text-decoration: underline;
  font-weight: 500;
}

.forgot-password a:hover {
  color: #4a3da6;
}

/* Back to login */
.back-to-login {
  text-align: center;
  margin-top: 24px;
}

.back-to-login a {
  font-size: 14px;
  color: #5b4dc0;
  text-decoration: none;
  font-weight: 500;
}

.back-to-login a:hover {
  text-decoration: underline;
  color: #4a3da6;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #e5e7eb;
}

.divider span {
  padding: 0 16px;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Social / Google Button */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  color: #374151;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-social:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.btn-social:focus-visible {
  outline: 2px solid #5b4dc0;
  outline-offset: 2px;
}

.btn-social svg {
  flex-shrink: 0;
}

/* Social hint */
.social-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

/* Responsive — Mobile */
@media (max-width: 480px) {
  .login-bg {
    display: none;
  }

  .login-wrapper {
    padding: 0;
    background-color: #ffffff;
    align-items: flex-start;
  }

  .login-card {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 32px 24px;
  }

  .login-logo {
    margin: 0 auto 24px;
  }

  .login-header {
    text-align: center;
  }
}
