/* ==========================================================================
   ثرى الأحبة — نظام التصميم (Mobile First، RTL)
   الهوية: أخضر زمردي #103D34، ذهبي معتّق #C5A56A، عاجي #F6F2E9، كحلي #101D20
   الخطوط: نوتو نسخ عربي للعناوين، نوتو سانس عربي للنصوص (مستضافة محلياً، رخصة OFL)
   ========================================================================== */

@font-face { font-family: "Thara Naskh"; src: url("/assets/fonts/noto-naskh-arabic.woff") format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Thara Sans"; src: url("/assets/fonts/noto-sans-arabic-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thara Sans"; src: url("/assets/fonts/noto-sans-arabic-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Thara Sans"; src: url("/assets/fonts/noto-sans-arabic-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --green: #103D34;
  --green-2: #164a40;
  --green-3: #1d5a4e;
  --gold: #C5A56A;
  --gold-2: #b39255;
  --gold-soft: #efe4cc;
  --ivory: #F6F2E9;
  --ivory-2: #ece6d8;
  --navy: #101D20;
  --white: #FFFFFF;
  --ink: #101D20;
  --ink-2: #3c4a48;
  --muted: #5f6b68;
  --line: #ddd5c4;
  --danger: #a8322b;
  --danger-soft: #f8e4e1;
  --ok: #1f6b4a;
  --ok-soft: #e1f0e7;
  --warn: #8a5a00;
  --warn-soft: #fbefd5;
  --info-soft: #e6eeec;
  --radius-btn: 9px;
  --radius-card: 15px;
  --shadow: 0 1px 2px rgba(16, 29, 32, .05), 0 6px 18px rgba(16, 29, 32, .06);
  --font-head: "Thara Naskh", "Noto Naskh Arabic", "Amiri", serif;
  --font-body: "Thara Sans", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --gutter: 18px;
  --header-h: 74px;
}
@media (max-width: 370px) { :root { --gutter: 14px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.75; color: var(--ink); background: var(--ivory); overflow-x: hidden; text-rendering: optimizeLegibility; }
img, svg, canvas, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-3); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 .5em; color: var(--green); font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -60px; right: 10px; background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: 8px; z-index: 1000; font-weight: 700; }
.skip-link:focus { top: 10px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.break { word-break: break-all; }
code { font-size: .9em; background: var(--ivory-2); padding: 1px 6px; border-radius: 5px; }

/* أيقونات */
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; }

/* ===== الرأس ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--green); color: var(--white); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.site-header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; flex: none; }
.brand__logo { width: 50px; height: auto; }
.main-nav { display: none; margin-inline-start: 18px; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: rgba(255,255,255,.88); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold); background: rgba(255,255,255,.06); }
.site-header__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.btn--header { color: var(--white); border: 1.5px solid rgba(255,255,255,.55); background: rgba(255,255,255,.04); min-height: 44px; padding: 6px 14px; font-weight: 700; }
.btn--header:hover { color: var(--gold); border-color: var(--gold); }
.menu-toggle { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--white); cursor: pointer; border-radius: 8px; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }
.mobile-menu { background: var(--white); color: var(--green); border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
.mobile-menu ul { list-style: none; margin: 0; padding-block: 4px 10px; }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu li:last-child { border-bottom: 0; }
.mobile-menu a, .mobile-menu__btn { display: flex; align-items: center; gap: 14px; padding: 15px 4px; color: var(--green); text-decoration: none; font-size: 1.12rem; width: 100%; background: none; border: 0; cursor: pointer; text-align: start; }
.mobile-menu a[aria-current="page"] { font-weight: 700; }
.mobile-menu .icon { width: 24px; height: 24px; }
@media (min-width: 1024px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ===== الأزرار ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: var(--radius-btn); border: 1.5px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; line-height: 1.3; transition: background .15s, color .15s, border-color .15s, transform .1s; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-3); color: var(--white); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-2); color: var(--navy); }
.btn--outline { background: var(--white); color: var(--green); border-color: var(--green); }
.btn--outline:hover { background: var(--ivory); color: var(--green); }
.btn--outline-light { background: rgba(16,61,52,.35); color: var(--white); border-color: rgba(255,255,255,.7); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn--ghost-light:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn--danger { background: var(--danger); color: var(--white); }
.btn--danger:hover { background: #8c2620; color: var(--white); }
.btn--lg { min-height: 54px; font-size: 1.06rem; padding-inline: 24px; }
.btn--small { min-height: 40px; padding: 6px 14px; font-size: .92rem; }
.btn--tiny { min-height: 34px; padding: 4px 10px; font-size: .85rem; border-color: var(--line); background: var(--white); color: var(--green); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row > form { margin: 0; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); border-radius: 8px; color: var(--green); cursor: pointer; }
.icon-btn--danger { color: var(--danger); }
.link-danger { background: none; border: 0; color: var(--danger); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 8px 0; text-decoration: underline; }
.inline-form { margin-top: 12px; }

/* ===== الأقسام ===== */
.section { padding-block: 32px; }
.section--white { background: var(--white); }
.section--ivory { background: var(--ivory); }
.section__head { margin-bottom: 14px; }
.section__title { font-size: 1.8rem; margin-bottom: .3em; }
.section__lead { color: var(--ink-2); margin-bottom: 1rem; }
@media (min-width: 768px) { .section { padding-block: 56px; } .section__title { font-size: 2.1rem; } }
.page-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }

