/* ===== فونت وزیر ===== */
@font-face {
  font-family: 'Vazir';
  src: url('/fonts/Vazir.woff2') format('woff2'),
       url('/fonts/Vazir.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('/fonts/Vazir-Bold.woff2') format('woff2'),
       url('/fonts/Vazir-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== متغیرها ===== */
:root {
  --green-dark:   #0f1a12;
  --green-deep:   #162519;
  --green-mid:    #1e3a25;
  --green-main:   #2d6a3f;
  --green-light:  #3d8b55;
  --green-bright: #4caf6e;
  --green-glow:   #5ecf84;
  --gold:         #c8a84b;
  --gold-light:   #e8c76b;
  --cream:        #f5ede0;
  --white:        #ffffff;
  --gray-soft:    #8a9e90;
  --chat-user-bg: #1e3a25;
  --chat-admin-bg:#2d4a35;
  --shadow-soft:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:  0 0 30px rgba(78,207,132,0.15);
  --radius:       16px;
  --radius-sm:    10px;
  --transition:   all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ===== ریست ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Vazir', Tahoma, sans-serif;
  direction: rtl;
  text-align: right;
  background: var(--green-dark);
  color: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ===== پس‌زمینه زیبا ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(45,106,63,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(78,175,110,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 30% 30% at 50% 50%, rgba(200,168,75,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===== لایه محتوا ===== */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ===== هدر ===== */
.header {
  background: rgba(15,26,18,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(78,175,110,0.15);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-logo img {
  height: 40px;
  width: auto;
}
.header-logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-glow);
  letter-spacing: -0.02em;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===== دکمه‌ها ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Vazir', Tahoma, sans-serif;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green-main), var(--green-light));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(45,106,63,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(45,106,63,0.5);
  background: linear-gradient(135deg, var(--green-light), var(--green-bright));
}
.btn-primary:active { transform: translateY(0); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--green-dark);
  box-shadow: 0 4px 16px rgba(200,168,75,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200,168,75,0.45);
}
.btn-ghost {
  background: rgba(78,175,110,0.1);
  color: var(--green-glow);
  border: 1px solid rgba(78,175,110,0.2);
}
.btn-ghost:hover {
  background: rgba(78,175,110,0.18);
  border-color: rgba(78,175,110,0.4);
}
.btn-danger {
  background: rgba(220,50,50,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(220,50,50,0.2);
}
.btn-danger:hover { background: rgba(220,50,50,0.25); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== فرم‌ها ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.form-label {
  font-size: 0.9rem;
  color: var(--gray-soft);
  font-weight: 700;
}
.form-input {
  background: rgba(30,58,37,0.5);
  border: 1.5px solid rgba(78,175,110,0.2);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--cream);
  font-size: 1rem;
  font-family: 'Vazir', Tahoma, sans-serif;
  direction: ltr;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}
.form-input.rtl-input {
  direction: rtl;
  text-align: right;
}
.form-input:focus {
  outline: none;
  border-color: var(--green-bright);
  background: rgba(30,58,37,0.7);
  box-shadow: 0 0 0 3px rgba(94,207,132,0.12);
}
.form-input::placeholder { color: rgba(138,158,144,0.5); }

/* ===== کارت ===== */
.card {
  background: rgba(22,37,25,0.8);
  border: 1px solid rgba(78,175,110,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

/* ===== پیام خطا/موفق ===== */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
}
.alert.show { display: block; }
.alert-error {
  background: rgba(220,50,50,0.15);
  border: 1px solid rgba(220,50,50,0.25);
  color: #ff8a8a;
}
.alert-success {
  background: rgba(78,175,110,0.15);
  border: 1px solid rgba(78,175,110,0.25);
  color: var(--green-glow);
}

/* ===== بارگذاری ===== */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== صفحه لاگین ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo img { height: 70px; margin-bottom: 1rem; }
.auth-logo h1 {
  font-size: 1.6rem;
  color: var(--green-glow);
  margin-bottom: 0.3rem;
}
.auth-logo p { font-size: 0.9rem; color: var(--gray-soft); }
.auth-tabs {
  display: flex;
  background: rgba(15,26,18,0.6);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(78,175,110,0.15);
}
.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-soft);
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active {
  background: var(--green-main);
  color: white;
}

/* ===== صفحه اول (Landing) ===== */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.landing-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}
.landing-content { max-width: 680px; }
.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.25);
  color: var(--gold-light);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.landing-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--cream);
  margin-bottom: 1.2rem;
}
.landing-title .highlight {
  color: var(--green-glow);
  position: relative;
}
.landing-desc {
  font-size: 1.05rem;
  color: var(--gray-soft);
  line-height: 1.9;
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.landing-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto 3rem;
  width: 100%;
}
.feature-card {
  background: rgba(22,37,25,0.6);
  border: 1px solid rgba(78,175,110,0.12);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  text-align: center;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: rgba(78,175,110,0.3);
  transform: translateY(-3px);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}
.feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}
.feature-desc {
  font-size: 0.82rem;
  color: var(--gray-soft);
  line-height: 1.7;
}

/* ===== صفحه چت ===== */
.chat-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
}
.chat-header {
  background: rgba(15,26,18,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(78,175,110,0.15);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-main), var(--green-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
}
.chat-header-status {
  font-size: 0.78rem;
  color: var(--green-glow);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.status-dot {
  width: 7px; height: 7px;
  background: var(--green-glow);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* پیام‌ها */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(78,175,110,0.2);
  border-radius: 4px;
}

.msg-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  animation: msgIn 0.25s ease-out;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-wrapper.from-user {
  align-self: flex-end;
  align-items: flex-end;
}
.msg-wrapper.from-admin {
  align-self: flex-start;
  align-items: flex-start;
}
.msg-bubble {
  padding: 0.7rem 1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  word-break: break-word;
  position: relative;
}
.from-user .msg-bubble {
  background: var(--green-main);
  color: white;
  border-bottom-right-radius: 4px;
}
.from-admin .msg-bubble {
  background: rgba(30,58,37,0.8);
  border: 1px solid rgba(78,175,110,0.2);
  color: var(--cream);
  border-bottom-left-radius: 4px;
}
.msg-time {
  font-size: 0.72rem;
  color: rgba(138,158,144,0.7);
  margin-top: 0.3rem;
  padding: 0 0.25rem;
}

/* کارت بانکی در چت */
.bank-card-bubble {
  background: linear-gradient(135deg, rgba(200,168,75,0.15), rgba(232,199,107,0.08));
  border: 1.5px solid rgba(200,168,75,0.35);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  min-width: 260px;
}
.bank-card-bubble .card-bank {
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.bank-card-bubble .card-number {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  direction: ltr;
  text-align: center;
  margin: 0.4rem 0;
}
.bank-card-bubble .card-name {
  font-size: 0.85rem;
  color: var(--cream);
}
.bank-card-bubble .card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--gray-soft);
}

/* ورودی چت */
.chat-input-area {
  background: rgba(15,26,18,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(78,175,110,0.15);
  padding: 1rem 1.25rem;
  flex-shrink: 0;
}
.chat-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}
.chat-textarea {
  flex: 1;
  background: rgba(30,58,37,0.5);
  border: 1.5px solid rgba(78,175,110,0.2);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  color: var(--cream);
  font-size: 0.95rem;
  font-family: 'Vazir', Tahoma, sans-serif;
  direction: rtl;
  resize: none;
  max-height: 120px;
  min-height: 48px;
  line-height: 1.6;
  transition: var(--transition);
}
.chat-textarea:focus {
  outline: none;
  border-color: var(--green-bright);
  background: rgba(30,58,37,0.7);
}
.chat-textarea::placeholder { color: rgba(138,158,144,0.5); }
.chat-send-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-main), var(--green-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(45,106,63,0.4);
}
.chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(45,106,63,0.5);
}

