/* =====================================================
   اینشوشیناک - تم کلاسیک و تاریخی
   Inshooshinak - Classical Historical Theme
   ===================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,400&display=swap');

/* --- CSS Variables / Token System --- */
:root {
  /* Palette - خاکی، سنگی، طلایی */
  --clay:        #C4956A;   /* خاک رس */
  --sand:        #E8D5B0;   /* شن طلایی */
  --parchment:   #F5EDD8;   /* پوست دباغی */
  --stone:       #8B7355;   /* سنگ خاکی */
  --earth:       #5C4033;   /* خاک تیره */
  --obsidian:    #1A1208;   /* سنگ سیاه */
  --gold:        #B8860B;   /* طلای تیره */
  --gold-light:  #D4A843;   /* طلای روشن */
  --ivory:       #FDFAF3;   /* عاج */
  --rust:        #8B3A2A;   /* زنگ‌زده */

  /* Typography */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body:    'Crimson Pro', 'Georgia', serif;
  --font-farsi:   'Vazirmatn', 'Tahoma', sans-serif;
  --font-ui:      'Vazirmatn', system-ui, sans-serif;

  /* Spacing */
  --sp-xs: 0.4rem;
  --sp-sm: 0.8rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(90,60,20,0.15);
  --shadow-md:  0 6px 24px rgba(90,60,20,0.2);
  --shadow-lg:  0 12px 48px rgba(90,60,20,0.25);
  --shadow-gold: 0 4px 20px rgba(184,134,11,0.3);

  /* Textures via gradients */
  --texture-parchment: 
    radial-gradient(ellipse at 20% 30%, rgba(196,149,106,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(139,115,85,0.06) 0%, transparent 60%),
    linear-gradient(160deg, #F5EDD8 0%, #F0E4C8 50%, #EDD9B5 100%);

  --texture-stone:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(139,115,85,0.03) 2px,
      rgba(139,115,85,0.03) 4px
    ),
    linear-gradient(180deg, #5C4033 0%, #4A3228 100%);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  background: var(--texture-parchment);
  color: var(--earth);
  font-family: var(--font-ui);
  line-height: 1.7;
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}

/* پس‌زمینه بافت سنگی ظریف */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238B7355' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  color: var(--earth);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: var(--sp-md); line-height: 1.8; }

a { color: var(--rust); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

/* خط تزئینی طلایی زیر عناوین */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  margin-bottom: var(--sp-lg);
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}
.section-title::before {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, var(--clay), transparent);
}

/* ===== HEADER ===== */
.header-area,
.header-area4 {
  background: var(--texture-stone) !important;
  border-bottom: 2px solid var(--gold) !important;
  box-shadow: 0 4px 20px rgba(26,18,8,0.4) !important;
  backdrop-filter: blur(4px);
  position: fixed !important;
  top: 0 !important;
  width: 100% !important;
  z-index: 999 !important;
  padding: 0 !important;
}

.header-area .container,
.header-area4 .container {
  padding: 14px 24px;
}

.header-elements {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* لوگو */
.site-logo img,
.logo img {
  max-height: 52px;
  filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* منو */
.main-menu-ex ul { 
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu-ex ul li a {
  color: var(--sand) !important;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.25s;
  position: relative;
  letter-spacing: 0.3px;
}

.main-menu-ex ul li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 16px;
  left: 16px;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s;
}

.main-menu-ex ul li a:hover {
  color: var(--gold-light) !important;
  background: rgba(212,168,67,0.12);
}

.main-menu-ex ul li a:hover::after {
  transform: scaleX(1);
}

/* دکمه خروج */
.header1-buttons .theme-btn1,
.header1-buttons a {
  background: transparent !important;
  border: 1.5px solid var(--gold) !important;
  color: var(--gold) !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  transition: all 0.25s !important;
  letter-spacing: 0.5px;
}

.header1-buttons .theme-btn1:hover,
.header1-buttons a:hover {
  background: var(--gold) !important;
  color: var(--obsidian) !important;
  box-shadow: var(--shadow-gold) !important;
}

/* آواتار هدر */
.header-user-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: 2px solid var(--gold) !important;
  object-fit: cover !important;
  transition: transform 0.2s !important;
}
.header-user-avatar:hover { transform: scale(1.08) !important; }

.user-info .user-name { color: var(--sand) !important; font-size: 0.85rem !important; }
.user-info .user-username { color: var(--clay) !important; font-size: 0.75rem !important; }

/* ===== MOBILE HEADER ===== */
.mobile-header,
.mobile-header-main {
  background: var(--obsidian) !important;
  border-bottom: 1px solid var(--gold) !important;
  border-radius: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

.mobile-sidebar {
  background: var(--obsidian) !important;
}

.mobile-nav li a {
  color: var(--sand) !important;
  border-bottom: 1px solid rgba(139,115,85,0.2);
  padding: 12px 0 !important;
}
.mobile-nav li a:hover { color: var(--gold-light) !important; }
.mobile-sidebar .mobile-button .theme-btn1 {
  background: var(--gold) !important;
  color: var(--obsidian) !important;
  border: none !important;
  font-weight: 700 !important;
}

/* ===== HERO / INNER HERO ===== */
.inner-hero {
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  position: relative;
  margin-top: 80px;
  overflow: hidden;
}

.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26,18,8,0.5) 0%,
    rgba(90,60,33,0.7) 60%,
    rgba(26,18,8,0.85) 100%
  );
}

