/* اسپریت SVG: صفر فضا (بدون display:none تا <use> کار کند) */
#ava-svg-sprite-host,
.ava-svg-sprite-host {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  left: -9999px !important;
  top: -9999px !important;
  pointer-events: none !important;
}
#ava-svg-sprite-host svg,
svg.ava-svg-sprite {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/*
Theme Name: آوا نیوز
Theme URI: https://avanews.ir
Author: Ava News Team
Author URI: https://avanews.ir
Description: قالب حرفه‌ای خبری آوا نیوز با پنل‌های فرانت‌اند برای مدیر، سردبیر و خبرنگار. طراحی تاریک مدرن با فونت کلمه.
Version: 2.39.9
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ava-news
Tags: news, rtl, dark, custom-colors, custom-logo, featured-images, theme-options
*/

/* ==========================================================================
   Base & Reset
   --------------------------------------------------------------------------
   مقیاس مرجع breakpoint ها (v2.22 — تک‌نقطهٔ مستندسازی):
   ≤360 گوشی خیلی باریک · ≤480 گوشی (گالری ۲ ستونه) · ≤600 موبایل (تک‌خبر/مودال)
   ≤680 موبایل هدر/فوتر · ≤768 لمس‌پذیری پنل (فرم‌ها ≥16px، دکمه ≥44px)
   ≤860 رسانه · ≤991 پنل (موبایل) · ≥992 دسکتاپ پنل
   ≥1100/1180 دسکتاپ سایت · ≤1280 منوی فشرده
   ========================================================================== */
:root {
  --bg-primary: #0A1120;
  --bg-secondary: #0B1322;
  --bg-card: #0D1628;
  --bg-card-hover: #172033;
  --bg-input: #0d131c;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #e8eef7;
  --text-secondary: #9aa8bc;
  --text-muted: #6b7a90;
  --accent: #2F6BFF;
  --accent-hover: #4D8DFF;
  --accent-soft: rgba(47, 107, 255, 0.15);
  --success: #39C48E;
  --danger: #FF4D57;
  --warning: #FFC36E;
  --gold: #FFC36E;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font: 'Kalameh', Tahoma, sans-serif;
  --transition: 0.2s ease;
}

/* --------------------------------------------------------------------------
   Light theme
   -------------------------------------------------------------------------- */
body.theme-light {
  --bg-primary: #f4f6fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4fa;
  --bg-input: #eef2f7;
  --border-color: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.16);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

body.theme-light .site-header,
body.theme-light .site-footer {
  background: #ffffff;
}

/* نوار بالایی — کلاس واقعی «.topbar» است (قبلاً «.top-bar» اشتباه تایپ شده بود و اثر نمی‌کرد) */
body.theme-light .topbar {
  background: #ffffff;
}

/* نوار خبر فوری — کلاس واقعی «.ticker» است (سلکتورهای قبلی .breaking-bar/.breaking-text در قالب وجود نداشتند) */
body.theme-light .ticker {
  background: #ffffff;
  border-bottom-color: rgba(37, 99, 235, 0.14);
}
body.theme-light .ticker .tick-badge {
  color: #ffffff;
}
body.theme-light .ticker .tick-track span b {
  color: #1e3a5f;
}

body.theme-light .hero-main .hero-bg {
  background: radial-gradient(ellipse at 30% 20%, rgba(37, 99, 235, 0.12), transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.08), transparent 50%),
              #e8eef8;
}

body.theme-light .side-card-icon {
  background: rgba(37, 99, 235, 0.1);
}

