/* =====================================================================
   صالة تبوك الاقتصادية — ألوان الشعار: أحمر + أخضر فاتح + أخضر غامق
   ===================================================================== */

:root {
  --red:        #E31E24;   /* أحمر الشعار */
  --red-deep:   #C21419;
  --leaf:       #8DC63F;   /* الورقة الفاتحة */
  --leaf-soft:  #EDF7DE;
  --green:      #1B7A3E;   /* الورقة الغامقة */
  --green-soft: #E6F2EA;

  --bg:      #FBFDF8;
  --surface: #FFFFFF;
  --ink:     #22372A;
  --muted:   #7C8D80;
  --line:    #E3EDDD;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;

  --display: 'Alexandria', 'Tajawal', system-ui, sans-serif;
  --body:    'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 8px; }

/* =====================================================================
   الصفحات العامة — خلفية فاتحة
   ===================================================================== */

.page {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  padding: 26px 18px 44px;
  position: relative;
  overflow-x: hidden;
}

.leafwash {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(62% 40% at 50% -6%,  rgba(141, 198, 63, .30) 0%, transparent 68%),
    radial-gradient(46% 32% at 92% 88%,  rgba(27, 122, 62, .10) 0%, transparent 70%);
}

.bio { position: relative; z-index: 1; width: 100%; max-width: 440px; margin-inline: auto; }
.bio--wide { max-width: 780px; }

/* ---------- الترويسة ---------- */

.bio__head { text-align: center; padding-block: 8px 26px; }

.bio__logo {
  width: 128px; height: 128px;
  margin-inline: auto;
  border-radius: 50%;
  background: var(--surface);
  display: grid; place-items: center;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(27, 122, 62, .14);
  border: 3px solid var(--leaf);
}
.bio__logo img { width: 100%; height: 100%; object-fit: contain; }

.bio__name {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(24px, 6.4vw, 31px);
  letter-spacing: -.4px;
  color: var(--green);
  margin: 18px 0 4px;
}

.bio__tagline { margin: 0; color: var(--muted); font-size: 14.5px; }

.bio__handle {
  display: inline-block;
  margin: 10px 0 0;
  padding: 3px 14px;
  border-radius: 99px;
  background: var(--leaf-soft);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
  direction: ltr;
}

/* ---------- أزرار الروابط ---------- */

.links { display: grid; gap: 11px; }

.link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 66px;
  padding: 11px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 15.5px;
  box-shadow: 0 2px 8px rgba(34, 55, 42, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation: rise .5s cubic-bezier(.2, .7, .3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 55ms + 100ms);
}
.link:hover, .link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--leaf);
  box-shadow: 0 8px 20px rgba(27, 122, 62, .12);
}

/* الأيقونة داخل مربع ملوّن */
.link__ico {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--leaf-soft);
  color: var(--green);
}
.link__ico svg { width: 22px; height: 22px; }

.link__text  { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link__label { display: block; }
.link__arrow { width: 20px; height: 20px; flex: none; color: var(--muted); opacity: .6; }

/* زر العروض — أحمر الشعار */
.link--cta {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(227, 30, 36, .26);
}
.link--cta:hover, .link--cta:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
  box-shadow: 0 10px 24px rgba(227, 30, 36, .32);
}
.link--cta .link__ico   { background: rgba(255, 255, 255, .2); color: #fff; }
.link--cta .link__arrow { color: #fff; opacity: .8; }

.link__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  opacity: .92;
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: beat 1.8s ease-in-out infinite;
}

@keyframes beat { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- التواصل — أيقونات كبيرة ---------- */

.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin: 5px 0 7px;
}

.social {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  border-radius: 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--green);
  box-shadow: 0 2px 8px rgba(34, 55, 42, .04);
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.social svg { width: 28px; height: 28px; }

.social:hover, .social:focus-visible {
  transform: translateY(-3px);
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}

.foot {
  margin-top: 34px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}
.foot p { margin: 0; }

/* =====================================================================
   صفحة العروض
   ===================================================================== */

.page-head { text-align: center; padding-block: 2px 24px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--green); }
.back--dark { color: var(--muted); }

.page-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(26px, 7vw, 34px);
  color: var(--green);
  margin: 0;
}
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 660px) { .grid { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(34, 55, 42, .06);
}

.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--leaf-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media-empty {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 54px; font-weight: 900;
  color: rgba(27, 122, 62, .22);
}

.tag-off {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: 12px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(227, 30, 36, .3);
}

.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }

.card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
}
.card__sub { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }

.price { margin: 12px 0 0; display: flex; align-items: baseline; gap: 6px; }
.price__now { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--red); }
.price__cur { font-size: 13px; color: var(--red); }
.price__was { color: var(--muted); font-size: 14px; }

.window { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); }
.card__title + .window, .card__sub + .window { margin-top: 14px; }

