/* ==========================================================================
   نهج الولاية — واجهة الحساب — سمة «المخطوط»
   ملف مستقل تماماً عن app.css (الخاص بلوحة الإدارة).
   ========================================================================== */

@font-face {
  font-family: "Aramesh";
  src: url("/static/fonts/Aramesh-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Aramesh";
  src: url("/static/fonts/Aramesh-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Aramesh";
  src: url("/static/fonts/Aramesh-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f1e6;
  --paper-deep: #efe5d2;
  --card: #fffdf8;
  --ink: #2b2117;
  --ink-soft: #4a3b2a;
  --muted: #7d6b55;
  --gold: #b8862b;
  --gold-dark: #8e6418;
  --gold-light: #e9c77a;
  --line: #e3d5bb;
  --line-soft: #efe6d6;
  --teal: #1f6f63;
  --danger: #a3301f;
  --danger-bg: #fdf1ee;
  --danger-line: #eec4b8;
  --ok-bg: #f0f6f2;
  --ok-line: #c3ddcf;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(80, 60, 30, .14);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Aramesh", Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-dark); text-decoration: none; }
button, input { font: inherit; }

/* ---------- الخلفية الزخرفية ---------- */

.decor { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }

.decor-lattice {
  position: absolute;
  inset: -200px;
  opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><g fill='none' stroke='%23b8862b' stroke-width='.8' opacity='.55'><path d='M70 10 L110 70 L70 130 L30 70 Z'/><path d='M70 10 L30 70 M70 10 L110 70 M70 130 L30 70 M70 130 L110 70'/><path d='M0 70 L70 0 L140 70 L70 140 Z'/><path d='M0 0 L140 140 M140 0 L0 140' stroke-dasharray='2 6'/><circle cx='70' cy='70' r='22'/><circle cx='0' cy='0' r='22'/><circle cx='140' cy='0' r='22'/><circle cx='0' cy='140' r='22'/><circle cx='140' cy='140' r='22'/></g></svg>");
  animation: latticeDrift 60s linear infinite;
  -webkit-mask: radial-gradient(ellipse at 70% 50%, rgba(0, 0, 0, .2), rgba(0, 0, 0, .92) 70%);
  mask: radial-gradient(ellipse at 70% 50%, rgba(0, 0, 0, .2), rgba(0, 0, 0, .92) 70%);
}
@keyframes latticeDrift { to { background-position: 140px 140px; } }

.decor-grain {
  position: absolute;
  inset: 0;
  opacity: .3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* أوراق تطفو ببطء — يُنشئها account.js، وهي زخرفية بحتة */
.leaf {
  position: absolute;
  bottom: -120px;
  width: 38px;
  height: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 8px 20px rgba(80, 60, 30, .1);
  opacity: 0;
  animation: leafFloat linear infinite;
}
.leaf::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 12px;
  height: 2px;
  background: var(--line);
  box-shadow: 0 8px 0 var(--line), 0 16px 0 var(--line), 0 24px 0 var(--line);
}
@keyframes leafFloat {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0; }
  10%  { opacity: .5; }
  90%  { opacity: .5; }
  100% { transform: translateY(-115vh) rotate(14deg); opacity: 0; }
}

/* ---------- التخطيط ---------- */

.wrap {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 72px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px clamp(24px, 5vw, 72px);
}

/* ---------- عمود الهوية ---------- */

.brand-col { text-align: center; }

.medal {
  position: relative;
  width: min(320px, 32vw);
  aspect-ratio: 1;
  margin: 0 auto 28px;
}
.medal-rays {
  position: absolute;
  inset: -55%;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg,
      rgba(184, 134, 43, 0) 0deg, rgba(184, 134, 43, .15) 4deg,
      rgba(184, 134, 43, 0) 9deg, rgba(184, 134, 43, 0) 18deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 62%);
  mask: radial-gradient(circle, #000 20%, transparent 62%);
  animation: medalSpin 80s linear infinite, fadeIn 1.4s .35s forwards;
}
.medal-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  opacity: 0;
  animation: fadeIn .7s .1s forwards;
}
.medal-ring-mid {
  inset: -14px;
  border: 1px dashed rgba(184, 134, 43, .55);
  animation: fadeIn .7s .2s forwards, medalSpin 90s linear infinite;
}
.medal-ring-outer {
  inset: -30px;
  border: 1px solid rgba(184, 134, 43, .25);
  animation: fadeIn .7s .3s forwards, medalSpin 140s linear reverse infinite;
}
.medal-ring-outer::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--gold);
}
/* ---------- نشان المجموعة الحيّ ----------
   بألوان الشعار الأصلية (#0e2f38 و #c9a24b) مباشرةً على الورق، بلا قرص أبيض.
   الحلقة تُرسم عند التحميل، النقطة تتنفّس، وفي صفحة «تم الربط» تُغلق الحلقة (account.js). */