body.theme-light .news-card-image {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

body.theme-light .video-main {
  background: radial-gradient(circle at center, #dbeafe 0%, #e2e8f0 70%);
}

body.theme-light .btn-icon {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  color: #475569;
}

body.theme-light .btn-icon:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.theme-light .login-page {
  background: radial-gradient(ellipse at top, #dbeafe 0%, #f4f6fa 60%);
}

/* ==========================================================================
   تم روشن آراز — لایهٔ تکمیلی
   توکن‌های کروم (ui-header-footer.css) در حالت روشن تعریف نشده بودند و
   چند کامپوننت رنگ تاریک هاردکد داشتند؛ این لایه هر دو را پوشش می‌دهد.
   ========================================================================== */
body.theme-light {
  --bg: #f4f6fa;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --faint: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --line-2: rgba(15, 23, 42, 0.18);
  --card: #ffffff;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-l: #1d4ed8;
  --accent-bg: rgba(37, 99, 235, 0.1);
  --red: #e11d48;
  --red-d: #be123c;
  --green: #0e9f6e;
  --green-2: #0b7f58;
  --amber: #d97706;
  --purple: #7c3aed;
  --cyan: #0891b2;
  --sh-card: 0 18px 40px rgba(15, 23, 42, 0.1);
}

/* پس‌زمینهٔ بدنه با درخشش ملایم روشن */
body.theme-light {
  background:
    radial-gradient(1100px 480px at 88% -140px, rgba(37, 99, 235, 0.07), transparent 65%),
    radial-gradient(900px 420px at 4% 300px, rgba(37, 99, 235, 0.04), transparent 60%),
    #f4f6fa;
  color: var(--ink);
}

body.theme-light ::selection { background: rgba(37, 99, 235, 0.22); color: #0f172a; }
body.theme-light ::-webkit-scrollbar-track { background: #eef2f7; }
body.theme-light ::-webkit-scrollbar-thumb { background: #c7d2e0; border: 3px solid #eef2f7; }
body.theme-light ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* هدر شیشه‌ای — سایهٔ اسکرول ملایم‌تر */
body.theme-light .site-header.scrolled { box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1); }
body.theme-light .icon-btn:hover,
body.theme-light .tb-soc a:hover,
body.theme-light .ft-soc a:hover,
body.theme-light .more:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}
/* لینک‌های فوتر در تم روشن — هاور سفید روی پس‌زمینه روشن خوانا نبود */
body.theme-light .ft-links a:hover {
  color: var(--accent);
}
body.theme-light .ft-links a:hover::before {
  background: var(--accent);
  opacity: 1;
}
body.theme-light .nav a:hover {
  color: var(--ink);
  background: rgba(37, 99, 235, 0.08);
}
body.theme-light .dr-nav a:hover,
body.theme-light .dr-nav a.on {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
}
body.theme-light .live-chip { color: #b91c3c; }

/* پنل جستجو */
body.theme-light .search-panel { background: rgba(255, 255, 255, 0.97); box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1); }
body.theme-light .sp-go { background: linear-gradient(140deg, var(--accent), #1e40af); box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28); }
body.theme-light .sp-input:focus { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); }

/* منوی کشویی موبایل و پردهٔ پشت آن */
body.theme-light .drawer .panel { background: #ffffff; }
body.theme-light .drawer .veil { background: rgba(15, 23, 42, 0.45); }

/* دکمهٔ بازگشت به بالا */
body.theme-light .to-top { background: rgba(255, 255, 255, 0.95); box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18); }
body.theme-light .to-top:hover { color: #ffffff; border-color: var(--accent-2); background: var(--accent); }

/* ویدیو و گالری — جای‌بان‌ها و نوار اطلاعات */
body.theme-light .video-thumb { background: #e2e8f0; }
body.theme-light .vstrip-item .video-thumb { background: #e2e8f0; }
body.theme-light .video-thumb .mini-play { color: var(--accent); text-shadow: none; }
body.theme-light .vstrip-item .mini-play { color: #ffffff; }
body.theme-light .video-main .video-info { background: linear-gradient(transparent, rgba(15, 23, 42, 0.07)); }
/* وقتی پوستر واقعی زیر کارت هست، گرادیان تیره + متن سفید مثل حالت تاریک لازم است؛
   اگر پوستری نیست (has-poster بدون img)، گرادیان روشن می‌ماند تا متن سیاه روی آن خوانا باشد */
body.theme-light .video-main.has-poster .video-poster ~ .video-info { background: linear-gradient(transparent, rgba(0, 0, 0, 0.66)); }
body.theme-light .video-main.has-poster .video-poster ~ .video-info h3 { color: #ffffff; }
body.theme-light .video-main.has-poster .video-poster ~ .video-info .meta { color: rgba(255, 255, 255, 0.85) !important; }
body.theme-light .vstrip-fallback,
body.theme-light .ava-mfeat-thumb .thumb-placeholder {
  background: radial-gradient(circle at center, #dbeafe 0%, #eef2f7 75%);
  color: rgba(37, 99, 235, 0.45);
}

/* کارت ویژهٔ آرشیو چندرسانه‌ای */
body.theme-light .ava-mfeat { background: #ffffff; border-color: rgba(15, 23, 42, 0.08); }

/* حالت مطالعهٔ خبر */
body.theme-light.reading-mode .single-post .container { background: #fffdf7; }

/* پنل کاربری همیشه RTL — مستقل از زبان سایت */
body.ava-dashboard,
body.ava-dashboard.dir-ltr,
body.ava-dashboard.ltr,
html[dir="ltr"] body.ava-dashboard {
  direction: rtl !important;
  text-align: right !important;
}
body.ava-dashboard .dash-sidebar,
body.ava-dashboard.dir-ltr .dash-sidebar {
  border-left: 1px solid var(--border-color) !important;
  border-right: none !important;
}
body.ava-dashboard .dash-nav a,
body.ava-dashboard.dir-ltr .dash-nav a {
  border-right: 3px solid transparent !important;
  border-left: none !important;
}
body.ava-dashboard .dash-nav a:hover,
body.ava-dashboard .dash-nav a.active,
body.ava-dashboard.dir-ltr .dash-nav a:hover,
body.ava-dashboard.dir-ltr .dash-nav a.active {
  border-right-color: var(--accent) !important;
  border-left-color: transparent !important;
}

/* v2.36: قانون مردهٔ .dash-sidebar{background:#ffffff} حذف شد —
   پس‌زمینهٔ سایدبار از var(--bg-secondary) در قانون پایه می‌آید */

body.theme-light .mobile-bottom-nav {
  background: #ffffff;
}

/* Theme toggle button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition);
  font-size: 1.15rem;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

body.theme-light .theme-toggle .icon-sun { display: none; }
body.theme-light .theme-toggle .icon-moon { display: inline; }
body:not(.theme-light) .theme-toggle .icon-sun { display: inline; }
body:not(.theme-light) .theme-toggle .icon-moon { display: none; }


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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl; /* پیش‌فرض؛ با .dir-ltr عوض می‌شود */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

html[dir="ltr"],
html[dir="ltr"] body,
body.dir-ltr,
body.ltr {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"],
html[dir="rtl"] body,
body.dir-rtl,
body.rtl {
  direction: rtl;
  text-align: right;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.container {
  width: min(1480px, 100% - clamp(28px, 6vw, 96px));
  max-width: 1480px;
  margin-inline: auto;
  padding: 0;
}

/* alias so content sections use same width as header wrap */
.wrap {
  width: min(1480px, 100% - clamp(28px, 6vw, 96px));
  margin-inline: auto;
}

/* هدر و نوارها تمام‌عرض پس‌زمینه، محتوا محدود */
.top-bar,
.site-header,
.breaking-bar,
.site-footer {
  width: 100%;
}

/* LTR support */
body.dir-ltr,
body.ltr,
html[dir="ltr"] body {
  direction: ltr !important;
  text-align: left;
}

body.dir-ltr .dash-sidebar {
  border-left: none;
  border-right: 1px solid var(--border-color);
}

body.dir-ltr .dash-nav a {
  border-right: none;
  border-left: 3px solid transparent;
}

body.dir-ltr .dash-nav a:hover,
body.dir-ltr .dash-nav a.active {
  border-left-color: var(--accent);
  border-right-color: transparent;
}

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.lang-switch a {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.lang-switch a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.lang-switch a.active {
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent);
}

.lang-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

.lang-badge.source {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.lang-badge.auto {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* ==========================================================================
   Header / Top Bar
   ========================================================================== */
.top-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.top-bar .lang-switch {
  display: flex;
  gap: 8px;
}

.top-bar .lang-switch a {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.top-bar .lang-switch a.active {
  background: var(--accent);
  color: #fff;
}

.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
}

/* v2.22: بلوک مردهٔ .main-nav حذف شد — منوی عمومی فقط در ui-header-footer.css (.nav) تعریف می‌شود
   تا دو سیستم استایل موازی باعث ناهماهنگی موبایل نشود. */

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-primary {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.mobile-menu-btn {
  display: flex;
}

@media (min-width: 992px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Breaking news ticker */
.breaking-bar {
  background: linear-gradient(90deg, #1e3a5f, #0f172a);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  overflow: hidden;
}

.breaking-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.breaking-label {
  background: #ef4444;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.breaking-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Hero / Featured
   ========================================================================== */
.hero-section {
  padding: 24px 0 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
  }
}

.hero-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--border-color);
}

.hero-main .hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.25), transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.15), transparent 50%),
              var(--bg-card);
  z-index: 0;
}

.hero-main .hero-content {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-badge.political {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.hero-badge.economy {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.hero-badge.sport {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.hero-badge.special {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
}

.hero-title {
  font-size: 1.45rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 1.7rem;
  }
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all var(--transition);
  flex: 1;
}

.side-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.side-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
  color: var(--accent);
}

.side-card-body h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  line-height: 1.45;
}

.side-card-body .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Widgets Row (Weather, Currency, Gold, Prayer)
   ========================================================================== */
.widgets-row {
  padding: 8px 0 20px;
}

.widgets-row .container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(14px, 3vw, 28px);
  box-sizing: border-box;
}

.widgets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  align-items: stretch;
}

@media (min-width: 640px) {
  .widgets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .widgets-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.widget-card {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color var(--transition);
}

.widget-card:hover {
  border-color: var(--border-hover);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.widget-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget-title .icon {
  font-size: 1rem;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.weather-temp {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.weather-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.weather-days {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.weather-days span {
  text-align: center;
}

.weather-days strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-top: 2px;
}

.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-color);
}

.rate-row:last-child {
  border-bottom: none;
}

.rate-name {
  color: var(--text-secondary);
}

.rate-value {
  font-weight: 600;
  direction: ltr;
}

.rate-change {
  font-size: 0.75rem;
  margin-right: 6px;
}

.rate-change.up {
  color: var(--success);
}

.rate-change.down {
  color: var(--danger);
}

.prayer-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.85rem;
}

.prayer-name {
  color: var(--text-secondary);
}

.prayer-time {
  font-weight: 600;
  direction: ltr;
}

.prayer-next {
  margin-top: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   Latest News Section
   ========================================================================== */
.section {
  padding: 28px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--accent);
  border-radius: 4px;
}

.cat-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-filter {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.cat-filter:hover,
.cat-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 576px) {
  .news-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.news-card-image {
  height: 160px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.news-card-image .placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.4;
  color: var(--accent);
}

.news-card-image .cat-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.news-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-body h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.5;
  flex: 1;
}

.news-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Videos & Gallery
   ========================================================================== */
.media-section {
  padding: 20px 0 32px;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .media-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.video-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e3a5f 0%, #0f1520 70%);
}

.video-main .play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 0 0 12px rgba(59, 130, 246, 0.2);
  transition: transform var(--transition);
}

.video-main:hover .play-btn {
  transform: scale(1.08);
}

.video-main .video-info {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.video-main .video-info h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-item {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px;
  align-items: center;
  transition: all var(--transition);
}

.video-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.video-thumb {
  width: 90px;
  height: 56px;
  border-radius: 8px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.video-item-body h4 {
  font-size: 0.88rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.video-item-body .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gallery-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.gallery-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.3rem;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   تکمیل بخش ویدیو و گالری v2.7 — پوستر، بَج، overlay، نمایشگر گالری
   -------------------------------------------------------------------------- */
.media-more {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}

.media-more:hover {
  color: var(--accent-hover, var(--accent));
  text-decoration: underline;
}

/* ویدیو/گالری ویژه با پوستر واقعی */
.video-main.has-poster {
  min-height: 0;
  aspect-ratio: 16 / 9;
  display: block;
  text-decoration: none;
}

.video-main .video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.video-main.has-poster:hover .video-poster {
  transform: scale(1.04);
}

/* دکمه پخش روی ویدیوی ویژه */
.video-main.has-poster .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.video-main.has-poster:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.08);
}

/* بَج مدت‌زمان ویدیو */
.dur-badge {
  position: absolute;
  bottom: 52px;
  left: 12px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* بَج تعداد عکس گالری */
.count-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.count-badge.on-thumb {
  position: absolute;
  bottom: 10px;
  top: auto;
  left: 10px;
}

/* overlay پخش روی کارت‌های آرشیو */
.video-thumb-lg {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius, 10px);
}

.video-thumb-lg img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.video-thumb-lg:hover img {
  transform: scale(1.04);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(47, 107, 255, 0.92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 0 10px rgba(47, 107, 255, 0.22);
  transition: transform var(--transition), background var(--transition);
}

.video-thumb-lg:hover .play-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(77, 141, 255, 0.95);
}

/* مینی‌پلی داخل بندانگشتی لیست */
.video-thumb {
  position: relative;
  overflow: hidden;
}

.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb .mini-play {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb {
  display: block;
}

/* حالت خالی بخش مدیا */
.video-main.media-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  background-image: none;
}

/* پخش‌کننده صفحه تک‌ویدیو */
.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin-bottom: 24px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

/* --------------------------------------------------------------------------
   نمایشگر گالری (single-ava_gallery)
   -------------------------------------------------------------------------- */
.gal-viewer {
  margin-top: 20px;
}

.gal-stage {
  position: relative;
  background: #05080f;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  max-height: 70vh;
}

.gal-stage img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: opacity .25s ease;
}

.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}

.gal-nav:hover {
  background: rgba(47, 107, 255, 0.9);
}

.gal-prev { left: 12px; }
.gal-next { right: 12px; }

.gal-counter {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 14px;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.gal-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition);
}

.gal-zoom:hover {
  background: rgba(47, 107, 255, 0.9);
}

.gal-caption {
  min-height: 24px;
  padding: 10px 4px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.gal-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 2px;
  scrollbar-width: thin;
}

.gal-thumb-btn {
  flex: 0 0 auto;
  width: 76px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--bg-card);
  cursor: pointer;
  opacity: 0.65;
  transition: opacity var(--transition), border-color var(--transition);
}

.gal-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gal-thumb-btn:hover {
  opacity: 1;
}

.gal-thumb-btn.active {
  border-color: var(--accent);
  opacity: 1;
}

/* نورباکس تمام‌صفحه */
.gal-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.gal-lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
}

.gal-lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.gal-lb-close:hover {
  background: rgba(255, 77, 87, 0.85);
}

/* گالری‌های مرتبط */
.gal-related {
  margin-top: 36px;
}

.gal-related .news-card-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius, 10px);
}

.gal-related .news-card-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

@media (max-width: 600px) {
  .gal-stage { min-height: 220px; }
  .gal-nav { width: 36px; height: 36px; font-size: 1.3rem; }
  .dur-badge { bottom: 46px; }
}

/* ==========================================================================
   Popular & Tags
   ========================================================================== */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 32px;
}

@media (min-width: 768px) {
  .bottom-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

.popular-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popular-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.popular-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.popular-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.popular-item h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.popular-item .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.tag-item:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Footer — v2.37: بلوک مردهٔ مارک‌آپ قدیمی (.footer-grid/.footer-brand/.footer-col/
   .social-links/.footer-bottom — فوتر فعلی با .ft-grid/.ft-brand است) حذف شد
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 36px 0 20px;
  margin-top: 28px;
}


/* ==========================================================================
   Dashboard (Front-end panels)
   ========================================================================== */
.dashboard-wrap {
  display: flex;
  min-height: calc(100vh - 60px);
}

.dash-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  padding: 20px 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: flex-start; /* v2.36: در فلکس stretch نکند تا sticky همیشه درست بچسبد */
  overflow-y: auto;
  display: none;
}

/* v2.36: مدیرکل وردپرس نوار ابزار ۳۲px دارد — سایدبار زیر آن نرود */
body.admin-bar .dash-sidebar {
  top: 32px;
  height: calc(100vh - 32px);
}

@media (min-width: 992px) {
  .dash-sidebar {
    display: block;
  }
}

.dash-sidebar .logo-area {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: all var(--transition);
  border-right: 3px solid transparent;
}

.dash-nav a:hover,
.dash-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-right-color: var(--accent);
}

.dash-nav .nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  color: inherit;
}
.dash-nav .nav-icon .ic,
.dash-nav .nav-icon .ava-ic {
  width: 18px;
  height: 18px;
  display: block;
}

.dash-main {
  flex: 1;
  padding: 24px;
  background: var(--bg-primary);
  min-width: 0;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-header h1 {
  font-size: 1.4rem;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dash-user .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-card .stat-change {
  font-size: 0.78rem;
  margin-top: 4px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.dash-card h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.table-responsive {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dash-table th,
.dash-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
}

.dash-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.2);
}

.dash-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ═══ ستون ترجمه‌ها — پرچم‌های لینک‌دار ═══ */
.ava-tr-flags {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ava-tr-flag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 23px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ava-tr-flag:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.ava-tr-flag.self {
  opacity: 0.4;
  cursor: default;
  border-style: dashed;
}

.ava-tr-flag.self:hover {
  transform: none;
  box-shadow: none;
}

.ava-tr-flag.on {
  border-color: rgba(47, 107, 255, 0.5);
}

.ava-tr-flag.off {
  opacity: 0.35;
  filter: grayscale(1);
}

.ava-tr-flag.off i {
  position: absolute;
  bottom: -4px;
  inset-inline-end: -4px;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  width: 13px;
  height: 13px;
  line-height: 13px;
  text-align: center;
}

.ava-tr-flag.off:hover {
  opacity: 0.85;
  filter: none;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.published {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.status-badge.draft {
  background: rgba(107, 122, 144, 0.2);
  color: #9aa8bc;
}

.status-badge.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.btn-sm {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.btn-sm:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-sm.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-sm.primary:hover {
  background: var(--accent-hover);
}

.btn-sm.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-sm.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Form styles for dashboard */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
}

/* ==========================================================================
   Jalali datepicker (panel filters — همه اخبار / در انتظار بررسی)
   ========================================================================== */
.ava-jd-input {
  cursor: pointer;
}

.ava-jd-input::placeholder {
  color: var(--text-muted);
}

.ava-jdp {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 500;
  width: 236px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px;
  user-select: none;
}

.ava-jdp-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 6px;
}

.ava-jdp-t {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.ava-jdp-nav {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  flex: 0 0 auto;
}

.ava-jdp-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ava-jdp-g {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.ava-jdp-w {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 3px 0;
}

.ava-jdp-d {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.78rem;
  padding: 6px 0;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}

.ava-jdp-d:hover {
  background: var(--accent-soft);
}

.ava-jdp-d.sel {
  background: var(--accent);
  color: #fff;
}

.ava-jdp-d.tod {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ava-jdp-f {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.ava-jdp-f button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
  font-family: inherit;
}

.ava-jdp-f button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239aa8bc' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* Mobile dash toggle */
.dash-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--text-secondary);
  width: 100%;
  justify-content: center;
}

@media (min-width: 992px) {
  .dash-mobile-toggle {
    display: none;
  }
}

.dash-sidebar.mobile-open {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 200;
  /* v2.22: روی گوشی‌های باریک کل عرض صفحه را نگیرد */
  width: min(280px, 85vw);
  padding-top: env(safe-area-inset-top);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
}

.dash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 150;
}

.dash-overlay.show {
  display: block;
}

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, #12203a 0%, var(--bg-primary) 60%);
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.login-box .logo-area {
  text-align: center;
  margin-bottom: 28px;
}

.login-box .logo-area .site-logo {
  justify-content: center;
  margin-bottom: 8px;
}

.login-box .logo-area p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-box .form-group {
  margin-bottom: 18px;
}

.login-box .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 1rem;
}

.login-links {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.login-links a {
  color: var(--accent);
}

/* Single post */
.single-post {
  padding: 28px 0 40px;
}

.single-post .post-header {
  margin-bottom: 24px;
}

.single-post .post-cat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 12px;
}

.single-post h1 {
  font-size: 1.7rem;
  margin-bottom: 14px;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .single-post h1 {
    font-size: 2rem;
  }
}

.single-post .post-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.single-post .post-content {
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--text-secondary);
  text-align: justify;
  text-justify: inter-word;
}

.single-post .post-content p {
  margin-bottom: 16px;
}

/* Utility */
.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Loading */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile bottom nav (optional) */
@media (max-width: 991px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    /* v2.22: فاصلهٔ ناحیهٔ امن نوار Home در iPhone */
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 90;
  }
  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 4px 8px;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:hover {
    color: var(--accent);
  }
  .mobile-bottom-nav .nav-icon {
    font-size: 1.2rem;
  }
  body.has-bottom-nav {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}


/* Archive / author */
.archive-header { margin: 24px 0 20px; }
.archive-header h1 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin: 8px 0; }
.archive-desc { color: var(--text-secondary); font-size: 0.95rem; max-width: 720px; }
.kicker { font-size: 0.75rem; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; text-transform: uppercase; }

/* Category hierarchy — breadcrumb + child chips (v2.15) */
.ava-cat-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text-secondary); margin-top: 8px;
}
.ava-cat-crumbs a { color: var(--accent); text-decoration: none; }
.ava-cat-crumbs a:hover { text-decoration: underline; }
.ava-cat-crumbs .sep { color: var(--text-muted); }
.ava-cat-crumbs .cur { color: var(--text-secondary); }
.ava-cat-children {
  display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px;
}
.ava-cat-children a {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  color: var(--text-secondary); font-size: 0.85rem; text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.ava-cat-children a:hover { border-color: var(--accent); color: var(--text-primary); }

/* Multi-category checkbox tree (v2.15) */
.ava-cat-tree {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 14px; max-height: 260px; overflow-y: auto;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 10px 14px;
}
.ava-cat-tree .ava-cat-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem; color: var(--text-primary);
  cursor: pointer; padding-block: 3px;
  min-width: 0; max-width: 100%; overflow: hidden;
}
.ava-cat-tree .ava-cat-check span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ava-cat-tree .ava-cat-check input[type=checkbox] {
  width: 16px; height: 16px; accent-color: var(--accent); flex: none;
}
.ava-cat-tree .ava-cat-check:hover span { color: var(--accent); }

/* Reading mode */
body.reading-mode .site-header,
body.reading-mode .topbar,
body.reading-mode .ticker,
body.reading-mode .site-footer,
body.reading-mode .ava-ad-slot,
body.reading-mode .related-news,
body.reading-mode .share-bar,
body.reading-mode .reading-tools { display: none !important; }
body.reading-mode .single-post .container { max-width: 720px; }
body.reading-mode .post-content { font-size: 1.15rem; line-height: 2; }

/* Comments */
.comments-area .comment-form textarea,
.comments-area .comment-form input[type=text],
.comments-area .comment-form input[type=email],
.comments-area .comment-form input[type=url] {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink, var(--text-primary));
  margin-bottom: 10px;
}
.comments-area .form-submit { margin-top: 8px; }