.inner-hero .container { position: relative; z-index: 2; padding-bottom: 32px; }

.inner-hero h1 {
  color: var(--ivory) !important;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
}

/* Breadcrumb */
.page-prog {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.page-prog a {
  color: var(--sand) !important;
  font-size: 0.9rem;
  opacity: 0.85;
}
.page-prog a:hover { color: var(--gold-light) !important; opacity: 1; }
.page-prog span, .page-prog .fa-angle-left { color: var(--clay) !important; font-size: 0.8rem; }
.page-prog p { color: var(--gold-light) !important; margin: 0; font-size: 0.9rem; font-weight: 600; }

/* ===== BUTTONS ===== */
.theme-btn1,
button[type="submit"],
.btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--ivory) !important;
  border: none !important;
  padding: 12px 28px !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-ui) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
}

.theme-btn1:hover,
button[type="submit"]:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, var(--clay), var(--rust)) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(184,134,11,0.35) !important;
  color: var(--ivory) !important;
}

.theme-btn1:active,
button[type="submit"]:active {
  transform: translateY(0) !important;
}

/* ===== CARDS ===== */
.blog1-cetegory-box,
.card,
.post-card {
  background: var(--ivory) !important;
  border: 1px solid rgba(196,149,106,0.3) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden;
  transition: all 0.3s !important;
}

.blog1-cetegory-box:hover,
.card:hover,
.post-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--shadow-md) !important;
  border-color: var(--gold) !important;
}

.blog1-cetegory-box .heading1 h3 a,
.card h3 a {
  color: var(--earth) !important;
  font-weight: 700;
  transition: color 0.2s;
}
.blog1-cetegory-box .heading1 h3 a:hover { color: var(--rust) !important; }

/* تصاویر کارت */
.blog1-cetegory-box .image img {
  transition: transform 0.5s ease !important;
}
.blog1-cetegory-box:hover .image img {
  transform: scale(1.07) !important;
}

/* ===== FORMS ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: var(--ivory) !important;
  border: 1.5px solid rgba(196,149,106,0.5) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-ui) !important;
  font-size: 0.95rem;
  color: var(--earth) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none;
  direction: rtl;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(184,134,11,0.15) !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(92,64,51,0.5) !important;
}

/* ===== SEARCH POPUP ===== */
.search__popup {
  background: rgba(26,18,8,0.97) !important;
  backdrop-filter: blur(8px);
}

.search__popup .search-input-field {
  background: transparent !important;
  border-bottom: 2px solid var(--gold) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  color: var(--sand) !important;
  font-size: 1.4rem !important;
  padding: 12px 0 !important;
}

/* ===== CATEGORIES SECTION ===== */
.blog1-cetegorys {
  padding: 60px 0;
}

/* گرید دسته‌بندی */
.blog1-cetegory-box {
  position: relative;
}

.blog1-cetegory-box .heading1 {
  padding: 16px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(245,237,216,0.95));
}

/* برچسب تزئینی کلاسیک */
.blog1-cetegory-box::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
}
.blog1-cetegory-box::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 24px;
  height: 24px;
  border-bottom: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
}
.blog1-cetegory-box:hover::before,
.blog1-cetegory-box:hover::after {
  opacity: 1;
}

