/* ===================== صفحات الدخول (Account/_AuthLayout) ===================== */
body.auth-page {
  min-height: 100vh; margin: 0; padding: 24px 16px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(16,163,127,.14), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(15,29,43,.08), transparent 60%),
    var(--canvas);
}
.auth-shell {
  width: 100%; max-width: 900px; display: grid; grid-template-columns: 5fr 6fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(15,23,42,.12);
}
.auth-hero {
  position: relative; color: #fff; padding: 2.25rem 2rem; display: flex; flex-direction: column; gap: 1.25rem;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(16,163,127,.45), transparent 60%),
    linear-gradient(160deg, #13283b 0%, var(--sidebar-bg) 70%);
}
.auth-hero .brand-mark, .auth-hero .brand-logo { width: 56px; height: 56px; border-radius: 16px; font-size: 1.6rem; }
.auth-hero-title { font-size: 1.5rem; font-weight: 700; margin: 0; color: #fff; line-height: 1.3; }
.auth-hero-sub { color: var(--sidebar-ink); font-size: .92rem; margin: .25rem 0 0; }
.auth-features { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: .75rem; }
.auth-features li { display: flex; gap: .7rem; align-items: center; font-size: .9rem; color: #dbe4ee; }
.auth-features .bi {
  width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); color: #34d3a6; font-size: 1rem; flex-shrink: 0;
}
.auth-hero-foot { font-size: .75rem; color: #6b7c90; }

.auth-panel { padding: 2.25rem 2.25rem 2rem; }
.auth-heading { font-size: 1.35rem; font-weight: 700; margin: 0; }
.auth-sub { color: var(--ink-500); font-size: .9rem; margin: .25rem 0 1.25rem; }

/* تبويبات مقسمة */
.auth-tabs { background: #f1f4f8; border-radius: 12px; padding: 4px; gap: 4px; }
.auth-tabs .nav-link {
  border-radius: 9px; font-weight: 600; color: var(--ink-500); padding: .55rem .5rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: 100%;
}
.auth-tabs .nav-link.active { background: var(--surface); color: var(--brand-700); box-shadow: 0 1px 3px rgba(15,23,42,.1); }

.auth-field { position: relative; }
.auth-field > .bi { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: .9rem; color: var(--ink-400); font-size: 1.05rem; pointer-events: none; }
.auth-field .form-control { padding-inline-start: 2.6rem; height: 3rem; font-size: 1rem; }

/* PIN */
.pin-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.pin-user { cursor: pointer; }
.pin-user label {
  width: 100%; display: flex; align-items: center; gap: .6rem; text-align: start; padding: .55rem .7rem;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink-900);
  justify-content: flex-start;
}
.pin-user label:hover { border-color: var(--brand-500); background: var(--brand-50); color: var(--ink-900); }
.pin-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-100); color: var(--brand-800); font-weight: 700; flex-shrink: 0;
}
.pin-user-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pin-user-text small { color: var(--ink-500); font-weight: 500; }
.pin-user .btn-check:checked + label.btn { background: var(--brand-50); border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(16,163,127,.15); color: var(--ink-900); }
.pin-user .btn-check:checked + label.btn .pin-avatar { background: var(--brand-600); color: #fff; }

.pin-display {
  letter-spacing: .8rem; font-size: 2rem; text-align: center; direction: ltr; height: 3.4rem;
  background: #f7f9fb; border-color: var(--line-strong); border-radius: 12px; font-weight: 700;
}
.pin-display:focus { background: #fff; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; direction: ltr; }
.pin-pad button {
  font-size: 1.5rem; font-weight: 700; height: 3.6rem; border-radius: 12px; touch-action: manipulation;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-900);
}
.pin-pad button:hover { background: #f1f4f8; }
.pin-pad button:active { background: var(--brand-50); border-color: var(--brand-500); transform: translateY(1px); }
.pin-pad button[data-action="clear"] { color: #c2333a; font-size: 1.1rem; }
.pin-pad button[data-action="back"] { color: var(--ink-500); font-size: 1.3rem; }

.auth-submit { height: 3.1rem; font-size: 1.05rem; font-weight: 700; }

@media (max-width: 767.98px) {
  body.auth-page { align-items: flex-start; padding: 16px 12px; }
  .auth-shell { grid-template-columns: 1fr; border-radius: 16px; }
  .auth-hero { padding: 1.1rem 1.25rem; flex-direction: row; align-items: center; gap: .9rem; }
  .auth-hero .brand-mark, .auth-hero .brand-logo { width: 44px; height: 44px; font-size: 1.25rem; border-radius: 12px; }
  .auth-hero-title { font-size: 1.1rem; }
  .auth-hero-sub { font-size: .8rem; margin: 0; }
  .auth-features, .auth-hero-foot { display: none; }
  .auth-panel { padding: 1.4rem 1.25rem 1.5rem; }
}

/* ===================== صفحات مستقلة داخل التطبيق (تغيير كلمة المرور / غير مسموح) ===================== */
.narrow-page { max-width: 480px; margin: 0 auto; }
.narrow-page .card-body { padding: 1.5rem; }
.notice-card { max-width: 520px; margin: 2rem auto 0; text-align: center; }
.notice-card .notice-icon {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: #fde8e8; color: #c2333a;
}
.notice-card .card-body { padding: 2.25rem 1.75rem; }

/* ===================== معالج الإعداد ===================== */
.wizard-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.wizard-steps { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; align-items: center; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow-sm); }
.wizard-step { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.wizard-step a { display: flex; align-items: center; gap: .6rem; color: var(--ink-500); min-width: 0; }
.wizard-step .step-num {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 2px solid var(--line-strong); background: var(--surface); font-weight: 700; color: var(--ink-500);
}
.wizard-step .step-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.wizard-step .step-text small { font-size: .72rem; color: var(--ink-400); }
.wizard-step .step-text span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wizard-step::after { content: ""; flex: 1; height: 2px; background: var(--line); margin: 0 .5rem; min-width: 12px; }
.wizard-step:last-child { flex: 0 1 auto; }
.wizard-step:last-child::after { display: none; }
.wizard-step.done .step-num { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.wizard-step.done a { color: var(--ink-700); }
.wizard-step.done::after { background: var(--brand-500); }
.wizard-step.current .step-num { border-color: var(--brand-600); color: var(--brand-700); box-shadow: 0 0 0 4px rgba(16,163,127,.15); }
.wizard-step.current a { color: var(--ink-900); }
.wizard-nav { display: flex; align-items: center; gap: .5rem; padding-top: 1rem; margin-top: 1.25rem; border-top: 1px solid var(--line); }
.wizard-nav .btn-primary { margin-inline-start: auto; }
.logo-preview { max-height: 72px; max-width: 140px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; background: #fff; }
@media (max-width: 575.98px) {
  .wizard-step .step-text small { display: none; }
  .wizard-step:not(.current) .step-text { display: none; }
}