/* ===== البطل ===== */
.hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--green); }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,61,52,.15) 0%, rgba(16,61,52,.55) 42%, rgba(16,61,52,.94) 78%, #103D34 100%); }
.hero__content { position: relative; z-index: 1; padding-block: 120px 34px; }
.hero__title { font-size: 3.4rem; color: var(--white); margin: 0 0 .1em; line-height: 1.2; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero__subtitle { font-family: var(--font-head); color: var(--gold); font-size: 1.55rem; font-weight: 700; margin-bottom: .5em; line-height: 1.4; }
.hero__desc { font-size: 1.06rem; max-width: 34em; color: rgba(255,255,255,.92); }
.hero__actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-top: 22px; max-width: 480px; }
.hero__actions .btn { padding-inline: 12px; white-space: nowrap; font-size: 1rem; }
@media (min-width: 768px) { .hero { min-height: 620px; align-items: center; } .hero__title { font-size: 4rem; } .hero__content { padding-block: 120px 80px; } }

/* ===== البطاقات والنماذج ===== */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card__title { font-size: 1.3rem; margin-bottom: .6em; }
.card__subtitle { font-size: 1.08rem; margin: 1em 0 .4em; }
.form { display: grid; gap: 14px; }
.form--inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field label, .field__label { font-weight: 600; font-size: .98rem; color: var(--ink); }
.field small, .field__label small { font-weight: 400; color: var(--muted); font-size: .84rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
@media (max-width: 330px) { .field-row { grid-template-columns: 1fr; } }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], input[type=date], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-btn); background: var(--white); color: var(--ink); font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,61,52,.12); outline: none; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }
input[disabled] { background: var(--ivory); color: var(--muted); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23103D34' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; background-size: 18px; padding-left: 38px; }
input[type=number] { direction: ltr; text-align: right; }
.field__error { color: var(--danger); font-size: .9rem; margin: 0; font-weight: 600; }
.form__note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .9rem; margin: 0; }
.form__alt { text-align: center; margin: 0; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-height: 32px; line-height: 1.6; }
.check input, .radio input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.check--box { background: var(--ivory); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.password { position: relative; }
.password input { padding-left: 52px; }
.password__toggle { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; }
.file-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; border: 1.5px dashed var(--green); border-radius: var(--radius-btn); color: var(--green); background: var(--white); cursor: pointer; font-weight: 600; }
.file-btn:focus-within { outline: 3px solid var(--gold); }
.mini-details { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; background: #fcfbf7; }
.mini-details summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--green); min-height: 44px; }
.mini-details[open] { padding-bottom: 14px; }
.mini-details > .field, .mini-details > .field-row, .mini-details > .check { margin-bottom: 12px; }