/* ===== BLOG / ARTICLES ===== */
.blog-area { padding: 60px 0; }

.blog-item,
.blog-single-item {
  background: var(--ivory) !important;
  border: 1px solid rgba(196,149,106,0.25) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s !important;
}
.blog-item:hover { 
  box-shadow: var(--shadow-md) !important; 
  transform: translateY(-4px) !important;
}

/* متادیتا مقاله */
.blog-meta,
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--stone) !important;
  font-size: 0.85rem;
  padding: 12px 0;
  border-bottom: 1px solid rgba(196,149,106,0.25);
  margin-bottom: 16px;
}
.blog-meta i { color: var(--clay) !important; }

/* تگ‌های مقاله */
.tag, .category-tag {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(196,149,106,0.15);
  border: 1px solid rgba(196,149,106,0.4);
  border-radius: 20px;
  color: var(--stone) !important;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.tag:hover {
  background: var(--clay);
  color: var(--ivory) !important;
  border-color: var(--clay);
}

/* ===== COMMENTS SECTION ===== */
.comments-section {
  background: var(--ivory);
  border: 1px solid rgba(196,149,106,0.3);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  margin-top: var(--sp-xl);
  box-shadow: var(--shadow-sm);
}

.comments-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--earth);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sand);
  margin-bottom: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}
.comments-title i { color: var(--gold); }

.comment-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(196,149,106,0.2);
}
.comment-item:last-child { border-bottom: none; }

.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clay), var(--stone));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 2px solid var(--sand);
}

.comment-body { flex: 1; }
.comment-author {
  font-weight: 700;
  color: var(--earth);
  font-size: 0.95rem;
}
.comment-date {
  font-size: 0.78rem;
  color: var(--stone);
  margin-right: 10px;
}
.comment-text {
  color: var(--earth);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 6px;
}

/* فرم ارسال نظر */
.comment-form {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 2px solid var(--sand);
}
.comment-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--earth);
  margin-bottom: var(--sp-md);
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-form-title i { color: var(--gold); }

/* ===== PROFILE PAGE ===== */
.profile-card {
  background: var(--ivory) !important;
  border: 1px solid rgba(196,149,106,0.3) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  padding: var(--sp-xl) !important;
}

.profile-title {
  color: var(--earth) !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
}
.profile-title::after {
  background: var(--gold) !important;
}

.info-row {
  border-bottom: 1px solid rgba(196,149,106,0.25) !important;
  padding: 18px 0 !important;
}
.info-label { color: var(--stone) !important; font-weight: 600 !important; }
.info-value { color: var(--earth) !important; }

.btn-edit { background: linear-gradient(135deg, #28a745, #1e7e34) !important; }
.btn-password { background: linear-gradient(135deg, var(--gold), var(--clay)) !important; }

/* ===== FOOTER ===== */
.footer4 {
  background: var(--texture-stone) !important;
  border-top: 2px solid var(--gold) !important;
  color: var(--sand) !important;
}

.footer4 h3 {
  color: var(--gold-light) !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212,168,67,0.3);
}

.footer4 p,
.footer4 .logo-area2 p {
  color: rgba(232,213,176,0.75) !important;
  font-size: 0.9rem !important;
  line-height: 1.8 !important;
}

.footer4 .footer-list4 ul li {
  padding: 4px 0;
}
.footer4 .footer-list4 ul li a {
  color: rgba(232,213,176,0.75) !important;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer4 .footer-list4 ul li a::before {
  content: '◆';
  font-size: 0.5rem;
  color: var(--gold);
}
.footer4 .footer-list4 ul li a:hover {
  color: var(--gold-light) !important;
  padding-right: 6px;
}

.footer4 .footer-contact-box4 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.footer4 .footer-contact-box4 .text a {
  color: rgba(232,213,176,0.75) !important;
  font-size: 0.9rem;
}
.footer4 .footer-contact-box4 .text a:hover {
  color: var(--gold-light) !important;
}

.coppyrihgt4 { 
  border-top: 1px solid rgba(139,115,85,0.3) !important; 
  margin-top: 40px;
  padding-top: 20px;
}
.coppyrihgt4 .coppyrihgt {
  color: rgba(232,213,176,0.5) !important;
  font-size: 0.85rem !important;
}

/* ===== PAGE PROGRESS ===== */
.progress-wrap {
  background: var(--earth) !important;
  box-shadow: 0 4px 15px rgba(26,18,8,0.3) !important;
  border: 1px solid var(--gold) !important;
}
.progress-wrap svg path {
  stroke: var(--gold) !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--clay), var(--stone));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--earth); }

