/* حساب الزبون: فوق ستايل لوحة الطلبات (admin.css) */
.ac-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.ac-help a {
  color: var(--navy);
  font-weight: 600;
}

.ac-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.ac-wrap .d-card {
  margin: 0;
}

/* ---------- صفحتي: الهوية، الرابط، الأزرار، وموبايل صغير فيه الصفحة الحقيقية ---------- */
.ac-me {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 26px 28px;
  overflow: hidden;
}

/* دواير خفيفة بالزاوية: من روح الشعار (خطوط بس) */
.ac-me::before {
  content: "";
  position: absolute;
  top: -140px;
  inset-inline-end: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid #e4e8d8;
  box-shadow: 0 0 0 46px #f6f7ed, 0 0 0 47px #eef0e3, 0 0 0 93px #f6f7ed, 0 0 0 94px #eef0e3;
  pointer-events: none;
}

.ac-me-main {
  position: relative;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.ac-id {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.ac-av {
  width: 76px;
  height: 76px;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 0 0 4px #f6f7ed, 0 0 0 5px var(--line);
}

.ac-id-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ac-id-text h2 {
  margin: 0;
  overflow: hidden;
  font-size: 1.55rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-role {
  margin: 0;
  color: var(--muted);
}

/* حالة الصفحة: نقطة بتنبض إذا منشورة */
.ac-state {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  padding: 4px 11px 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ac-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.ac-state.is-live {
  background: #e7f4ec;
  color: #157347;
}

.ac-state.is-live i {
  animation: ac-pulse 2s ease-in-out infinite;
}

.ac-state.is-draft {
  background: #e4e8d8;
  color: var(--navy-2);
}

.ac-state.is-off {
  background: #fdecec;
  color: #b42318;
}

@keyframes ac-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21, 115, 71, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(21, 115, 71, 0); }
}

.ac-linkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--off-white);
  direction: ltr;
}

.ac-linkbox > i {
  color: var(--slate);
}

.ac-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-url:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ac-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  background: var(--navy);
  color: #f6f7ed;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.12s ease;
}

.ac-copy:active {
  transform: scale(0.96);
}

.ac-copy.is-done {
  background: #157347;
}

.ac-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ac-actions .btn {
  transition: transform 0.12s ease;
}

.ac-actions .btn:active {
  transform: scale(0.97);
}

/* الموبايل الصغير: الصفحة الحقيقية، وبيطلع شوي لما تمرّر عليه */
.ac-mini {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
}

.ac-mini-phone {
  display: block;
  width: 196px;
  padding: 7px;
  border-radius: 30px;
  background: var(--navy);
  box-shadow: 0 24px 40px -24px rgba(0, 31, 63, 0.55);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ac-mini:hover .ac-mini-phone {
  transform: translateY(-6px) rotate(-1.5deg);
}

.ac-mini-screen {
  position: relative;
  display: block;
  width: 182px;
  height: 330px;
  overflow: hidden;
  border-radius: 24px;
  background: #f6f7ed;
}

/* الصفحة بعرض موبايل حقيقي (390) متصغّرة */
.ac-mini-screen iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 708px;
  border: 0;
  transform: scale(0.4667);
  transform-origin: top left;
  pointer-events: none;
}

.ac-mini-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ac-mini:hover .ac-mini-hint,
.ac-mini:focus-visible .ac-mini-hint {
  opacity: 1;
  transform: none;
}

/* ---------- الشبكة: التفعيل أو الاشتراك، وجنبه رمز QR ---------- */
.ac-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 14px;
}

.ac-grid > [hidden] {
  display: none;
}

.ac-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 1.05rem;
}

.ac-h i {
  color: var(--navy);
}

.ac-h .a-status {
  margin-inline-start: auto;
}

/* خطوات النشر */
.ac-steps {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.ac-steps li {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
}

.ac-steps li:last-child {
  padding-bottom: 0;
}

/* الخط بين الخطوات */
.ac-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 2px;
  inset-inline-start: 15px;
  width: 2px;
  background: var(--line);
}

.ac-steps li.is-done:not(:last-child)::after {
  background: var(--navy);
}

.ac-step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #f6f7ed;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
}

.ac-steps li.is-done .ac-step-dot {
  border-color: var(--navy);
  background: var(--navy);
  color: #f6f7ed;
}

.ac-steps li.is-now .ac-step-dot {
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.12);
}

.ac-steps b {
  display: block;
  margin-top: 4px;
}

.ac-steps small {
  color: var(--muted);
}

.ac-activate .btn-wa {
  width: 100%;
  justify-content: center;
}

/* الاشتراك: حلقة الأيام الباقية */
.ac-subs-body {
  display: flex;
  align-items: center;
  gap: 24px;
}

.ac-ring {
  position: relative;
  flex: none;
  width: 128px;
  height: 128px;
}