/* Pagination */
.pagination .nav-links, .pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination a, .pagination span {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 0 10px;
  font-size: 0.9rem;
}
.pagination .current {
  background: var(--accent, #2F6BFF);
  border-color: transparent;
  color: #fff;
}

.settings-tabs { display: flex; flex-wrap: wrap; gap: 8px; } /* v2.22: استایل inline به CSS منتقل شد */
.settings-tabs .btn-sm.primary { background: var(--accent,#2F6BFF); color:#fff; border-color: transparent; }
.settings-tabs .btn-sm { white-space: nowrap; }
.dashboard-wrap[dir="ltr"] .dash-sidebar { text-align: left; }
.dashboard-wrap[dir="ltr"] .dash-nav a { flex-direction: row; }

/* ==========================================================================
   بخش رسانه خلاقانه — هرو آوا تی‌وی/گالری، کارت ویژه، چیپ‌های اطلاعاتی،
   پخش‌کننده سینمایی، اشتراک‌گذاری دایره‌ای و نوار ویدیوهای مرتبط
   ========================================================================== */

/* --- سربرگ هرو آرشیو (ویدیو / گالری) --- */
.ava-mhero {
  position: relative;
  padding: 42px 0 38px;
  margin-bottom: 28px;
  background:
    radial-gradient(900px 260px at 85% -40%, rgba(47, 107, 255, 0.22), transparent 60%),
    radial-gradient(700px 220px at 10% 130%, rgba(255, 77, 87, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.ava-mhero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 178, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 75%);
}

.ava-mhero .container { position: relative; z-index: 1; }

.ava-mhero-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 8px;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  color: var(--text-primary);
}

.ava-mhero-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #7A4DFF);
  box-shadow: 0 10px 30px rgba(47, 107, 255, 0.35);
  flex: 0 0 auto;
}

.ava-mhero-play.gal {
  background: linear-gradient(135deg, #39C48E, #2F6BFF);
  box-shadow: 0 10px 30px rgba(57, 196, 142, 0.30);
}

.ava-mhero-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 560px;
}

.ava-mhero .kicker.on-hero {
  background: var(--accent-soft);
  color: var(--accent-hover, var(--accent));
  border: 1px solid rgba(47, 107, 255, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  font-size: 0.8rem;
}

/* --- چیپ‌های اطلاعاتی (بازدید / تاریخ / مدت / نویسنده) --- */
.media-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.mchip b {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mchip:hover {
  border-color: rgba(47, 107, 255, 0.45);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.mchip.mchip-accent {
  background: var(--accent-soft);
  border-color: rgba(47, 107, 255, 0.35);
  color: var(--accent-hover, var(--accent));
}

.mchip.mchip-accent b { color: var(--accent-hover, var(--accent)); }

.media-meta-chips.on-hero .mchip {
  background: rgba(10, 17, 32, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(234, 240, 251, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.media-meta-chips.on-hero .mchip b { color: #fff; }

.media-meta-chips.on-hero .mchip.mchip-accent {
  background: rgba(47, 107, 255, 0.4);
  border-color: rgba(77, 141, 255, 0.55);
  color: #fff;
}

/* --- پخش‌کننده سینمایی تک‌ویدیو --- */
.ava-vpost { margin-top: 18px; }

.ava-vplayer-wrap {
  position: relative;
  margin: 0 0 20px;
}

.ava-vplayer-wrap .video-player {
  margin-bottom: 0;
  border-radius: 20px;
  border: 1px solid rgba(148, 178, 255, 0.14);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(47, 107, 255, 0.10);
  background: #05080f;
}

.ava-vplayer-cap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ava-tv-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), #7A4DFF);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: .2px;
}

.ava-tv-dur {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 20px;
  font-variant-numeric: tabular-nums;
}

.ava-tv-hosted {
  background: rgba(57, 196, 142, 0.14);
  border: 1px solid rgba(57, 196, 142, 0.4);
  color: var(--success);
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 20px;
}

.ava-vposter { border-radius: 20px; overflow: hidden; }

/* --- سربرگ تک‌ویدیو + چیپ‌ها --- */
.ava-vhead { margin: 4px 0 8px; }

.ava-vtitle {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.5;
  margin: 0;
  color: var(--text-primary);
}

/* --- شرح محتوا (ویدیو/گالری) --- */
.media-desc {
  position: relative;
  margin-top: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  padding: 18px 20px 8px;
}

.media-desc::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 20px;
  width: 44px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--accent), #7A4DFF);
}

.media-desc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  margin: 0 0 10px;
  color: var(--text-primary);
}

.media-desc-title span {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--accent);
  transform: rotate(45deg);
  display: inline-block;
}

.media-desc-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.9;
}

.media-desc-body p { margin: 0 0 12px; }

/* --- اشتراک‌گذاری دایره‌ای --- */
.ava-vshare {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 0;
  border-top: 1px dashed var(--border-color);
  flex-wrap: wrap;
}

.ava-vshare-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-inline-end: 4px;
}

.share-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), filter var(--transition);
}

