/* css/auth.css - Authentication Pages Theme */

.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* min-height: 100vh; */
  padding: 1rem;
  background-color: var(--bg-body, #f8fafc);
}

.auth-card {
  width: 100%;
  max-width: 35rem; /* approx 450px */
  background: var(--bg-primary, #ffffff);
  border-radius: 0.5rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color, #e2e8f0);
  overflow: hidden;
}

.auth-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  line-height: 1.25;
}

.auth-subtitle {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Password field wrapper for toggle icon */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .form-control {
  padding-right: 2.75rem;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--text-primary);
}

.password-toggle:focus {
  outline: none;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--bg-input, #f8fafc);
  color: var(--text-primary, #1e293b);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control-error {
  border-color: #ef4444 !important;
}

.form-control-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-error-text {
  color: #ef4444; /* Red-500 */
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.form-checkbox-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.form-checkbox-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.auth-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-color, #4f46e5);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-link:hover {
  text-decoration: underline;
}

.btn-auth {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  background: var(--primary-color, #4f46e5);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-auth:hover {
  background-color: var(--primary-dark, #4338ca);
}

.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: bold;
}

/* OTP Specific Styles */
.auth-otp-group {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.auth-otp-input {
  width: 3rem !important;
  height: 3rem !important;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--bg-input, #f8fafc);
  color: var(--text-primary, #1e293b);
  transition: all 0.2s ease;
}

.auth-otp-input:focus {
  outline: none;
  border-color: var(--primary-color, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

.resend-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
}

.resend-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.resend-btn:hover:not(:disabled) {
  text-decoration: underline;
}

/* Password Strength & Requirements */
.password-strength {
  height: 6px;
  background-color: var(--border-color, #e2e8f0);
  border-radius: 3px;
  margin: 0.5rem 0;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

.strength-weak {
  background-color: #ef4444;
  width: 33%;
}
.strength-medium {
  background-color: #f59e0b;
  width: 66%;
}
.strength-strong {
  background-color: #10b981;
  width: 100%;
}

.password-requirements {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin-top: 0.25rem;
}

.back-link-wrapper {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.hidden {
  display: none !important;
}