.ac-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg) scaleY(-1); /* بتبلّش من فوق وبتمشي عكس عقارب الساعة (يمين لشمال) */
}

.ac-ring circle {
  fill: none;
  stroke-width: 10;
}

.ac-ring-track {
  stroke: var(--brand-soft);
}

.ac-ring-fill {
  stroke: var(--navy);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ac-ring.is-warn .ac-ring-track {
  stroke: #fdecc8;
}

.ac-ring.is-warn .ac-ring-fill {
  stroke: #d97706;
}

.ac-ring.is-over .ac-ring-track {
  stroke: #fde2e2;
}

.ac-ring-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.ac-ring-num b {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1;
}

.ac-ring-num small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.ac-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.ac-facts dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.ac-facts dd {
  margin: 2px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.ac-left {
  margin: 14px 0 0;
}

/* رمز QR */
.ac-qr-body {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.ac-qr-body p {
  margin: 0;
  font-size: 0.88rem;
}

.ac-qr-code {
  position: relative;
  width: 164px;
  height: 164px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6f7ed;
  transition: transform 0.25s ease;
}

.ac-qr-code:hover {
  transform: scale(1.04);
}

.ac-qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* قبل النشر: الرمز مغبّش وعليه قفل */
.ac-qr.is-locked .ac-qr-code svg {
  filter: blur(5px);
  opacity: 0.55;
}

.ac-qr.is-locked .ac-qr-code:hover {
  transform: none;
}

.ac-qr-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  justify-items: center;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
}

.ac-qr-lock i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #f6f7ed;
}

/* إشعار صغير تحت */
.ac-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 80;
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--navy);
  color: #f6f7ed;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(0, 31, 63, 0.6);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ac-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* الأقسام بتطلع وحدة ورا التانية */
.ac-wrap > *,
.ac-grid > * {
  animation: ac-up 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.ac-grid > :nth-child(2) { animation-delay: 0.06s; }
.ac-grid > :nth-child(3) { animation-delay: 0.12s; }
.ac-wrap > :nth-child(3) { animation-delay: 0.1s; }
.ac-wrap > :nth-child(4) { animation-delay: 0.14s; }

@keyframes ac-up {
  from { opacity: 0; translate: 0 10px; }
}

@media (max-width: 760px) {
  .ac-me {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 18px;
  }

  .ac-mini {
    display: none;
  }

  .ac-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ac-av {
    width: 64px;
    height: 64px;
  }

  .ac-id-text h2 {
    font-size: 1.3rem;
  }

  .ac-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .ac-actions .btn-primary {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-wrap > *,
  .ac-grid > *,
  .ac-state.is-live i {
    animation: none;
  }

  .ac-ring-fill {
    transition: none;
  }
}

.ac-renew {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7e6;
}

.ac-renew p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.ac-pay {
  margin-top: 14px;
}

.ac-pay summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 600;
}

.ac-pw .btn {
  margin-top: 4px;
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}


/* ---------- الدخول وإنشاء الحساب ---------- */
.ac-auth {
  max-width: 520px;
  margin: 0 auto;
}

.ac-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: var(--tint);
}

.ac-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.ac-tabs button[aria-selected="true"] {
  background: #f6f7ed;
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(0, 31, 63, 0.08);
}

.ac-form {
  display: grid;
  gap: 2px;
}

.ac-form .btn-lg {
  margin-top: 8px;
}

.ac-lead {
  margin: 0 0 14px;
  color: var(--muted);
}

.ac-slug-msg {
  min-height: 1.4em;
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.ac-slug-msg.is-ok {
  color: #157347;
}

.ac-slug-msg.is-bad {
  color: #b91c1c;
}

/* ---------- التفعيل: اختيار الباقة ---------- */
.ac-activate {
  border: 1px solid var(--navy);
}

.ac-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.ac-plan {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f7ed;
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ac-plan:hover {
  border-color: var(--slate);
}

.ac-plan.is-active {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}

.ac-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ac-plan-top .chip {
  font-size: 0.72rem;
  padding: 0.2em 0.6em;
}

.ac-plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ac-plan-price strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--navy);
}

.ac-plan-price small,
.ac-plan-tag {
  color: var(--muted);
  font-size: 0.85rem;
}

.ac-plan ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.88rem;
}

.ac-plan li {
  display: flex;
  gap: 8px;
}

.ac-plan li i {
  margin-top: 0.3em;
  font-size: 0.75rem;
  color: var(--navy-2);
}

.ac-req {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--brand-soft);
}

.ac-req p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.ac-req-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--navy);
  color: #f6f7ed;
}

@media (max-width: 760px) {
  .ac-plans {
    grid-template-columns: 1fr;
  }
}

/* ---------- الأساسية: ترغيب بالإحصائيات ---------- */
.ac-upsell {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 20px;
}