/* ===== ADMIN PANEL ===== */
.admin-sidebar {
  background: var(--texture-stone);
  border-left: 2px solid var(--gold);
  min-height: 100vh;
  width: 260px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
  padding: 20px 0;
  box-shadow: 4px 0 20px rgba(26,18,8,0.3);
}

.admin-sidebar .admin-logo {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(212,168,67,0.3);
  margin-bottom: 16px;
}
.admin-sidebar .admin-logo h2 {
  color: var(--gold-light) !important;
  font-size: 1.1rem !important;
  margin: 0;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(232,213,176,0.8) !important;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-right: 3px solid transparent;
}
.admin-nav a:hover,
.admin-nav a.active {
  color: var(--gold-light) !important;
  background: rgba(212,168,67,0.1);
  border-right-color: var(--gold);
}
.admin-nav a i { 
  width: 18px; 
  text-align: center; 
  color: var(--clay);
}
.admin-nav a:hover i,
.admin-nav a.active i { color: var(--gold-light); }

.admin-content {
  margin-right: 260px;
  padding: var(--sp-lg);
  min-height: 100vh;
  background: var(--parchment);
}

/* کارت‌های آمار ادمین */
.stat-card {
  background: var(--ivory);
  border: 1px solid rgba(196,149,106,0.3);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}
.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gold), var(--clay));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--earth);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--stone);
  margin-top: 4px;
}

/* جداول ادمین */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ivory);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-table thead {
  background: linear-gradient(135deg, var(--earth), var(--stone));
}
.admin-table thead th {
  color: var(--sand) !important;
  padding: 14px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
  border: none;
}
.admin-table tbody tr {
  border-bottom: 1px solid rgba(196,149,106,0.2);
  transition: background 0.15s;
}
.admin-table tbody tr:hover { background: rgba(196,149,106,0.07); }
.admin-table tbody td {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--earth);
  text-align: right;
}

/* badge‌های ادمین */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-admin { background: rgba(184,134,11,0.15); color: var(--gold); border: 1px solid var(--gold); }
.badge-user { background: rgba(139,115,85,0.15); color: var(--stone); border: 1px solid var(--stone); }

/* ===== CHATBOT ===== */
.chatbot-bubble {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--clay));
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(184,134,11,0.45);
  z-index: 9999;
  transition: all 0.3s;
  border: none;
}
.chatbot-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(184,134,11,0.55);
}
.chatbot-bubble .bubble-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--rust);
  border-radius: 50%;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ivory);
}

.chatbot-window {
  position: fixed;
  bottom: 100px;
  left: 28px;
  width: 360px;
  max-height: 520px;
  background: var(--ivory);
  border: 1px solid rgba(196,149,106,0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chatbot-window.open { display: flex; }

.chatbot-header {
  background: linear-gradient(135deg, var(--earth), var(--stone));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--gold);
}
.chatbot-header .bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--clay));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  font-size: 1.1rem;
  border: 2px solid var(--gold-light);
}
.chatbot-header .bot-info h4 {
  color: var(--sand) !important;
  font-size: 0.95rem !important;
  margin: 0;
}
.chatbot-header .bot-info span {
  font-size: 0.75rem;
  color: var(--clay);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 340px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.msg.bot {
  background: rgba(196,149,106,0.15);
  border: 1px solid rgba(196,149,106,0.3);
  color: var(--earth);
  border-radius: 12px 12px 12px 0;
  align-self: flex-start;
}
.msg.user {
  background: linear-gradient(135deg, var(--earth), var(--stone));
  color: var(--sand);
  border-radius: 12px 12px 0 12px;
  align-self: flex-end;
}
.msg.typing {
  display: flex;
  align-items: center;
  gap: 6px;
}
.typing-dot {
  width: 7px; height: 7px;
  background: var(--stone);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chatbot-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(196,149,106,0.3);
  display: flex;
  gap: 8px;
  background: var(--parchment);
}
.chatbot-input-area input {
  flex: 1;
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
  border-radius: 20px !important;
}
.chatbot-input-area button {
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--clay)) !important;
  flex-shrink: 0;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(212,168,67,0.1);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 20px;
  padding: 4px 6px;
}
.lang-btn {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  color: rgba(232,213,176,0.7);
}
.lang-btn.active {
  background: var(--gold);
  color: var(--obsidian);
}

