/* Winter — ألوان مأخوذة من لوقو السيرفر: أزرق ثلجي وأبيض على أسود. */

:root,
:root[data-theme="dark"] {
  --bg: #07090d;
  --bg-glow: rgba(120, 175, 230, 0.16);
  --surface: #11161e;
  --surface-2: #19212c;
  --surface-hover: #1e2835;
  --border: rgba(170, 205, 240, 0.12);
  --border-strong: rgba(170, 205, 240, 0.24);
  --text: #eaf2fa;
  --muted: #8e9cad;
  --accent: #a9d0f2;
  --accent-2: #6aa8dd;
  --accent-ink: #061320;
  --accent-soft: rgba(140, 195, 240, 0.14);
  --header-bg: rgba(7, 9, 13, 0.72);
  --logo-bg: transparent;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --wordmark: linear-gradient(180deg, #ffffff 0%, #dcebf8 55%, #9cc4e8 100%);
  --red: #f36b7a;
  --green: #4fd08f;
  --blue: #6fb3f2;
  --gray: #9aa6b4;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f7fc;
  --bg-glow: rgba(110, 165, 220, 0.22);
  --surface: #ffffff;
  --surface-2: #eaf2fa;
  --surface-hover: #e1ecf7;
  --border: rgba(30, 70, 120, 0.12);
  --border-strong: rgba(30, 70, 120, 0.22);
  --text: #0c1724;
  --muted: #5a6b7e;
  --accent: #2f78bb;
  --accent-2: #4f93d2;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 120, 187, 0.1);
  --header-bg: rgba(242, 247, 252, 0.78);
  --logo-bg: #0d1724;
  --shadow: 0 18px 44px rgba(30, 70, 120, 0.14);
  --wordmark: linear-gradient(180deg, #2b6aa6 0%, #3f86c6 50%, #79b1e2 100%);
  --red: #d9475a;
  --green: #1f9d62;
  --blue: #2f78bb;
  --gray: #6b7a8b;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 50% -120px, var(--bg-glow), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
}
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }
.flip { transform: scaleX(-1); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── الهيدر ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-group, .top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions { margin-inline-start: auto; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--logo-bg);
  padding: 2px;
}
.brand span {
  font-family: "Fredoka", "Rubik", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.3px;
  direction: ltr;
}

/* روابط نص بسيطة جنب اللوقو، والنشط تحته خط يتحرك للرابط اللي تضغطه */
.top-nav {
  position: relative;
  display: flex;
  gap: 2px;
  margin-inline-start: 14px;
}
.top-nav a {
  padding: 10px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.top-nav a:hover { color: var(--text); }
.top-nav a.is-active { color: var(--text); font-weight: 600; }
.nav-indicator {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.theme-toggle .when-light { display: none; }
:root[data-theme="light"] .theme-toggle .when-dark { display: none; }
:root[data-theme="light"] .theme-toggle .when-light { display: inline-grid; }
.theme-toggle span { display: inline-grid; }

/* ── الأزرار ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 26px rgba(110, 170, 225, 0.28);
}
.btn-ghost { background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-discord { background: #5865f2; color: #fff; width: 100%; }
.btn-discord:hover { background: #4f5bdc; }

/* ── قائمة الحساب ────────────────────────────────────────── */
.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary img { width: 32px; height: 32px; border-radius: 50%; }
.user-name { font-size: 14px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head img { border-radius: 50%; }
.menu-head strong { display: block; font-size: 14px; }
.menu-head small { color: var(--muted); font-size: 12px; }
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  text-align: start;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--red); }

/* ── القائمة الجانبية (من اليمين) ───────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(3, 6, 10, 0.55);
  backdrop-filter: blur(3px);
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  z-index: 40;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.drawer-nav { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; }

.drawer-group summary,
.drawer-link {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.drawer-group summary::-webkit-details-marker { display: none; }
.drawer-group summary:hover,
.drawer-link:hover { background: var(--surface-2); }
.drawer-link.is-active { background: var(--accent-soft); color: var(--accent); }
.drawer-group summary .icon:first-child,
.drawer-link .icon { color: var(--accent); }
.drawer-label { display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; flex: 1; }
.drawer-label small { font-weight: 400; font-size: 12px; color: var(--muted); }
.drawer-group .chev { color: var(--muted); transition: transform 0.2s; }
.drawer-group[open] .chev { transform: rotate(180deg); }
.drawer-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 22px 6px 0;
  padding-inline-start: 14px;
  border-inline-start: 2px solid var(--border);
}
.drawer-sub a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 500;
}
.drawer-sub a small { color: var(--muted); font-size: 12px; }
.drawer-sub a:hover { background: var(--surface-2); }
.drawer-sub a.is-active { background: var(--accent-soft); color: var(--accent); }

/* ── المحتوى ─────────────────────────────────────────────── */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 64px;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* التنقل بين الصفحات: المحتوى يختفي بنعومة والجديد يطلع، والبطاقات وحدة ورا الثانية */
.main.is-leaving { opacity: 0; transform: translateY(6px); transition-duration: 0.16s; }
.main.is-entering { opacity: 0; transform: translateY(10px); transition: none; }
.reveal { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

.hero { text-align: center; padding: 72px 0 40px; }
.hero-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 8px;
  border-radius: 24px;
  background: var(--logo-bg);
  padding: 6px;
  filter: drop-shadow(0 10px 30px rgba(120, 180, 235, 0.35));
}
.wordmark {
  margin: 0;
  font-family: "Fredoka", "Rubik", sans-serif;
  font-weight: 700;
  font-size: clamp(64px, 13vw, 128px);
  line-height: 1;
  letter-spacing: -1px;
  direction: ltr;
  background: var(--wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(120, 180, 235, 0.22));
}
.wordmark-sub {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.9em;
  margin-inline-end: -0.9em;
  color: var(--muted);
  direction: ltr;
}
.lead { max-width: 560px; margin: 22px auto 0; font-size: 17px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 700; direction: ltr; }
.section-head span { color: var(--muted); font-size: 14px; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.cat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.cat-icon .icon { width: 24px; height: 24px; }
.cat-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.cat-text strong { font-size: 18px; }
.cat-text small { color: var(--muted); font-size: 13px; }
.cat-arrow { color: var(--muted); transition: transform 0.18s; }
.cat-card:hover .cat-arrow { transform: translateX(-4px); color: var(--accent); }

/* ── عناوين الصفحات والتبويبات ───────────────────────────── */
.page-head { text-align: center; padding: 56px 0 28px; }
.page-head h1 { margin: 0; font-size: clamp(38px, 7vw, 60px); line-height: 1.1; font-weight: 700; letter-spacing: -0.5px; direction: ltr; }
.page-head p { margin: 12px auto 0; max-width: 560px; color: var(--muted); }

.tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 24px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  direction: ltr;
}
.tabs a {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.tabs a small { font-weight: 400; font-size: 12px; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { background: var(--text); color: var(--bg); }

.empty {
  max-width: 560px;
  margin: 16px auto 0;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}
.empty-icon .icon { width: 30px; height: 30px; }
.empty h2 { margin: 0; font-size: 20px; }
.empty p { margin: 8px 0 0; color: var(--muted); }
.empty .btn { margin-top: 22px; }

/* ── الإحصائيات ──────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; direction: ltr; }
.stat-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-label .icon { width: 14px; height: 14px; }
.tone-blue .icon { color: var(--blue); }
.tone-red .icon { color: var(--red); }
.tone-green .icon { color: var(--green); }
.tone-gray .icon { color: var(--gray); }
.stat-card strong { display: block; margin-top: 6px; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── نافذة تسجيل الدخول ──────────────────────────────────── */
.login-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 36px 28px 26px;
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow);
}
.login-dialog::backdrop { background: rgba(3, 6, 10, 0.6); backdrop-filter: blur(6px); }
.dialog-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 10px; }
.connect-art { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; direction: ltr; }
.connect-art img { width: 52px; height: 52px; border-radius: 14px; background: #0d1724; padding: 4px; }
.connect-line { position: relative; width: 44px; height: 2px; background: var(--border-strong); }
.connect-line i {
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: connect 1.6s ease-in-out infinite alternate;
}
@keyframes connect { to { left: calc(100% - 8px); } }
.connect-discord {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #5865f2;
  color: #fff;
  box-shadow: 0 8px 26px rgba(88, 101, 242, 0.45);
}
.connect-discord .icon { width: 28px; height: 28px; }
.login-dialog h2 { margin: 0; font-size: 24px; }
.login-dialog p { margin: 8px 0 22px; color: var(--muted); }
.login-dialog small { display: block; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* نافذة التأكيد (نعم / إلغاء) */
.confirm-dialog {
  width: min(380px, calc(100vw - 32px));
  padding: 30px 26px 24px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow), 0 0 60px rgba(140, 200, 250, 0.12);
}
.confirm-dialog[open] { animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.confirm-dialog::backdrop { background: rgba(3, 6, 10, 0.6); backdrop-filter: blur(6px); }
.confirm-icon { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.confirm-icon .icon { width: 26px; height: 26px; }
.confirm-text { margin: 0 0 22px; font-size: 17px; font-weight: 600; line-height: 1.7; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── أزرار إضافية ────────────────────────────────────────── */
.btn-block { width: 100%; }
.btn-warn {
  background: color-mix(in srgb, #f0a24a 14%, transparent);
  border-color: color-mix(in srgb, #f0a24a 35%, transparent);
  color: #f0a24a;
}
.btn.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn.is-liked { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 12%, transparent); }
.btn.is-liked .icon { fill: currentColor; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ── شريط البحث والترتيب ─────────────────────────────────── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 22px;
  max-width: 720px;
}
.search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.search:focus-within { border-color: var(--accent); }
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  direction: ltr;
}
.seg a { padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg a.is-active { background: var(--surface-2); color: var(--text); }

/* ── شبكة المنشورات ──────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.post-card {
  --c1: var(--surface-2);
  --c2: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--c1) 22%, transparent)),
    var(--surface);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.post-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c1) 60%, var(--border-strong)); box-shadow: var(--shadow); }
.pc-banner { aspect-ratio: 2.4 / 1; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.pc-banner img, .pc-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; flex: 1; }
.is-profile .pc-body { padding-top: 40px; }
.pc-avatar {
  position: absolute;
  top: -34px;
  inset-inline-start: 14px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  background: var(--surface-2);
  object-fit: cover;
}
.pc-author { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pc-author strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-author small { color: var(--muted); font-size: 13px; direction: ltr; text-align: end; }
.pc-counts {
  display: flex;
  justify-content: space-around;
  padding: 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}
.pc-counts span, .pc-meta { display: inline-flex; align-items: center; gap: 4px; }
.pc-meta { color: var(--muted); font-size: 12px; gap: 5px; }
.pc-meta .icon { width: 13px; height: 13px; }
.pc-mosaic { position: relative; display: grid; gap: 2px; aspect-ratio: 1; background: var(--surface-2); }
.pc-mosaic.n2 { grid-template-columns: 1fr 1fr; }
.pc-mosaic.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pc-mosaic.n3 img:first-child { grid-row: span 2; }
.pc-mosaic.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pc-mosaic img { min-height: 0; }
.pc-more {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  direction: ltr;
}
.tone-blue { color: var(--blue); }
.tone-red { color: var(--red); }
.tone-green { color: var(--green); }
.tone-gray { color: var(--gray); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 420px; margin: 28px auto 0; }
.pager-info { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ── صفحة المنشور ────────────────────────────────────────── */
.post-page { padding-top: 26px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.back-link:hover { color: var(--text); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.post-preview { display: flex; flex-direction: column; gap: 16px; }

.profile-preview {
  --c1: var(--surface-2);
  --c2: var(--surface);
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 30%, var(--surface)), color-mix(in srgb, var(--c2) 18%, var(--surface)));
}
.pp-banner { aspect-ratio: 2.5 / 1; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.pp-banner img { width: 100%; height: 100%; object-fit: cover; }
.pp-body { position: relative; display: flex; flex-direction: column; padding: 70px 24px 24px; }
.pp-avatar {
  position: absolute;
  top: -64px;
  inset-inline-start: 24px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 6px solid color-mix(in srgb, var(--c1) 30%, var(--surface));
  background: var(--surface-2);
  object-fit: cover;
}
.pp-body strong { font-size: 24px; }
.pp-body small { color: var(--muted); direction: ltr; text-align: end; }

.card-figure { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.card-figure img { width: 100%; border-radius: 12px; }
.card-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

.avatar-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.avatar-gallery.n1 { grid-template-columns: minmax(0, 480px); justify-content: center; }
.avatar-gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2); aspect-ratio: 1; }
.avatar-gallery img { width: 100%; height: 100%; object-fit: cover; }
.fig-dl { position: absolute; bottom: 10px; inset-inline-end: 10px; width: 36px; height: 36px; background: rgba(0, 0, 0, 0.6); color: #fff; border-color: transparent; }

.post-panel {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
}
.panel-author { display: flex; align-items: center; gap: 12px; }
.panel-author img { border-radius: 50%; }
.panel-author strong { display: block; font-size: 17px; }
.panel-author small { color: var(--muted); font-size: 13px; }
.panel-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.panel-stats span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13px;
}
.panel-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.panel-block { padding-top: 16px; border-top: 1px solid var(--border); }
.panel-block h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); direction: ltr; text-align: start; }
.swatches, .assets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  cursor: pointer;
  direction: ltr;
}
.swatch i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); flex-shrink: 0; }
.swatch span { font-weight: 700; font-size: 14px; }
.swatch small { margin-inline-start: auto; font-size: 10px; color: var(--muted); }
.asset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  font-weight: 600;
}
.asset .icon { color: var(--blue); }
.asset:hover { border-color: var(--border-strong); }
.asset-wide { grid-column: 1 / -1; }
.panel-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.action-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.discord-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); }
.discord-link:hover { color: var(--text); }