.ac-upsell-fake {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 90px;
  padding: 10px;
  border-radius: 10px;
  background: var(--tint);
  direction: ltr;
}

.ac-upsell-fake i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--slate);
  opacity: 0.6;
}

.ac-upsell-text strong {
  display: block;
  margin-bottom: 4px;
}

.ac-upsell-text p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 560px) {
  .ac-upsell {
    grid-template-columns: 1fr;
  }
}

/* ================= الدخول وإنشاء الحساب: شاشة كاملة ================= */
.is-auth .d-top,
.is-auth .a-main {
  display: none;
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); /* الجهة الكحلية (أول عنصر) أعرض */
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
}

/* ---------- جهة الهوية (كحلي): الكلام بجهة، والموبايل كامل بجهة ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  column-gap: 48px;
  padding: 40px 56px 48px;
  background-color: var(--navy);
  /* تدرّج الهوية: كحلي فوق عند الكلام، وليموني بالزاوية تحت عند الموبايل */
  background-image: linear-gradient(200deg, var(--navy) 0%, var(--navy) 45%, #0a4f66 62%, #0f8a83 76%, #7cc06a 90%, var(--lime) 100%);
  color: #f6f7ed;
}

.auth-logo {
  position: relative;
  grid-column: 1 / -1;
  align-self: start;
  justify-self: start;
  font-size: 1.05rem;
}

.auth-pitch {
  position: relative;
}

/* السطرين ما بينكسروا، والحجم على قد المكان */
.auth-pitch h2 {
  font-size: clamp(1.7rem, 2.2vw, 3rem);
  line-height: 1.25;
  white-space: nowrap;
  margin-bottom: 26px;
}

.auth-pitch ul {
  font-size: clamp(0.95rem, 1vw, 1.1rem);
}

.auth-pitch h2 span {
  color: var(--slate);
}

.auth-pitch ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(246, 247, 237, 0.85);
}

.auth-pitch li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-pitch li i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: rgba(246, 247, 237, 0.1);
  font-size: 0.85rem;
}

/* موبايل صغير كامل فيه صفحة حقيقية، والطول على قد الشاشة */
.auth-phone {
  /* العرض على قد طول الشاشة وعرضها، والطول بنسبة موبايل */
  --pw: clamp(220px, min(calc((100vh - 170px) * 0.49), 21vw), 330px);
  --ph: calc(var(--pw) / 0.49);
  position: relative;
  width: var(--pw);
  margin-inline-end: 44px; /* مكان «تم حفظ جهة الاتصال» الطالعة من جنبه */
  padding: 9px;
  border-radius: 36px;
  background: #050f1f;
  box-shadow: 0 0 0 1px rgba(246, 247, 237, 0.14), 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  animation: auth-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.auth-phone-screen {
  overflow: hidden;
  height: calc(var(--ph) - 18px);
  border-radius: 28px;
  background: #f6f7ed;
}

.auth-phone-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-chip {
  position: absolute;
  top: 40%;
  inset-inline-end: -64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border-radius: 12px;
  background: #f6f7ed;
  color: var(--navy);
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.6);
  animation: auth-float 6s ease-in-out infinite;
}

.auth-chip span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--navy);
  color: #f6f7ed;
  font-size: 0.8rem;
}

/* جهة ضيقة (لابتوب صغير): الكلام فوق والموبايل تحته بالنص */
@media (min-width: 900px) and (max-width: 1179px) {
  .auth-brand {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    row-gap: 28px;
    padding: 36px 40px 40px;
  }

  .auth-pitch h2 {
    margin-bottom: 18px;
  }

  .auth-phone {
    --pw: clamp(150px, calc((100vh - 440px) * 0.49), 200px);
    justify-self: center;
    align-self: end;
    margin-inline-end: 0;
  }
}