.medal-logo {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.mark { width: 76%; height: 76%; display: block; overflow: visible; }
.mark-ring {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: markDraw 1.3s cubic-bezier(.4, 0, .2, 1) .45s forwards;
}
.mark-dot {
  transform-origin: 300px 300px;
  transform-box: view-box;
  animation: dotIn .7s cubic-bezier(.2, .8, .2, 1) .8s both, breathe 3.2s ease-in-out 1.6s infinite;
}
@keyframes markDraw { to { stroke-dashoffset: 0; } }
@keyframes dotIn { from { opacity: 0; transform: scale(.4); } to { opacity: .88; transform: scale(1); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .88; } 50% { transform: scale(1.07); opacity: 1; } }
/* بعد الربط: الحلقة مغلقة، النقطة تومض، والإطار الذهبي يضيء */
.medal.is-closed .mark-dot { animation: dotFlash .9s ease-out forwards; }
@keyframes dotFlash {
  0%   { transform: scale(1); opacity: 1; }
  35%  { transform: scale(1.25); filter: drop-shadow(0 0 18px #c9a24b); }
  100% { transform: scale(1.04); opacity: 1; }
}
.medal.is-closed .medal-ring {
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(184, 134, 43, .18);
  transition: box-shadow .6s, border-color .6s;
}
@keyframes medalSpin { to { transform: rotate(360deg); } }
@keyframes fadeIn { to { opacity: 1; } }

.brand-title {
  display: block;
  margin: 0;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.brand-title span {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold) 50%, var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* ---------- الشعار الكتابي: خطّ يُكتب ثم حبرٌ حيّ ----------
   ١) عند التحميل يُرسم المسار كقلمٍ ثم يمتلئ (CSS فقط).
   ٢) بعدها يحوّله account.js إلى نقاط حبر تتناثر مع المؤشر وتعود (شاشات ذات مؤشر فقط). */
.wordmark {
  position: relative;
  width: clamp(220px, 24vw, 320px);
  margin: 0 auto;
}
.wordmark-svg { display: block; width: 100%; height: auto; overflow: visible; }
.wordmark-path {
  fill-opacity: 0;
  stroke-width: 7;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: inkDraw 1.5s cubic-bezier(.4, 0, .2, 1) .35s forwards, inkFill .7s ease 1.6s forwards;
}
@keyframes inkDraw { to { stroke-dashoffset: 0; } }
@keyframes inkFill { to { fill-opacity: 1; stroke-width: 0; } }
.wordmark-ink {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  opacity: 0;
  pointer-events: none;
}
.wordmark.is-live .wordmark-ink { opacity: 1; }
.wordmark.is-live .wordmark-svg { opacity: 0; }

.brand-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 300;
  font-size: 16px;
  opacity: 0;
  animation: riseIn .6s .75s forwards;
}
.brand-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--gold);
  opacity: 0;
  animation: riseIn .6s .85s forwards;
}
.brand-orn i {
  display: block;
  height: 1px;
  width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.brand-orn i:last-child { transform: scaleX(-1); }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- البطاقة ---------- */

.card {
  position: relative;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 34px 26px;
  box-shadow: var(--shadow), inset 0 2px 0 #fff;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: riseIn .5s cubic-bezier(.2, .8, .2, 1) .1s forwards;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
  background-size: 200% 100%;
  animation: cardSheen 5s linear infinite;
}
@keyframes cardSheen { to { background-position: 200% 0; } }

.card-seal {
  position: absolute;
  left: -26px;
  bottom: -26px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--gold);
  opacity: .07;
  text-align: center;
  pointer-events: none;
  z-index: 0;
}
/* محتوای بطاقة فوق واترمارک */
.card > .stagger,
.card > .result,
.card > .rail { position: relative; z-index: 1; }

/* ---------- شريط الخطوات ---------- */

