/* ─── static/css/global.css ─── */

/* ─── static/css/global.css ─── */

/* ─────────────────────────────────────────────────────────
   پمپ پارت آریا — استایل اصلی   v3.0
   RTL | Vazirmatn | Premium Industrial Holding
   ───────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* ═══ ریست ═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══ توکن‌های طراحی ════════════════════════════════════ */
:root {
  --navy:         #0f1f3d;
  --navy-mid:     #182d52;
  --navy-light:   #1e3a6a;
  --navy-muted:   #2a4a7f;
  --gold:         #d4a017;
  --gold-bright:  #f0bc2e;
  --gold-dark:    #a87c10;
  --gold-glow:    rgba(212,160,23,.18);

  --bg:           #f0f2f7;
  --bg-card:      #ffffff;
  --bg-subtle:    #f7f8fc;

  --text:         #1a2744;
  --text-muted:   #6b7a99;
  --text-faint:   #a0aec0;

  --border:       #dde3f0;
  --border-light: rgba(255,255,255,.12);

  --shadow-xs: 0 1px 4px rgba(15,31,61,.06);
  --shadow-sm: 0 2px 10px rgba(15,31,61,.08);
  --shadow-md: 0 6px 28px rgba(15,31,61,.12);
  --shadow-lg: 0 16px 48px rgba(15,31,61,.18);
  --shadow-xl: 0 30px 72px rgba(15,31,61,.22);

  --radius:    10px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --ease: .22s cubic-bezier(.4,0,.2,1);
}

/* ═══ پایه ══════════════════════════════════════════════ */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a  { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ═══ هدر ════════════════════════════════════════════════ */
.main-header {
  background: var(--navy);
  height: 76px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}

.main-header::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6;
}

.header-logo { display: flex; align-items: center; gap: 14px; }

.logo-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: var(--navy);
  box-shadow: 0 2px 12px var(--gold-glow);
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text .name    { font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.logo-text .tagline { font-size: 10.5px; color: rgba(255,255,255,.38); margin-top: 1px; }

.main-nav { display: flex; align-items: center; gap: 6px; }

.main-nav > a {
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.6);
  padding: 8px 14px; border-radius: 8px;
  transition: var(--ease);
}
.main-nav > a:hover { color: #fff; background: rgba(255,255,255,.08); }

.nav-btn {
  font-size: 13px !important; font-weight: 700 !important;
  padding: 8px 18px !important; border-radius: 8px !important;
  color: #fff !important; transition: var(--ease) !important;
}
.nav-btn.btn-admin    { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); }
.nav-btn.btn-category { background: #1a6fa3; }
.nav-btn.btn-logout   { background: #a93226; }
.nav-btn.btn-login    { background: var(--gold); color: var(--navy) !important; }
.nav-btn:hover        { filter: brightness(1.12); transform: translateY(-1px); }

/* ═══ لایه‌بندی محتوا ═══════════════════════════════════ */
.main-content { max-width: 1320px; margin: 0 auto; padding: 48px 40px; }

/* ═══ هیرو ══════════════════════════════════════════════ */
.hero {
  position: relative;
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 55%, #1a4070 100%);
  border-radius: var(--radius-xl);
  padding: 80px 68px;
  margin-bottom: 60px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-text { position: relative; z-index: 2; max-width: 580px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,160,23,.15);
  border: 1px solid rgba(212,160,23,.3);
  color: #f0c840;
  font-size: 12px; font-weight: 700;
  padding: 6px 16px; border-radius: 99px;
  margin-bottom: 24px; letter-spacing: .02em;
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 900; color: #fff;
  line-height: 1.2; margin-bottom: 20px; letter-spacing: -.02em;
}
.hero h1 span { color: var(--gold-bright); }

.hero p {
  font-size: 16px; color: rgba(255,255,255,.58);
  line-height: 2; margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--radius);
  font-size: 14px; font-weight: 800; font-family: inherit;
  border: none; transition: var(--ease); cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy);
  box-shadow: 0 4px 18px rgba(212,160,23,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,160,23,.45); }
.btn-outline {
  background: rgba(255,255,255,.08); color: #fff;
  border: 1.5px solid rgba(255,255,255,.22);
}
.btn-outline:hover { background: rgba(255,255,255,.14); }

.hero-stats { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }

.stat-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 20px 28px; text-align: center; min-width: 140px;
  backdrop-filter: blur(6px); transition: var(--ease);
}
.stat-card:hover { background: rgba(255,255,255,.1); transform: translateX(-4px); }
.stat-card .number { font-size: 32px; font-weight: 900; color: var(--gold-bright); line-height: 1; margin-bottom: 5px; }
.stat-card .label  { font-size: 11px; color: rgba(255,255,255,.45); font-weight: 500; }

/* ═══ دسته‌های کلیدی ═════════════════════════════════════ */
.quick-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px; margin-bottom: 60px;
}

.qcat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 22px;
  text-align: center; box-shadow: var(--shadow-xs);
  transition: var(--ease); position: relative; overflow: hidden;
}
.qcat-card::after {
  content: ''; position: absolute; bottom: 0; right: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0); transform-origin: right; transition: var(--ease);
}
.qcat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.qcat-card:hover::after { transform: scaleX(1); }

.qcat-icon  { font-size: 42px; margin-bottom: 12px; display: block; }
.qcat-title { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 5px; }
.qcat-sub   { font-size: 12px; color: var(--text-muted); }

/* ═══ سکشن ══════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px;
}
.section-title {
  font-size: 22px; font-weight: 900; color: var(--navy);
  display: flex; align-items: center; gap: 12px;
}
.section-title::before {
  content: ''; display: block; width: 5px; height: 28px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dark)); border-radius: 3px;
}

/* ═══ گرید ══════════════════════════════════════════════ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; }

/* ═══ کارت برند ══════════════════════════════════════════ */
.brand-card {
  background: var(--bg-card); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); transition: var(--ease);
  display: flex; flex-direction: column;
}
.brand-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }

.brand-card-image {
  height: 210px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-subtle);
}
.brand-card-image img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 24px; transition: transform .5s ease;
}
.brand-card:hover .brand-card-image img { transform: scale(1.08); }

.brand-card-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }
.brand-card-body h3 { font-size: 18px; font-weight: 900; color: var(--navy); margin-bottom: 8px; letter-spacing: -.01em; }
.brand-card-body p  { font-size: 13px; color: var(--text-muted); line-height: 1.85; flex: 1; }

.brand-card-footer {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.color-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(0,0,0,.08); flex-shrink: 0; }
.brand-cta {
  margin-right: auto; font-size: 12px; font-weight: 700; color: var(--text-muted);
  display: flex; align-items: center; gap: 5px; transition: var(--ease);
}
.brand-card:hover .brand-cta { color: var(--gold-dark); }

/* ═══ هدر برند ══════════════════════════════════════════ */
.brand-hero {
  border-radius: var(--radius-xl); padding: 60px 56px;
  margin-bottom: 48px; position: relative; overflow: hidden;
  min-height: 240px; display: flex; align-items: center;
}
.brand-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(0,0,0,.52) 0%, rgba(0,0,0,.18) 100%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
}

.brand-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 32px; }

.brand-logo-wrap {
  background: rgba(255,255,255,.95); border-radius: 18px; padding: 18px;
  width: 120px; height: 120px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.brand-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }

.brand-hero-text { color: white; }
.brand-hero-text h1 { font-size: 36px; font-weight: 900; margin-bottom: 10px; letter-spacing: -.02em; }
.brand-hero-text p  { font-size: 15px; color: rgba(255,255,255,.75); line-height: 1.85; }