.share-round:hover { transform: translateY(-3px); filter: brightness(1.12); }

.share-round.tg { background: #229ED9; }
.share-round.wa { background: #25D366; }
.share-round.x  { background: #14171A; border-color: rgba(255,255,255,.18); }
.share-round.copy { background: var(--bg-card); border-color: var(--border-hover); color: var(--text-primary); font-size: 1rem; }
.share-round.copy.copied { background: rgba(57, 196, 142, 0.2); color: var(--success); border-color: rgba(57, 196, 142, 0.5); }

.ava-vshare-hint {
  color: var(--success);
  font-size: 0.8rem;
}

/* --- نوار ویدیوهای مرتبط --- */
.vstrip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.vstrip-item {
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: block;
}

.vstrip-item:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 107, 255, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.vstrip-item .video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05080f;
}

.vstrip-item .video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.vstrip-item:hover .video-thumb img { transform: scale(1.05); }

.vstrip-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at center, #16233d 0%, #0a1120 75%);
}

.vstrip-item .mini-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(47, 107, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  z-index: 2;
  box-shadow: 0 0 0 7px rgba(47, 107, 255, 0.2);
  transition: transform var(--transition);
}

.vstrip-item:hover .mini-play { transform: translate(-50%, -50%) scale(1.1); }

.dur-badge.on-item { top: 10px; bottom: auto; z-index: 3; }
.dur-badge.on-item.big { font-size: 0.85rem; padding: 5px 12px; border-radius: 8px; }

.vstrip-item .video-item-body { padding: 12px 14px 14px; }

.vstrip-item h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.vstrip-item .meta {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.vstrip-item .meta span { display: inline-flex; align-items: center; gap: 5px; }

/* --- کارت ویژه (تازه‌ترین ویدیو / گالری) --- */
.ava-mfeat {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  margin: 6px 0 34px;
  box-shadow: var(--shadow);
}

.ava-mfeat-thumb {
  position: relative;
  display: block;
  min-height: 320px;
  overflow: hidden;
}

.ava-mfeat-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.ava-mfeat-thumb:hover img { transform: scale(1.045); }

.ava-mfeat-thumb .thumb-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  color: rgba(255, 255, 255, 0.4);
  background: radial-gradient(circle at center, #16233d 0%, #0a1120 75%);
}

.ava-mfeat-thumb .media-fallback { aspect-ratio: auto; }

.play-overlay.big {
  width: 68px;
  height: 68px;
  font-size: 1.5rem;
}

.ava-mfeat-flag {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: rgba(255, 77, 87, 0.92);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(255, 77, 87, 0.35);
}

.ava-mfeat.gal .ava-mfeat-flag { background: rgba(57, 196, 142, 0.94); box-shadow: 0 6px 18px rgba(57, 196, 142, 0.3); }

.ava-mfeat-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.ava-mfeat-title {
  margin: 10px 0 8px;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.55;
}

.ava-mfeat-title a { color: var(--text-primary); text-decoration: none; }
.ava-mfeat-title a:hover { color: var(--accent-hover, var(--accent)); }

.ava-mfeat-excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.9;
}

.ava-mfeat .count-badge.big {
  font-size: 0.9rem;
  padding: 7px 16px;
  bottom: 14px;
  top: auto;
}

/* --- هرو تک‌گالری --- */
.ava-ghero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  margin: 18px 0 20px;
  border: 1px solid rgba(148, 178, 255, 0.14);
  box-shadow: var(--shadow);
}

