/* ============================================================
   رزنامة القبيلة — نظام التصميم
   ============================================================ */

:root {
  --navy:        #0F172A;
  --navy-soft:   #1E293B;
  --page:        #F8FAFC;
  --card:        #FFFFFF;
  --ink:         #0F172A;
  --ink-soft:    #475569;
  --ink-faint:   #94A3B8;
  --line:        #E2E8F0;

  --indigo:      #4F46E5;
  --indigo-dark: #4338CA;
  --indigo-bg:   #EEF2FF;

  --amber:       #E07B0C;
  --amber-bg:    #FEF3E2;

  --rose:        #E11D48;
  --rose-bg:     #FFF1F3;

  --slate:       #475569;
  --slate-bg:    #F1F5F9;

  --accent:      var(--indigo);
  --accent-bg:   var(--indigo-bg);

  --w:      min(100% - 2rem, 46rem);
  --w-wide: min(100% - 2rem, 64rem);
  --r:      14px;

  --font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-card: 'Amiri', 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.35; font-weight: 700; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

.wrap      { width: var(--w);      margin-inline: auto; }
.wrap-wide { width: var(--w-wide); margin-inline: auto; }

/* الألوان حسب النوع */
.t-indigo { --accent: var(--indigo); --accent-bg: var(--indigo-bg); }
.t-amber  { --accent: var(--amber);  --accent-bg: var(--amber-bg); }
.t-rose   { --accent: var(--rose);   --accent-bg: var(--rose-bg); }
.t-slate  { --accent: var(--slate);  --accent-bg: var(--slate-bg); }

/* ── الهيرو ─────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 2rem 1rem 4.5rem;
  text-align: center;
  position: relative;
}
.hero .brand-mini {
  font-size: .78rem;
  letter-spacing: .12em;
  color: #94A3B8;
  margin-bottom: 1.75rem;
}
.hero h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); margin-bottom: .35rem; }
.hero p  { color: #CBD5E1; margin: 0 0 1.75rem; font-size: .95rem; }

.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.hero-top {
  position: absolute;
  top: 1.25rem;
  inset-inline-start: 1.25rem;
  display: flex;
  gap: .5rem;
}
.hero-top a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #E2E8F0;
  text-decoration: none;
  font-size: 1rem;
}
.hero-top a:hover { background: rgba(255,255,255,.16); }

/* ── الأزرار ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  padding: .7rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, filter .15s;
}
.btn:hover  { filter: brightness(.94); }
.btn:active { transform: scale(.97); }

.btn-indigo { background: var(--indigo); color: #fff; }
.btn-amber  { background: var(--amber);  color: #fff; }
.btn-dark   { background: var(--navy);   color: #fff; }
.btn-ghost  { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-block  { width: 100%; }
.btn-sm     { padding: .4rem .8rem; font-size: .85rem; }

/* ── التبويبات ──────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: .25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem;
  width: fit-content;
  margin: -2.5rem auto 2.5rem;
  position: relative;
  box-shadow: 0 4px 16px rgba(15,23,42,.07);
  max-width: calc(100% - 2rem);
  overflow-x: auto;
}
.tabs a {
  white-space: nowrap;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  color: var(--ink-soft);
}
.tabs a.on { background: var(--accent); color: #fff; }
.tabs a:not(.on):hover { background: var(--page); }

/* ── فاصل الشهر ─────────────────────────────────────────── */
.month {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 2rem 0 1rem;
}
.month span {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 700;
  font-size: .88rem;
  padding: .3rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}
.month::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── بطاقة المناسبة ─────────────────────────────────────── */
.occ {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  margin-bottom: .85rem;
  transition: border-color .15s, transform .15s;
}
.occ:hover { border-color: var(--accent); transform: translateY(-2px); }
.occ.is-past { opacity: .55; }
.occ .strip { height: 4px; background: var(--accent); }

.occ .row { display: flex; gap: 1rem; padding: 1rem 1.1rem; align-items: center; }

.datebox {
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .35rem 0;
  background: var(--page);
}
.datebox .m { font-size: .68rem; color: var(--ink-faint); }
.datebox .d { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.datebox .w { font-size: .68rem; color: var(--ink-faint); }

.occ .meta { flex: 1; min-width: 0; }
.occ .pill {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .6rem;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent);
  margin-bottom: .3rem;
}
.occ h3 { font-size: 1.05rem; margin: 0 0 .15rem; overflow-wrap: anywhere; }
.occ .sub { font-size: .82rem; color: var(--ink-faint); margin: 0; }

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-faint);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--r);
}

/* ── بطاقة الدعوة الاحترافية (مقاس 9:16) ───────────────────────────── */
.card-shell {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  margin-inline: auto;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(15,23,42,.12);
  position: relative;
  background: #FDFBF3;
}

.inv {
  width: 1080px;
  height: 1920px;
  transform: scale(0.296);
  transform-origin: top left;
  background: #FDFBF3;
  font-family: var(--font-card);
  color: #1B2333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 160px 120px 110px;
  position: absolute;
  top: 0;
  left: 0;
}
/* المحتوى المركزي */
.inv .inv-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

/* تحديث الزوايا */
.inv .cor {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 16px solid var(--navy);
}
.inv .cor.c1 { top: 70px; right: 70px; border-left: 0; border-bottom: 0; border-top-right-radius: 40px; }
.inv .cor.c2 { top: 70px; left: 70px; border-right: 0; border-bottom: 0; border-top-left-radius: 40px; }
.inv .cor.c3 { bottom: 70px; right: 70px; border-left: 0; border-top: 0; border-bottom-right-radius: 40px; }
.inv .cor.c4 { bottom: 70px; left: 70px; border-right: 0; border-top: 0; border-bottom-left-radius: 40px; }

/* تحسين العناوين */
.inv .ttl { font-size: 82px; font-weight: 700; line-height: 1.3; margin-bottom: 40px; }
.inv .gr { font-size: 80px; font-weight: 700; line-height: 1.4; margin-bottom: 20px; }


/* الزوايا الأربع */
.inv .cor {
  position: absolute;
  width: 170px;
  height: 170px;
  border: 12px solid var(--navy);
}
.inv .cor.c1 { top: 60px;    right: 60px; border-left: 0;  border-bottom: 0; border-top-right-radius: 34px; }
.inv .cor.c2 { top: 60px;    left: 60px;  border-right: 0; border-bottom: 0; border-top-left-radius: 34px; }
.inv .cor.c3 { bottom: 60px; right: 60px; border-left: 0;  border-top: 0;    border-bottom-right-radius: 34px; }
.inv .cor.c4 { bottom: 60px; left: 60px;  border-right: 0; border-top: 0;    border-bottom-left-radius: 34px; }