.rail {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 22px;
}
.rail-node {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  position: relative;
  z-index: 1;
}
.rail-node.is-current {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(184, 134, 43, .15);
}
.rail-node.is-done {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}
.rail-link { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.rail-link::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--teal);
}
.rail-link.is-done::after {
  animation: railFill .7s cubic-bezier(.2, .8, .2, 1) .35s forwards;
}
@keyframes railFill { to { width: 100%; } }
.rail-caption { margin-right: 12px; font-size: 13px; color: var(--muted); font-weight: 300; }

/* ---------- المحتوى ---------- */

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .2px;
}
.card h1 { margin: 0 0 6px; font-size: 25px; font-weight: 700; line-height: 1.45; }
.lead { margin: 0 0 22px; color: var(--muted); font-weight: 300; font-size: 14.5px; }
.lead b { color: var(--ink-soft); font-weight: 700; }

/* ظهور متتابع لعناصر البطاقة */
.stagger > * {
  opacity: 0;
  animation: riseIn .4s cubic-bezier(.2, .8, .2, 1) forwards;
}
.stagger > *:nth-child(1) { animation-delay: .10s; }
.stagger > *:nth-child(2) { animation-delay: .15s; }
.stagger > *:nth-child(3) { animation-delay: .20s; }
.stagger > *:nth-child(4) { animation-delay: .25s; }
.stagger > *:nth-child(5) { animation-delay: .30s; }
.stagger > *:nth-child(6) { animation-delay: .35s; }
.stagger > *:nth-child(7) { animation-delay: .40s; }
.stagger > *:nth-child(8) { animation-delay: .45s; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.field input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.field input:hover { border-color: #d8c6a4; }
.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 134, 43, .14);
}
.password-input { position: relative; }
.password-input input { padding-inline-end: 76px; }
.password-input button {
  position: absolute;
  inset-inline-end: 8px;
  top: 5px;
  height: 38px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.password-input button:focus-visible, .text-action:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.field-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 300; }
.field-hint.is-centered { text-align: center; margin-top: 16px; }

.actions { margin-top: 22px; }

.button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s, background .25s, box-shadow .25s;
}
.button:disabled { opacity: .5; cursor: not-allowed; }
.button:not(:disabled):hover { transform: translateY(-1px); }

.button-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 50%, var(--gold-dark));
  color: #2b2117;
  box-shadow: 0 10px 24px rgba(184, 134, 43, .26);
}
.button-primary:not(:disabled):hover { box-shadow: 0 14px 30px rgba(184, 134, 43, .34); }
.button-primary::after {
  content: "";
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -40%;
  width: 32%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  animation: buttonSheen 5s 1.4s ease-in-out infinite;
}
@keyframes buttonSheen {
  0%        { left: -40%; }
  45%, 100% { left: 130%; }
}

.button-secondary {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
}
.button-secondary:hover { border-color: var(--gold); color: var(--gold-dark); }

/* حالة الإرسال */
.button.is-busy { color: transparent; }
.button.is-busy::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(43, 33, 23, .25);
  border-top-color: #2b2117;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.download-portal h1 { margin-bottom: 10px; }