/* ═══ کارت دسته‌بندی ═════════════════════════════════════ */
.category-card {
  background: var(--bg-card); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); transition: var(--ease);
  display: flex; flex-direction: column;
}
.category-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.category-card-image { height: 200px; overflow: hidden; background: var(--bg-subtle); }
.category-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.category-card:hover .category-card-image img { transform: scale(1.07); }
.category-card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.category-card-body h3 { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.category-card-body p  { font-size: 13px; color: var(--text-muted); line-height: 1.85; flex: 1; }

.btn-brand {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: 9px;
  font-size: 13px; font-weight: 800; font-family: inherit;
  color: white; transition: var(--ease);
  margin-top: 16px; align-self: flex-start;
  border: none; cursor: pointer; text-decoration: none;
}
.btn-brand:hover { opacity: .88; transform: translateX(-3px); box-shadow: 0 5px 16px rgba(0,0,0,.2); }
.btn-brand.disabled { opacity: .45; cursor: not-allowed; background: #95a5a6 !important; pointer-events: none; }

.admin-edit-link {
  font-size: 11px; font-weight: 700; color: var(--gold); display: inline-block; margin-bottom: 6px;
}
.admin-edit-link:hover { color: var(--gold-dark); }

/* ═══ حالت خالی ══════════════════════════════════════════ */
.empty-state { grid-column: 1/-1; text-align: center; padding: 72px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 56px; margin-bottom: 18px; opacity: .35; }
.empty-state p { font-size: 15px; }

/* ═══ فرم‌ها ══════════════════════════════════════════════ */
.form-page { max-width: 680px; margin: 0 auto; }

.form-box {
  background: var(--bg-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md); padding: 44px; border: 1px solid var(--border);
}
.form-box-header { margin-bottom: 34px; padding-bottom: 26px; border-bottom: 2px solid var(--bg); }
.form-box-header h2 { font-size: 24px; font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.form-box-header p  { font-size: 14px; color: var(--text-muted); }

.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 9px; }
.form-group label .req { color: #e53e3e; margin-right: 2px; }

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--bg-subtle); transition: var(--ease); outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--navy-muted); background: #fff;
  box-shadow: 0 0 0 4px rgba(30,58,106,.1);
}
.form-group input[type="file"] { padding: 12px 0; font-size: 13px; color: var(--text-muted); background: none; border: none; }
.form-group textarea { resize: vertical; min-height: 110px; }

.color-row { display: flex; gap: 32px; flex-wrap: wrap; }
.color-field { display: flex; flex-direction: column; gap: 8px; }
.color-preview-wrap { display: flex; align-items: center; gap: 10px; }
input[type="color"] { width: 52px; height: 44px; border: 2px solid var(--border); border-radius: 9px; cursor: pointer; padding: 2px; }

.color-hex-input {
  width: 108px; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: 9px;
  font-family: 'Courier New', monospace; font-size: 13px;
  color: var(--text); background: var(--bg-subtle);
  outline: none; direction: ltr; text-align: center; transition: var(--ease);
}
.color-hex-input:focus { border-color: var(--navy-muted); background: #fff; box-shadow: 0 0 0 4px rgba(30,58,106,.1); }
.color-hex-input.invalid { border-color: #e53e3e; box-shadow: 0 0 0 4px rgba(229,62,62,.12); }

.file-hint { font-size: 12px; color: var(--text-faint); margin-top: 7px; display: block; }

.btn-submit {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 100%);
  color: white; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: var(--ease); margin-top: 8px;
  box-shadow: 0 4px 16px rgba(15,31,61,.22);
}
.btn-submit:hover {
  background: linear-gradient(135deg, var(--navy-light) 0%, var(--navy-mid) 100%);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,31,61,.3);
}

