@import url('fonts.css');

/* ============================================================
   نظام تسجيل الطلاب — مدارس واحة جدة
   الهوية اللونية مأخوذة من شعار المدرسة وترويسة العقد الرسمي
   ============================================================ */

:root {
  --navy: #004170;
  --navy-700: #00355c;
  --navy-900: #002743;
  --teal: #0098b3;
  --teal-600: #00849c;
  --teal-050: #e8f7fa;
  --gold: #d9a441;
  --gold-050: #fdf6e8;

  --ink: #14212b;
  --ink-2: #47606f;
  --ink-3: #7b93a2;
  --line: #dde7ee;
  --line-2: #eef4f8;
  --bg: #f2f6f9;
  --card: #ffffff;

  --ok: #157f57;
  --ok-bg: #e6f6ef;
  --warn: #9a6704;
  --warn-bg: #fdf3e0;
  --danger: #b3261e;
  --danger-bg: #fdeceb;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0, 45, 75, .06), 0 8px 24px -12px rgba(0, 45, 75, .18);
  --shadow-lg: 0 24px 60px -28px rgba(0, 45, 75, .38);

  --ui: 'Cairo', 'Dubai', 'Sakkal Majalla', 'Segoe UI', Tahoma, sans-serif;
  --naskh: 'Scheherazade New', 'Traditional Arabic', 'Simplified Arabic', 'Times New Roman', serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* يسبق قواعد display الخاصة بـ .field وغيرها حتى تعمل الحقول الشرطية */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.45; }
p { margin: 0 0 .8em; }
a { color: var(--teal-600); }