.download-release-mark { display: flex; align-items: center; gap: 9px; color: #0d6b57; margin: 22px 0 14px; }
.download-release-mark span { width: 9px; height: 9px; border-radius: 50%; background: #2f9c7b; box-shadow: 0 0 0 5px rgba(47, 156, 123, .13); }
.download-version-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fdfbf7; }
.download-version-grid div { padding: 14px 12px; border-left: 1px solid var(--line); }
.download-version-grid div:last-child { border-left: 0; }
.download-version-grid span, .download-details span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.download-version-grid strong { font-size: 17px; color: var(--ink); }
.download-notes { margin: 16px 0; padding: 13px 15px; border-right: 3px solid var(--gold); background: #fbf7ed; border-radius: 8px; }
.download-notes p { margin: 4px 0 0; white-space: pre-line; color: var(--ink-soft); }
.download-cta { margin-top: 20px; }
.download-cta span { margin-right: 8px; font-size: 20px; }
.download-meta { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.download-details { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 7px 12px; align-items: baseline; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.download-details b { color: var(--ink-soft); }
.download-footer-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 12px; }
.download-footer-links a { color: var(--gold-dark); }

@media (max-width: 620px) {
  .download-version-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-version-grid div:nth-child(2) { border-left: 0; }
  .download-version-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .download-details { grid-template-columns: 1fr auto; }
  .download-footer-links { align-items: stretch; flex-direction: column; }
}

.link-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  font-size: 13.5px;
}
.link-row a { border-bottom: 1px solid transparent; transition: border-color .25s; }
.link-row a:hover { border-color: var(--gold-dark); }
.alert-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font-weight: 700; }
.verification-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.verification-tools form { margin: 0; }
.text-action { padding: 2px; border: 0; background: none; color: var(--gold-dark); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.text-action:disabled { color: var(--muted); cursor: default; }

/* ---------- التنبيهات ---------- */

.alert {
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  /* نفس حركة .stagger مع forwards حتى تبقى ظاهرة داخل .stagger وخارجه */
  animation: riseIn .4s cubic-bezier(.2, .8, .2, 1) .06s forwards;
}
.alert-error { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.alert-success { color: var(--teal); border-color: var(--ok-line); background: var(--ok-bg); }
/* ---------- رمز التحقق ---------- */

.code-field input {
  direction: ltr;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 14px;
  text-indent: 14px;
  height: 60px;
}
/* النسخة المحسّنة بالجافاسكربت: ستة مربعات */
.otp { display: flex; direction: ltr; gap: 10px; justify-content: center; }
.otp-cell {
  width: 52px;
  height: 60px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.otp-cell:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 134, 43, .14); }
.otp-cell.is-filled { border-color: var(--gold); animation: otpPop .3s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes otpPop { from { transform: scale(.75); } }
.otp-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

/* ---------- رمز الاتصال بالجهاز ---------- */

.device-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fffaf0;
}
.device-code span { font-size: 12.5px; color: var(--muted); font-weight: 300; }
.device-code b {
  direction: ltr;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-dark);
}

/* ---------- شروط كلمة المرور ---------- */

.password-rules {
  margin: -6px 0 16px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 300;
}
.password-rules ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.password-rules li { position: relative; padding-right: 18px; transition: color .25s; }
.password-rules li::before {
  content: "○";
  position: absolute;
  right: 0;
  color: var(--line);
  transition: color .25s;
}
.password-rules li.ok { color: var(--teal); font-weight: 700; }
.password-rules li.ok::before { content: "✓"; color: var(--teal); }

/* ---------- حالات النتيجة ---------- */

.result { text-align: center; padding: 8px 0 4px; }
.result-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: markPop .55s cubic-bezier(.2, 1.4, .3, 1);
}
.result-mark svg { width: 42px; height: 42px; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.result-mark svg path, .result-mark svg line {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: markDraw .6s .2s forwards;
}
.result-ok { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.result-ok svg { stroke: var(--teal); }
.result-warn { background: var(--danger-bg); border: 1px solid var(--danger-line); }
.result-warn svg { stroke: var(--danger); }
@keyframes markPop { from { transform: scale(.4); opacity: 0; } }
@keyframes markDraw { to { stroke-dashoffset: 0; } }

.footnote {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
}
.footnote svg { width: 12px; height: 12px; vertical-align: -1px; fill: none; stroke: var(--teal); stroke-width: 2; }

/* ---------- الشاشات الصغيرة ---------- */

@media (max-width: 960px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 34px 20px 44px;
    align-content: center;
  }
  .brand-col { order: -1; }
  .medal { width: 148px; margin-bottom: 18px; }
  .medal-ring-outer { inset: -18px; }
  .brand-title { font-size: 28px; }
  .wordmark { width: 200px; }
  .brand-sub { font-size: 14px; }
  .brand-orn { display: none; }
  .card { padding: 26px 22px 22px; }
  .card-seal { display: none; }
  .decor-lattice { opacity: .35; }
}

@media (max-width: 420px) {
  .otp-cell { width: 44px; height: 54px; font-size: 22px; }
  .otp { gap: 7px; }
  .link-row { flex-direction: column; gap: 8px; }
}

/* ---------- تقليل الحركة ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .wordmark-path { animation: none; fill-opacity: 1; stroke-width: 0; }
  .mark-ring { animation: none; stroke-dashoffset: 0; }
  .mark-dot { animation: none; opacity: 1; }
  .leaf { display: none; }
}
/* Admin login language selector */
.language-switch { display: flex; gap: 4px; direction: ltr; width: max-content; margin: 0 0 18px; padding: 3px; border: 1px solid var(--line, #d8dee7); border-radius: 7px; }
.language-switch a { padding: 3px 8px; border-radius: 5px; color: inherit; font-size: 12px; font-weight: 700; text-decoration: none; }
.language-switch a.active { color: #fff; background: var(--primary, #1769aa); }
