/* ========================================
   Auth Pages — Login / Register / Reset
   ======================================== */

.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}

.auth-card__bismillah {
  font-family: var(--arabic-font, 'Amiri', serif);
  font-size: 22px;
  color: var(--accent);
  direction: rtl;
  text-align: center;
  margin-bottom: 20px;
  line-height: 2;
  opacity: 0.8;
}

.auth-card__title {
  font-family: var(--font-display, serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.auth-card__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

/* ========================================
   Form Fields
   ======================================== */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-field__input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body, serif);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field__input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-field__input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.auth-field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.auth-field__hint {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-field__error {
  font-size: 12px;
  color: var(--btn-again);
  display: none;
}

.auth-field--error .auth-field__input {
  border-color: var(--btn-again);
}

.auth-field--error .auth-field__error {
  display: block;
}

/* ========================================
   Submit Button
   ======================================== */

.auth-submit {
  width: 100%;
  padding: 12px;
  font-family: var(--font-display, serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--bg-primary);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 6px;
}

.auth-submit:hover {
  background: var(--accent-hover);
}

.auth-submit:active {
  transform: scale(0.99);
}

/* ========================================
   Divider & Links
   ======================================== */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

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

.auth-divider__text {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.auth-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}

.auth-link span {
  color: var(--accent);
  font-weight: 600;
}

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

.auth-forgot {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  align-self: flex-end;
  margin-top: -10px;
}

.auth-forgot:hover {
  color: var(--accent);
}

/* ========================================
   Alert (success / error flash)
   ======================================== */

.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-alert--error {
  background: #fdf0f0;
  border: 1px solid #f0c0c0;
  color: var(--btn-again);
}

.auth-alert--success {
  background: #f0f7f2;
  border: 1px solid #b0d8bc;
  color: var(--btn-good);
}

/* ========================================
   Password strength indicator
   ======================================== */

.auth-strength {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.auth-strength__bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.2s;
}

.auth-strength__bar--weak   { background: var(--btn-again); }
.auth-strength__bar--medium { background: var(--btn-hard); }
.auth-strength__bar--strong { background: var(--btn-good); }

.auth-strength__label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================
   Terms checkbox
   ======================================== */

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-terms input[type='checkbox'] {
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.auth-terms a {
  color: var(--accent);
  text-decoration: none;
}