.ava-ghero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.ava-ghero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 17, 32, 0.15) 30%, rgba(10, 17, 32, 0.92) 100%),
    radial-gradient(500px 200px at 80% 0%, rgba(47, 107, 255, 0.25), transparent 60%);
}

.ava-ghero-content {
  position: relative;
  z-index: 1;
  padding: 26px 28px 24px;
  width: 100%;
}

.ava-ghero-title {
  margin: 10px 0 0;
  font-size: clamp(1.35rem, 3.4vw, 2.1rem);
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.ava-ghero .post-cat.on-hero {
  display: inline-block;
  background: rgba(57, 196, 142, 0.2);
  border: 1px solid rgba(57, 196, 142, 0.45);
  color: #7BE3B5;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* شماره روی بندانگشتی‌های گالری */
.gal-thumb-btn { position: relative; }

.gal-thumb-num {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

/* --- کارت‌های آرشیو: متای خلاقانه + هاور --- */
.media-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.media-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.media-meta .meta-views { color: var(--accent-hover, var(--accent)); }

.media-card .news-card-thumb { overflow: hidden; }

.media-card.gal-card .news-card-thumb { position: relative; }

.gal-open-hint {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 26px 12px 10px;
  text-align: center;
  color: #fff;
  font-size: 0.82rem;
  background: linear-gradient(180deg, transparent, rgba(10, 17, 32, 0.88));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.media-card.gal-card .news-card-thumb:hover .gal-open-hint {
  opacity: 1;
  transform: translateY(0);
}

.gallery-preview.feat {
  display: flex;
  gap: 8px;
}

.gallery-preview.feat .gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-hover);
}

.media-card .news-card-thumb:hover img { transform: scale(1.05); }
.media-card .news-card-thumb img { transition: transform .5s ease; }

/* --- فرم‌های رسانه پنل‌ها: سوییچ منبع + نوار پیشرفت --- */
.ava-src-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 6px;
  margin-top: 8px;
}

.ava-src-toggle .src-btn {
  flex: 1 1 180px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.ava-src-toggle .src-btn:hover { color: var(--text-primary); }

.ava-src-toggle .src-btn.active {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 107, 255, 0.3);
}

.ava-progress {
  position: relative;
  margin-top: 10px;
  height: 22px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.ava-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7A4DFF);
  transition: width .25s ease;
}

.ava-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  font-variant-numeric: tabular-nums;
}

/* --- واکنش‌گرا --- */
@media (max-width: 860px) {
  .ava-mfeat { grid-template-columns: 1fr; }
  .ava-mfeat-thumb { min-height: 220px; aspect-ratio: 16 / 9; }
  .ava-mfeat-body { padding: 18px 18px 22px; }
  .ava-ghero { min-height: 280px; }
  .ava-mhero { padding: 30px 0 26px; }
  .ava-mhero-title { font-size: 1.35rem; }
  .ava-mhero-play { width: 46px; height: 46px; font-size: 1.1rem; }
}

@media (max-width: 520px) {
  .media-meta-chips .mchip { padding: 6px 11px; font-size: 0.78rem; }
  .ava-ghero-content { padding: 18px 16px 16px; }
  .vstrip { grid-auto-columns: minmax(200px, 78%); }
}

/* --- حالت روشن: هرو و چیپ‌ها --- */
.theme-light .ava-mhero {
  background:
    radial-gradient(900px 260px at 85% -40%, rgba(37, 99, 235, 0.14), transparent 60%),
    linear-gradient(180deg, #ffffff, #f4f6fa);
}

.theme-light .ava-mhero .kicker.on-hero { color: var(--accent); }

.theme-light .media-meta-chips.on-hero .mchip,
.theme-light .ava-ghero-content .media-meta-chips .mchip {
  background: rgba(15, 23, 42, 0.6);
  color: rgba(255, 255, 255, 0.88);
}

.theme-light .ava-ghero-title { color: #fff; }

/* ==========================================================================
   v2.15 — تصویر شاخص در هیرو + لینک ترکر + مدیریت کاربران
   ========================================================================== */

/* --- هیرو با عکس خبر --- */
.hero-main .hero-bg.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* روکش تیرهٔ خوانایی روی عکس — اسکریم یکنواخت + گرادیان سنگین‌تر در پایین */
.hero-main .hero-bg.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.42)),
    linear-gradient(to top,
              rgba(2, 6, 23, 0.95) 0%,
              rgba(2, 6, 23, 0.72) 50%,
              rgba(2, 6, 23, 0.42) 100%);
}

body.theme-light .hero-main .hero-bg.has-image::after {
  background:
    linear-gradient(rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.46)),
    linear-gradient(to top,
              rgba(2, 6, 23, 0.95) 0%,
              rgba(2, 6, 23, 0.76) 50%,
              rgba(2, 6, 23, 0.46) 100%);
}

.hero-main.has-image .hero-content {
  text-shadow: 0 1px 14px rgba(2, 6, 23, 0.55);
}

.hero-main.has-image .hero-content,
.hero-main.has-image .hero-content a {
  color: #fff;
}

.hero-main.has-image .hero-meta {
  color: rgba(255, 255, 255, 0.82);
}

.hero-main.has-image .hero-badge {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}

/* کارت‌های کناری هیرو با عکس شاخص */
.side-card.has-image {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 118px;
  align-items: stretch;
}

.side-card .side-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.45s ease;
}

.side-card.has-image:hover .side-card-img {
  transform: scale(1.05);
}

/* لایهٔ تیرهٔ خوانایی کارت عکس‌دار */
.side-card.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.93) 0%, rgba(2, 6, 23, 0.68) 55%, rgba(2, 6, 23, 0.5) 100%);
}

.side-card.has-image .side-card-body {
  position: relative;
  z-index: 2;
  padding: 14px 16px;
  align-self: flex-end;
  width: 100%;
}

.side-card.has-image .side-card-body h3,
.side-card.has-image .side-card-body .meta {
  color: #fff;
}

.side-card.has-image .side-card-body .meta {
  color: rgba(255, 255, 255, 0.75);
}

/* --- ترکر: متن اخبار کلیک‌پذیر --- */
.tick-track a {
  color: inherit;
  text-decoration: none;
}

.tick-track a b {
  font-weight: inherit;
  transition: color 0.2s ease;
}

.tick-track a:hover b {
  color: var(--accent, #3b82f6);
  text-decoration: underline;
}

/* --- پنل: ابزار گروهی دسته‌ها و انتخاب ردیف‌ها --- */
.ava-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
}

.ava-bulk-bar .form-group {
  margin: 0;
  min-width: 170px;
}

.ava-bulk-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ==========================================================================
   v2.27 — لیست اخبار: یکسان‌سازی فیلترها + تب زبان‌ها + صفحه‌بندی
   ==========================================================================
   قاعده: همهٔ کنترل‌های فیلتر لیست (input/select/datetime/دکمه) ارتفاع ۴۲px و
   فونت ۰.۹rem دارند؛ inline style های قدیمی حذف و به همین بلاک منتقل شد. */

/* --- فیلتر لیست: همهٔ فرزندان هم‌ارتفاع و هم‌فونت --- */
/* (v2.27: قاعدهٔ پایهٔ گرید از inline CSS ‏editorial-tools.php به اینجا منتقل شد — تک‌منبع) */
.ava-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  align-items: end;
}

.ava-filter-bar .form-group {
  margin: 0;
}