/* العنوان */
.inv .ttl { font-size: 86px; font-weight: 700; line-height: 1.3; margin-bottom: 20px; overflow-wrap: anywhere; }
.inv .sub { font-size: 50px; color: #8A8F9C; margin-bottom: 40px; }

/* أسماء الدعاة — نفس الحجم بغض النظر عن العدد */
.inv .ln  { font-size: 72px; line-height: 1.6; overflow-wrap: anywhere; margin-bottom: 10px; }
.inv .ln2 { font-size: 72px; line-height: 1.6; overflow-wrap: anywhere; margin-bottom: 10px; }
.inv .ln3 { font-size: 72px; line-height: 1.6; overflow-wrap: anywhere; margin-bottom: 10px; }
.inv .ln:last-child, .inv .ln2:last-child, .inv .ln3:last-child { margin-bottom: 0; }

/* الشريط الذهبي بخطوط جانبية */
.inv .rule {
  display: flex;
  align-items: center;
  gap: 26px;
  width: 100%;
  margin: 40px 0;
}
.inv .rule::before, .inv .rule::after {
  content: '';
  flex: 1;
  height: 3px;
  background: #E3D6A8;
}
.inv .rule span { font-size: 46px; font-weight: 700; color: #000000; white-space: nowrap; }

.inv .gr { 
  font-size: 74px; 
  font-weight: 700; 
  line-height: 1.5; 
  overflow-wrap: anywhere;
  color: #6B7280; /* أضفت لوناً كحلياً غامقاً وفخماً للأسماء */
}
/* السطر الزمني */
.inv .when { font-size: 50px; color: #000000; margin: 34px 0 24px; }
.inv .when b { color: #C9A227; font-weight: 700; }

/* بادج التاريخ الداكن */
.inv .datepill {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 22px 56px;
  font-size: 50px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 32px;
}
.inv .datepill svg { color: #C9A227; flex: 0 0 auto; }
.inv .datepill i { width: 10px; height: 50px; background: rgba(255,255,255,.28); }

.inv .venue {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 28px;
}
.inv .venue svg { color: #C9A227; }

.inv .bless { font-size: 40px; color: #000000; }

.inv .sep { width: 55%; height: 2px; background: #000000; margin: 26px 0 22px; }
.inv .apology { font-size: 34px; color: #000000; }

لاتشتتني انا سالتك عن هذا الكود بدون كسر 

/* ── دعوة العشاء — أحجام ومسافات احترافية (لا تؤثر على الزواج) ── */
/* المحتوى يبقى موسّطاً عمودياً فيتوازن الهامش تلقائياً مع 1 أو 2 أو 3 دعاة */
.inv.dinner { padding: 150px 130px; }
.inv.dinner .ttl{ font-size: 80px; line-height: 1.25; margin-bottom: 34px; }
.inv.dinner .sub{ font-size: 66px; margin-bottom: 46px; }
.inv.dinner .ln{ font-size: 80px; font-weight: 600; line-height: 1.75; color: #1B2333; }
.inv.dinner .ln2{ font-size: 64px; font-weight: 600; line-height: 1.65; color: #1B2333; }
.inv.dinner .ln3{ font-size: 52px; font-weight: 600; line-height: 1.55; color: #1B2333; }
.inv.dinner .rule { margin: 58px 0; }
.inv.dinner .gr{ margin-bottom: 15px; }
.inv.dinner .when { margin: 46px 0 34px; }

/* تحديد الزفاف — نمط أهدأ (معدل للتحكم الذكي في النص) */
.inv.soft .ttl { font-size: 92px; }
.inv.soft .cor { border-color: #C9A227; }
.inv.soft .note { font-size: 50px; color: #6B7280; line-height: 1.8; margin-bottom: 56px; }

.inv.soft .nmbox {
  /* ثوابت التصميم */
  font-weight: 700;
  line-height: 1.7; /* قللنا ارتفاع السطر ليتناسب مع الخطوط الكبيرة */
  background: #F5F0DF;
  border-radius: 22px;
  padding: 35px 42px;
  margin-bottom: 56px;
  
  /* التحكم الذكي في النص */
  font-size: 86px;       /* الحجم الأقصى */
  white-space: nowrap;   /* منع النزول لسطر جديد */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;      /* إخفاء أي فائض غير مرئي */
  
  /* تفعيل خاصية التصغير التلقائي للمتصفحات الحديثة */
  /* هذا يجعل الخط يصغر تدريجياً ليتسع داخل العرض المتاح */
  font-size: clamp(60px, 8vw, 86px); 
}
.inv.soft .nmbox.multi { font-size: 48px; padding: 22px 36px; margin-bottom: 24px; }
.inv.soft .datepill { background: transparent; color: #1B2333; border: 5px solid #E8DFC0; }
.inv.soft .datepill i { background: #E8DFC0; }

/* عزاء */
.inv.mourn { background: #F7F7F5; }
.inv.mourn .cor { border-color: #64748B; }
.inv.mourn .rule span, .inv.mourn .bless { color: #64748B; }
.inv.mourn .rule::before, .inv.mourn .rule::after { background: #D3D7DE; }
.inv.mourn .datepill { background: #475569; }
.inv.mourn .datepill svg { color: #CBD5E1; }

/* ── صفحة التفاصيل ──────────────────────────────────────── */
.detail-hero { background: var(--navy); padding: 2rem 1rem 6rem; }
.detail-body { margin-top: -5rem; padding-bottom: 3rem; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem;
}
.panel.tight { padding: 1.25rem; }

/* عناصر صفحة التفاصيل */
.badge-pill {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .9rem;
  border-radius: 999px;
}
.fam {
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: 700;
  margin: .7rem 0 0;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.block {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.block.accentbg { background: var(--accent-bg); border-color: transparent; text-align: center; }
.block-h {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--ink-faint);
  margin-bottom: .7rem;
}
.block.accentbg .block-h { justify-content: center; }

.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .5rem; }
.chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .6rem .75rem;
  font-size: .92rem;
  overflow-wrap: anywhere;
}
.chip .ic {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--page);
  color: var(--ink-faint);
}

.quote {
  position: relative;
  text-align: center;
  font-family: var(--font-card);
  font-size: 1.15rem;
  font-weight: 700;
  color: #C9A227;
  margin: 1.25rem 0;
  padding: 0 1.5rem;
}
.quote::before, .quote::after {
  content: '”';
  position: absolute;
  top: -.35rem;
  font-size: 1.6rem;
  color: var(--line);
}
.quote::before { right: 0; }
.quote::after  { left: 0; content: '“'; }

.bigname {
  font-size: clamp(1.3rem, 5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.amp-line { font-size: .85rem; color: var(--ink-faint); margin: .2rem 0; }

.facts { display: grid; gap: .6rem; margin: 1.25rem 0; }
.fact {
  background: var(--page);
  border-radius: 12px;
  padding: .75rem 1rem;
}
.fact .k { font-size: .74rem; color: var(--ink-faint); }
.fact .v { font-weight: 600; overflow-wrap: anywhere; }

.share-row { display: flex; gap: .5rem; justify-content: center; margin: 1.25rem 0; }
.share-row a, .share-row button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  font-size: 1.05rem;
}
.share-row a:hover, .share-row button:hover { border-color: var(--accent); color: var(--accent); }

/* ── النماذج ────────────────────────────────────────────── */
.form-head {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 1.25rem;
  border-radius: 20px 20px 0 0;
}
.form-head h2 { margin: 0; font-size: 1.15rem; }
.form-head p  { margin: .15rem 0 0; font-size: .82rem; color: #94A3B8; }

.form-body {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  padding: 1.5rem;
}

.seg {
  display: flex;
  gap: .3rem;
  background: #ECEEF0;
  border-radius: 10px;
  padding: .3rem;
  margin-bottom: 1.5rem;
}
.seg a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  padding: .55rem .65rem;
  border-radius: 8px;
  color: var(--ink-soft);
  transition: background .14s, color .14s, box-shadow .14s;
}
.seg a:hover:not(.on) { background: rgba(255,255,255,.5); color: var(--ink); }
.seg a.on {
  background: #fff; color: var(--accent);
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}

.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: .35rem; }
.field .note { font-weight: 400; color: var(--ink-faint); font-size: .78rem; }

input[type=text], input[type=tel], input[type=date], input[type=time],
input[type=password], input[type=search], select, textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  padding: .72rem .9rem;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: #2170E4; background: #fff; outline: none;
  box-shadow: 0 0 0 3px rgba(33,112,228,.1);
}
textarea { min-height: 6rem; resize: vertical; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.1rem;
  background: var(--page);
}
.group > h4 { margin: 0 0 .75rem; font-size: .88rem; color: var(--accent); }
.group input { background: #fff; margin-bottom: .5rem; }

.addbtn {
  background: none;
  border: 0;
  color: var(--accent);
  font-family: var(--font);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  padding: .2rem 0;
}

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.choice label {
  display: block;
  text-align: center;
  padding: 1.1rem .75rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  background: #fff;
}
.choice input { position: absolute; opacity: 0; }
.choice label .t { font-weight: 700; font-size: .92rem; display: block; }
.choice label .s { font-size: .75rem; color: var(--ink-faint); }
.choice input:checked + .t,
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }

.preview-box {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.preview-box > .cap { text-align: center; font-size: .82rem; color: var(--ink-faint); margin-bottom: .9rem; }

.hidden { display: none !important; }

.alert {
  padding: .8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: .9rem;
  border: 1px solid var(--line);
  background: #fff;
}
.alert.success { border-color: #16A34A; color: #15803D; background: #F0FDF4; }
.alert.error   { border-color: var(--rose); color: var(--rose); background: var(--rose-bg); }
.alert.info    { border-color: var(--indigo); color: var(--indigo-dark); background: var(--indigo-bg); }

/* ── التواصل ────────────────────────────────────────────── */
.people { display: grid; gap: 1rem; }
.person {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.person .who { flex: 1; min-width: 9rem; }
.person .who .n { font-weight: 700; font-size: 1.05rem; }
.person .who .r { font-size: .82rem; color: var(--ink-faint); }

.socials { display: flex; gap: .55rem; flex-wrap: wrap; }
.soc {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  width: 52px;
  text-decoration: none;
}
.soc .ic {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
}
.soc .lbl {
  font-size: .66rem;
  line-height: 1.15;
  text-align: center;
  color: var(--ink-faint);
}
.s-wa     .ic { background: #25D366; }
.s-snap   .ic { background: #111; }
.s-snap   .ic svg { color: #FFFC00; }
.s-ig     .ic { background: #E1306C; }
.s-x      .ic { background: #000; }
.s-tk     .ic { background: #000; }
.s-deafat .ic { background: #fff; border: 1px solid var(--line); padding: 0; overflow: hidden; }
.s-deafat .ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-cal    .ic { background: #4F46E5; }

.qr-wrap { text-align: center; }
.qr {
  width: 96px; height: 96px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
}
.qr img, .qr canvas { width: 100%; height: 100%; display: block; }
.qr-wrap .cap { font-size: .68rem; color: var(--ink-faint); margin-top: .2rem; }

/* ── لوحة التحكم ────────────────────────────────────────── */
.abar {
  background: var(--navy); color: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.12);
  position: sticky; top: 0; z-index: 50;
}
.abar .in {
  width: var(--w-wide);
  margin-inline: auto;
  padding: .9rem 0;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}
.abar a { color: #CBD5E1; text-decoration: none; font-size: .9rem; }
.abar a:hover, .abar a.on { color: #fff; }
.abar nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.abar .brand { font-weight: 700; color: #fff; font-size: 1rem; letter-spacing: -.01em; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: .85rem;
  margin-bottom: 1.75rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.stat:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.stat .n { font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--navy); }
.stat .l { font-size: .78rem; color: var(--ink-faint); margin-top: .3rem; }

table.list {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; font-size: .9rem;
}
table.list th {
  text-align: right; font-size: .73rem; font-weight: 600;
  color: var(--ink-faint); padding: .8rem 1rem;
  background: #F8FAFC; border-bottom: 1px solid var(--line);
  letter-spacing: .01em; text-transform: none;
}
table.list td {
  padding: .8rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #FAFBFD; }
table.list tr.unread td { font-weight: 600; }
.table-scroll { overflow-x: auto; border-radius: 16px; }

/* ── الدخول / التركيب ───────────────────────────────────── */
.center-page {
  display: grid; place-items: center; min-height: 100vh;
  padding: 1rem; background: #F7F9FB;
}
.center-card {
  width: min(100%, 26rem); background: #fff;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 2.25rem;
  box-shadow: 0 4px 24px rgba(15,23,42,.06);
}
.center-card h1 { font-size: 1.35rem; font-weight: 700; color: var(--navy); }
.center-card .hint { font-size: .85rem; color: var(--ink-faint); }
.center-card .ok  { color: #15803D; font-weight: 600; }
.center-card code { background: var(--page); padding: .1rem .35rem; border-radius: 5px; font-size: .85em; }

/* ── التذييل ────────────────────────────────────────────── */
.foot {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: .85rem;
  color: var(--ink-faint);
}
.foot a { color: var(--ink-soft); text-decoration: none; }

/* ── شريط الحقوق على البطاقة — table layout لتوافق html2canvas ── */
table.card-brand {
  margin-left: auto;
  margin-right: auto;
  padding-top: 0;
  width: 840px;
  border-top: 2px solid rgba(15,23,42,.10);
  direction: rtl;
}
.card-brand-cell-text {
  vertical-align: middle;
  text-align: right;
  padding-right: 30px;
}
.card-brand-cell-qr {
  vertical-align: middle;
  width: 160px;
}
.card-brand-qr {
  width: 150px;
  height: 150px;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  overflow: hidden;
}
.card-brand-qr svg {
  display: block;
  width: 130px !important;
  height: 130px !important;
}
.card-brand-name {
  font-size: 34px;
  font-weight: 700;
  color: #1B2333;
  margin-bottom: 10px;
}
.card-brand-sub {
  font-size: 26px;
  color: #6B7280;
}

/* ── بطاقات المعاريس الذهبية (بطاقة الزواج فقط) ─────────── */
.gr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0;
  margin: 20px 0 10px;
}
.gr-box {
  width: 100%;
  background: linear-gradient(135deg, #C9A227 0%, #E8C84A 50%, #C9A227 100%);
  color: #fff;
  font-size: 74px;
  font-weight: 700;
  line-height: 1.4;
  padding: 28px 48px;
  border-radius: 22px;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 8px rgba(0,0,0,.18);
  box-shadow: 0 6px 24px rgba(201,162,39,.35);
}
.gr-box--multi {
  font-size: 60px;
  padding: 22px 40px;
}
.amp-and {
  font-size: 40px;
  color: #C9A227;
  font-weight: 700;
  line-height: 1;
  padding: 12px 0;
}

/* ── قائمة همبرغر ───────────────────────────────────────── */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: #CBD5E1;
  flex-shrink: 0;
}
.nav-burger svg { display: block; }
.abar-links { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }

@media (max-width: 700px) {
  .nav-burger { display: flex; align-items: center; }
  .abar .in { flex-wrap: nowrap; position: relative; }
  .abar-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--navy);
    padding: .5rem 1rem 1rem;
    z-index: 200;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .abar-links.open { display: flex; }
  .abar-links a { padding: .6rem 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .abar-links a:last-child { border-bottom: 0; }
  .abar .brand { font-size: .95rem; }
}

/* همبرغر الصفحة الرئيسية — يظهر دائماً */
.hero-burger {
  background: rgba(255,255,255,.12);
  border: none;
  cursor: pointer;
  padding: .45rem .55rem;
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 210;
}
.hero-burger:hover { background: rgba(255,255,255,.2); }

.hero-nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  min-width: 180px;
  background: #1E293B;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: .4rem;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.hero-nav-links.open { display: flex; }
.hero-nav-links a,
.hero-nav-links .hero-nav-share {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  color: #CBD5E1;
  text-decoration: none;
  font-size: .92rem;
  border-radius: 10px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
}
.hero-nav-links a:hover,
.hero-nav-links .hero-nav-share:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.hero-top { position: relative; }

@media print { .hero, .foot, .share-row, .abar, .tabs { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 299;
}
.sidebar-overlay.open { display: block; }
.sidebar {
  position: fixed; top: 0; right: -280px;
  width: 260px; height: 100%; background: #1E293B;
  z-index: 300; display: flex; flex-direction: column;
  transition: right .25s ease; box-shadow: -4px 0 24px rgba(0,0,0,.3);
}
.sidebar.open { right: 0; }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand { color: #E2E8F0; font-size: .95rem; font-weight: 700; }
.sidebar-close {
  background: none; border: none; color: #94A3B8; cursor: pointer;
  padding: .25rem; border-radius: 8px; display: flex; align-items: center;
}
.sidebar-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; padding: .75rem; gap: .2rem; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: .65rem; padding: .75rem 1rem;
  color: #CBD5E1; text-decoration: none; font-size: .92rem; border-radius: 10px;
  background: none; border: none; cursor: pointer; width: 100%;
  text-align: right; font-family: inherit; transition: background .15s, color .15s;
}
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.on { background: rgba(99,102,241,.18); color: #A5B4FC; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.08); margin: .4rem 0; }

/* ── قائمة همبرغر (تظهر دائماً في لوحة التحكم: كمبيوتر وجوال) ── */
.nav-burger {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: #CBD5E1;
  flex-shrink: 0;
}
.nav-burger svg { display: block; }

.abar .in { flex-wrap: nowrap; position: relative; }
.abar-links {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--navy);
  padding: .5rem 1rem 1rem;
  z-index: 200;
  border-top: 1px solid rgba(255,255,255,.1);
}
.abar-links.open { display: flex; }
.abar-links a { padding: .6rem 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
.abar-links a:last-child { border-bottom: 0; }
.abar .brand { font-size: .95rem; }

@media (max-width: 700px) {
  .abar .brand { font-size: .9rem; }
}

/* همبرغر الصفحة الرئيسية — يظهر دائماً */
.hero-burger {
  background: rgba(255,255,255,.12);
  border: none;
  cursor: pointer;
  padding: .45rem .55rem;
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 210;
}
.hero-burger:hover { background: rgba(255,255,255,.2); }

.hero-nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  min-width: 180px;
  background: #1E293B;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: .4rem;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.hero-nav-links.open { display: flex; }
.hero-nav-links a,
.hero-nav-links .hero-nav-share {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  color: #CBD5E1;
  text-decoration: none;
  font-size: .92rem;
  border-radius: 10px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
}
.hero-nav-links a:hover,
.hero-nav-links .hero-nav-share:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.hero-top { position: relative; }

@media print { .hero, .foot, .share-row, .abar, .tabs { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* ── أدوات لوحة المناسبات: فرز + بحث ─────────────────────── */
.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 1.25rem;
}
.seg.seg-sm { max-width: none; flex: 0 1 auto; }
.seg.seg-sm a { padding: .4rem .8rem; font-size: .85rem; }
.admin-search {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex: 1 1 18rem;
  min-width: min(100%, 16rem);
}
.admin-search input[type=text] { flex: 1; padding: .55rem .8rem; font-size: .92rem; }
.admin-search .btn { flex-shrink: 0; }
.filter-note { font-size: .85rem; color: var(--ink-faint); margin: -.5rem 0 1rem; }

@media (max-width: 640px) {
  .admin-tools { flex-direction: column; align-items: stretch; }
  .seg.seg-sm { overflow-x: auto; }
}

/* ── نافذة المعاينة قبل النشر ───────────────────────────── */
.pv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 500;
}
.pv-overlay.open { display: flex; }
.pv-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: min(46rem, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .3);
}
.pv-close {
  position: absolute;
  top: .6rem;
  left: .8rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
}
.pv-close:hover { color: var(--ink); }
.pv-type { font-size: .95rem; font-weight: 700; color: var(--accent, var(--indigo)); margin-bottom: 1rem; }
.pv-grid { display: grid; grid-template-columns: 190px 1fr; gap: 1.25rem; align-items: start; }
.pv-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.pv-noimg {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: .85rem;
  background: var(--page);
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.pv-rows { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem .9rem; font-size: .9rem; }
.pv-rows dt { color: var(--ink-faint); font-size: .8rem; white-space: nowrap; }
.pv-rows dd { margin: 0; color: var(--ink); }
.pv-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .pv-grid { grid-template-columns: 1fr; }
  .pv-media { max-width: 12rem; margin-inline: auto; }
}

/* ═══════════════════════════════════════════════════════════
   Sidebar (للزوار — diwaniya.php + index.php)
   ═══════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.45); z-index: 300; backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }
.sidebar {
  position: fixed; top: 0; right: 0;
  width: min(270px, 86vw); height: 100vh;
  background: var(--navy); z-index: 400;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow-y: auto;
  box-shadow: -4px 0 32px rgba(0,0,0,.35);
}
.sidebar.open { transform: translateX(0); }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand { font-weight: 700; font-size: .95rem; color: #fff; }
.sidebar-close {
  display: flex; align-items: center; background: rgba(255,255,255,.08);
  border: none; cursor: pointer; padding: .35rem; border-radius: 8px; color: #CBD5E1;
}
.sidebar-close:hover { background: rgba(255,255,255,.18); color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; padding: .65rem .6rem 1.5rem; gap: .1rem; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.07); margin: .45rem .3rem; }
.sidebar-link {
  display: flex; align-items: center; gap: .65rem; padding: .72rem .95rem;
  border-radius: 10px; color: #CBD5E1; text-decoration: none; font-size: .91rem;
  font-weight: 500; transition: background .14s, color .14s;
  background: none; border: none; cursor: pointer; width: 100%;
  text-align: right; font-family: inherit;
}
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.on    { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   Admin Sidebar (لوحة التحكم)
   ═══════════════════════════════════════════════════════════ */
.nav-burger {
  display: flex; align-items: center; background: none; border: none;
  cursor: pointer; padding: .45rem; color: #CBD5E1; flex-shrink: 0;
  border-radius: 8px; transition: background .14s;
}
.nav-burger:hover { background: rgba(255,255,255,.12); }
.nav-burger svg { display: block; }
.abar .in { display: flex; align-items: center; gap: .85rem; flex-wrap: nowrap; }
.abar-page-title {
  font-size: .85rem; color: #94A3B8; margin-inline-start: auto;
  font-weight: 500; letter-spacing: .01em;
}

.adm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.45); z-index: 380;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.adm-overlay.open { display: block; }
.adm-sidebar {
  position: fixed; top: 0; right: 0;
  width: min(280px, 85vw); height: 100vh;
  background: #131B2E; z-index: 400;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow-y: auto;
  box-shadow: -8px 0 48px rgba(0,0,0,.35);
  border-left: 1px solid rgba(255,255,255,.06);
}
.adm-sidebar.open { transform: translateX(0); }
.adm-sb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0;
}
.adm-sb-brand { font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: -.01em; }
.adm-sb-close {
  display: flex; align-items: center; background: rgba(255,255,255,.06);
  border: none; cursor: pointer; padding: .4rem; border-radius: 8px; color: #94A3B8;
  transition: background .14s, color .14s;
}
.adm-sb-close:hover { background: rgba(255,255,255,.15); color: #fff; }
.adm-sb-nav { display: flex; flex-direction: column; padding: .8rem .7rem 1.5rem; gap: .15rem; }
.adm-sb-divider { height: 1px; background: rgba(255,255,255,.06); margin: .55rem .4rem; }
.adm-sb-link {
  display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem;
  border-radius: 10px; color: #94A3B8; text-decoration: none; font-size: .9rem;
  font-weight: 500; transition: background .15s, color .15s;
  cursor: pointer; white-space: nowrap;
}
.adm-sb-link:hover   { background: rgba(255,255,255,.06); color: #E2E8F0; }
.adm-sb-link.on      {
  background: rgba(33,112,228,.2); color: #ADC6FF; font-weight: 700;
}
.adm-sb-logout       { color: #FCA5A5; }
.adm-sb-logout:hover { background: rgba(239,68,68,.12); color: #FFB3AD; }
.adm-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 .4rem; border-radius: 999px;
  background: #2170E4; color: #fff; font-size: .72rem; font-weight: 700;
  margin-inline-start: auto;
}
.adm-badge-rose { background: var(--rose); }

/* ═══════════════════════════════════════════════════════════
   أدوات لوحة المناسبات (بحث + فرز)
   ═══════════════════════════════════════════════════════════ */
.admin-tools {
  display: flex; flex-wrap: wrap; gap: .85rem;
  align-items: center; justify-content: space-between;
  margin: 1.25rem 0 1.5rem;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: .75rem;
}
.seg.seg-sm { max-width: none; flex: 0 1 auto; }
.seg.seg-sm a {
  padding: .42rem .85rem; font-size: .82rem;
  border-radius: 999px;
}
.admin-search {
  display: flex; gap: .45rem; align-items: center;
  flex: 1 1 18rem; min-width: min(100%, 16rem);
}
.admin-search input[type=text] {
  flex: 1; padding: .6rem .9rem; font-size: .9rem;
  border-radius: 10px; background: #F8FAFC;
  border: 1px solid var(--line);
}
.admin-search input[type=text]:focus {
  border-color: #2170E4; background: #fff;
  box-shadow: 0 0 0 2px rgba(33,112,228,.12);
}
.admin-search .btn { flex-shrink: 0; }
.filter-note {
  font-size: .83rem; color: var(--ink-faint);
  margin: -.25rem 0 1rem; font-weight: 500;
}
@media (max-width:640px) {
  .admin-tools { flex-direction: column; align-items: stretch; padding: .6rem; }
  .seg.seg-sm { overflow-x: auto; }
}

/* ── نافذة المعاينة ── */
.pv-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem; z-index: 500;
}
.pv-overlay.open { display: flex; }
.pv-modal {
  position: relative; background: #fff; border-radius: 20px;
  width: 100%; max-width: min(46rem,100%); max-height: 92vh;
  overflow: auto; padding: 1.75rem;
  box-shadow: 0 24px 64px rgba(15,23,42,.25);
  border: 1px solid rgba(226,232,240,.5);
}
.pv-close {
  position: absolute; top: .75rem; left: .9rem;
  background: #F8FAFC; border: 1px solid var(--line);
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; line-height: 1; color: var(--ink-faint); cursor: pointer;
  transition: background .14s, color .14s;
}
.pv-close:hover { background: #EEF0F2; color: var(--ink); }
.pv-type {
  font-size: .9rem; font-weight: 700;
  color: var(--accent, var(--indigo));
  margin-bottom: 1.1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.pv-grid { display: grid; grid-template-columns: 190px 1fr; gap: 1.5rem; align-items: start; }
.pv-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.pv-noimg {
  width: 100%; aspect-ratio: 9/16;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-size: .85rem;
  background: #F8FAFC; border: 1px dashed #D8DADC; border-radius: 12px;
}
.pv-rows { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; font-size: .9rem; }
.pv-rows dt { color: var(--ink-faint); font-size: .78rem; white-space: nowrap; font-weight: 500; }
.pv-rows dd { margin: 0; color: var(--ink); font-weight: 500; }
.pv-actions {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
@media (max-width:560px) {
  .pv-grid { grid-template-columns: 1fr; }
  .pv-media { max-width: 12rem; margin-inline: auto; }
}

/* ═══════════════════════════════════════════════════════════
   نموذج إضافة الديوانية — تصميم احترافي
   ═══════════════════════════════════════════════════════════ */
.diw-add-hero {
  background: var(--navy); color: #fff;
  padding: 1.5rem 1rem 2rem; text-align: center; position: relative;
}
.diw-add-hero h1 { font-size: clamp(1.4rem,5vw,1.8rem); margin: .5rem 0 0; font-weight: 700; }

.diw-add-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 1.5rem; margin: 1.5rem auto 2rem; width: var(--w);
}
.diw-add-section-head {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: 1rem 1.1rem; background: var(--navy); border-radius: 14px;
  margin-bottom: 1.35rem; color: #fff;
}
.diw-add-section-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.12); flex-shrink: 0;
}
.diw-add-section-title { font-weight: 700; font-size: 1rem; }
.diw-add-section-sub   { font-size: .82rem; color: #94A3B8; margin-top: .12rem; }

.diw-field    { margin-bottom: 1.15rem; }
.diw-label    { display:block; font-size:.88rem; font-weight:600; margin-bottom:.38rem; color:var(--ink); }
.diw-note     { font-weight:400; color:var(--ink-faint); font-size:.78rem; }
.diw-req      { color:var(--rose); margin-right:.1rem; }
.diw-hint     { font-size:.78rem; color:var(--ink-faint); margin-top:.3rem; }
.diw-row2     { display:grid; grid-template-columns:1fr 1fr; gap:.9rem; }
@media (max-width:560px) { .diw-row2 { grid-template-columns:1fr; } }

.diw-input-wrap { position:relative; }
.diw-input-icon {
  position:absolute; top:50%; right:.85rem; transform:translateY(-50%);
  color:var(--ink-faint); pointer-events:none; display:flex;
}
.diw-input {
  width:100%; font-family:var(--font); font-size:1rem; padding:.82rem 1rem;
  background:var(--page); border:1px solid var(--line); border-radius:12px; color:var(--ink);
  transition:border-color .15s, background .15s;
}
.diw-input:focus { border-color:var(--amber); background:#fff; outline:none; }
.diw-input-icon-pad { padding-right:2.6rem; }
.diw-textarea { min-height:5rem; resize:vertical; padding:.9rem 1rem; }

.diw-check-label {
  display:inline-flex; align-items:center; gap:.55rem;
  font-size:.9rem; cursor:pointer; color:var(--ink-soft);
}
.diw-check-label input { accent-color:var(--amber); width:auto; }

/* ── chips الأيام — صف أفقي كامل ── */
.diw-days-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .75rem;
}
.diw-day-chip {
  display: inline-flex;
  align-items: center;
  padding: .48rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--page);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  user-select: none;
  transition: background .13s, color .13s, border-color .13s;
}
.diw-day-chip input { display: none; }
.diw-day-chip.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.diw-day-chip:hover:not(.on) { border-color: var(--navy); color: var(--navy); }

/* ── يومي toggle ── */
.diw-daily-label {
  display: inline-flex; align-items: center; gap: .55rem;
  cursor: pointer; font-size: .88rem; font-weight: 600;
  color: var(--amber); user-select: none;
}
.diw-daily-cb {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--amber); display: flex; align-items: center; justify-content: center;
  background: transparent; flex-shrink: 0; transition: background .14s;
}
.diw-daily-cb svg { display: none; }
.diw-daily-cb.on { background: var(--amber); }
.diw-daily-cb.on svg { display: block; color: #fff; }

/* ── وقت الاستقبال — chips 2×2 ── */
.time-grid  { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
.time-chip  {
  display:flex; align-items:center; justify-content:center;
  padding:.75rem 1rem; border-radius:14px;
  border:1.5px solid var(--line); background:var(--page);
  font-size:.9rem; font-weight:600; cursor:pointer; color:var(--ink-soft);
  text-align:center; user-select:none;
  transition:background .13s, color .13s, border-color .13s;
}
.time-chip input { display:none; }
.time-chip.on {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber);
  font-weight: 700;
}
.time-chip:hover:not(.on) { border-color:var(--amber); color:var(--amber); }
@media (max-width:480px) { .time-grid { grid-template-columns:1fr; } }

/* ── إعدادات toggle ── */
.settings-toggle { display:flex; align-items:flex-start; gap:.6rem; cursor:pointer; margin-bottom:.5rem; }
.settings-toggle input { accent-color:var(--indigo); width:auto; margin-top:.22rem; flex-shrink:0; }
.settings-toggle-label { font-size:.92rem; color:var(--ink-soft); }

/* ── فلتر أيام الديوانيات ── */
.diw-day-filter { display:flex; gap:.4rem; overflow-x:auto; padding:1rem 1rem .65rem; scrollbar-width:none; }
.diw-day-filter::-webkit-scrollbar { display:none; }
.diw-day-pill {
  white-space:nowrap; padding:.42rem .95rem; border-radius:999px; font-size:.86rem; font-weight:600;
  background:#fff; border:1px solid var(--line); color:var(--ink-soft); text-decoration:none; flex-shrink:0;
  display:inline-flex; align-items:center; gap:.3rem;
  transition:background .14s, color .14s, border-color .14s;
}
.diw-day-pill:hover { border-color:var(--amber); color:var(--amber); }
.diw-day-pill.on    { background:var(--amber); color:#fff; border-color:var(--amber); }
.diw-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.8; }

/* ── فاصل اليوم ── */
.diw-day-header { display:flex; align-items:center; gap:.6rem; margin:1.75rem 0 .85rem; font-weight:700; font-size:.98rem; color:var(--ink); }
.diw-day-header::after { content:''; flex:1; height:1px; background:var(--line); }
.diw-day-icon { display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:8px; background:var(--amber-bg); color:var(--amber); flex-shrink:0; }
.diw-day-today .diw-day-icon { background:var(--amber); color:#fff; }
.diw-day-today > span:first-of-type { color:var(--amber); }
.diw-today-badge { background:var(--amber); color:#fff; font-size:.72rem; font-weight:700; padding:.14rem .58rem; border-radius:999px; flex-shrink:0; }

/* ── بطاقة الديوانية ── */
.diw-card { display:block; background:#fff; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; text-decoration:none; margin-bottom:.75rem; transition:border-color .15s, transform .15s; }
.diw-card:hover { border-color:var(--amber); transform:translateY(-2px); }
.diw-card-accent { height:3px; background:var(--amber); }
.diw-card-body { display:flex; align-items:center; gap:.85rem; padding:.88rem 1rem .45rem; }
.diw-card-icon-wrap { flex-shrink:0; width:42px; height:42px; border-radius:12px; background:var(--amber-bg); color:var(--amber); display:flex; align-items:center; justify-content:center; }
.diw-card-info { flex:1; min-width:0; }
.diw-card-name { font-size:1rem; font-weight:700; color:var(--ink); overflow-wrap:anywhere; }
.diw-card-owner { font-size:.85rem; font-weight:600; color:var(--ink-soft); margin-top:.1rem; }
.diw-card-addr { font-size:.82rem; color:var(--ink-faint); margin-top:.12rem; }
.diw-card-meta { display:flex; gap:1rem; flex-wrap:wrap; padding:.35rem 1rem .7rem; font-size:.8rem; color:var(--ink-soft); }
.diw-card-meta span { display:inline-flex; align-items:center; gap:.3rem; }

/* ── تفاصيل الديوانية ── */
.diw-detail-wrap { width:var(--w); margin-inline:auto; padding:1.5rem 0 4rem; }
.diw-detail-nav { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.25rem; font-size:.88rem; color:var(--ink-faint); }
.diw-back { display:inline-flex; align-items:center; gap:.4rem; color:var(--ink-soft); text-decoration:none; font-weight:600; font-size:.9rem; }
.diw-back:hover { color:var(--ink); }
.diw-detail-label { font-size:.82rem; }
.diw-detail-card { background:#fff; border:1px solid var(--line); border-radius:20px; overflow:hidden; padding:1.5rem; }
.diw-detail-header { margin-bottom:1.2rem; padding-bottom:1rem; border-bottom:1px solid var(--line); }
.diw-detail-name { font-size:1.55rem; font-weight:700; text-align:center; margin:0 0 .45rem; }
.diw-detail-owner { display:flex; align-items:center; justify-content:center; gap:.35rem; font-size:.9rem; color:var(--ink-soft); }
.diw-detail-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:.85rem; margin-bottom:1.1rem; }
.diw-info-box { display:flex; flex-direction:column; align-items:center; gap:.35rem; padding:1rem; border-radius:14px; text-align:center; }
.diw-info-time { background:var(--amber-bg); color:var(--amber); }
.diw-info-days { background:var(--indigo-bg); color:var(--indigo); }
.diw-info-label { font-size:.75rem; font-weight:600; opacity:.75; }
.diw-info-val { font-size:1rem; font-weight:700; color:var(--ink); }
.diw-detail-address { display:flex; gap:.75rem; align-items:flex-start; padding:.9rem 1rem; background:var(--page); border-radius:12px; margin-bottom:1.1rem; }
.diw-addr-label { font-size:.75rem; color:var(--ink-faint); margin-bottom:.15rem; }
.diw-addr-val { font-weight:700; color:var(--ink); font-size:1rem; }
.diw-addr-note { font-size:.82rem; color:var(--ink-soft); margin-top:.2rem; }
.diw-maps-btn { margin-bottom:.85rem; }
.diw-detail-btns { display:grid; grid-template-columns:1fr 1fr; gap:.65rem; }
@media (max-width:480px) { .diw-detail-info-grid, .diw-detail-btns { grid-template-columns:1fr; } }
/* ═══════════════════════════════════════════════════════════
   Admin Desktop — Sidebar ثابت على الكمبيوتر (≥1024px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .adm-sidebar {
    transform: translateX(0) !important;
    box-shadow: none;
    border-left: 1px solid rgba(255,255,255,.06);
    width: 250px;
  }
  .adm-sb-close { display: none; }
  .adm-overlay { display: none !important; }
  .nav-burger { display: none; }
  .abar { margin-right: 250px; }
  .abar .in { padding-right: 1.5rem; padding-left: 1.5rem; }
  main.wrap-wide { margin-right: 250px; padding-right: 1.5rem; padding-left: 1.5rem; }
}

/* ═══════════════════════════════════════════════════════════
   Admin Mobile — بطاقات بدل جدول + شريط سفلي (≤767px)
   ═══════════════════════════════════════════════════════════ */

/* ── إحصائيات: 2×2 على الجوال ── */
@media (max-width: 767px) {
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat { padding: .85rem .7rem; }
  .stat .n { font-size: 1.5rem; }
  .stat .l { font-size: .72rem; }
}

/* ── الجدول يتحوّل لبطاقات على الجوال ── */
@media (max-width: 767px) {
  .table-scroll { overflow-x: visible; border-radius: 0; }
  table.list { border: none; background: transparent; }
  table.list thead { display: none; }
  table.list tbody { display: flex; flex-direction: column; gap: .85rem; }
  table.list tr {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    gap: .5rem .75rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
    align-items: start;
  }
  table.list td { padding: 0; border-bottom: none; }

  /* النوع — أعلى يمين */
  table.list td:nth-child(1) {
    grid-column: 1 / -1;
    order: 1;
  }
  /* المناسبة — الاسم الكبير */
  table.list td:nth-child(2) {
    grid-column: 1 / -1;
    order: 2;
  }
  table.list td:nth-child(2) strong { font-size: 1.05rem; }
  /* مقدّم الطلب */
  table.list td:nth-child(3) {
    grid-column: 1;
    order: 4;
    font-size: .82rem;
  }
  table.list td:nth-child(3)::before {
    content: 'مقدّم الطلب';
    display: block;
    font-size: .7rem;
    color: var(--ink-faint);
    font-weight: 600;
    margin-bottom: .15rem;
  }
  /* التاريخ */
  table.list td:nth-child(4) {
    grid-column: 2;
    order: 5;
    font-size: .82rem;
    text-align: left;
  }
  table.list td:nth-child(4)::before {
    content: 'التاريخ';
    display: block;
    font-size: .7rem;
    color: var(--ink-faint);
    font-weight: 600;
    margin-bottom: .15rem;
  }
  /* البطاقة — مصغّرة */
  table.list td:nth-child(5) {
    grid-row: 2 / 4;
    grid-column: 1;
    order: 3;
    width: 60px;
  }
  table.list td:nth-child(5) img { width: 56px; height: auto; border-radius: 8px; }
  /* الإجراء — أزرار أسفل */
  table.list td:nth-child(6) {
    grid-column: 1 / -1;
    order: 6;
    padding-top: .6rem;
    border-top: 1px solid #F1F5F9;
    margin-top: .3rem;
  }
  table.list td:nth-child(6) form { justify-content: flex-start; }

  /* أدوات البحث والفلتر */
  .admin-tools { padding: .6rem; gap: .6rem; }
  .admin-search { min-width: 100%; }

  /* محتوى أدمن */
  main.wrap-wide { padding: 1rem .75rem 6rem !important; }
}

/* ── الشريط السفلي للجوال ── */
.adm-bottom-nav {
  display: none;
}
@media (max-width: 1023px) {
  .adm-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    z-index: 100;
    padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom));
    justify-content: space-around;
    box-shadow: 0 -2px 12px rgba(15,23,42,.06);
  }
  .adm-bnav-link {
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    text-decoration: none; color: var(--ink-faint);
    font-size: .65rem; font-weight: 600;
    padding: .3rem .5rem; border-radius: 8px;
    position: relative;
    transition: color .14s;
  }
  .adm-bnav-link.on { color: #2170E4; }
  .adm-bnav-link svg { width: 20px; height: 20px; }
  .adm-bnav-badge {
    position: absolute; top: -2px; right: 50%; transform: translateX(70%);
    min-width: 16px; height: 16px; padding: 0 .3rem;
    border-radius: 999px; background: var(--rose); color: #fff;
    font-size: .62rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════
   Admin Contacts — عرض الجوال (≤767px)
   ═══════════════════════════════════════════════════════════ */
.ac-add-btn { display: none; }
.ac-back { display: none; }

@media (max-width: 767px) {
  /* الشبكة عمود واحد */
  .ac-wrap {
    grid-template-columns: 1fr !important;
  }

  /* الوضع الافتراضي: إخفاء النموذج وإظهار القائمة */
  .ac-wrap .ac-form { display: none; }
  .ac-wrap .ac-list { display: block; }
  .ac-add-btn {
    display: block; width: 100%; text-align: center;
    margin-bottom: 1rem; font-size: .95rem;
  }

  /* وضع الإضافة/التعديل: إظهار النموذج وإخفاء القائمة */
  .ac-wrap.ac-form-mode .ac-form { display: block; }
  .ac-wrap.ac-form-mode .ac-list { display: none; }

  /* زر الرجوع */
  .ac-back {
    display: inline-flex; text-decoration: none; color: var(--ink-faint);
    margin-left: .5rem; font-size: 1.1rem;
  }
  .ac-back:hover { color: var(--ink); }

  /* جدول القائمون — بطاقات */
  .ac-list table.list { border: none; background: transparent; }
  .ac-list table.list thead { display: none; }
  .ac-list table.list tbody { display: flex; flex-direction: column; gap: .75rem; }
  .ac-list table.list tr {
    display: flex; flex-direction: column; gap: .4rem;
    background: #fff; border: 1px solid var(--line);
    border-radius: 14px; padding: 1rem;
  }
  .ac-list table.list td { padding: 0; border-bottom: none; }
  .ac-list table.list td:nth-child(3) { display: none; }
  .ac-list table.list td:last-child form {
    flex-wrap: nowrap; gap: .4rem; padding-top: .5rem;
    border-top: 1px solid #F1F5F9; margin-top: .3rem;
  }
}

/* ── Admin Sidebar (desktop only) ───────────────────────── */
.adm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 998;
}
.adm-overlay.open { display: block; }

.adm-sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100vh;
  background: var(--navy);
  z-index: 999;
  transition: left .25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0,0,0,.25);
}
.adm-sidebar.open { left: 0; }

.adm-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.adm-sidebar-head .brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.adm-sidebar-close {
  background: none;
  border: none;
  color: #CBD5E1;
  cursor: pointer;
  font-size: 1.2rem;
  padding: .2rem .5rem;
  line-height: 1;
}
.adm-sidebar-close:hover { color: #fff; }

.adm-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: .75rem 0;
  overflow-y: auto;
}
.adm-sidebar-nav a {
  color: #CBD5E1;
  text-decoration: none;
  padding: .85rem 1.25rem;
  font-size: .95rem;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.adm-sidebar-nav a:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.adm-sidebar-nav a.on {
  color: #fff;
  border-left-color: #60A5FA;
  background: rgba(255,255,255,.1);
  font-weight: 600;
}

/* على الجوال: أخفِ الـ sidebar والـ overlay */
@media (max-width: 700px) {
  .adm-sidebar,
  .adm-overlay { display: none !important; }
}

/* على الكمبيوتر: أخفِ الدروب داون، أظهر الهمبرغر دائماً */
@media (min-width: 701px) {
  .abar-links { display: none !important; }
  .nav-burger  { display: flex !important; align-items: center; }
}