/* ===== CONTACT PAGE ===== */
.contact-page-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--ivory) !important;
  border: 1px solid rgba(196,149,106,0.3) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s !important;
  margin-bottom: 16px;
}
.contact-page-box:hover {
  border-color: var(--gold) !important;
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-md) !important;
}
.contact-page-box .icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(196,149,106,0.2), rgba(196,149,106,0.1)) !important;
  border: 1px solid rgba(196,149,106,0.4);
  border-radius: var(--radius-md) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-page-box .heading h4 { color: var(--earth) !important; font-size: 1rem !important; }
.contact-page-box .heading a { color: var(--stone) !important; font-size: 0.9rem; }
.contact-page-box .heading a:hover { color: var(--gold) !important; }

/* ===== PRELOADER ===== */
.overlay-preloader {
  background: var(--obsidian) !important;
}
.preloader .outer {
  stroke: var(--gold) !important;
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--texture-parchment);
  padding: var(--sp-md);
}
.login-card {
  background: var(--ivory);
  border: 1px solid rgba(196,149,106,0.4);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '𒀭'; /* کنیفرم */
  position: absolute;
  top: -20px;
  left: -10px;
  font-size: 120px;
  color: rgba(196,149,106,0.06);
  pointer-events: none;
  line-height: 1;
}
.login-card h2 {
  text-align: center;
  color: var(--earth) !important;
  font-size: 1.6rem !important;
  margin-bottom: var(--sp-lg);
}
.login-card .login-logo {
  text-align: center;
  margin-bottom: var(--sp-md);
}
.login-card .login-logo img { max-height: 70px; }

/* پیام‌های خطا/موفقیت */
.alert-success, .success {
  background: rgba(212,168,67,0.15) !important;
  border: 1px solid var(--gold) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--earth) !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
  font-size: 0.9rem !important;
}
.alert-error, .error {
  background: rgba(139,58,42,0.12) !important;
  border: 1px solid rgba(139,58,42,0.4) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--rust) !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
  font-size: 0.9rem !important;
}

/* ===== HEADING DECORATIONS ===== */
.heading1 h2,
.heading1 h3 {
  color: var(--earth) !important;
}
.heading1 p { color: var(--stone) !important; }

/* زیوراک بالای سکشن‌ها */
.sp {
  padding: 60px 0;
}

/* جداکننده تزئینی */
.divider-ornament {
  text-align: center;
  margin: var(--sp-lg) 0;
  color: var(--clay);
  font-size: 1.2rem;
  letter-spacing: 8px;
  opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .header-area, .header-area4 { display: none !important; }
  
  body { padding-top: 85px; }

  .admin-sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
  }
  .admin-content { margin-right: 0; }

  .chatbot-window {
    width: calc(100vw - 40px);
    left: 20px;
    right: 20px;
  }
}

@media (max-width: 576px) {
  .stat-card { flex-direction: column; text-align: center; }
  .profile-content { flex-direction: column !important; }
  .actions { justify-content: center !important; }
  .chatbot-bubble { bottom: 16px; left: 16px; }
}

/* ===== ENGLISH MODE ===== */
body.lang-en {
  direction: ltr;
  font-family: 'Crimson Pro', 'Georgia', serif;
}
body.lang-en .main-menu-ex ul { flex-direction: row; }
body.lang-en .admin-sidebar { right: auto; left: 0; border-left: none; border-right: 2px solid var(--gold); }
body.lang-en .admin-content { margin-right: 0; margin-left: 260px; }

/* ===== UTILITY CLASSES ===== */
.text-gold { color: var(--gold) !important; }
.text-clay { color: var(--clay) !important; }
.text-earth { color: var(--earth) !important; }
.text-sand { color: var(--sand) !important; }
.bg-ivory { background: var(--ivory) !important; }
.bg-parchment { background: var(--parchment) !important; }
.border-gold { border-color: var(--gold) !important; }

.mt-16 { margin-top: 16px; }
.mt-30 { margin-top: 30px; }
.mt-80 { margin-top: 80px; }
.mb-50 { margin-bottom: 50px; }
.sp { padding: 60px 0; }
.bold { font-weight: 700; }