.window__bar { height: 6px; border-radius: 99px; background: var(--leaf-soft); overflow: hidden; }
.window__bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--leaf), var(--green));
}

.window__text {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.window__date { font-weight: 400; color: var(--muted); }

.card--urgent .window__bar span { background: linear-gradient(90deg, #F5A623, var(--red)); }
.card--urgent .window__text    { color: var(--red); }

.card__body .btn--full { margin-top: 14px; }
.card__body .btn svg   { width: 18px; height: 18px; }

.empty {
  background: var(--surface);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.empty__title { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); margin: 0 0 6px; }
.empty .btn { margin-top: 16px; }

/* =====================================================================
   الأزرار
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--body);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--solid  { background: var(--green); color: #fff; }
.btn--solid:hover { background: #146432; }

.btn--ghost  { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }

.btn--danger { background: transparent; border-color: rgba(227, 30, 36, .35); color: var(--red); }
.btn--danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

.btn--sm   { padding: 7px 14px; font-size: 13px; }
.btn--full { width: 100%; }

/* =====================================================================
   لوحة التحكم
   ===================================================================== */

.admin-body { background: var(--bg); color: var(--ink); min-height: 100vh; }

.topbar { background: var(--green); color: #fff; }
.topbar__in {
  max-width: 1040px; margin-inline: auto;
  padding: 13px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; }
.topbar__brand img { border-radius: 50%; background: #fff; padding: 3px; }
.topbar__end  { display: flex; align-items: center; gap: 16px; font-size: 13.5px; }
.topbar__user { color: rgba(255, 255, 255, .72); }
.topbar__link { color: var(--leaf); font-weight: 600; }
.topbar__link:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin-inline: auto; padding: 26px 20px 60px; }
.wrap--narrow { max-width: 660px; }
.wrap__title { font-family: var(--display); font-weight: 700; font-size: 23px; margin: 10px 0 20px; color: var(--green); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stats { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
  font-size: 12.5px; font-weight: 600;
  padding: 4px 12px; border-radius: 99px;
  border: 1px solid var(--line); background: #fff;
  white-space: nowrap;
}
.chip--live  { color: var(--green); border-color: rgba(27, 122, 62, .3);  background: var(--green-soft); }
.chip--soon  { color: #A9700F;      border-color: rgba(169, 112, 15, .3); background: #FBF3E3; }
.chip--over  { color: var(--muted); }
.chip--draft { color: #5B6BA8;      border-color: rgba(91, 107, 168, .3); background: #EEF0F8; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td { padding: 13px 16px; text-align: right; border-bottom: 1px solid var(--line); }
.table th { font-size: 12.5px; font-weight: 600; color: var(--muted); background: #F7FAF4; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FCFDFA; }

.cellrow { display: flex; align-items: center; gap: 11px; }
.cellrow strong { display: block; font-weight: 600; }
.cellrow .muted { display: block; font-size: 12.5px; }

.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: var(--leaf-soft); }
.thumb--empty {
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 19px;
  color: rgba(27, 122, 62, .34);
}

.muted  { color: var(--muted); }
.nowrap { white-space: nowrap; }
.inline { display: inline; }

.form { display: grid; gap: 15px; }
.card-form { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 600; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12.5px; }

.field input {
  font-family: var(--body); font-size: 14.5px;
  padding: 10px 13px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); width: 100%;
}
.field input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(27, 122, 62, .13); }

.field-row { display: grid; gap: 15px; grid-template-columns: 1fr 1fr; align-items: end; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding-bottom: 10px; }
.check input { width: 17px; height: 17px; accent-color: var(--green); }

.hint { margin: -6px 0 0; font-size: 12.5px; color: var(--muted); }

.preview { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.preview img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }

.form__actions { display: flex; gap: 10px; margin-top: 6px; }

.auth-card {
  max-width: 380px; margin: 9vh auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 34px 28px;
  text-align: center; box-shadow: 0 14px 40px rgba(34, 55, 42, .07);
}
.auth-logo  { margin-inline: auto; border-radius: 50%; }
.auth-title { font-family: var(--display); font-weight: 700; font-size: 20px; margin: 14px 0 20px; color: var(--green); }
.auth-card .form { text-align: right; }
.auth-card .btn  { margin-top: 6px; }

.notice { padding: 11px 15px; border-radius: var(--r-sm); font-size: 13.5px; margin: 0 0 14px; border: 1px solid; }
.notice--ok   { background: var(--green-soft); border-color: rgba(27, 122, 62, .28); color: #135F31; }
.notice--err  { background: #FDECEC; border-color: rgba(227, 30, 36, .28); color: #A31419; }
.notice--warn { background: #FBF3E3; border-color: rgba(169, 112, 15, .3); color: #8A5A0E; }
.notice code  { direction: ltr; display: inline-block; font-size: 12.5px; }

.admin-body .empty { background: #fff; border: 1.5px dashed var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .btn:hover, .link:hover, .social:hover { transform: none; }
}