.ava-filter-bar .form-control {
  height: 42px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.ava-filter-bar .btn-primary {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  justify-content: center;
  border: 1px solid var(--accent);
  cursor: pointer;
}

/* دکمهٔ «پاک کردن» هم‌قوارهٔ بقیه — استایل ثانویه حاشیه‌دار */
.ava-filter-bar .btn-sm {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* گروه‌های تاریخ شمسی: بستر نسبت‌دار برای پاپ‌آپ تقویم */
.ava-filter-bar .fg-jdate {
  position: relative;
}

.ava-filter-bar .fg-jdate-hint {
  font-weight: 400;
  opacity: 0.7;
}

/* --- نوار ابزار گروهی: هم‌قواره با فیلتر لیست --- */
.ava-bulk-bar .form-control {
  height: 42px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.ava-bulk-bar .form-group label {
  font-size: 0.82rem;
  font-weight: 600;
}

.ava-bulk-bar .btn-sm {
  height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ava-bulk-bar .ava-bulk-count-wrap {
  min-width: auto;
  align-self: center;
}

.ava-bulk-bar .ava-bulk-count-wrap .text-muted {
  font-size: 0.82rem;
  white-space: nowrap;
}

/* --- تب زبان‌ها (v2.27) --- */
.ava-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ava-lang-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  transition: all var(--transition);
}

.ava-lang-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.ava-lang-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.ava-lang-tab-flag {
  font-size: 1rem;
  line-height: 1;
}

/* --- شمارندهٔ نتایج (v2.27) --- */
.ava-list-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -2px 0 12px;
}

/* --- صفحه‌بندی لیست (v2.27) --- */
.dash-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.dash-pagination .pg-nav,
.dash-pagination .pg-num,
.dash-pagination .pg-dots {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
}

.dash-pagination .pg-dots {
  border: none;
  min-width: auto;
  padding: 0 2px;
  color: var(--text-muted);
}

.dash-pagination a.pg-nav:hover,
.dash-pagination a.pg-num:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.dash-pagination .pg-num.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.dash-pagination .pg-nav.disabled {
  opacity: 0.38;
  pointer-events: none;
}

@media (max-width: 768px) {
  .dash-pagination .pg-nav,
  .dash-pagination .pg-num {
    min-width: 42px;
    height: 42px;
  }
}

/* --- پنل: نشان نقش کاربران --- */
.ava-role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.ava-role-badge.reporter {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}

.ava-role-badge.editor {
  background: rgba(234, 179, 8, 0.16);
  color: #facc15;
}

/* --- پنل: انتخاب همه دسته‌ها در فرم خبر --- */
.ava-cat-check.is-parent {
  font-weight: 700;
}

.ava-cat-tree .ava-cat-check input {
  margin-inline-end: 6px;
}

/* اسکین فیروزه — تم روشن: عنوان هیروی عکس‌دار باید سفید بماند */
body.ava-skin-firuzeh.theme-light .hero-main.has-image .hero-title,
body.ava-skin-firuzeh.theme-light .hero-main.has-image .hero-content a {
  color: #fff !important;
}

/* ==========================================================================
   صفحه ورود (v2.17) — Login page
   ========================================================================== */
.login-shell {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 64px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 28px 26px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.5px;
  flex: 0 0 auto;
}

.login-site {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.login-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.login-sub {
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.login-msg {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.8;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.login-msg.is-error {
  background: rgba(255, 77, 87, 0.12);
  border-color: rgba(255, 77, 87, 0.35);
  color: var(--danger);
}

.login-msg.is-ok {
  background: rgba(57, 196, 142, 0.12);
  border-color: rgba(57, 196, 142, 0.35);
  color: var(--success);
}

.login-field {
  margin-bottom: 14px;
}

.login-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.login-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 14px;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-pass-wrap {
  position: relative;
}

.login-pass-wrap .login-input {
  padding-inline-end: 46px;
}

.login-pass-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.login-pass-toggle:hover,
.login-pass-toggle.is-on {
  color: var(--accent);
  background: var(--accent-soft);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 4px 0 18px;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.login-btn {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.login-btn:hover {
  background: var(--accent-hover);
}

.login-btn:active {
  transform: translateY(1px);
}

.login-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.8rem;
}

.login-links a {
  color: var(--accent);
  text-decoration: none;
}

.login-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}


.ava-hp-field {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .login-shell {
    padding: 28px 12px 48px;
  }
  .login-card {
    padding: 26px 20px 22px;
  }
}

/* ==========================================================================
   پاپ‌آپ ورود (v2.18) — Login modal
   ========================================================================== */
.ava-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ava-modal-backdrop[hidden] {
  display: none !important;
}

.ava-modal {
  position: relative;
  max-width: 400px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: 0;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card, #0f172a);
  color: var(--text-primary, #e5e7eb);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: avaModalIn 0.25s ease;
}

/* کارت ورود/ثبت‌نام ظاهر خودش را حفظ می‌کند — پس از بلوک .ava-modal بازنویسی می‌شود */
.login-card {
  max-width: 420px;
  padding: 32px 28px 26px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ava-modal-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.ava-modal-close:hover {
  color: var(--danger);
  background: rgba(255, 77, 87, 0.12);
}

body.ava-modal-open {
  overflow: hidden;
}

.login-btn.is-loading {
  opacity: 0.7;
  cursor: wait;
}

@keyframes avaModalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  .ava-modal-backdrop {
    padding: 12px;
  }
  .ava-modal {
    max-width: 100%;
  }
  .login-card {
    padding: 26px 20px 22px;
  }
}

/* ==========================================================================
   v2.19 — بهینه‌سازی هیرو برای تم روشن + منوی ناوبری
   ========================================================================== */

/* --- هیرو بدون عکس در تم روشن: پس‌زمینهٔ زنده‌تر و متن پرکنتراست --- */
body.theme-light .hero-main .hero-bg {
  background:
    radial-gradient(ellipse at 22% 8%, rgba(37, 99, 235, 0.16), transparent 55%),
    radial-gradient(ellipse at 85% 95%, rgba(99, 102, 241, 0.11), transparent 52%),
    linear-gradient(160deg, #eaf1fb 0%, #f6f9fe 55%, #e8eef8 100%);
}

body.theme-light .hero-main {
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.09);
}

/* بج‌های دسته در هیروی بدون عکس — رنگ‌های پررنگ‌تر برای خوانایی روی زمینهٔ روشن */
body.theme-light .hero-badge.political {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

body.theme-light .hero-badge.economy {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

body.theme-light .hero-badge.sport {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

body.theme-light .hero-badge.special {
  background: rgba(202, 138, 4, 0.16);
  color: #a16207;
}

/* --- هیرو با عکس در تم روشن: اسکریم روشن‌تر و شادتر (متن سفید با گرادیان پایین محافظت می‌شود) --- */
body.theme-light .hero-main .hero-bg.has-image::after {
  background:
    linear-gradient(rgba(15, 23, 42, 0.30), rgba(15, 23, 42, 0.30)),
    linear-gradient(to top,
              rgba(2, 6, 23, 0.92) 0%,
              rgba(2, 6, 23, 0.62) 48%,
              rgba(15, 23, 42, 0.28) 100%);
}

body.theme-light .hero-main.has-image {
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
  border-color: rgba(15, 23, 42, 0.06);
}

body.theme-light .hero-main.has-image .hero-content {
  text-shadow: 0 1px 16px rgba(2, 6, 23, 0.65);
}

/* بج روی عکس در تم روشن: کپسول سفید نیمه‌شفاف با متن سفید — هماهنگ با تم روشن */
body.theme-light .hero-main.has-image .hero-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

/* --- کارت‌های کناری با عکس در تم روشن --- */
body.theme-light .side-card.has-image::after {
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.55) 55%, rgba(15, 23, 42, 0.22) 100%);
}

body.theme-light .side-card.has-image {
  border-color: rgba(15, 23, 42, 0.06);
}

body.theme-light .side-card.has-image:hover {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
}

/* بج دسته روی کارت عکس‌دار در تم روشن */
body.theme-light .side-card.has-image .hero-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

/* --- کارت‌های بدون عکس در تم روشن: نرم‌تر --- */
body.theme-light .side-card {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

body.theme-light .side-card:hover {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
}

/* ==========================================================================
   v2.22 — بهینه‌سازی موبایل بر اساس audit رسپانسیو
   (اسکرول افقی، زوم iOS، تایپوگرافی تک‌خبر، لمس‌پذیری، جدول‌های پنل)
   ========================================================================== */

/* ─── جلوگیری از اسکرول افقی تصادفی در سطح سند ───
   clip در مرورگرهای مدرن: بدون ساختن scroll container جدید → position:sticky سالم می‌ماند */
html {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html {
    overflow-x: clip;
  }
}

/* ─── جلوگیری از زوم خودکار Safari/iOS هنگام فوکوس فرم‌ها ───
   Safari اگر font-size فیلد کمتر از 16px باشد موقع فوکوس زوم می‌کند
   (html پایه 15px است، بنابراین همهٔ فیلدها زیر 16px بودند) */
@media (max-width: 768px) {
  .form-control,
  .login-input,
  .sp-input,
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="url"],
  input[type="datetime-local"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ─── تایپوگرافی بدنهٔ تک‌خبر در موبایل ─── */
@media (max-width: 600px) {
  .single-post .post-content {
    font-size: 1.07rem; /* ≈16px با پایهٔ 15px */
    line-height: 1.95;
  }

  .single-post .post-content p {
    margin-bottom: 14px;
  }
}

/* ─── هدف لمسی دکمه‌های کوچک در موبایل (~44px استاندارد لمس) ─── */
@media (max-width: 768px) {
  .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.85rem;
    border-radius: 9px;
  }
}

/* ─── تب‌های تنظیمات در موبایل: یک ردیف اسکرول افقی به‌جای چند ردیف شلوغ ─── */
@media (max-width: 768px) {
  .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .settings-tabs::-webkit-scrollbar {
    display: none;
  }

  .settings-tabs .btn-sm {
    flex: 0 0 auto;
  }
}

/* ─── جدول‌های پنل در موبایل: هر ردیف به یک کارت تبدیل می‌شود ───
   data-label ها هنگام بارگذاری توسط main.js از سرستون‌ها پر می‌شوند */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: visible;
  }

  .dash-table thead {
    display: none;
  }

  .dash-table,
  .dash-table tbody,
  .dash-table tr,
  .dash-table td {
    display: block;
    width: 100%;
  }

  .dash-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    padding: 4px 14px;
  }

  .dash-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    text-align: start;
  }

  /* سلول‌های فرمی: برچسب بالا، فیلد تمام‌عرض زیرش */
  .dash-table td .form-control,
  .dash-table td select,
  .dash-table td textarea {
    flex: 1 1 100%;
    min-width: 0;
  }

  .dash-table td .btn-sm {
    flex: 0 0 auto;
  }

  .dash-table td:last-child {
    border-bottom: 0;
  }

  .dash-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    padding-top: 2px;
  }

  .dash-table td strong {
    font-size: 1rem;
  }
}

/* ==========================================================================
   v2.23 — کلید ترجمهٔ خودکار + پیش‌نمایش ترجمه در لیست اخبار
   ========================================================================== */

/* ─── سوئیچ روشن/خاموش (پنل) ─── */
.ava-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.ava-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ava-switch-track {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  transition: background 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.ava-switch-track::before {
  content: '';
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.25s ease, background 0.25s ease;
}

.ava-switch input:checked + .ava-switch-track {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.5);
}

.ava-switch input:checked + .ava-switch-track::before {
  transform: translateX(-22px); /* RTL */
  background: #4ade80;
}

[dir="ltr"] .ava-switch input:checked + .ava-switch-track::before {
  transform: translateX(22px);
}

.ava-switch input:focus-visible + .ava-switch-track {
  outline: 2px solid var(--accent, #2F6BFF);
  outline-offset: 2px;
}

.ava-auto-tr-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ava-auto-tr-txt b {
  display: block;
  margin-bottom: 4px;
}

.ava-auto-tr-txt p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.9;
  max-width: 560px;
}

/* ─── مودال پیش‌نمایش ترجمه ─── */
.ava-trmodal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ava-trmodal[hidden] {
  display: none;
}

body.ava-trmodal-open {
  overflow: hidden;
}

.ava-trmodal-box {
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow, 0 24px 60px rgba(0, 0, 0, 0.5));
  overflow: hidden;
}

.ava-trmodal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.ava-trmodal-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.ava-trmodal-lang {
  font-weight: 700;
}

.ava-trmodal-x {
  margin-inline-start: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s;
}

.ava-trmodal-x:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.ava-trmodal-src {
  padding: 10px 18px;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.86rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.ava-trmodal-src-lbl {
  color: var(--text-muted);
  flex-shrink: 0;
}

.ava-trmodal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}

.ava-trmodal-empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 2;
}

.ava-trmodal-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.ava-trmodal-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

.ava-trmodal-content {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--text-secondary);
}

