/* ============================================
   Free Diaria — Auth Pages (Modern Clean Design)
   ============================================ */

.auth-body {
  margin: 0;
  min-height: 100vh;
  background: #FAFBFC;
  position: relative;
}

/* Layout */

.auth-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-layout__header {
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.auth-logo:hover {
  opacity: 0.85;
}

.auth-logo__mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.auth-logo__text {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-gray-900);
  letter-spacing: -0.03em;
}

/* Card */

.auth-card {
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--color-gray-100);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  animation: authCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-gray-900);
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-card__subtitle {
  font-size: 0.938rem;
  color: var(--color-gray-500);
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Role selector */

.auth-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 1.75rem;
}

.auth-role-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.auth-role-card__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.auth-role-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 16px;
  background: white;
  transition: all 0.25s ease;
  text-align: center;
}

.auth-role-card__body:hover {
  border-color: var(--color-primary-light);
  background: #EFF6FF;
}

.auth-role-card__input:checked ~ .auth-role-card__body {
  border-color: var(--color-primary);
  background: #EFF6FF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-role-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.25s ease;
}

.auth-role-card__icon svg {
  width: 24px;
  height: 24px;
}

.auth-role-card--worker .auth-role-card__icon {
  background: #EFF6FF;
  color: var(--color-primary);
}

.auth-role-card--worker .auth-role-card__input:checked ~ .auth-role-card__body .auth-role-card__icon {
  background: var(--color-primary);
  color: white;
}

.auth-role-card--employer .auth-role-card__icon {
  background: #ECFDF5;
  color: var(--color-secondary);
}

.auth-role-card--employer .auth-role-card__input:checked ~ .auth-role-card__body .auth-role-card__icon {
  background: var(--color-secondary);
  color: white;
}

.auth-role-card__title {
  font-size: 0.938rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.auth-role-card__desc {
  font-size: 0.813rem;
  color: var(--color-gray-500);
  margin-top: -0.375rem;
}

/* Inputs */

.auth-form .form-group {
  margin-bottom: 1.125rem;
}

.auth-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-600);
  margin-bottom: 6px;
  display: block;
}

.auth-form .form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: 12px;
  background: white;
  color: var(--color-gray-900);
  transition: all 0.2s ease;
  outline: none;
  font-family: var(--font-sans);
}

.auth-form .form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form .form-input::placeholder {
  color: var(--color-gray-400);
}

.auth-form .form-hint {
  display: block;
  font-size: 12px;
  color: var(--color-gray-400);
  margin-top: 4px;
}

/* Checkbox row */

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

.form-group--checkbox .form-label--checkbox {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--color-gray-600);
  cursor: pointer;
}

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

/* Submit */

.auth-form .form-actions {
  margin-top: 1.75rem;
}

.btn--full {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn--success {
  background: var(--color-secondary);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn--success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

/* Auth links */

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-links a,
.auth-links__link {
  font-size: 14px;
  color: var(--color-gray-500);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-links a:hover,
.auth-links__link:hover {
  color: var(--color-primary);
}

/* Footer */

.auth-layout__footer {
  margin-top: 2rem;
}

.auth-footer-text {
  font-size: 13px;
  color: var(--color-gray-400);
}

/* Flash inside card */

.auth-card .flash {
  margin-bottom: 1.25rem;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  animation: none;
  box-shadow: none;
}

/* Error explanation inside card */

.auth-card #error_explanation {
  margin-bottom: 1.25rem;
}

/* Divider */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--color-gray-400);
  font-size: 13px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray-200);
}

/* Error messages */

.form-errors {
  background: #FEF2F2;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.form-errors__title {
  font-size: 14px;
  font-weight: 600;
  color: #DC2626;
  margin-bottom: 0.5rem;
}

.form-errors__list {
  list-style: disc;
  padding-left: 1.25rem;
}

.form-errors__item {
  font-size: 13px;
  color: var(--color-danger);
  margin-bottom: 2px;
}

/* Danger zone (account deletion) */

.auth-danger-zone {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--color-gray-200);
  border-radius: 12px;
  background: var(--color-gray-50);
}

.auth-danger-zone__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-danger);
  margin-bottom: 0.25rem;
}

.auth-danger-zone__text {
  font-size: 13px;
  color: var(--color-gray-500);
  margin-bottom: 1rem;
}

/* Responsive */

@media (max-width: 520px) {
  .auth-card {
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
  }

  .auth-role-selector {
    grid-template-columns: 1fr;
  }

  .auth-card__title {
    font-size: 1.25rem;
  }

  .auth-logo__mark {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .auth-logo__text {
    font-size: 20px;
  }
}