/* ═══ آلرت‌ها ════════════════════════════════════════════ */
.alert {
  padding: 14px 18px; border-radius: var(--radius); font-size: 14px;
  font-weight: 500; margin-bottom: 24px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-error   { background: #fff5f5; color: #c0392b; border: 1px solid #fed7d7; border-right: 4px solid #c0392b; }
.alert-success { background: #f0fff4; color: #1e8e3e; border: 1px solid #c6f6d5; border-right: 4px solid #1e8e3e; }

/* ═══ صفحه احراز هویت ════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-light) 60%, #173566 100%);
  padding: 40px 20px; position: relative; overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
}
.auth-page::after {
  content: ''; position: absolute; top: -120px; left: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212,160,23,.15) 0%, transparent 70%);
  pointer-events: none;
}

.auth-box {
  position: relative; z-index: 2; background: white;
  border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
  padding: 52px 48px; width: 100%; max-width: 450px;
}
.auth-logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 38px; }
.auth-logo .icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: var(--gold);
  margin-bottom: 16px; box-shadow: 0 6px 24px rgba(15,31,61,.2);
}
.auth-logo h2 { font-size: 20px; font-weight: 900; color: var(--navy); margin-bottom: 5px; }
.auth-logo p  { font-size: 13px; color: var(--text-muted); }
.auth-divider { height: 1px; background: var(--border); margin: 28px 0; }

/* ═══ بردکرام ════════════════════════════════════════════ */
.admin-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted); margin-bottom: 30px; flex-wrap: wrap;
}
.admin-breadcrumb a { color: #2d7dd2; }
.admin-breadcrumb a:hover { text-decoration: underline; }
.admin-breadcrumb .sep { opacity: .35; }

/* ═══ لینک بازگشت ════════════════════════════════════════ */
.back-link-row { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.back-link {
  font-size: 14px; font-weight: 600; color: var(--navy-muted);
  display: inline-flex; align-items: center; gap: 7px; transition: var(--ease);
}
.back-link:hover { color: var(--gold-dark); transform: translateX(4px); }

/* ═══ فوتر ══════════════════════════════════════════════ */
.main-footer {
  background: var(--navy); margin-top: 80px;
  padding: 56px 48px 0; border-top: 1px solid rgba(255,255,255,.05);
}
.footer-grid {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand .logo-mark {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: var(--navy);
}
.footer-brand .brand-name { font-size: 16px; font-weight: 800; color: #fff; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.38); line-height: 1.9; max-width: 320px; }
.footer-col h4 {
  font-size: 12px; font-weight: 800; color: rgba(255,255,255,.4);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,.5); transition: var(--ease); }
.footer-col ul li a:hover { color: var(--gold-bright); }
.footer-bottom {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; font-size: 12px; color: rgba(255,255,255,.25);
}
.footer-bottom strong { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   بخش‌های جدید: داشبورد · وبلاگ · تماس با ما
   ═══════════════════════════════════════════════════════════ */

/* ═══ داشبورد ═══════════════════════════════════════════ */
.dashboard-page { max-width: 1200px; margin: 0 auto; }
.dashboard-header { margin-bottom: 36px; }
.dashboard-header h1 { font-size: 28px; font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.dashboard-subtitle { font-size: 14px; color: var(--text-muted); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 40px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: var(--ease);
  position: relative; overflow: hidden;
}
.stat-item::after {
  content: ''; position: absolute; bottom: 0; right: 0; left: 0; height: 3px;
  transform: scaleX(0); transform-origin: right; transition: var(--ease);
}
.stat-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-item:hover::after { transform: scaleX(1); }

.stat-visits::after { background: var(--gold); }
.stat-blog::after { background: #1a6fa3; }
.stat-brands::after { background: #2ecc71; }
.stat-cats::after { background: #8e44ad; }
.stat-msgs::after { background: #e67e22; }

.stat-has-unread { border-color: #e67e22; }
.stat-icon { font-size: 32px; flex-shrink: 0; }
.stat-info { display: flex; flex-direction: column; }
.stat-number { font-size: 28px; font-weight: 900; color: var(--navy); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

.dashboard-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dash-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-xs); }
.dash-section-title {
  font-size: 17px; font-weight: 900; color: var(--navy); margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.dash-section-title::before {
  content: ''; width: 4px; height: 22px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dark));
  border-radius: 2px;
}

.action-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px; border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: var(--ease); position: relative;
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.action-icon { font-size: 28px; }
.action-title { font-size: 14px; font-weight: 800; color: var(--navy); }
.action-desc { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.action-brands:hover { background: #f0faf0; }
.action-cats:hover { background: #f0f4ff; }
.action-blog:hover { background: #fff8e6; }
.action-contact:hover { background: #fff0e6; }
.unread-badge {
  position: absolute; top: 12px; left: 12px;
  background: #e67e22; color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 99px;
}

.visits-table { width: 100%; border-collapse: collapse; }
.visits-table th {
  text-align: right; font-size: 11px; font-weight: 700;
  color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .05em; padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}
.visits-table td { padding: 10px 0; border-bottom: 1px solid var(--bg); font-size: 13px; }
.page-slug-badge {
  display: inline-block; padding: 3px 10px; background: var(--bg-subtle);
  border-radius: 6px; font-size: 12px; font-family: monospace; direction: ltr;
  color: var(--navy-muted);
}
.empty-mini { text-align: center; padding: 24px; color: var(--text-faint); font-size: 13px; }

.recent-messages { display: flex; flex-direction: column; gap: 4px; }
.recent-msg-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  transition: var(--ease); position: relative;
}
.recent-msg-item:hover { background: var(--bg-subtle); }
.msg-unread { background: rgba(230,126,34,.04); }
.msg-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; flex-shrink: 0;
}
.msg-brief { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg-brief strong { font-size: 13px; color: var(--navy); }
.msg-brief span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-time { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.msg-unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #e67e22; flex-shrink: 0;
}

/* ═══ لیست وبلاگ ادمین ═══════════════════════════════ */
.list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.list-header h2 { font-size: 22px; font-weight: 900; color: var(--navy); }
.list-header .btn { font-size: 13px; padding: 10px 22px; }

.blog-admin-list { display: flex; flex-direction: column; gap: 12px; }
.blog-admin-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 22px;
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-xs); transition: var(--ease);
}
.blog-admin-item:hover { box-shadow: var(--shadow-sm); }
.blog-admin-thumb {
  width: 90px; height: 64px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0; background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
}
.blog-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-thumb { font-size: 28px; opacity: .3; }
.blog-admin-info { flex: 1; min-width: 0; }
.blog-admin-info h3 { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.blog-admin-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slug-badge {
  font-size: 11px; padding: 2px 8px; background: var(--bg-subtle);
  border-radius: 6px; font-family: monospace; direction: ltr; color: var(--text-muted);
}
.status-badge {
  font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 99px;
}
.status-published { background: #e6f9ee; color: #1a8a47; }
.status-draft { background: #fff5e0; color: #b8860b; }
.date-badge { font-size: 11px; color: var(--text-faint); }
.blog-admin-actions { display: flex; gap: 6px; flex-shrink: 0; }
.action-link {
  font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: 7px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-muted);
  cursor: pointer; transition: var(--ease); font-family: inherit;
  text-decoration: none; display: inline-block;
}
.action-edit:hover { background: #ebf5ff; color: #1a6fa3; border-color: #1a6fa3; }
.action-toggle:hover { background: #f0fff4; color: #1e8e3e; border-color: #1e8e3e; }
.action-delete:hover { background: #fff5f5; color: #c0392b; border-color: #c0392b; }

/* ═══ پیام‌های تماس ادمین ═════════════════════════════ */
.messages-list { display: flex; flex-direction: column; gap: 8px; }
.message-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 22px;
  box-shadow: var(--shadow-xs); transition: var(--ease);
  text-decoration: none; color: inherit;
}
.message-item:hover { box-shadow: var(--shadow-md); transform: translateX(-3px); border-color: transparent; }
.message-unread { border-right: 4px solid #e67e22; background: rgba(230,126,34,.02); }
.msg-item-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; flex-shrink: 0;
}
.msg-item-body { flex: 1; min-width: 0; }
.msg-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.msg-item-header strong { font-size: 14px; color: var(--navy); }
.msg-item-date { font-size: 11px; color: var(--text-faint); margin-right: auto; }
.msg-item-subject { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.msg-item-preview { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.msg-item-arrow { font-size: 16px; color: var(--text-faint); flex-shrink: 0; transition: var(--ease); }
.message-item:hover .msg-item-arrow { color: var(--gold-dark); transform: translateX(-4px); }

/* جزئیات پیام */
.msg-detail-header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 2px solid var(--bg); }
.msg-detail-header h2 { font-size: 22px; font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.msg-detail-date { font-size: 13px; color: var(--text-muted); }
.msg-detail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.msg-field { display: flex; flex-direction: column; gap: 4px; }
.msg-field label { font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.msg-field span { font-size: 14px; color: var(--text); }
.msg-detail-body { margin-bottom: 28px; }
.msg-detail-body > label { font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 8px; }
.msg-text {
  background: var(--bg-subtle); border-radius: var(--radius);
  padding: 20px; font-size: 14px; line-height: 2; color: var(--text);
}
.msg-detail-actions { display: flex; align-items: center; padding-top: 20px; border-top: 1px solid var(--border); }

/* ═══ وبلاگ فرانت ═════════════════════════════════════ */
.blog-page-hero {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 55%, #1a4070 100%);
  border-radius: var(--radius-xl); padding: 60px 48px;
  margin-bottom: 48px; position: relative; overflow: hidden;
  text-align: center;
}
.blog-page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none;
}
.blog-page-hero-inner { position: relative; z-index: 1; }
.blog-page-hero h1 { font-size: 36px; font-weight: 900; color: #fff; margin: 16px 0 10px; }
.blog-page-hero p { font-size: 15px; color: rgba(255,255,255,.55); max-width: 500px; margin: 0 auto; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

.blog-card {
  background: var(--bg-card); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); transition: var(--ease);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.blog-card-image { height: 200px; overflow: hidden; background: var(--bg-subtle); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.06); }
.blog-card-no-img { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 48px; opacity: .2; }
.blog-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card-date { font-size: 12px; color: var(--text-faint); margin-bottom: 8px; }
.blog-card-body h3 { font-size: 17px; font-weight: 900; color: var(--navy); margin-bottom: 10px; line-height: 1.5; }
.blog-card-body p { font-size: 13px; color: var(--text-muted); line-height: 1.85; flex: 1; }
.blog-card-cta {
  margin-top: 14px; font-size: 13px; font-weight: 800;
  color: var(--gold-dark); transition: var(--ease);
  display: inline-flex; align-items: center; gap: 4px;
}
.blog-card:hover .blog-card-cta { color: var(--gold); transform: translateX(-4px); }

/* ═══ صفحه تک پست ═════════════════════════════════════ */
.blog-post-page { max-width: 820px; margin: 0 auto; }

.blog-post-article { background: var(--bg-card); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.blog-post-header { padding: 40px 40px 0; }
.blog-post-header h1 { font-size: 28px; font-weight: 900; color: var(--navy); line-height: 1.5; margin-bottom: 10px; }
.blog-post-meta { font-size: 13px; color: var(--text-muted); padding-bottom: 24px; border-bottom: 1px solid var(--border); }

.blog-post-cover { margin: 0; }
.blog-post-cover img { width: 100%; max-height: 420px; object-fit: cover; }

.blog-post-excerpt {
  padding: 28px 40px; font-size: 16px; color: var(--text-muted);
  line-height: 2; border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.blog-post-content { padding: 32px 40px 40px; }
.content-text-block {
  font-size: 15px; line-height: 2.1; color: var(--text);
  margin-bottom: 24px; text-align: justify;
}
.content-image-block {
  margin: 28px 0; text-align: center;
}
.content-image-block img {
  max-width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.content-image-block figcaption {
  margin-top: 12px; font-size: 13px; color: var(--text-muted);
  font-style: italic;
}

/* ═══ تماس با ما ═════════════════════════════════════ */
.contact-hero {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 55%, #1a4070 100%);
  border-radius: var(--radius-xl); padding: 56px 48px;
  margin-bottom: 40px; position: relative; overflow: hidden; text-align: center;
}
.contact-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none;
}
.contact-hero-inner { position: relative; z-index: 1; }
.contact-hero h1 { font-size: 34px; font-weight: 900; color: #fff; margin: 14px 0 10px; }
.contact-hero p { font-size: 15px; color: rgba(255,255,255,.55); max-width: 520px; margin: 0 auto; }

.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: start; }
.contact-info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px;
  box-shadow: var(--shadow-sm);
}
.contact-info-card h3 { font-size: 18px; font-weight: 900; color: var(--navy); margin-bottom: 24px; }
.contact-info-items { display: flex; flex-direction: column; gap: 20px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; }
.ci-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.contact-info-item strong { font-size: 13px; font-weight: 800; color: var(--navy); display: block; margin-bottom: 3px; }
.contact-info-item p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ═══ ریسپانسیو بخش‌های جدید ═════════════════════════ */
@media (max-width: 960px) {
  .dashboard-cols { grid-template-columns: 1fr; }
  .action-cards { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .msg-detail-fields { grid-template-columns: 1fr; }
  .blog-post-header, .blog-post-content, .blog-post-excerpt { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-admin-item { flex-direction: column; align-items: flex-start; }
  .blog-admin-actions { width: 100%; justify-content: flex-end; }
  .blog-page-hero, .contact-hero { padding: 36px 20px; }
  .blog-page-hero h1, .contact-hero h1 { font-size: 24px; }
  .blog-post-header h1 { font-size: 22px; }
}

/* ═══ ریسپانسیو اصلی ══════════════════════════════════ */
@media (max-width: 960px) {
  .main-header { padding: 0 24px; height: 68px; }
  .main-content { padding: 28px 20px; }
  .hero { flex-direction: column; padding: 48px 32px; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .brand-hero { padding: 40px 28px; }
  .form-box { padding: 32px 28px; }
  .auth-box { padding: 40px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 600px) {
  .main-nav > a:not(.nav-btn) { display: none; }
  .grid { grid-template-columns: 1fr; }
  .quick-categories { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 26px; }
  .hero { padding: 36px 22px; }
  .brand-hero { padding: 28px 20px; }
  .brand-hero-inner { flex-direction: column; text-align: center; }
  .main-footer { padding: 40px 20px 0; }
}