/* ---------- الترويسة ---------- */
.topbar {
  background: linear-gradient(275deg, var(--navy) 0%, #005b86 55%, var(--teal) 100%);
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 20;
}
.topbar::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, #eac57e 45%, transparent 85%);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: #fff; }
.brand img { height: 52px; width: auto; display: block; filter: brightness(0) invert(1); opacity: .96; }
.brand-text strong { display: block; font-size: 17px; font-weight: 700; letter-spacing: 0; }
.brand-text span { display: block; font-size: 12.5px; opacity: .82; }
.topbar nav { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.topbar nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .26);
  transition: background .15s ease, border-color .15s ease;
}
.topbar nav a:hover { background: rgba(255, 255, 255, .16); }
.topbar nav a.active { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- الحاوية ---------- */
.wrap { max-width: 1500px; margin: 0 auto; padding: 26px 32px 60px; }
.wrap-narrow { max-width: 1180px; }
.topbar-inner { max-width: 1500px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 25px; color: var(--navy); }
.page-head .sub { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }

/* ---------- ترويسة نموذج التسجيل ---------- */
.form-hero {
  background:
    linear-gradient(275deg, var(--navy) 0%, #005b86 58%, var(--teal) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.form-hero::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold), #eac57e);
}
.form-hero h1 { font-size: 26px; margin-bottom: 6px; }
.form-hero p { margin: 0; opacity: .92; font-size: 14.5px; max-width: 760px; line-height: 1.85; }
.form-hero .meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-size: 13px;
}
.form-hero .meta span { display: flex; align-items: center; gap: 7px; opacity: .95; }

/* ---------- شريط الخطوات ---------- */
.stepper {
  display: flex;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stepper::-webkit-scrollbar { display: none; }
.stepper .stp {
  flex: 1 1 0;
  min-width: 148px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  background: none;
  border: 0;
  font-family: inherit;
  cursor: default;
  text-align: start;
  position: relative;
  transition: background .18s ease, color .18s ease;
}
.stepper .stp + .stp::after {
  content: '';
  position: absolute;
  inset-inline-end: 100%;
  top: 50%;
  width: 8px;
  height: 1.5px;
  background: var(--line);
  transform: translateY(-50%);
}
.stepper .stp .n {
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef3f7;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 700;
  transition: all .18s ease;
}
.stepper .stp .t { line-height: 1.35; }
.stepper .stp.done { color: var(--navy); cursor: pointer; }
.stepper .stp.done .n { background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.stepper .stp.active { background: var(--teal-050); color: var(--navy); }
.stepper .stp.active .n { background: var(--navy); color: #fff; box-shadow: 0 0 0 4px rgba(0, 65, 112, .12); }

/* شريط تقدّم رفيع */
.progress-line { height: 4px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.progress-line i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--navy));
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

/* ألواح الخطوات */
.step-panel { animation: stepIn .28s ease both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* أزرار التنقل بين الخطوات */
.wizard-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.wizard-nav .spacer { margin-inline-start: auto; }
.wizard-nav .count { font-size: 13px; color: var(--ink-3); font-weight: 600; }

/* ملخص المراجعة النهائية */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.review-grid > div { background: #fff; padding: 11px 15px; min-width: 0; }
.review-grid dt { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.review-grid dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); word-break: break-word; }
.review-grid dd:empty::before { content: '—'; color: var(--ink-3); font-weight: 400; }
.review-grid dd.num { direction: ltr; text-align: right; }
.review-sec { margin-bottom: 18px; }
.review-sec h3 {
  font-size: 14.5px;
  color: var(--navy);
  margin-bottom: 8px;
  padding-inline-start: 9px;
  border-inline-start: 3px solid var(--gold);
}

/* ---------- البطاقات ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h2 { font-size: 17px; color: var(--navy); }
.card-head .n {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-050);
  color: var(--teal-600);
  font-weight: 700;
  font-size: 14px;
}
.card-head .hint { margin-inline-start: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.card-body { padding: 20px; }

/* ---------- الشبكة والحقول ---------- */
.grid {
  display: grid;
  gap: 18px 18px;
  grid-template-columns: repeat(12, 1fr);
  align-items: start; /* يمنع تمدد الحقول وتفاوت الارتفاعات بين الأعمدة */
}
.grid > * { min-width: 0; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}
.field > label .req { color: var(--danger); font-size: 15px; line-height: 1; }
.field .note { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
/* ملاحظة مختصرة بجانب اسم الحقل مباشرة */
.field > label .note {
  font-weight: 500;
  background: var(--line-2);
  color: var(--ink-2);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='number'],
select,
textarea {
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
textarea { min-height: 86px; resize: vertical; line-height: 1.7; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%237b93a2' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 13px center;
  padding-inline-start: 13px;
  padding-inline-end: 34px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3.5px rgba(0, 152, 179, .16);
}
input::placeholder, textarea::placeholder { color: #a9bbc7; }

/* الحقول الرقمية تُعرض دائماً بأرقام لاتينية ومن اليسار */
.num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--danger); background: #fffafa; }
.field .err { display: none; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.field.invalid .err { display: block; }

/* مجموعة الاسم الرباعي — إطار واحد يجمع الخانات الأربع */
.name-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.name-grid > div { position: relative; min-width: 0; }
.name-grid > div + div { border-inline-start: 1px solid var(--line); }
.name-grid .sub-label {
  position: absolute;
  top: 7px;
  inset-inline-start: 13px;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}
.name-grid input {
  border: 0;
  border-radius: 0;
  padding: 26px 13px 9px;
  background: transparent;
}
.name-grid input:focus { box-shadow: inset 0 0 0 2px var(--teal); }
.field.invalid .name-grid { border-color: var(--danger); background: #fffafa; }

/* مجموعة التاريخ */
.date-grid { display: grid; grid-template-columns: 0.85fr 1.5fr 1fr 1.1fr; gap: 8px; }
.date-grid > * { min-width: 0; }

/* الخيارات (راديو / تشيك) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s ease;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #c2d3dd;
  flex: none;
  transition: all .15s ease;
}
.choice:hover { border-color: #b9d6e0; background: #fbfeff; }
.choice input:checked ~ .dot { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 3px #fff; }
.choice:has(input:checked) { border-color: var(--teal); background: var(--teal-050); color: var(--navy); }
.choice input:focus-visible ~ .dot { box-shadow: 0 0 0 3px rgba(0, 152, 179, .25); }

/* رفع الملفات */
.file-drop {
  border: 1.5px dashed #b9cdd9;
  border-radius: var(--radius-sm);
  background: #fafdfe;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all .15s ease;
}
.file-drop:hover, .file-drop.drag { border-color: var(--teal); background: var(--teal-050); }
.file-drop input { display: none; }
.file-drop .ico { font-size: 26px; line-height: 1; color: var(--teal); }
.file-drop .t { font-weight: 600; font-size: 14.5px; margin-top: 6px; }
.file-drop .h { font-size: 12.5px; color: var(--ink-3); }
.file-picked {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  border: 1px solid #bfe5d3;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ok);
}
.file-picked.show { display: flex; }
.file-picked .x {
  margin-inline-start: auto;
  cursor: pointer;
  color: var(--ink-3);
  font-weight: 700;
  border: 0;
  background: none;
  font-size: 16px;
  line-height: 1;
}

/* ---------- الأزرار ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: filter .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px -8px rgba(0, 65, 112, .8); }
.btn-primary:hover { filter: brightness(1.14); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 6px 16px -8px rgba(0, 152, 179, .85); }
.btn-teal:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: #f3c9c6; }
.btn-danger:hover { background: #fbdedb; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-actions .spacer { margin-inline-start: auto; }

/* ---------- التنبيهات ---------- */
.alert {
  padding: 13px 17px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-error { background: var(--danger-bg); border-color: #f3c9c6; color: var(--danger); }
.alert-ok { background: var(--ok-bg); border-color: #bfe5d3; color: var(--ok); }
.alert-info { background: var(--teal-050); border-color: #bee6ee; color: var(--teal-600); }
.alert ul { margin: 6px 0 0; padding-inline-start: 20px; }

/* ---------- الشارات ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe5d3; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0d9ae; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: #f3c9c6; }
.badge.muted { background: #eef3f7; color: var(--ink-2); border-color: #dae5ed; }

/* ---------- الإحصائيات ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--teal);
}
.stat.s-warn::before { background: var(--gold); }
.stat.s-ok::before { background: var(--ok); }
.stat.s-navy::before { background: var(--navy); }
.stat .k { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.stat .v { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1.25; font-variant-numeric: tabular-nums; }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; min-width: 900px; }
table.data th {
  background: #f6fafc;
  text-align: start;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafdfe; }
table.data .ref { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
table.data .name { font-weight: 600; }
table.data .muted-cell { color: var(--ink-3); font-size: 13px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty .ico { font-size: 44px; opacity: .45; }
.empty h3 { font-size: 17px; color: var(--ink-2); margin: 10px 0 4px; }

/* ---------- شريط الفلاتر ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.filters .field { flex: 1 1 170px; }
.filters .field > label { font-size: 12px; }

/* ---------- عرض تفاصيل الطلب ---------- */
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.dl > div { background: #fff; padding: 12px 15px; }
.dl dt { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.dl dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); word-break: break-word; }
.dl dd.num { direction: ltr; text-align: right; }

/* ---------- تسجيل الدخول ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(0, 152, 179, .16), transparent 60%),
    radial-gradient(800px 500px at 10% 110%, rgba(217, 164, 65, .12), transparent 60%),
    var(--bg);
}
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 34px 30px; }
.login-card .logo { text-align: center; margin-bottom: 18px; }
.login-card .logo img { height: 82px; }
.login-card h1 { font-size: 20px; text-align: center; color: var(--navy); }
.login-card .sub { text-align: center; color: var(--ink-3); font-size: 13.5px; margin-bottom: 22px; }

/* ---------- شريط التذييل ---------- */
.site-footer { margin-top: 40px; }
.site-footer img { width: 100%; display: block; }

/* ---------- صفحة الشكر ---------- */
.done-card { text-align: center; padding: 44px 30px; }
.done-card .tick {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 36px;
  border: 3px solid #bfe5d3;
}
.done-card h1 { font-size: 23px; color: var(--navy); }
.done-card .ref-chip {
  display: inline-block;
  margin: 14px 0 6px;
  padding: 9px 22px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  direction: ltr;
  letter-spacing: .04em;
}

/* ---------- الاستجابة للشاشات ---------- */
@media (max-width: 1200px) {
  .wrap { padding: 24px 22px 56px; }
  .col-3 { grid-column: span 4; }
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dl { grid-template-columns: repeat(2, 1fr); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
  .date-grid { grid-template-columns: 1fr 1.5fr 1fr 1.1fr; }
  .stepper .stp .t { font-size: 13px; }
  .stepper .stp { min-width: 128px; padding: 10px; }
}

@media (max-width: 620px) {
  .wrap { padding: 16px 13px 40px; }
  .card-body { padding: 15px; }
  .name-grid { grid-template-columns: repeat(2, 1fr); }
  .name-grid > div:nth-child(3) { border-inline-start: 0; }
  .name-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .date-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .brand img { height: 40px; }
  .brand-text strong { font-size: 14.5px; }
  .brand-text span { font-size: 11.5px; }
  .form-hero { padding: 20px 18px; }
  .form-hero h1 { font-size: 20px; }
  .form-hero p { font-size: 13.5px; }
  .page-head h1 { font-size: 20px; }
  .choices { gap: 7px; }
  .choice { font-size: 13.5px; padding: 8px 12px; }

  /* شريط الخطوات يتحول إلى نقاط مختصرة */
  .stepper .stp { min-width: 0; flex: 0 0 auto; padding: 8px 10px; }
  .stepper .stp .t { display: none; }
  .stepper .stp.active { flex: 1 1 auto; }
  .stepper .stp.active .t { display: block; }

  .wizard-nav { position: sticky; bottom: 0; z-index: 5; padding: 12px 14px; }
  .wizard-nav .btn { flex: 1 1 auto; justify-content: center; }
  .wizard-nav .count { display: none; }
}

@media print {
  .topbar, .form-actions, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
}