.ava-trmodal-content p {
  margin-bottom: 12px;
}

.ava-trmodal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.ava-trmodal-content h1,
.ava-trmodal-content h2,
.ava-trmodal-content h3 {
  color: var(--text-primary);
  margin: 18px 0 10px;
}

.ava-trmodal-content a {
  color: var(--accent, #4D8DFF);
}

.ava-trmodal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.ava-trmodal-foot-space {
  flex: 1;
}

@media (max-width: 600px) {
  .ava-trmodal {
    padding: 12px;
  }

  .ava-trmodal-box {
    max-width: 100%;
    max-height: calc(100vh - 24px);
  }

  .ava-trmodal-head,
  .ava-trmodal-src,
  .ava-trmodal-body,
  .ava-trmodal-foot {
    padding-inline: 14px;
  }
}
/* ═══════════════════════════════════════════════════════════════════
   v2.24 — انتشار در شبکه‌های اجتماعی (view-social + tab-social_channels)
   ═══════════════════════════════════════════════════════════════════ */
.soc-search-results {
  margin-top: 8px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  max-height: 260px;
  overflow: auto;
}
.soc-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: start;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  font: inherit;
  color: var(--text-primary);
}
.soc-search-item:last-child { border-bottom: 0; }
.soc-search-item:hover { background: var(--bg-card-hover); }
.soc-search-meta { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.soc-search-empty { padding: 10px 12px; color: var(--text-muted); font-size: 0.85rem; }
.soc-preview {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 64px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.ava-soc-results { display: flex; flex-direction: column; gap: 8px; }
.ava-soc-result {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
}
.ava-soc-result.ok   { background: rgba(34, 197, 94, 0.12); }
.ava-soc-result.err  { background: rgba(239, 68, 68, 0.12); }
.ava-soc-result.skip { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }
.ava-soc-result-plat { font-weight: 700; min-width: 72px; }
.status-badge.soc-sent    { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.status-badge.soc-partial { background: rgba(245, 158, 11, 0.16); color: #d97706; }
.status-badge.soc-failed  { background: rgba(239, 68, 68, 0.14); color: #dc2626; }
.status-badge.soc-draft   { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); }
@media (max-width: 768px) {
  .ava-soc-result { align-items: flex-start; }
  .soc-search-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ==========================================================================
   v2.34 — پروفایل حرفه‌ای خبرنگاران
   (وضعیت‌ها، تب‌های فیلتر، جدول، مودال پروفایل، برگهٔ ثبت‌نام)
   ========================================================================== */

/* --- بج‌های وضعیت خبرنگار --- */
.status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status-badge.blocked {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}

/* --- هشدار ثبت‌نام در انتظار تایید --- */
.rep-pending-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--warning);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

/* --- تب‌های فیلتر وضعیت --- */
.rep-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.rep-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.rep-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.rep-tab.is-on {
  background: var(--accent-soft);
  border-color: rgba(47, 107, 255, 0.4);
  color: var(--accent-hover);
}

.rep-count {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}

/* --- سلول خبرنگار در جدول --- */
.rep-cell-reporter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.rep-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-input);
}

.rep-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rep-avatar-sm {
  width: 36px;
  height: 36px;
}

.rep-cell-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rep-cell-txt strong {
  font-size: 0.9rem;
}

.rep-cell-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.rep-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rep-editors-title {
  margin: 22px 0 10px;
  font-size: 1rem;
}

/* --- مودال پروفایل --- */
.rep-modal-shell {
  width: 100%;
  max-width: 560px;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.rep-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.rep-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline-end: 40px;
}

.rep-head .rep-avatar {
  width: 56px;
  height: 56px;
}

.rep-head-txt {
  flex: 1;
  min-width: 0;
}

.rep-name {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.rep-head-sub {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rep-username {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rep-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
}

.rep-facts > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rep-facts dt {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.rep-facts dd {
  margin: 0;
  font-size: 0.85rem;
  word-break: break-word;
}

.rep-bio {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border-inline-start: 3px solid var(--accent);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.rep-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.rep-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  text-align: center;
}

.rep-stat b {
  font-size: 1.05rem;
  color: var(--text-primary);
}

.rep-stat span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.rep-note-box {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 0.85rem;
  color: #f87171;
}

.rep-note-wrap {
  margin-top: 14px;
}

.rep-note-wrap label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.rep-note-wrap textarea {
  width: 100%;
  resize: vertical;
}

.rep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.rep-ok-hint {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--success);
}

.rep-modal-msg {
  margin-top: 10px;
}

.rep-modal-msg .alert {
  margin: 0;
}

/* --- برگهٔ ثبت‌نام خبرنگار --- */
.login-card-wide {
  max-width: 720px;
}

.reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.login-opt {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.reg-form .req {
  color: var(--danger);
}

.reg-textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.8;
  font-family: inherit;
}

.reg-have {
  color: var(--text-muted);
}

.reg-success {
  text-align: center;
}

.reg-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.reg-status-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.reg-status-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.rep-logout-link {
  color: var(--danger);
}

@media (max-width: 640px) {
  .reg-grid {
    grid-template-columns: 1fr;
  }
  .rep-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .rep-facts {
    grid-template-columns: 1fr;
  }
  .rep-head {
    flex-wrap: wrap;
  }
  .rep-cell-sub {
    max-width: 160px;
  }
}

/* ============================================================
   v2.35 — عکس پرسنلی خبرنگار (عکس پروفایل) + سلکت استان/شهر ایران
   ============================================================ */

.reg-photo-field {
  margin-top: 20px;
}

.reg-photo-caption {
  display: block;
  margin-bottom: 10px;
}

.reg-photo-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.reg-photo-circle {
  flex: 0 0 auto;
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 2px dashed var(--border-color);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.reg-photo-circle:hover {
  border-color: var(--accent);
}

.reg-photo-circle.is-set {
  border-style: solid;
  border-color: var(--accent);
}

.reg-photo-circle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reg-photo-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
}

.reg-photo-ph svg {
  width: 28px;
  height: 28px;
}

.reg-photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.reg-photo-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.reg-photo-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reg-photo-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.reg-photo-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reg-photo-del {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.reg-photo-del:hover {
  background: rgba(239, 68, 68, 0.1);
}

.reg-photo-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.reg-photo-msg {
  margin: 0;
  font-size: 0.78rem;
  color: var(--danger);
}

.reg-form select.login-input {
  cursor: pointer;
}

.reg-form select.login-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* عکس پرسنلی خبرنگار در مودال پروفایل — قاب بزرگ‌تر و دایره‌ای */
.rep-head .rep-avatar.is-photo {
  width: 72px;
  height: 72px;
  border: 2px solid var(--border-color);
}

@media (max-width: 640px) {
  .reg-photo-picker {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   v2.37 — سطح‌بندی خبرنگار (A/B) + مودال مشاهدهٔ آیتم
   ========================================================================== */
/* بج سطح ارسال خبرنگار */
.ava-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ava-level-badge.level-a {
  background: rgba(57, 196, 142, 0.14);
  color: var(--success, #39C48E);
  border-color: rgba(57, 196, 142, 0.4);
}
.ava-level-badge.level-b {
  background: rgba(245, 176, 66, 0.14);
  color: var(--warning, #F5B042);
  border-color: rgba(245, 176, 66, 0.4);
}

/* نوار سطح در پنل خبرنگار */
.ava-level-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* مودال مشاهدهٔ آیتم — از قاب .ava-modal-backdrop/.ava-modal مشترک استفاده می‌کند */
.ava-preview-modal {
  width: min(720px, 94vw);
  max-width: min(720px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 24px 22px 20px;
}
.ava-preview-modal h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.7;
}
.ava-preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.ava-preview-meta .pv-chip {
  display: inline-flex;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
}
.ava-preview-media {
  margin-bottom: 14px;
}
.ava-preview-media video {
  width: 100%;
  max-height: 340px;
  border-radius: 10px;
  background: #000;
  display: block;
}
.ava-preview-thumb {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.ava-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.ava-preview-grid img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  border: 1px solid var(--border-color);
}
.ava-preview-body {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  font-size: 0.92rem;
  line-height: 2;
  color: var(--text-primary, inherit);
  max-height: 46vh;
  overflow: auto;
}
.ava-preview-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.ava-preview-excerpt {
  padding: 10px 14px;
  border-inline-start: 3px solid var(--accent, #2F6BFF);
  background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .ava-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }
  .ava-level-note {
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   v2.38 — اتصال اپ تحریریه
   (QR داخلی، کد جفت‌سازی، شمارش معکوس، فهرست دستگاه‌ها)
   ========================================================================== */

.app-qr-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  display: inline-block;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.app-qr-box #ava-app-qr {
  width: 180px;
  height: 180px;
}

.app-pair-field {
  margin: 10px 0;
}

.app-pair-field > label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.app-pair-value {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-pair-value b,
.app-pair-value code {
  font-size: 1.05rem;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 6px 12px;
  letter-spacing: 1px;
}

.app-pair-value code {
  font-size: 0.9rem;
  word-break: break-all;
}

.app-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
  border-radius: 10px;
  padding: 4px 12px;
}

.ava-alert {
  border-radius: var(--radius-sm, 10px);
  padding: 10px 14px;
  font-size: 0.88rem;
  margin: 6px 0;
}

.ava-alert.ok {
  background: rgba(34, 197, 94, 0.13);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.ava-alert.err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* بج وضعیت دستگاه (نام‌های مستعار مختص اپ) */
.status-badge.st-active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status-badge.st-blocked {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}


/* v2.39.2 — آیکن شناور مجوزها (هم‌اندازه دکمه برو بالا) */
.ava-float-licenses,
.ava-float-licenses.to-top-sized {
  position: fixed;
  bottom: 86px;
  inset-inline-end: 26px;
  z-index: 69;
  width: 47px;
  height: 47px;
  padding: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(13, 22, 40, 0.92);
  border: 1px solid var(--line, var(--border-color));
  color: var(--muted, var(--text-secondary));
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(2, 8, 22, 0.5);
  transition: 0.3s;
  backdrop-filter: blur(8px);
  overflow: visible;
}
.ava-float-licenses .ava-float-lic-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.ava-float-licenses .ava-float-lic-label {
  position: absolute;
  inset-inline-end: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13, 22, 40, 0.95);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid var(--line, var(--border-color));
}
.ava-float-licenses:hover {
  color: #fff;
  border-color: var(--accent, #2F6BFF);
  background: var(--accent, #2F6BFF);
  transform: translateY(-2px);
}
.ava-float-licenses:hover .ava-float-lic-label {
  opacity: 1;
}
body.theme-light .ava-float-licenses {
  background: rgba(255, 255, 255, 0.95);
  color: #475569;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}
body.theme-light .ava-float-licenses:hover {
  color: #fff;
  background: var(--accent, #2563eb);
  border-color: var(--accent, #2563eb);
}
body.theme-light .ava-float-licenses .ava-float-lic-label {
  background: #fff;
  color: #0f172a;
}
@media (max-width: 600px) {
  .ava-float-licenses {
    bottom: 80px;
    inset-inline-end: 16px;
  }
}


/* کپی‌رایت فوتر — یک ردیف مرتب و ظریف */
.ft-bottom {
  border-top: 1px solid var(--line, var(--border-color));
  padding: 18px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.ft-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  max-width: 920px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--faint, var(--text-muted));
}
.ft-bottom .ft-copy {
  color: var(--faint, var(--text-muted));
}
.ft-bottom .ft-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint, var(--text-muted));
  opacity: 0.45;
  flex-shrink: 0;
}
.ft-bottom .ft-credit a {
  color: var(--muted, var(--text-secondary));
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.ft-bottom .ft-credit a:hover {
  color: var(--accent, #2F6BFF);
}
@media (max-width: 600px) {
  .ft-bottom {
    padding: 16px 16px 20px;
  }
  .ft-bottom .ft-sep {
    display: none;
  }
  .ft-bottom-inner {
    flex-direction: column;
    gap: 6px;
  }
}

/* آیکن‌های SVG داخلی */
.ic, .ava-ic {
  display: inline-block;
  vertical-align: -0.2em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  color: inherit;
}
.nav-icon .ic,
.nav-icon .ava-ic {
  width: 18px;
  height: 18px;
}
.author-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.post-meta-read {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: grid;
  place-items: center;
  line-height: 0;
}
.theme-toggle .ic {
  width: 16px;
  height: 16px;
}

/* placeholder تبلیغات */
.ava-ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  width: 100%;
  border: 1px dashed var(--border-color, rgba(255,255,255,0.15));
  border-radius: 12px;
  background: var(--bg-secondary, rgba(255,255,255,0.03));
  color: var(--text-muted, #8B9BB8);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 16px;
  box-sizing: border-box;
}
.ava-ad-placeholder span {
  opacity: 0.85;
}
body.theme-light .ava-ad-placeholder {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.12);
  color: #64748b;
}
.ava-ad-slot {
  margin: 12px 0;
  text-align: center;
}
.ava-ad-sidebar .ava-ad-placeholder {
  min-height: 180px;
}
.ava-ad-header .ava-ad-placeholder,
.ava-ad-footer .ava-ad-placeholder {
  min-height: 70px;
}

.ava-ad-header,
.ava-ad-footer {
  margin: 12px auto;
  padding: 0 16px;
  max-width: 1320px;
  box-sizing: border-box;
}
.ava-ad-header .ava-ad-placeholder,
.ava-ad-footer .ava-ad-placeholder {
  min-height: 70px;
}