.report-dialog .empty-icon { margin-bottom: 10px; color: #f0a24a; background: color-mix(in srgb, #f0a24a 14%, transparent); }
.report-dialog textarea, .field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.report-dialog textarea { margin-bottom: 14px; }
.report-dialog textarea:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* ── لوحة المتصدرين ──────────────────────────────────────── */
.leaderboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.leaderboard li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.leaderboard img { border-radius: 50%; }
.rank { width: 28px; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-1 { color: #f5c451; }
.rank-2 { color: #c8d3de; }
.rank-3 { color: #d99a6c; }
.lb-name { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.lb-name small { color: var(--muted); font-size: 12px; }
.lb-stats { display: flex; gap: 14px; font-size: 13px; font-weight: 700; }
.lb-stats span { display: inline-flex; align-items: center; gap: 4px; }

/* ── باقات النشر ─────────────────────────────────────────── */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(240px 140px at 85% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.pkg-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pkg-num { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pkg-tag { padding: 3px 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.pkg-icon {
  align-self: center;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  color: var(--accent);
  transform: skewX(-6deg);
}
.pkg-icon .icon { width: 34px; height: 34px; transform: skewX(6deg); }
.pkg-card h2 { margin: 16px 0 4px; font-size: 20px; }
.pkg-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; flex: 1; }
.pkg-card footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.pkg-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.pkg-price strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.pkg-price span { color: var(--muted); font-size: 13px; }
.pkg-price small { width: 100%; color: var(--muted); font-size: 12px; }

/* ── الداش بورد ──────────────────────────────────────────── */
.main-wide { max-width: 1280px; }
.dash { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; padding-top: 28px; align-items: start; }
.dash-nav {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
.dash-nav a, .dash-exit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 500;
  color: var(--muted);
}
.dash-nav a:hover, .dash-exit:hover { background: var(--surface-2); color: var(--text); }
.dash-nav a.is-active { background: var(--accent-soft); color: var(--accent); }
.dash-nav form { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dash-exit { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; }
.badge { margin-inline-start: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; text-align: center; }
.dash-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-title { margin: 0; font-size: 28px; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
.dash-card h2 { margin: 0; font-size: 18px; }
.dash-card p { margin: 0; }
.muted { color: var(--muted); }
.flash { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 14px; font-weight: 500; }
.flash-ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.flash-err { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.flash-warn { background: color-mix(in srgb, #f0a24a 14%, transparent); color: #f0a24a; }
.flash a { text-decoration: underline; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist a:hover { color: var(--accent); }

.dash-card fieldset { margin: 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.dash-card fieldset:first-of-type { border-top: 0; padding-top: 0; }
.dash-card legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 16px; }
.dash-card fieldset > div { display: flex; flex-direction: column; gap: 12px; }
.dash-card fieldset > div.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 14px; }
.field small, .switch-row small { color: var(--muted); font-size: 12px; font-weight: 400; }
.field input, .field select { min-height: 44px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  cursor: pointer;
}
.switch-row > span { display: flex; flex-direction: column; gap: 2px; font-weight: 500; }
.switch {
  appearance: none;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.switch:checked { background: var(--accent-2); }
.switch:checked::after { transform: translateX(-20px); }
.form-actions { display: flex; gap: 10px; justify-content: flex-start; padding-top: 4px; }

.table-wrap { overflow-x: auto; }
.dash-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-card th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border); }
.dash-card td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dash-card tr:last-child td { border-bottom: 0; }
tr.is-hidden td { opacity: 0.6; }
.row-thumb { width: 72px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.nav-head { margin: 12px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); opacity: 0.8; }
.nav-head:first-of-type { margin-top: 6px; }
.img-preview { max-width: 100%; max-height: 180px; width: auto; object-fit: contain; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.field input[type="file"] { padding: 10px; border-style: dashed; cursor: pointer; }
.field input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
.inline-add { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-add select, .inline-add input {
  flex: 1 1 200px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.dash-card textarea.mono, textarea.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; line-height: 1.7; width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface-2); color: var(--text); resize: vertical; }
.pill-ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.bot-head { display: flex; align-items: center; gap: 12px; }
.bot-head img { border-radius: 50%; }
.bot-head div { display: flex; flex-direction: column; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.nowrap { white-space: nowrap; }
.reason { max-width: 320px; }
.pill { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; }
.dash-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-filter select, .dash-filter input {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.dash-filter input { flex: 1 1 200px; }

.gate { margin-top: 48px; }
.gate .flash { margin: 16px 0 0; justify-content: center; }
.code-form { display: flex; flex-direction: column; gap: 12px; max-width: 280px; margin: 20px auto 0; }
.code-form input {
  min-height: 56px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  font: 700 28px/1 "Rubik", monospace;
  letter-spacing: 0.4em;
  text-align: center;
  direction: ltr;
}
.code-form input:focus { outline: 2px solid var(--accent); }
.empty code { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); direction: ltr; display: inline-block; }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .dash-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .nav-head { display: none; }
  .dash-nav a, .dash-exit { white-space: nowrap; }
  .dash-nav form { margin: 0; padding: 0 8px 0 0; border: 0; border-inline-start: 1px solid var(--border); }
  .dash-card fieldset > div.grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ── المتجر: السلة والطلبات ──────────────────────────────── */
.cart-btn { position: relative; }
.cart-count {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent-ink);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.cart-count[hidden] { display: none; }
.pkg-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); }
.pkg-note { display: flex; align-items: center; gap: 6px; margin: -8px 0 14px; font-size: 13px; color: var(--accent); }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}
.cart-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); overflow: hidden; }
.cart-icon img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-info strong { font-size: 17px; }
.cart-price { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.cart-price strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.cart-price small { color: var(--muted); }
.day-pick, .order-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.day-pick > span, .order-days > span { display: inline-flex; align-items: center; gap: 6px; width: 100%; color: var(--accent); }
.day-pick select, .ad-slot select, .ad-slot input[type="time"] {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  color-scheme: inherit;
}
.order-days ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.cart-info .pkg-note { margin: 6px 0 0; }

/* خيار القيفاوي بالسلة */
.addon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
}
.addon:has(input:checked) { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.addon input { accent-color: var(--accent); width: 16px; height: 16px; }

/* الإعلان: المشتري يكتبه بعد القبول */
.ad-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.ad-form fieldset { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ad-form legend { padding: 0 6px; font-weight: 700; }
.ad-form .field { margin: 0; }
.ad-form .form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-slot > span { min-width: 64px; font-size: 14px; }
.ad-summary { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.ad-summary p { margin: 0; }
.ad-text { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface); white-space: pre-wrap; word-break: break-word; font: inherit; }

/* كود الخصم بالسلة */
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; text-transform: uppercase; direction: ltr; text-align: right; }
.coupon-msg { color: var(--green, #4fd08f); }
.coupon-msg.is-bad { color: var(--red, #f36b7a); }
.sum-discount strong { color: var(--green, #4fd08f); }

/* سجل تحديثات البوت بصفحة الطلب */
.updates { margin-top: 8px; font-size: 14px; }
.updates summary { cursor: pointer; color: var(--accent); }
.updates ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.updates li { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.updates p { margin: 4px 0 0; white-space: pre-wrap; }

/* جدول أيام الكاست بصفحة Share */
.cast-week { margin: 0 auto 24px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.cast-week header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.cast-week h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.cast-week header small { color: var(--muted); }
.cast-week ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cast-week li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--border); text-align: center; }
.cast-week li b { font-size: 14px; }
.cast-week li span { font-size: 12px; }
.cast-week .is-free { border-color: color-mix(in srgb, var(--green, #4fd08f) 45%, transparent); background: color-mix(in srgb, var(--green, #4fd08f) 10%, transparent); }
.cast-week .is-free span { color: var(--green, #4fd08f); }
.cast-week .is-busy { opacity: .55; }
.cast-week .is-busy b { text-decoration: line-through; }
@media (max-width: 640px) { .cast-week ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* إحصائيات المتجر */
.sales-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); direction: rtl; margin-bottom: 16px; }
.sales-grid .stat-card strong { font-size: 24px; }
.sales-grid .stat-card strong small { font-size: 13px; font-weight: 400; color: var(--muted); }
.sales-grid .stat-label { letter-spacing: 0; text-transform: none; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 14px; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
@media (max-width: 760px) {
  .sales-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-row { grid-template-columns: 60px minmax(0, 1fr) auto; }
  .bar-row small { display: none; }
}
.steps { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps code { word-break: break-all; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

/* رفع ملف البوت بالداش بورد */
.upload-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.upload-box input[type="file"] { flex: 1 1 200px; min-width: 0; }
.upload-progress { flex-basis: 100%; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.upload-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s; }
.upload-status { flex-basis: 100%; }

.cart-summary {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}
.cart-summary h3 { margin: 4px 0 0; font-size: 15px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sum-row strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  cursor: pointer;
}
.pay-method:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pay-method input { margin-top: 4px; accent-color: var(--accent-2); }
.pay-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-body small { color: var(--muted); }
.pay-value { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.pay-value code { direction: ltr; font-weight: 700; }
.copy-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-size: 12px; cursor: pointer; }
.cart-summary .field input[type="file"] { padding: 10px; border-style: dashed; }
.receipt-link { display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.receipt-link img { max-width: 100%; max-height: 220px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }

.order-list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; margin: 0 auto; }
.order-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.order-row:hover { border-color: var(--border-strong); }
.order-id { font-weight: 700; direction: ltr; }
.order-items { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-total { font-weight: 700; white-space: nowrap; }
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.order-head h1 { margin: 0; font-size: 28px; }
.pill-pending { color: #f0a24a; border-color: color-mix(in srgb, #f0a24a 40%, transparent); }
.pill-bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.delivery { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; align-items: flex-start; }
.delivery-text { white-space: pre-wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }

.dash-tabs { align-self: flex-start; }
.dash-tabs b { margin-inline-start: 4px; font-size: 12px; color: var(--muted); }
.order-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.order-card-head a { margin-inline-start: auto; font-size: 13px; }
.order-card-body { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
.order-meta ul { margin: 6px 0; padding-inline-start: 18px; }
.order-meta p { margin: 4px 0; }
.order-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); }
.order-actions .inline-add { flex: 1; }

@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .order-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .order-row small { display: none; }
  .order-card-body { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cart-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .cart-item .cart-price { grid-column: 2; }
  .cart-icon { width: 44px; height: 44px; }
}

/* ── الفوتر ──────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  direction: ltr;
}
.footer img { border-radius: 6px; background: var(--logo-bg); padding: 1px; }

/* ── الجوال ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .top-nav { display: none; }
  .post-layout { grid-template-columns: 1fr; }
  .post-panel { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}
@media (max-width: 480px) {
  .post-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pc-counts { font-size: 12px; padding: 6px 4px; }
  .pc-body { padding: 10px; }
  .is-profile .pc-body { padding-top: 30px; }
  .pc-avatar { width: 52px; height: 52px; top: -26px; border-width: 3px; }
  .pp-avatar { width: 96px; height: 96px; top: -48px; }
  .pp-body { padding-top: 56px; }
  .lb-stats .tone-blue { display: none; }
  .user-name { display: none; }
  .top-actions .btn-sm span { display: none; }
  .top-actions .btn-sm { width: 40px; min-height: 40px; padding: 0; }
  .tabs a { padding: 8px 14px; }
  .tabs a small { display: none; }
}

/* ══════════════════════ أجواء الشتاء ══════════════════════ */
:root, :root[data-theme="dark"] {
  --snow: #f4f9ff;
  --ice: rgba(190, 225, 255, 0.55);
  --aurora-1: rgba(110, 200, 255, 0.16);
  --aurora-2: rgba(140, 120, 255, 0.10);
  --aurora-3: rgba(90, 230, 210, 0.08);
  /* منظر آخر الصفحة (ليل مقمر) */
  --ws-far-a: #1f2c3b; --ws-far-b: #121a24;
  --ws-cap: #9fb6cc;
  --ws-fog: #0b1017;
  --ws-tree: #0e1620; --ws-trunk: #0a0f15; --ws-tree-snow: #b8cbe0;
  --ws-mid-a: #2a3b4e; --ws-mid-b: #18222e;
  --ws-front-a: #e3edf7; --ws-front-b: #b3c6da;
  --ws-shine: rgba(255, 255, 255, 0.85);
  --ws-ink: #2a3f56;
}
:root[data-theme="light"] {
  --snow: #ffffff;
  --ice: rgba(120, 175, 225, 0.55);
  --aurora-1: rgba(120, 190, 250, 0.22);
  --aurora-2: rgba(170, 160, 255, 0.14);
  --aurora-3: rgba(120, 220, 230, 0.14);
  /* منظر آخر الصفحة (نهار ثلجي) */
  --ws-far-a: #c3d7ea; --ws-far-b: #dde9f5;
  --ws-cap: #ffffff;
  --ws-fog: #f3f8fd;
  --ws-tree: #35516e; --ws-trunk: #2a3f56; --ws-tree-snow: #ffffff;
  --ws-mid-a: #e6eff8; --ws-mid-b: #d3e2f0;
  --ws-front-a: #ffffff; --ws-front-b: #eaf2fa;
  --ws-shine: rgba(160, 200, 235, 0.7);
  --ws-ink: #3d5670;
}
:root[data-theme="light"] body {
  background:
    radial-gradient(900px 480px at 50% -120px, var(--bg-glow), transparent 70%),
    linear-gradient(180deg, #e7f1fb 0%, #f6faff 45%, #ffffff 100%);
}

/* شفق قطبي هادي بأعلى الصفحة */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 70vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 20% 40%, var(--aurora-1), transparent 70%),
    radial-gradient(35% 45% at 60% 30%, var(--aurora-2), transparent 70%),
    radial-gradient(30% 40% at 85% 45%, var(--aurora-3), transparent 70%);
  filter: blur(20px);
  animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate3d(-3%, 0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate3d(3%, 2%, 0) scale(1.08); opacity: 1; }
  100% { transform: translate3d(-1%, -2%, 0) scale(1.02); opacity: 0.85; }
}

/* شموع ثلج تحت الهيدر */
.topbar::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 100%;
  height: 12px;
  pointer-events: none;
  background: var(--ice);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 12'%3E%3Cpath d='M0 0h80v1.5l-3 .5-2 7-2-7-6 .5-1.5 4-1.5-4-8 .3-2.5 9.5-2.5-9.5-7 .3-1 3-1-3-9 .2-2 6-2-6-6 .3-1.5 4.5-1.5-4.5L0 2z'/%3E%3C/svg%3E") repeat-x 0 0 / 80px 12px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 12'%3E%3Cpath d='M0 0h80v1.5l-3 .5-2 7-2-7-6 .5-1.5 4-1.5-4-8 .3-2.5 9.5-2.5-9.5-7 .3-1 3-1-3-9 .2-2 6-2-6-6 .3-1.5 4.5-1.5-4.5L0 2z'/%3E%3C/svg%3E") repeat-x 0 0 / 80px 12px;
}

/* ثلج متراكم فوق البطاقات */
.cat-card, .server-card, .mail-card, .stat-card, .empty, .cast-week { position: relative; }
.cat-card::before, .server-card::before, .mail-card::before, .stat-card::before, .empty::before, .cast-week::before {
  content: "";
  position: absolute;
  top: -7px;
  inset-inline: 16px;
  height: 14px;
  pointer-events: none;
  background: var(--snow);
  filter: drop-shadow(0 2px 3px rgba(0, 20, 50, 0.25));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 12c3-6 9-8 15-5 5-5 13-6 19-2 6-4 14-4 20 0 6-5 14-5 20-1 6-4 14-4 19 1 6-4 13-3 17 2 4-1 8 0 10 5z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 12c3-6 9-8 15-5 5-5 13-6 19-2 6-4 14-4 20 0 6-5 14-5 20-1 6-4 14-4 19 1 6-4 13-3 17 2 4-1 8 0 10 5z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  opacity: 0.92;
}
.empty::before { inset-inline: 22%; }

/* لمعة ثلجية على كلمة Winter */
.wordmark {
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%) 120% 0 / 260% 100% no-repeat, var(--wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  animation: frost-shine 7s ease-in-out 1.2s infinite;
}
@keyframes frost-shine {
  0%, 55% { background-position: 120% 0, 0 0; }
  100% { background-position: -40% 0, 0 0; }
}
.hero { position: relative; }
.hero-logo { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* تلال ثلجية وأشجار بآخر الصفحة */
.footer {
  margin-top: 40px;
  padding-top: 96px;
  border-top: 0;
  overflow: hidden;
}
.footer { display: block; padding: 0; margin-top: 56px; direction: rtl; }
.winterscape { display: block; width: 100%; height: clamp(150px, 15vw, 230px); }
.ws-far-a { stop-color: var(--ws-far-a); } .ws-far-b { stop-color: var(--ws-far-b); }
.ws-mid-a { stop-color: var(--ws-mid-a); } .ws-mid-b { stop-color: var(--ws-mid-b); }
.ws-front-a { stop-color: var(--ws-front-a); } .ws-front-b { stop-color: var(--ws-front-b); }
.ws-fog-a { stop-color: var(--ws-fog); stop-opacity: 0; } .ws-fog-b { stop-color: var(--ws-fog); stop-opacity: 0.55; }
.ws-cap { fill: var(--ws-cap); }
.ws-tree { fill: var(--ws-tree); }
.ws-trunk { fill: var(--ws-trunk); }
.ws-tree-snow { fill: var(--ws-tree-snow); }
.ws-shine { fill: none; stroke: var(--ws-shine); stroke-width: 2; stroke-linecap: round; }
.ws-sparkles circle { fill: #fff; animation: twinkle 3.2s ease-in-out infinite; }
.ws-sparkles circle:nth-child(2n) { animation-delay: -1.1s; animation-duration: 2.6s; }
.ws-sparkles circle:nth-child(3n) { animation-delay: -2.2s; animation-duration: 3.8s; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: -1px;
  padding: 4px 16px 20px;
  background: var(--ws-front-b);
  color: var(--ws-ink);
  font-size: 13px;
  font-weight: 500;
  direction: ltr;
}

/* ── سماء الشتاء: قمر وجبال بعيدة ثابتة خلف المحتوى ── */
:root, :root[data-theme="dark"] { --moon: #eef5ff; --moon-glow: rgba(190, 220, 255, 0.28); }
:root[data-theme="light"] { --moon: #ffffff; --moon-glow: rgba(255, 255, 255, 0.9); }
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.moon {
  position: absolute;
  top: 92px;
  inset-inline-end: 7vw;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--moon) 0 55%, color-mix(in srgb, var(--moon) 80%, #9cb8d6) 100%);
  box-shadow: 0 0 40px 10px var(--moon-glow), 0 0 140px 50px color-mix(in srgb, var(--moon-glow) 50%, transparent);
  opacity: 0.85;
}
.moon::before, .moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(140, 165, 195, 0.18); }
.moon::before { width: 16px; height: 16px; top: 18px; left: 40px; }
.moon::after { width: 10px; height: 10px; top: 44px; left: 22px; }
:root[data-theme="light"] .moon::before, :root[data-theme="light"] .moon::after { display: none; }
@media (max-width: 640px) { .moon { width: 48px; height: 48px; top: 78px; } .moon::before, .moon::after { display: none; } }

/* زينة ثلج معلّقة بالهيرو تتمايل */
.ornaments { position: absolute; inset: -2px 0 auto; height: 0; pointer-events: none; }
.orn {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent);
  transform-origin: top center;
  animation: swing 5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px var(--moon-glow));
}
.orn::before { content: ""; width: 1px; height: var(--len, 80px); background: linear-gradient(180deg, transparent, var(--border-strong)); }
.orn .icon { width: var(--size, 22px); height: var(--size, 22px); }
.o1 { inset-inline-start: 8%; --len: 120px; --size: 26px; animation-duration: 5.5s; }
.o2 { inset-inline-start: 20%; --len: 70px; --size: 16px; animation-duration: 4.2s; animation-delay: -1s; }
.o3 { inset-inline-end: 9%; --len: 140px; --size: 28px; animation-duration: 6s; animation-delay: -2s; }
.o4 { inset-inline-end: 22%; --len: 85px; --size: 18px; animation-duration: 4.8s; animation-delay: -3s; }
.o5 { inset-inline-end: 34%; --len: 50px; --size: 14px; animation-duration: 3.9s; animation-delay: -1.5s; }
@keyframes swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@media (max-width: 640px) { .o2, .o5 { display: none; } .o1 { --len: 70px; } .o3 { --len: 90px; } }

/* عناوين الصفحات بلون الثلج ولمعة */
.page-head h1, .section-head h2 {
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.9) 50%, transparent 62%) 120% 0 / 260% 100% no-repeat, var(--wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: frost-shine 9s ease-in-out 2s infinite;
}

/* الزر الأساسي: ثلج فوقه ولمعة جليد */
.btn-primary { position: relative; }
.btn-primary::before {
  content: "";
  position: absolute;
  top: -5px;
  inset-inline: 12px;
  height: 9px;
  pointer-events: none;
  background: var(--snow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 12c3-6 9-8 15-5 5-5 13-6 19-2 6-4 14-4 20 0 6-5 14-5 20-1 6-4 14-4 19 1 6-4 13-3 17 2 4-1 8 0 10 5z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 12c3-6 9-8 15-5 5-5 13-6 19-2 6-4 14-4 20 0 6-5 14-5 20-1 6-4 14-4 19 1 6-4 13-3 17 2 4-1 8 0 10 5z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0, 30, 60, 0.25));
}
.btn-primary:hover { box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 30px rgba(140, 200, 250, 0.4); }
.btn-sm.btn-primary::before { top: -4px; height: 7px; inset-inline: 8px; }

/* جليد بزوايا البطاقات */
.post-card::after, .cat-card::after, .mail-card::after, .dash-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(70px 40px at 0 0, rgba(220, 240, 255, 0.12), transparent 70%),
    radial-gradient(90px 50px at 100% 100%, rgba(220, 240, 255, 0.08), transparent 70%);
}
.dash-card { position: relative; }

/* ── بطاقة السيرفر بالصفحة الرئيسية ── */
.server-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  margin: 8px auto 0;
  max-width: 980px;
  border-radius: 26px;
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(170, 210, 245, 0.12) 40%, rgba(255, 255, 255, 0.35)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 24px 70px rgba(60, 130, 200, 0.18), var(--shadow);
}
.sc-banner { position: relative; min-height: 100%; border-radius: 24px 0 0 24px; overflow: hidden; }
[dir="rtl"] .sc-banner { border-radius: 0 24px 24px 0; }
.sc-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; transition: transform 0.6s ease; }
.server-card:hover .sc-banner img { transform: scale(1.04); }
.sc-frost { position: absolute; inset: 0; background: linear-gradient(270deg, var(--surface) 0%, transparent 35%); }
[dir="rtl"] .sc-frost { background: linear-gradient(90deg, var(--surface) 0%, transparent 35%); }
.sc-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; }
.sc-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  direction: ltr;
}
.sc-id { display: flex; align-items: center; gap: 14px; }
/* اللوقو شكله دائري غير منتظم وخلفيته شفافة — ينعرض كامل بدون مربع */
.sc-logo { width: 76px; height: 76px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(120, 180, 235, 0.45)); }
.sc-id h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-family: "Fredoka", "Rubik", sans-serif; font-size: 26px; line-height: 1.1; }
.sc-verified { width: 20px; height: 20px; color: #5ba7ff; flex-shrink: 0; }
.sc-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.sc-counts b { color: var(--text); font-weight: 600; }
.sc-counts i { font-style: normal; opacity: 0.6; }
.sc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 0%, transparent); } }
.sc-lang { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 13px; color: var(--muted); direction: ltr; justify-content: flex-end; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; direction: ltr; justify-content: flex-end; }
.sc-tags span { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 13px; font-weight: 500; }
.sc-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.sc-join { margin-top: auto; min-height: 48px; font-size: 16px; }
.sc-join .icon:last-child { margin-inline-start: auto; }
@media (max-width: 760px) {
  .server-card { grid-template-columns: 1fr; }
  .sc-banner, [dir="rtl"] .sc-banner { min-height: 180px; border-radius: 24px 24px 0 0; }
  .sc-frost, [dir="rtl"] .sc-frost { background: linear-gradient(0deg, var(--surface) 0%, transparent 45%); }
  .sc-body { padding: 16px 18px 20px; }
}

/* ── الإيميل المؤقت ── */
.mail-card {
  max-width: 820px;
  margin: 8px auto 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px);
}
.mail-intro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mail-intro h2 { margin: 0; }
.mail-art { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.mail-art .icon { width: 30px; height: 30px; }
.mail-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.mail-points li { display: flex; align-items: center; justify-content: center; gap: 8px; }
.mail-address { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mail-address > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mail-address code { font-size: clamp(16px, 3.4vw, 22px); font-weight: 600; word-break: break-all; color: var(--accent); }
.mail-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.mail-meta > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.mail-meta b { color: var(--text); }
.mail-actions { display: inline-flex; gap: 8px; }
.mail-box h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; }
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mail-row { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); transition: border-color 0.15s, transform 0.15s; }
.mail-row:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.mail-row.is-new { border-inline-start: 3px solid var(--accent); }
.mail-from, .mail-subject { display: flex; flex-direction: column; min-width: 0; }
.mail-from small, .mail-subject small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-from strong, .mail-subject strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row time { font-size: 12px; white-space: nowrap; }
.mail-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 0; color: var(--muted); text-align: center; }
.mail-empty .icon { width: 34px; height: 34px; opacity: 0.6; }
.mail-empty p { margin: 6px 0 0; }
.mail-read h1 { margin: 0 0 6px; font-size: 24px; }
.mail-text { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--surface-2); white-space: pre-wrap; word-break: break-word; line-height: 1.8; }
.mail-text a { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) {
  .mail-row { grid-template-columns: 1fr; gap: 4px; }
  .mail-card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