/* تنبيهات */
.flash-stack { margin-top: 14px; display: grid; gap: 10px; }
.flash, .notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; margin-bottom: 12px; }
.flash p, .notice p { margin: 0; flex: 1; }
.flash--success, .notice--ok { background: var(--ok-soft); color: var(--ok); border-color: #c4e2d0; }
.flash--error { background: var(--danger-soft); color: var(--danger); border-color: #efc9c4; }
.flash--info, .notice--info { background: var(--info-soft); color: var(--green); border-color: #cfdcd8; }
.flash--warn, .notice--warn { background: var(--warn-soft); color: var(--warn); border-color: #ecd8a8; }
.flash__close { background: none; border: 0; cursor: pointer; color: inherit; width: 36px; height: 36px; display: grid; place-items: center; margin: -6px; }
.flash .btn { flex: none; }

/* شارات */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--ivory-2); color: var(--ink-2); white-space: nowrap; }
.badge--active, .badge--approved, .badge--paid, .badge--completed, .badge--resolved { background: var(--ok-soft); color: var(--ok); }
.badge--pending_payment, .badge--pending_review, .badge--submitted, .badge--pending, .badge--needs_info, .badge--reserved, .badge--open, .badge--in_review, .badge--new { background: var(--warn-soft); color: var(--warn); }
.badge--rejected, .badge--suspended, .badge--banned, .badge--cancelled, .badge--hidden, .badge--dismissed { background: var(--danger-soft); color: var(--danger); }
.badge--draft, .badge--archived, .badge--available { background: var(--ivory-2); color: var(--ink-2); }
.tag { display: inline-block; padding: 3px 12px; border-radius: 8px; font-size: .82rem; background: var(--ivory-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag--gold { background: var(--gold-soft); border-color: var(--gold); color: #6b5221; }
.tag--danger { background: var(--danger-soft); color: var(--danger); border-color: #efc9c4; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: var(--white); font-size: .78rem; font-weight: 700; }

/* ===== عارض القبر ===== */
.viewer { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.viewer__stage { position: relative; aspect-ratio: 4 / 3.1; background: linear-gradient(180deg, #e9e3d6 0%, #d9ccb3 100%); touch-action: none; }
.viewer__canvas { position: absolute; inset: 0; }
.viewer__canvas canvas { width: 100% !important; height: 100% !important; display: block; outline: none; }
.viewer__badge { position: absolute; top: 12px; left: 12px; background: var(--white); color: var(--navy); font-weight: 700; padding: 3px 14px; border-radius: 999px; font-size: .95rem; box-shadow: 0 2px 6px rgba(0,0,0,.12); direction: ltr; }
.viewer__demo { position: absolute; top: 12px; right: 12px; background: rgba(16,61,52,.86); color: var(--white); font-size: .8rem; padding: 3px 10px; border-radius: 8px; }
.viewer__loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; color: var(--green); font-weight: 600; background: rgba(246,242,233,.6); transition: opacity .3s; }
.viewer__loading.is-done { opacity: 0; pointer-events: none; }
.viewer__fallback { position: absolute; inset: 0; background: var(--ivory); }
.viewer__fallback img { width: 100%; height: 100%; object-fit: cover; }
.viewer__fallback p { position: absolute; inset-inline: 10px; bottom: 10px; margin: 0; background: rgba(255,255,255,.94); padding: 8px 12px; border-radius: 10px; font-size: .88rem; color: var(--ink-2); }
.viewer__tools { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.viewer__tools button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px 8px; min-height: 60px; border: 0; background: var(--white); color: var(--navy); cursor: pointer; font-size: .8rem; white-space: nowrap; }
@media (max-width: 380px) { .viewer__tools button { font-size: .72rem; } }
.viewer__tools button:hover, .viewer__tools button[aria-pressed="true"] { color: var(--green); background: var(--ivory); }
.viewer__tools button[aria-pressed="true"] .icon { color: var(--gold-2); }
.viewer__hint { margin: 0; padding: 10px 14px 12px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); }
.viewer:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.viewer:fullscreen .viewer__stage { flex: 1; aspect-ratio: auto; }
.viewer.is-pseudo-fs { position: fixed; inset: 0; z-index: 2000; border-radius: 0; display: flex; flex-direction: column; }
.viewer.is-pseudo-fs .viewer__stage { flex: 1; aspect-ratio: auto; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(16,61,52,.18); border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-caption { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; padding: 12px 16px; margin-top: -12px; padding-top: 22px; }
.viewer-caption__name { font-family: var(--font-head); font-weight: 700; color: var(--green); font-size: 1.15rem; margin: 0; }
.viewer-caption__dates { margin: 0; color: var(--muted); font-size: .92rem; }

.split { display: grid; gap: 28px; }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 40px; } }

/* ===== القرآن ===== */
.quran { background: var(--green); color: var(--white); border-radius: 18px; padding: 20px 18px 16px; box-shadow: var(--shadow); }
.quran__head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.quran__icon { width: 52px; height: 52px; border: 1.5px solid rgba(255,255,255,.35); border-radius: 12px; display: grid; place-items: center; flex: none; }
.quran__title { color: var(--white); font-size: 1.75rem; margin: 0; }
.quran__reciter { margin: 0; color: rgba(255,255,255,.75); font-size: .95rem; }
.quran__progress input[type=range] { width: 100%; accent-color: var(--gold); height: 28px; direction: ltr; transform: scaleX(-1); }
.quran__times { display: flex; justify-content: space-between; font-size: .85rem; color: rgba(255,255,255,.75); direction: ltr; flex-direction: row-reverse; }
.quran__controls { display: flex; justify-content: center; align-items: center; gap: 30px; margin: 8px 0 6px; }
.quran__btn { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; color: var(--white); cursor: pointer; border-radius: 50%; }
.quran__btn:hover { background: rgba(255,255,255,.08); }
.quran__play { width: 70px; height: 70px; border-radius: 50%; background: var(--gold); color: var(--navy); border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.quran__play:hover { background: #d3b57c; }
.quran__ic-pause { display: none; }
.quran.is-playing .quran__ic-play { display: none; }
.quran.is-playing .quran__ic-pause { display: block; }
.quran__volume { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.8); max-width: 260px; margin: 4px auto 0; }
.quran__volume input { flex: 1; accent-color: var(--gold); }
.quran__status { min-height: 1.4em; text-align: center; font-size: .9rem; color: var(--gold-soft); margin: 6px 0; }
.quran__listbtn { display: flex; width: 100%; justify-content: center; align-items: center; gap: 10px; border: 0; border-top: 1px solid rgba(255,255,255,.15); background: none; color: var(--white); padding: 14px 0 4px; font-weight: 700; font-size: 1.05rem; cursor: pointer; min-height: 48px; }
.quran__panel { margin-top: 10px; background: var(--white); color: var(--ink); border-radius: 12px; padding: 12px; }
.quran__row { margin-bottom: 10px; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tabs button { flex: 1; min-height: 42px; border: 1px solid var(--line); background: var(--ivory); border-radius: 8px; cursor: pointer; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--green); color: var(--white); border-color: var(--green); }
.quran__list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.quran__list button { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 10px 8px; min-height: 46px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: start; }
.quran__list button:hover, .quran__list button[aria-current="true"] { background: var(--ivory); color: var(--green); font-weight: 700; }
.quran__list .n { color: var(--muted); font-size: .85rem; }
.quran__auto { margin-top: 10px; font-size: .9rem; }
.quran__note { margin: 10px 0 0; font-size: .82rem; color: rgba(255,255,255,.7); }

/* ===== الختمة ===== */
.khatma-demo__head, .khatma__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.khatma-demo__name, .khatma__name { font-family: var(--font-head); font-weight: 700; color: var(--green); font-size: 1.15rem; margin: 0; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { display: flex; align-items: baseline; gap: 8px; justify-content: center; background: var(--ivory); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat strong { font-family: var(--font-head); font-size: 2rem; color: var(--green); line-height: 1; }
.stat span { color: var(--ink-2); font-size: .92rem; }
.khatma-bar { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; margin-bottom: 12px; direction: rtl; }
.khatma-bar span { height: 12px; border-radius: 3px; background: var(--ivory-2); border: 1px solid var(--line); }
.khatma-bar span.is-done { background: var(--green); border-color: var(--green); }
.khatma-bar span.is-reserved { background: var(--gold-soft); border-color: var(--gold); }
.khatma__progress { font-weight: 600; color: var(--green); margin-bottom: 8px; }
.khatma__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.kpart { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; background: var(--white); display: grid; gap: 4px; text-align: center; min-height: 92px; align-content: start; }
.kpart__no { font-family: var(--font-head); font-weight: 700; color: var(--green); font-size: 1.05rem; }
.kpart__who { font-size: .76rem; color: var(--muted); min-height: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpart button { min-height: 36px; border-radius: 8px; border: 1px solid var(--green); background: var(--green); color: var(--white); cursor: pointer; font-size: .82rem; font-weight: 700; padding: 2px 4px; }
.kpart button.secondary { background: var(--white); color: var(--green); }
.kpart--reserved { background: #fbf6ea; border-color: var(--gold); }
.kpart--mine { background: var(--gold-soft); border-color: var(--gold-2); box-shadow: 0 0 0 2px rgba(197,165,106,.35); }
.kpart--completed { background: var(--ok-soft); border-color: #b9dcc7; }
.kpart--completed .kpart__no { color: var(--ok); }
.khatma__legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; border: 1px solid var(--line); }
.lg--available::before { background: var(--white); }
.lg--reserved::before { background: #fbf6ea; border-color: var(--gold); }
.lg--mine::before { background: var(--gold-soft); border-color: var(--gold-2); }
.lg--completed::before { background: var(--ok-soft); border-color: #b9dcc7; }
.khatma__msg { min-height: 1.5em; font-weight: 600; margin: 10px 0 0; }
.khatma__msg.is-error { color: var(--danger); }
.khatma__msg.is-ok { color: var(--ok); }
.khatma__complete { display: flex; gap: 12px; align-items: center; background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.khatma__complete p { margin: 0; }

/* ===== الدعاء ===== */
.dua-card { background: var(--green); color: var(--white); border-radius: 18px; padding: 24px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.dua-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(197,165,106,.35); border-radius: 12px; pointer-events: none; }
.dua-card__for { color: var(--gold); font-weight: 700; margin-bottom: .4em; position: relative; }
.dua-card__text { font-family: var(--font-head); font-size: 1.85rem; line-height: 1.6; margin-bottom: 18px; position: relative; }
.dua-card__actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.prayers { margin-top: 22px; }
.prayer { margin: 0 0 12px; background: var(--ivory); border-inline-start: 4px solid var(--gold); border-radius: 10px; padding: 12px 16px; }
.prayer p { margin: 0 0 4px; font-family: var(--font-head); font-size: 1.12rem; }
.prayer footer { color: var(--muted); font-size: .88rem; }
.prayer-form summary, .report summary { cursor: pointer; font-weight: 700; color: var(--green); min-height: 44px; display: flex; align-items: center; gap: 8px; }
.prayer-form[open] summary, .report[open] summary { margin-bottom: 12px; }

/* ===== الخطوات والمميزات والسعر ===== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--ivory); border-radius: 12px; border: 1px solid var(--line); }
.steps__n { width: 36px; height: 36px; border-radius: 50%; background: var(--gold-soft); color: var(--green); display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); }
.steps .icon { color: var(--muted); }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, 1fr); } }
.features li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; }
.features .icon { color: var(--gold-2); margin-bottom: 8px; }
.features h3 { font-size: 1.15rem; margin-bottom: .3em; }
.features p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.price-card { border: 1.5px solid var(--gold); }
.price-card__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.price-card__amount { font-family: var(--font-head); font-size: 2.2rem; color: var(--green); font-weight: 700; margin: 0; }
.price-card__once { color: var(--gold-2); font-weight: 700; }
.checklist { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist .icon { color: var(--ok); }
.price-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.price-inline__amount { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--green); }

.accordion { display: grid; gap: 10px; }
.accordion__item { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.section--white .accordion__item { background: var(--ivory); }
.accordion__item summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; color: var(--green); display: flex; justify-content: space-between; gap: 12px; min-height: 52px; align-items: center; }
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--gold-2); }
.accordion__item[open] summary::after { content: "−"; }
.accordion__item p { margin: 0 0 14px; color: var(--ink-2); }

/* بحث وبطاقات الذكرى */
.search-box { display: flex; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); overflow: hidden; margin-bottom: 16px; }
.search-box input { border: 0; min-height: 52px; }
.search-box input:focus { box-shadow: none; }
.search-box button { width: 56px; border: 0; background: none; color: var(--green); cursor: pointer; display: grid; place-items: center; }
.mcard-list { display: grid; gap: 12px; }
.mcard-list--grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mcard { display: grid; grid-template-columns: 64px 1fr; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px; box-shadow: var(--shadow); }
.mcard__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.mcard__avatar img { width: 100%; height: 100%; object-fit: cover; }
.mcard__name { font-size: 1.2rem; margin: 0; }
.mcard__name a { text-decoration: none; }
.mcard__meta { margin: 0; color: var(--muted); font-size: .9rem; }
.mcard__bio { margin: 4px 0 6px; color: var(--ink-2); font-size: .94rem; }
.mcard__link { font-weight: 700; text-decoration: none; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.empty .icon { color: var(--gold-2); }
.pagination { display: flex; justify-content: center; gap: 16px; align-items: center; margin-top: 18px; }
.pagination a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); text-decoration: none; }

/* ===== صفحة الذكرى ===== */
.preview-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; background: var(--warn-soft); color: var(--warn); padding: 10px var(--gutter); font-size: .92rem; text-align: center; }
.memorial-head { background: #eeeadc; padding-block: 20px 22px; }
.memorial-head__inner { display: flex; gap: 16px; align-items: center; }
.memorial-head__avatar { width: 84px; height: 84px; border-radius: 14px; background: var(--ivory); border: 1px solid #d7d1bf; display: grid; place-items: center; color: var(--muted); flex: none; overflow: hidden; }
.memorial-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.memorial-head__label { margin: 0; color: var(--muted); font-size: .9rem; }
.memorial-head__name { font-size: 2rem; margin: 0; line-height: 1.3; }
.memorial-head__dates { margin: 0; color: var(--ink-2); }
.memorial-head__meta { margin: 0; color: var(--muted); font-size: .9rem; }
@media (min-width: 768px) { .memorial-head__name { font-size: 2.6rem; } .memorial-head__avatar { width: 110px; height: 110px; } }
.memorial-tabs { position: sticky; top: var(--header-h); z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.memorial-tabs .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.memorial-tabs .container::-webkit-scrollbar { display: none; }
.memorial-tabs a { flex: 1 0 auto; text-align: center; padding: 14px 12px; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; min-height: 50px; font-size: .98rem; }
.memorial-tabs a.is-active { color: var(--green); border-bottom-color: var(--gold); font-weight: 700; }
.lead-text { font-size: 1.12rem; color: var(--ink-2); }
.prose { line-height: 1.95; }
.prose h2 { font-size: 1.35rem; margin-top: 1.2em; }
.prose ol, .prose ul { padding-inline-start: 1.4em; }
.draft-note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
.memory { margin-bottom: 10px; }
.memory h4 { font-size: 1.1rem; margin-bottom: .3em; }
.memory p { margin: 0; }
.album__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 640px) { .album__grid { grid-template-columns: repeat(4, 1fr); } }
.album__grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(16,29,32,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-height: 80vh; width: auto; border-radius: 8px; }
.lightbox p { color: var(--white); margin-top: 10px; text-align: center; }
.lightbox button { position: absolute; top: 12px; left: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: var(--white); cursor: pointer; display: grid; place-items: center; }

/* المشاركة */
.share__qr { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.share__qr canvas { width: 130px; height: 130px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; image-rendering: pixelated; }
.share__qr-title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--green); margin: 0; }
.share__url { font-size: .8rem; color: var(--muted); word-break: break-all; margin: 4px 0 0; }
.share__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share__actions .btn { padding-inline: 10px; }

/* ===== المعالج ===== */
.wizard__steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wizard__steps button { width: 100%; min-height: 54px; border: 1px solid var(--line); background: var(--white); border-radius: 10px; cursor: pointer; font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; line-height: 1.3; }
.wizard__steps button span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ivory-2); color: var(--green); font-weight: 700; }
.wizard__steps button[aria-current="step"] { border-color: var(--green); color: var(--green); font-weight: 700; }
.wizard__steps button[aria-current="step"] span { background: var(--green); color: var(--white); }
.wizard__body { display: grid; gap: 16px; }
.wizard__pane { margin: 0; min-width: 0; }
.wizard__pane legend { float: right; width: 100%; padding: 0; }
.wizard__pane > :not(legend) { clear: both; }
.wizard__pane > * + * { margin-top: 14px; }
.wizard__nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 18px !important; }
.wizard__nav .btn--primary:only-child { margin-inline-start: auto; }
.js .wizard__pane { display: none; }
.js .wizard[data-step="1"] [data-pane="1"], .js .wizard[data-step="2"] [data-pane="2"], .js .wizard[data-step="3"] [data-pane="3"], .js .wizard[data-step="4"] [data-pane="4"] { display: block; }
.js .wizard[data-step="1"] .wizard__preview { display: none; }
@media (min-width: 1024px) {
  .wizard__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .wizard__preview { position: sticky; top: calc(var(--header-h) + 16px); }
  .js .wizard[data-step="1"] .wizard__preview { display: block; }
}
.photo-pick { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.photo-pick__preview { width: 84px; height: 84px; border-radius: 12px; border: 1px solid var(--line); background: var(--ivory); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.photo-pick__preview img { width: 100%; height: 100%; object-fit: cover; }
.tpl-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
.tpl { position: relative; display: grid; gap: 4px; border: 2px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; background: var(--white); }
.tpl input { position: absolute; opacity: 0; }
.tpl:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,61,52,.12); }
.tpl:has(input:focus-visible) { outline: 3px solid var(--gold); }
.tpl__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: var(--ivory); }
.tpl__name { font-weight: 700; color: var(--green); }
.tpl__desc { font-size: .84rem; color: var(--muted); line-height: 1.6; }
.activate { border: 1.5px solid var(--gold); margin-top: 18px; }
.quick-form { margin: 0; }

/* الدفع */
.dl { margin: 0; display: grid; gap: 0; }
.dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dl > div:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); font-size: .92rem; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .dl > div { grid-template-columns: 1fr; gap: 0; } }
.pay-methods { display: grid; gap: 10px; }
.pay-method { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.pay-method input { width: 22px; height: 22px; accent-color: var(--green); grid-row: span 2; margin-top: 4px; }
.pay-method:has(input:checked) { border-color: var(--green); background: #f7faf8; }
.pay-method__name { font-weight: 700; color: var(--green); }
.pay-method__body { display: grid; gap: 4px; font-size: .95rem; }
.pay-method__acc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-method__inst { color: var(--ink-2); background: var(--ivory); padding: 8px 10px; border-radius: 8px; }

/* جداول */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
.table th { background: #faf8f2; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.table tr.is-new td { background: #fffaf0; }
@media (max-width: 760px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .table--stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
  .table--stack td::before { content: attr(data-label); color: var(--muted); font-size: .84rem; }
  .table--stack td:not([data-label]) { grid-template-columns: 1fr; padding-top: 8px; }
  .table--stack td:not([data-label])::before { content: none; }
}

/* الحساب */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; align-items: center; }
.subnav a, .subnav button { padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--white); text-decoration: none; color: var(--ink-2); font-size: .94rem; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.subnav a[aria-current="page"] { background: var(--green); color: var(--white); border-color: var(--green); }
.subnav__form { margin: 0; }
.subnav--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.subnav--scroll a { white-space: nowrap; }
.memorial-grid { display: grid; gap: 14px; }
@media (min-width: 768px) { .memorial-grid { grid-template-columns: 1fr 1fr; } }
.mrow__head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mrow__name { font-size: 1.25rem; margin: 0; }
.notice-list { padding: 6px 14px; }
.notice-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.notice-item:last-child { border-bottom: 0; }
.notice-item.is-unread strong { color: var(--green); }
.notice-item p { margin: 2px 0; }
.danger-zone { border-color: #efc9c4; }
.auth__box { max-width: 520px; }
.contact-list { list-style: none; padding: 14px 18px; display: grid; gap: 8px; }
.plain-list { padding-inline-start: 1.2em; }
.memory-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card.memory-row { padding: 14px 18px; }
.memory-row p { margin: 4px 0 0; }
.memory-row.is-new { border-inline-start: 4px solid var(--gold); }
.album-admin { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.album-admin li { border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 6px; position: relative; }
.album-admin li.is-hidden img { opacity: .4; }
.album-admin img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.album-admin .tag { position: absolute; top: 14px; right: 14px; }
.album-admin__caption { display: flex; gap: 4px; }
.album-admin__caption input { min-height: 36px; padding: 4px 8px; font-size: .85rem; }
.album-admin__tools { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.album-admin__tools form { margin: 0; }

/* أخطاء وتثبيت */
.error-page { text-align: center; padding-block: 40px; display: grid; justify-items: center; gap: 10px; }
.error-page__code { font-family: var(--font-head); font-size: 4.5rem; color: var(--gold-2); margin: 0; line-height: 1; }
.debug { text-align: left; font-size: .75rem; background: #222; color: #eee; padding: 12px; overflow: auto; max-width: 100%; border-radius: 8px; }
.install { background: var(--ivory); min-height: 100vh; }
.install__logo { margin: 0 auto 10px; }
.req-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.req-list li { display: flex; gap: 8px; align-items: center; }
.req-list .ok { color: var(--ok); }
.req-list .bad { color: var(--danger); font-weight: 700; }

/* ===== التذييل ===== */
.site-footer { background: var(--green); color: rgba(255,255,255,.88); padding-block: 34px 22px; }
.site-footer__brand { display: grid; gap: 10px; margin-bottom: 18px; }
.site-footer__brand img { width: 54px; }
.site-footer__brand p { margin: 0; max-width: 30em; }
.site-footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; padding-block: 16px; border-block: 1px solid rgba(255,255,255,.14); }
.site-footer__links a, .site-footer__social a { color: rgba(255,255,255,.88); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.site-footer__links a:hover { color: var(--gold); }
.site-footer__social { display: flex; gap: 18px; padding-top: 14px; }
.site-footer__copy { font-size: .84rem; color: rgba(255,255,255,.7); margin: 16px 0 0; }
@media (min-width: 768px) { .site-footer__links { grid-template-columns: repeat(4, 1fr); } }

/* ===== لوحة الإدارة ===== */
body.admin { background: #f3f1ea; }
.admin-top { position: sticky; top: 0; z-index: 120; height: 60px; background: var(--green); color: var(--white); display: flex; align-items: center; gap: 10px; padding-inline: 10px; }
.admin-top__menu { width: 46px; height: 46px; border: 0; background: none; color: var(--white); display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.admin-top__brand { display: flex; align-items: center; gap: 8px; color: var(--white); text-decoration: none; font-weight: 700; font-family: var(--font-head); font-size: 1.05rem; white-space: nowrap; min-width: 0; }
@media (max-width: 380px) { .admin-top__brand { font-size: .92rem; } .admin-top__brand img { width: 28px; } }
.admin-top__alert { margin-inline-start: auto; position: relative; color: var(--gold); display: flex; align-items: center; gap: 4px; padding: 8px; text-decoration: none; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.admin-top__site { color: rgba(255,255,255,.85); text-decoration: none; padding: 8px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; font-size: .9rem; }
.admin-top__alert + .admin-top__site { margin-inline-start: 0; }
.admin-top__brand + .admin-top__site { margin-inline-start: auto; }
.admin-shell { display: flex; min-height: calc(100vh - 60px); }
.admin-side { position: fixed; top: 60px; bottom: 0; right: 0; width: 270px; max-width: 86vw; background: var(--white); border-inline-start: 1px solid var(--line); overflow-y: auto; transform: translateX(105%); transition: transform .22s ease; z-index: 110; padding: 10px 0 30px; }
.admin-side.is-open { transform: none; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.admin-side__user { padding: 8px 18px 14px; border-bottom: 1px solid var(--line); margin: 0 0 6px; font-weight: 700; color: var(--green); }
.admin-side__user small { color: var(--muted); font-weight: 400; }
.admin-side ul { list-style: none; margin: 0; padding: 0; }
.admin-side a, .admin-side button { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: var(--ink-2); text-decoration: none; width: 100%; background: none; border: 0; cursor: pointer; font-size: .98rem; min-height: 48px; }
.admin-side a:hover, .admin-side button:hover { background: var(--ivory); }
.admin-side a[aria-current="page"] { background: var(--ivory); color: var(--green); font-weight: 700; border-inline-start: 4px solid var(--gold); }
.admin-side .count { margin-inline-start: auto; }
.admin-side form { margin: 0; }
.admin-backdrop { position: fixed; inset: 60px 0 0 0; background: rgba(16,29,32,.4); z-index: 105; }
.admin-main { flex: 1; min-width: 0; padding: 18px var(--gutter) 40px; }
.admin-title { font-size: 1.6rem; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (min-width: 1024px) {
  .admin-top__menu { display: none; }
  .admin-side { position: sticky; top: 60px; height: calc(100vh - 60px); transform: none; flex: none; }
  .admin-backdrop { display: none !important; }
  .admin-main { padding: 26px 32px 50px; }
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 2px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat-card span { color: var(--muted); font-size: .88rem; }
.stat-card strong { font-family: var(--font-head); font-size: 1.9rem; color: var(--green); line-height: 1.2; }
.stat-card small { color: var(--muted); }
.stat-card--attn { border-color: var(--gold); background: #fffaf0; }
.stat-card--attn strong { color: var(--warn); }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.review-list li:last-child { border-bottom: 0; }
.review-list a:first-child { flex: 1; min-width: 200px; text-decoration: none; color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters input, .filters select { flex: 1 1 200px; width: auto; }
.admin-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .admin-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.action-grid { display: grid; gap: 14px; }
@media (min-width: 768px) { .action-grid { grid-template-columns: repeat(2, 1fr); } }
.action-grid > form { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbf7; display: grid; gap: 8px; align-content: start; }
.receipt-img { max-height: 520px; width: auto; margin-inline: auto; border-radius: 10px; border: 1px solid var(--line); }
.admin-photo { width: 120px; border-radius: 10px; }
.audit-list { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.audit-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.bars__track { background: var(--ivory-2); border-radius: 6px; height: 14px; overflow: hidden; }
.bars__fill { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.tpl-admin__head { display: flex; gap: 14px; align-items: center; }
.tpl-admin__head img { width: 140px; border-radius: 10px; }
.tpl-admin__preview { border-radius: 12px; overflow: hidden; }
.code-area { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; direction: rtl; }
.admin-attn { margin-bottom: 16px; }

/* طباعة */
@media print {
  .site-header, .site-footer, .memorial-tabs, .viewer__tools, .quran, .share__actions, .report, .prayer-form, .preview-bar { display: none !important; }
  body { background: #fff; }
}