/* ===== صفحه خالی چت ===== */
.empty-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-soft);
  text-align: center;
  padding: 2rem;
}
.empty-chat-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-chat p { font-size: 0.95rem; line-height: 1.8; opacity: 0.7; }

/* ===== پنل ادمین ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 260px;
  background: rgba(15,26,18,0.98);
  border-left: 1px solid rgba(78,175,110,0.12);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 0.3s ease;
}
.admin-sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(78,175,110,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.admin-sidebar-logo img { height: 36px; }
.admin-sidebar-logo span {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-glow);
}
.admin-nav { flex: 1; padding: 1rem 0.75rem; overflow-y: auto; }
.nav-section-title {
  font-size: 0.72rem;
  color: rgba(138,158,144,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--gray-soft);
  font-size: 0.92rem;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 0.15rem;
  position: relative;
}
.nav-item:hover {
  background: rgba(78,175,110,0.08);
  color: var(--cream);
}
.nav-item.active {
  background: rgba(45,106,63,0.25);
  color: var(--green-glow);
  border: 1px solid rgba(78,175,110,0.2);
}
.nav-item .nav-icon { width: 20px; text-align: center; font-size: 1rem; }
.nav-badge {
  margin-right: auto;
  background: var(--green-main);
  color: white;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}

.admin-main {
  flex: 1;
  margin-left: 0;
  margin-right: 260px;
  padding: 1.5rem;
  min-width: 0;
}
.admin-page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===== جدول ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: right;
  font-size: 0.8rem;
  color: var(--gray-soft);
  border-bottom: 1px solid rgba(78,175,110,0.15);
  white-space: nowrap;
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(78,175,110,0.07);
  color: var(--cream);
}
.data-table tr:hover td { background: rgba(78,175,110,0.04); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== بادج‌ها ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-active { background: rgba(78,175,110,0.15); color: var(--green-glow); }
.badge-inactive { background: rgba(220,50,50,0.15); color: #ff8a8a; }

/* ===== ستون‌های ادمین چت ===== */
.admin-chat-layout {
  display: flex;
  height: 100vh;
}
.users-sidebar {
  width: 300px;
  border-left: 1px solid rgba(78,175,110,0.15);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: rgba(15,26,18,0.6);
}
.users-sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(78,175,110,0.1);
}
.users-search {
  background: rgba(30,58,37,0.4);
  border: 1px solid rgba(78,175,110,0.15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: var(--cream);
  font-family: 'Vazir', Tahoma, sans-serif;
  font-size: 0.88rem;
  width: 100%;
  direction: rtl;
}
.users-search:focus { outline: none; border-color: var(--green-bright); }
.users-list { flex: 1; overflow-y: auto; }
.user-chat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(78,175,110,0.07);
  cursor: pointer;
  transition: var(--transition);
}
.user-chat-item:hover { background: rgba(78,175,110,0.06); }
.user-chat-item.active { background: rgba(45,106,63,0.2); }
.user-avatar-sm {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
}
.user-chat-info { flex: 1; min-width: 0; }
.user-chat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chat-preview {
  font-size: 0.78rem;
  color: var(--gray-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-unread {
  background: var(--green-main);
  color: white;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== آیکون ارسال کارت ===== */
.card-picker {
  display: none;
  background: rgba(15,26,18,0.98);
  border: 1px solid rgba(200,168,75,0.2);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-soft);
}
.card-picker.show { display: block; }
.card-picker-title {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.card-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(200,168,75,0.15);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
}
.card-pick-item:hover {
  background: rgba(200,168,75,0.08);
  border-color: rgba(200,168,75,0.3);
}

/* ===== آیکون‌های ابزار چت ===== */
.chat-tools {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.chat-tool-btn {
  background: rgba(30,58,37,0.4);
  border: 1px solid rgba(78,175,110,0.15);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  color: var(--gray-soft);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Vazir', Tahoma, sans-serif;
}
.chat-tool-btn:hover { color: var(--green-glow); border-color: rgba(78,175,110,0.3); }

/* ===== مدال ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--green-deep);
  border: 1px solid rgba(78,175,110,0.2);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  transform: scale(0.96);
  transition: transform 0.2s;
}
.modal-overlay.show .modal-box { transform: scale(1); }
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* ===== استتس‌کارت ===== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: rgba(22,37,25,0.7);
  border: 1px solid rgba(78,175,110,0.15);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--gray-soft);
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green-glow);
  line-height: 1;
}
.stat-sub {
  font-size: 0.78rem;
  color: var(--gray-soft);
  margin-top: 0.35rem;
}

/* ===== PWA Install Banner ===== */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,26,18,0.97);
  border-top: 1px solid rgba(78,175,110,0.25);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 150;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.pwa-banner.show { transform: translateY(0); }
.pwa-banner-icon { font-size: 2rem; flex-shrink: 0; }
.pwa-banner-text { flex: 1; }
.pwa-banner-title { font-size: 0.95rem; font-weight: 700; color: var(--cream); }
.pwa-banner-desc { font-size: 0.8rem; color: var(--gray-soft); }
.pwa-banner-close {
  background: none;
  border: none;
  color: var(--gray-soft);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(260px);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main { margin-right: 0; padding: 1rem; }
  .users-sidebar { width: 100%; }
  .admin-chat-layout { flex-direction: column; }
  .landing-actions { flex-direction: column; align-items: center; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .msg-wrapper { max-width: 88%; }
}

/* ===== اسکرول‌بار کاستوم ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(78,175,110,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(78,175,110,0.35); }

/* ===== سایر ===== */
.divider {
  height: 1px;
  background: rgba(78,175,110,0.12);
  margin: 1.25rem 0;
}
.text-muted { color: var(--gray-soft); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.overflow-hidden { overflow: hidden; }
.table-wrapper {
  background: rgba(22,37,25,0.7);
  border: 1px solid rgba(78,175,110,0.12);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(78,175,110,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
}

/* ===== آفلاین ===== */
.offline-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.offline-page h1 { font-size: 2rem; color: var(--green-glow); margin-bottom: 1rem; }
.offline-page p { color: var(--gray-soft); }