.auth-rings {
  position: absolute;
  left: 26%;
  top: 50%;
  width: 520px;
  height: 520px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (max-width: 1179px) {
  .auth-rings {
    left: 50%;
    top: auto;
    bottom: -120px;
    transform: translateX(-50%);
  }
}

.auth-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(138, 152, 168, 0.35);
  opacity: 0;
  animation: auth-ring 7.5s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.auth-rings span:nth-child(2) { animation-delay: 2.5s; }
.auth-rings span:nth-child(3) { animation-delay: 5s; }

@keyframes auth-ring {
  0% { transform: scale(0.4); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes auth-rise {
  from { translate: 0 40px; opacity: 0; }
}

@keyframes auth-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* ---------- جهة النموذج ---------- */
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
}

.auth-logo-m {
  display: none;
}

.auth-card {
  width: min(460px, 100%);
}

@media (min-width: 900px) {
  .auth-head h1 {
    font-size: 2rem;
  }

  .auth-head p {
    font-size: 1.02rem;
  }

  .auth .auth-input input,
  .auth-eye {
    height: 54px;
  }

  .auth-submit {
    height: 54px;
    font-size: 1.02rem;
  }

  .auth-tabs button {
    padding: 12px;
    font-size: 1rem;
  }
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: #e4e8d8;
}

.auth-tabs button {
  position: relative;
  z-index: 1;
  padding: 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-tabs button[aria-selected="true"] {
  color: var(--navy);
}

/* الخلفية البيضا بتنزلق بين التبويبين */
.auth-tabs-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  inset-inline-start: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: #f6f7ed;
  box-shadow: 0 1px 3px rgba(0, 31, 63, 0.12);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.auth-tabs[data-on="login"] .auth-tabs-pill {
  transform: translateX(-100%);
}

/* بالإنجليزي «تسجيل الدخول» عاليمين، فالخلفية بتنزلق لليمين */
[dir="ltr"] .auth-tabs[data-on="login"] .auth-tabs-pill {
  transform: translateX(100%);
}

.auth-form {
  display: grid;
  gap: 14px;
  animation: auth-in 0.35s ease both;
}

@keyframes auth-in {
  from { opacity: 0; translate: 0 6px; }
}

.auth-head h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.auth-label-row a {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy-2);
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f7ed;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.auth-input.is-invalid {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.auth-input > i {
  flex: none;
  width: 44px;
  text-align: center;
  color: var(--slate);
  font-size: 0.92rem;
}

.auth-input:focus-within > i {
  color: var(--navy);
}

/* specificity أعلى من ستايل الحقول العام بـ dashboard.css */
.auth .auth-input input,
.auth .auth-input input:hover,
.auth .auth-input input:focus {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth .auth-input input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 0 0 14px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.auth-input input::placeholder {
  color: #a3afbd;
}

/* حقول اللاتيني (البريد، كلمة السر، الرابط) مكتوبة يسار، فالأيقونة يسار كمان */
.auth-input:has(input[dir="ltr"]) {
  flex-direction: row-reverse;
}

.auth .auth-input:has(input[dir="ltr"]) input {
  padding: 0 14px 0 0;
  text-align: left;
}

.auth-slug {
  flex-direction: row !important;
}

.auth .auth-slug input {
  padding: 0;
}

.auth-eye {
  flex: none;
  width: 44px;
  height: 50px;
  border: 0;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
}

.auth-eye:hover {
  color: var(--navy);
}

.auth .auth-input:has(.auth-eye) input {
  padding: 0 16px;
}

.auth-strength {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 16px;
}

.auth-strength span {
  height: 4px;
  border-radius: 2px;
  background: #e4e8d8;
  transition: background 0.2s ease;
}

.auth-strength small {
  min-width: 48px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: left;
}

.auth-strength[data-score="1"] span:nth-child(1) { background: #b42318; }
.auth-strength[data-score="2"] span:nth-child(-n + 2) { background: #b7791f; }
.auth-strength[data-score="3"] span:nth-child(-n + 3) { background: #157347; }

.auth-slug-state {
  flex: none;
  width: 40px;
  text-align: center;
}

.auth-slug-state.is-ok { color: #157347; }
.auth-slug-state.is-bad { color: #b42318; }
.auth-slug-state.is-wait { color: var(--slate); }

.auth-slug-state.is-wait i {
  animation: auth-spin 0.9s linear infinite;
}

.auth-slug-preview {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Manrope", var(--font);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: left;
}

.auth-slug-preview b {
  color: var(--navy);
  font-weight: 600;
}

.auth-slug-msg {
  min-height: 0;
  margin: -2px 0 0;
  font-size: 0.82rem;
}

.auth-slug-msg:empty {
  display: none;
}

.auth-slug-msg.is-ok { color: #157347; }
.auth-slug-msg.is-bad { color: #b42318; }

.auth-error {
  margin: 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fef3f2;
  color: #b42318;
  font-size: 0.9rem;
}

.auth-submit {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 4px;
}

.auth-spin {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(246, 247, 237, 0.35);
  border-top-color: #f6f7ed;
  animation: auth-spin 0.8s linear infinite;
}

.auth-submit.is-loading .auth-spin {
  display: block;
}

.auth-submit:disabled {
  opacity: 0.85;
  cursor: progress;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-switch {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-switch button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.auth-foot a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- موبايل وتابلت: بس النموذج، نظيف وبالنص، بشاشة وحدة ---------- */
@media (max-width: 899px) {
  .auth {
    grid-template-columns: 1fr;
    background: #f6f7ed;
  }

  .auth-brand {
    display: none;
  }

  .auth-main {
    justify-content: center;
    gap: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .auth-logo-m {
    display: inline-flex;
    align-self: center;
    margin: 0 0 24px;
    font-size: 1rem;
  }

  .auth-card {
    width: 100%;
    max-width: 420px;
  }

  .auth-tabs {
    margin-bottom: 24px;
  }

  .auth-form {
    gap: 12px;
  }

  .auth-head {
    margin-bottom: 6px;
    text-align: center;
  }

  .auth-head h1 {
    margin-bottom: 6px;
    font-size: 1.6rem;
  }

  .auth-head p {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  /* اللوغو فوق بيكفي: ما منكرّر أيقونة تانية بشاشة الكود */
  .auth-mail-icon {
    display: none;
  }

  /* الحقول: رمادي فاتح هادي، وبتبيضّ مع إطار كحلي وقت الكتابة */
  .auth-input {
    border-color: transparent;
    border-radius: 12px;
    background: #eef0e3;
  }

  .auth-input:focus-within {
    border-color: var(--navy);
    background: #f6f7ed;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
  }

  .auth-input.is-invalid {
    background: #f6f7ed;
  }

  .auth .auth-input input,
  .auth-eye {
    height: 52px;
  }

  /* النموذج كله بشاشة وحدة: الأيقونة والنص المساعد بيكفّوا بدل العناوين */
  .auth-field > label,
  .auth-label-row label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .auth-label-row {
    justify-content: flex-end;
    margin-bottom: -4px;
  }

  .auth-field {
    gap: 6px;
  }

  .auth-strength:not([data-score]),
  .auth-strength[data-score="0"] {
    display: none;
  }

  .auth-slug-preview {
    padding: 0 4px;
  }

  /* علامة ✓ جوّا الحقل بتكفي؛ منخلّي رسالة «محجوز» بس */
  .auth-slug-msg.is-ok {
    display: none;
  }

  .auth-submit {
    height: 52px;
    margin-top: 6px;
    border-radius: 12px;
  }

  .auth-switch {
    margin-top: 4px;
  }

  .auth-foot {
    display: none;
  }
}

/* ---------- موبايل: لمسات احترافية (اللوغو، التبويبات، الحقول بعناوين طايرة، الزر) ---------- */
@media (max-width: 899px) {
  .auth-main {
    position: relative;
    overflow: hidden;
  }

  /* دواير ناعمة جداً ورا اللوغو: من روح NFC بالهوية (خطوط بس، بلا تدرّج) */
  .auth-main::before {
    content: "";
    position: absolute;
    top: calc(-60px + env(safe-area-inset-top, 0px));
    left: 50%;
    width: 150px;
    height: 150px;
    margin-left: -75px;
    border-radius: 50%;
    border: 1px solid #e4e8d8;
    box-shadow: 0 0 0 54px #f6f7ed, 0 0 0 55px #e4e8d8, 0 0 0 109px #f6f7ed, 0 0 0 110px #eef0e3, 0 0 0 164px #f6f7ed, 0 0 0 165px #eef0e3;
    pointer-events: none;
  }

  .auth-logo-m,
  .auth-card {
    position: relative;
    z-index: 1;
  }

  /* اللوغو الطبيعي: الشعار وجنبه KONTAKTI و«كونتاكتي»، أكبر وبمسافة مريحة */
  .auth-logo-m {
    gap: 0.6em;
    margin-bottom: 28px;
    font-size: 1.7rem;
  }

  .auth-logo-m .kt-word {
    letter-spacing: 0.1em;
  }

  /* الشعار (الرمز) أكبر من الكتابة جنبه */
  .auth-logo-m .kt-mark {
    width: 2.5em;
    height: 2.5em;
  }

  /* التبويبات: المختار كحلي */
  .auth-tabs {
    padding: 5px;
    border-radius: 14px;
    background: #eef0e3;
  }

  .auth-tabs button {
    padding: 11px;
  }

  .auth-tabs button[aria-selected="true"] {
    color: #f6f7ed;
  }

  .auth-tabs-pill {
    top: 5px;
    bottom: 5px;
    inset-inline-start: 5px;
    width: calc(50% - 5px);
    border-radius: 10px;
    background: var(--navy);
    box-shadow: 0 6px 14px -8px rgba(0, 31, 63, 0.55);
  }

  .auth-head h1 {
    font-size: 1.7rem;
  }

  .auth-main {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .auth-tabs {
    margin-bottom: 20px;
  }

  .auth-form {
    gap: 11px;
  }

  /* اللوغو أعلى، وبينه وبين النموذج مسافة واضحة (الصفحة بتبلّش من فوق بدل ما يكون كلشي ملزوق بالنص) */
  .auth-main {
    justify-content: flex-start;
    padding-top: calc(clamp(24px, 7svh, 64px) + env(safe-area-inset-top, 0px));
  }

  .auth-logo-m {
    margin-bottom: clamp(36px, 8svh, 72px);
  }

  /* حساب جديد فيه 4 خانات: اللوغو أصغر شوي، والمسافات أقل */
  .auth:has(#signup:not([hidden])) .auth-main {
    padding-top: calc(clamp(16px, 4svh, 40px) + env(safe-area-inset-top, 0px));
  }

  .auth:has(#signup:not([hidden])) .auth-logo-m {
    margin-bottom: clamp(24px, 4.5svh, 44px);
    font-size: 1.45rem;
  }

  /* الحقول */
  .auth-input {
    border-width: 1.5px;
    border-radius: 14px;
  }

  .auth-input:focus-within > i {
    color: var(--navy);
  }

  .auth .auth-input input,
  .auth-eye {
    height: 56px;
  }

  /* الزر */
  .auth-submit {
    height: 56px;
    border-radius: 14px;
    font-size: 1.02rem;
    box-shadow: 0 12px 24px -14px rgba(0, 31, 63, 0.7);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
  }

  .auth-submit:active {
    transform: scale(0.98);
    box-shadow: 0 6px 14px -10px rgba(0, 31, 63, 0.7);
  }

  /* النموذج بيطلع عنصر ورا عنصر */
  .auth-form > * {
    animation: auth-up 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .auth-form > :nth-child(2) { animation-delay: 0.04s; }
  .auth-form > :nth-child(3) { animation-delay: 0.08s; }
  .auth-form > :nth-child(4) { animation-delay: 0.12s; }
  .auth-form > :nth-child(5) { animation-delay: 0.16s; }
  .auth-form > :nth-child(6) { animation-delay: 0.2s; }
  .auth-form > :nth-child(n + 7) { animation-delay: 0.24s; }

  @keyframes auth-up {
    from { opacity: 0; translate: 0 10px; }
  }
}

/* عناوين طايرة: اسم الخانة جوّاها، ولما تكتب بيطلع صغير لفوق (المتصفحات الحديثة) */
@supports selector(:has(*)) {
  @media (max-width: 899px) {
    .auth-field {
      position: relative;
    }

    .auth-label-row {
      display: contents;
    }

    /* «نسيتها؟» تحت خانة كلمة السر */
    .auth-label-row a {
      order: 3;
      justify-self: end;
      margin-top: 2px;
      font-size: 0.86rem;
    }

    .auth-field > label,
    .auth-label-row label {
      position: absolute;
      top: 0;
      inset-inline-start: 46px;
      z-index: 2;
      display: flex;
      align-items: center;
      width: auto;
      height: 56px;
      overflow: visible;
      clip: auto;
      font-size: 0.98rem;
      font-weight: 500;
      color: var(--slate);
      pointer-events: none;
      transform-origin: right center;
      transition: transform 0.18s ease, color 0.18s ease;
    }

    /* الخانات الإنجليزية: الأيقونة يسار، فالعنوان على طرف اليمين */
    .auth-field:has(input[dir="ltr"]) > label,
    .auth-field:has(.auth-slug) > label {
      inset-inline-start: 16px;
    }

    .auth-field:has(input:focus) > label,
    .auth-field:has(input:not(:placeholder-shown)) > label,
    .auth-field:has(input:autofill) > label,
    .auth-field:has(input:focus) .auth-label-row label,
    .auth-field:has(input:not(:placeholder-shown)) .auth-label-row label {
      transform: translateY(-12px) scale(0.76);
      font-weight: 600;
    }

    .auth-field:has(input:focus) > label,
    .auth-field:has(input:focus) .auth-label-row label {
      color: var(--navy);
    }

    .auth .auth-field .auth-input input {
      padding-top: 18px;
    }

    /* المثال (placeholder) بيبيّن بس وقت الكتابة، تحت العنوان */
    .auth .auth-field .auth-input input::placeholder {
      color: transparent;
    }

    .auth .auth-field .auth-input input:focus::placeholder {
      color: #aab4c0;
    }
  }
}

/* شاشة قصيرة: زر واتساب العائم كان بيغطّي زر الإرسال */
@media (max-width: 899px) and (max-height: 720px) {
  .is-auth .wa-fab {
    display: none;
  }

  /* تسجيل الدخول فيه مكان: اللوغو فوق وبعيد عن النموذج */
  .auth-main {
    padding-top: calc(clamp(20px, 5svh, 40px) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .auth-logo-m {
    margin-bottom: clamp(28px, 6svh, 48px);
    font-size: 1.45rem;
  }

  /* حساب جديد (4 خانات): مضغوط ليساع بشاشة وحدة */
  .auth:has(#signup:not([hidden])) .auth-main {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  .auth:has(#signup:not([hidden])) .auth-logo-m {
    margin-bottom: 16px;
    font-size: 1.25rem;
  }

  .auth-tabs {
    margin-bottom: 16px;
  }

  .auth .auth-input input,
  .auth-eye,
  .auth .auth-field > label,
  .auth .auth-label-row label {
    height: 52px;
  }

  .auth-submit {
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form > * {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-phone,
  .auth-chip,
  .auth-rings span,
  .auth-form {
    animation: none;
  }
}

/* ---------- كود البريد: 6 خانات (حقل واحد شفّاف فوقها، فبيشتغل اللصق وتعبئة الكود التلقائية) ---------- */
.auth-mail-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #e4e8d8;
  color: var(--navy);
  font-size: 1.4rem;
}

.auth-mail {
  color: var(--navy);
  font-weight: 700;
  word-break: break-all;
}

.auth-code {
  position: relative;
}

/* محدّد أقوى من قاعدة input العامة بـ dashboard.css */
.auth-code .auth-code-input.auth-code-input,
.auth-code .auth-code-input.auth-code-input:focus {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px; /* بيمنع iPhone يكبّر الصفحة */
  letter-spacing: 0;
  outline: none;
  box-shadow: none;
  -webkit-text-fill-color: transparent;
  cursor: text;
}

.auth-code-input::selection {
  background: transparent;
}

.auth-code-slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.auth-code-slots span {
  position: relative;
  display: grid;
  place-items: center;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f7ed;
  font-family: var(--display, "Manrope"), sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.auth-code-slots span.is-filled {
  border-color: var(--navy-2);
}

/* الخانة الجاية: إطار ومؤشر بيرمش */
.auth-code.is-focus .auth-code-slots span.is-next {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.auth-code.is-focus .auth-code-slots span.is-next::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 24px;
  background: var(--navy);
  animation: code-caret 1s steps(1) infinite;
}

@keyframes code-caret {
  50% { opacity: 0; }
}

.auth-code.is-bad .auth-code-slots span {
  border-color: #b42318;
  animation: code-shake 0.35s ease;
}

.auth-code.is-ok .auth-code-slots span {
  border-color: #15803d;
  color: #15803d;
}

@keyframes code-shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-reset-step {
  display: grid;
  gap: 14px;
}

.auth-resend button:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}

@media (max-width: 380px) {
  .auth-code-slots {
    gap: 6px;
  }
  .auth-code-slots span {
    height: 50px;
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-code.is-bad .auth-code-slots span {
    animation: none;
  }
}

/* تغيير كلمة السر: مطوي، بيفتح بكبسة */
.ac-settings > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
}

.ac-settings > summary::-webkit-details-marker {
  display: none;
}

.ac-settings > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-inline-start: auto;
  border-inline-end: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.ac-settings[open] > summary {
  color: var(--navy);
}

.ac-settings[open] > summary::after {
  transform: rotate(-135deg);
}

.ac-settings[open] .ac-pw {
  margin-top: 18px;
}

/* زر اللغة بصفحة الدخول: بالزاوية فوق */
.auth-main {
  position: relative;
}

.auth-lang {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  inset-inline-end: 16px;
  z-index: 5;
  color: var(--navy);
}

/* الإنجليزي: العنوان بيتلفّ (أطول من العربي)، وحقول الإيميل والرابط أيقونتها عاليسار طبيعي */
.kt-en .auth-pitch h2 {
  white-space: normal;
}

[dir="ltr"] .auth-input:has(input[dir="ltr"]) {
  flex-direction: row;
}

[dir="ltr"] .auth .auth-input:has(input[dir="ltr"]) input {
  padding: 0 14px 0 0;
}

@supports selector(:has(*)) {
  @media (max-width: 899px) {
    [dir="ltr"] .auth-field:has(input[dir="ltr"]) > label,
    [dir="ltr"] .auth-field:has(.auth-slug) > label {
      inset-inline-start: 46px;
    }

    [dir="ltr"] .auth-field > label,
    [dir="ltr"] .auth-label-row label {
      transform-origin: left center;
    }
  }
}

/* حلقة الاشتراك: بالإنجليزي مع عقارب الساعة */
[dir="ltr"] .ac-ring svg {
  transform: rotate(-90deg);
}

/* ---------- الدخول بحساب Google ---------- */
.auth-google {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid #dfe3e9;
  border-radius: var(--radius-sm);
  background: #f6f7ed;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}

.auth-google[hidden] {
  display: none;
}

.auth-google:hover {
  border-color: #c5ccd6;
  background: #eef0e3;
}

.auth-google:active {
  transform: scale(0.98);
}

.auth-google:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.auth-google:disabled {
  cursor: progress;
}

.auth-google .auth-spin-dark {
  position: absolute;
  inset-inline-end: 16px;
  border-color: rgba(0, 31, 63, 0.2);
  border-top-color: var(--navy);
}

.auth-google.is-loading .auth-spin {
  display: block;
}

.auth-google-g {
  flex: none;
}

/* «أو بالبريد»: خط رفيع من الجهتين */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-or[hidden] {
  display: none;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e8d8;
}

/* إكمال حساب جديد بـ Google: بلا بريد وكلمة سر، والبريد ظاهر فوق */
#signup.is-google [data-pw-field],
#signup.is-google [data-google],
#signup.is-google [data-google-or],
#signup.is-google .auth-switch {
  display: none;
}

.auth-gchip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #eef0e3;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-gchip[hidden] {
  display: none;
}

.auth-gchip span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: start;
}

.auth-gchip button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@media (max-width: 899px) {
  .auth-google {
    height: 56px;
    border-radius: 14px;
  }
}

@media (max-width: 899px) and (max-height: 720px) {
  .auth-google {
    height: 52px;
  }
}

/* التبويبات فوق بتعمل نفس الشغلة: ما في داعي لسطر «عندك حساب؟» تحت حساب جديد والدخول */
#signup > .auth-switch,
#login > .auth-switch {
  display: none;
}

/* شاشة قصيرة: حساب جديد بلا السطر التعريفي تحت العنوان ليساع كلّه */
@media (max-height: 720px) {
  #signup:not(.is-google) .auth-head p {
    display: none;
  }
}

/* لابتوب بشاشة مش طويلة: حساب جديد (4 خانات + Google) أضيق شوي ليساع بلا سكرول */
@media (min-width: 900px) and (max-height: 900px) {
  .auth:has(#signup:not([hidden])) .auth-tabs {
    margin-bottom: 18px;
  }

  #signup {
    gap: 10px;
  }

  #signup .auth-field {
    gap: 5px;
  }

  #signup .auth-head h1 {
    margin-bottom: 0;
    font-size: 1.75rem;
  }

  #signup:not(.is-google) .auth-head p {
    display: none;
  }

  #signup .auth-input input,
  #signup .auth-eye,
  #signup .auth-google,
  #signup .auth-submit {
    height: 48px;
  }
}

/* موبايل: «أو بالبريد» أقرب للي حوله */
@media (max-width: 899px) {
  #signup .auth-or {
    margin-block: -3px;
  }
}

@supports (background: linear-gradient(in oklch, red, blue)) {
  .auth-brand {
    background-image: linear-gradient(200deg in oklch, var(--navy) 0%, var(--navy) 45%, var(--lime) 115%);
  }
}

/* بطاقة «ثبّت كونتاكتي كتطبيق» */
.ac-install {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 14px;
  margin-bottom: 16px;
}

.ac-install img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

.ac-install b {
  display: block;
  font-size: 1rem;
}

.ac-install small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.6;
}

.ac-install-btns {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ac-install-steps {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin: 0;
  padding-inline-start: 22px;
  color: var(--ink-2);
  line-height: 1.75;
}

/* ---------- التسجيل بخطوتين + رقم واتساب ---------- */
#signup[data-su-step="1"]:not(.is-google) [data-step="2"],
#signup[data-su-step="2"]:not(.is-google) [data-step="1"] {
  display: none;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink-2, #33475f);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

html[dir="ltr"] .auth-back svg {
  transform: scaleX(-1);
}

.auth-back[hidden],
.auth-dots[hidden] {
  display: none;
}

.auth-fine {
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-dots i {
  width: 26px;
  height: 6px;
  border-radius: 3px;
  background: #e4e8d8;
}

.auth-dots i.on {
  background: var(--navy);
}


/* أكمل صفحتك */
.ac-todo {
  margin-bottom: 14px;
}

.ac-todo .ac-h {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-todo-n {
  margin-inline-start: auto;
  font-family: var(--display);
  font-size: 0.9rem;
  color: var(--muted);
}

.ac-todo-bar {
  height: 6px;
  margin: 4px 0 12px;
  border-radius: 999px;
  background: var(--off-white-3);
  overflow: hidden;
}

.ac-todo-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), var(--lime));
  transition: width 0.4s ease;
}

.ac-todo-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-todo-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.ac-todo-list li.is-done a {
  color: var(--muted);
}

.ac-todo-list .ac-step-dot {
  width: 26px;
  height: 26px;
}

.ac-todo-list li:not(.is-done) .ac-step-dot i {
  opacity: 0;
}

.ac-todo-list li.is-done .ac-step-dot {
  border-color: var(--navy);
  background: var(--navy);
  color: #f6f7ed;
}

.ac-todo-go {
  margin-inline-start: auto;
  font-size: 0.8rem;
  color: var(--slate);
}

.ac-todo-list li.is-done .ac-todo-go {
  display: none;
}

html[dir="ltr"] .ac-todo-go {
  transform: scaleX(-1);
}

/* تنزيل رمز QR: نوع الملف + الزر */
.ac-qr-dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ac-qr-dl select {
  width: auto;
  max-width: 100%;
  padding: 8px 12px;
  font-size: 0.88rem;
}
