/* Auth SHERIN — styles alignés sur order-flow.css */
.dj-auth-page {
  background: var(--dj-bg, #f4f6f5);
  min-height: 100vh;
}

.dj-auth-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.dj-auth-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 8px auto 20px;
  border-radius: 18px;
}

.dj-auth-card {
  background: #fff;
  border-radius: var(--dj-radius-lg, 24px);
  box-shadow: var(--dj-shadow, 0 4px 24px rgba(0, 0, 0, 0.08));
  padding: 24px 20px;
}

.dj-auth-card h1 {
  font-size: 1.5rem;
  color: var(--dj-green-dark, #033f38);
  margin: 0 0 8px;
  text-align: center;
}

.dj-auth-card .dj-auth-lead {
  color: var(--dj-muted, #6b7280);
  text-align: center;
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.dj-auth-field {
  margin-bottom: 16px;
}

.dj-auth-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dj-text, #1a1a1a);
  margin-bottom: 6px;
}

.dj-auth-field input,
.dj-auth-field select {
  width: 100%;
  border: 1px solid var(--dj-border, #e5e7eb);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #fff;
}

.dj-auth-field input:focus,
.dj-auth-field select:focus {
  outline: none;
  border-color: var(--dj-green, #04764e);
  box-shadow: 0 0 0 3px rgba(4, 118, 78, 0.12);
}

.dj-auth-password-wrap {
  position: relative;
  display: block;
}

.dj-auth-password-wrap input,
.dj-auth-field input.dj-auth-password,
.dj-auth-page input.dj-auth-password {
  display: block !important;
  width: 100%;
  padding: 12px 48px 12px 14px !important;
  box-sizing: border-box;
  text-align: left !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
}

.dj-auth-toggle-pass {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: 0;
  background: transparent;
  color: var(--dj-muted, #6b7280);
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  line-height: 1;
}

/* Legacy markup: label + input dans le même .dj-auth-password-wrap */
.dj-auth-field.dj-auth-password-wrap .dj-auth-toggle-pass {
  top: auto;
  bottom: 6px;
  transform: none;
}

.dj-auth-toggle-pass i {
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.dj-auth-row {
  display: flex;
  gap: 12px;
}

.dj-auth-row .dj-auth-field {
  flex: 1;
}

.dj-auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 16px;
  font-size: 0.9rem;
  color: var(--dj-muted, #6b7280);
}

.dj-auth-check input {
  width: auto;
}

.dj-auth-error {
  display: none;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.dj-auth-error.is-visible {
  display: block;
}

.dj-auth-error.is-success {
  background: #ecfdf5;
  color: #04764e;
}

.dj-auth-submit {
  width: 100%;
  margin-top: 8px;
}

.dj-auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 0.92rem;
}

.dj-auth-links a {
  color: var(--dj-green, #04764e);
  font-weight: 600;
  text-decoration: none;
}

.dj-auth-links p {
  margin: 8px 0 0;
  color: var(--dj-muted, #6b7280);
}

.dj-auth-form.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.dj-otp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.dj-otp-digit {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 14px 0;
}

.dj-auth-target {
  display: block;
  text-align: center;
  font-weight: 700;
  color: var(--dj-green-dark, #033f38);
  margin-top: 8px;
}

.dj-auth-secondary {
  display: block;
  width: 100%;
  margin-top: 12px;
  text-align: center;
  background: transparent;
  border: 1px solid var(--dj-border, #e5e7eb);
  color: var(--dj-green-dark, #033f38);
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 600;
  cursor: pointer;
}

.dj-profile-card {
  background: #fff;
  border-radius: var(--dj-radius, 16px);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--dj-shadow, 0 4px 24px rgba(0, 0, 0, 0.08));
}

.dj-profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--dj-border, #e5e7eb);
}

.dj-profile-row:last-child {
  border-bottom: 0;
}

.dj-profile-label {
  color: var(--dj-muted, #6b7280);
  font-size: 0.88rem;
}

.dj-profile-value {
  font-weight: 600;
  color: var(--dj-text, #1a1a1a);
  text-align: right;
}

.dj-auth-note {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--dj-muted, #6b7280);
  text-align: center;
}
