/* ============================================================
   قرضی یار - استایل اصلی
   ============================================================ */

/* ==================== فونت ==================== */
@font-face {
  font-family: "Qarziyar";
  src: url("https://qarziyar.ir/assets/fonts/Qarziyar-Regular.woff2")
    format("woff2");
  font-weight: 400;
}
@font-face {
  font-family: "Qarziyar";
  src: url("https://qarziyar.ir/assets/fonts/Qarziyar-Medium.woff2")
    format("woff2");
  font-weight: 500;
}
@font-face {
  font-family: "Qarziyar";
  src: url("https://qarziyar.ir/assets/fonts/Qarziyar-Bold.woff2")
    format("woff2");
  font-weight: 700;
}
@font-face {
  font-family: "Qarziyar";
  src: url("https://qarziyar.ir/assets/fonts/Qarziyar-Regular.woff")
    format("woff");
  font-weight: 400;
}
@font-face {
  font-family: "Qarziyar";
  src: url("https://qarziyar.ir/assets/fonts/Qarziyar-Medium.woff")
    format("woff");
  font-weight: 500;
}
@font-face {
  font-family: "Qarziyar";
  src: url("https://qarziyar.ir/assets/fonts/Qarziyar-Bold.woff") format("woff");
  font-weight: 700;
}

/* ==================== پایه ==================== */
body {
  font-family: "Qarziyar", sans-serif;
  background: white;
}

/* نازک کردن اسکرول بار */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

::-webkit-scrollbar-thumb:vertical:active,
::-webkit-scrollbar-thumb:horizontal:active {
  background: #888;
}

/* برای Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 transparent;
}

/* ==================== آیکون‌ها ==================== */
.icon,
.icon-svg {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.3rem;
}

/* ==================== رنگ‌های پس‌زمینه ==================== */
.color-blue {
  background: #6d77ed;
}
.color-grey {
  background: #edf1ff;
}
.login-background {
  background: linear-gradient(135deg, #4a6b8a 0%, #2c3e50 100%);
}

/* ==================== منوی کناری ==================== */
.sidebar {
  min-height: 100vh;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.sidebar .nav-link {
  color: #333;
  padding: 0.5rem 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.15rem;
  transition: all 0.2s;
}
.sidebar .nav-link:hover {
  background-color: #f0f2f5;
}
.sidebar .nav-link.active {
  background-color: #e9ecef;
  color: #4a6b8a;
  font-weight: 500;
}

.nav-link {
  color: #363949;
  border-radius: 0.5rem;
  margin: 0.2rem 0.5rem;
  transition: all 0.2s;
}
.nav-link:hover {
  background-color: rgba(115, 128, 236, 0.18);
  color: #7380ec;
}
.nav-link.active {
  background-color: rgba(115, 128, 236, 0.18);
  color: #7380ec;
  border-right: 4px solid #7380ec;
}

.nav-link .icon-red-soft {
  filter: brightness(0) saturate(100%) invert(65%) sepia(30%) saturate(1000%)
    hue-rotate(315deg) brightness(105%) contrast(95%) !important;
}

.nav-link.active .icon-red-soft {
  filter: brightness(0) saturate(100%) invert(65%) sepia(30%) saturate(1000%)
    hue-rotate(315deg) brightness(105%) contrast(95%) !important;
}

.nav-link:hover .icon-red-soft {
  filter: brightness(0) saturate(100%) invert(70%) sepia(35%) saturate(1200%)
    hue-rotate(310deg) brightness(108%) contrast(92%) !important;
}

.profile-section {
  background-color: rgba(132, 139, 200, 0.18);
  border-radius: 0.8rem;
  padding: 0.5rem;
  margin: 0.5rem 1rem;
}

.logo-text {
  color: inherit;
}

.badge-pro {
  background-color: #ff7782;
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  margin-right: auto;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #4a6b8a;
}

.offcanvas-body .nav-link {
  border-radius: 14px;
}

/* ==================== کارت‌ها ==================== */
.card-header {
  border-radius: 1rem 1rem 0 0 !important;
  background: linear-gradient(135deg, #4a6b8a 0%, #2c3e50 100%);
}

.log-header {
  background: transparent !important;
  border-radius: 1rem 1rem 0 0 !important;
}

.log-body {
  background: white !important;
  border-radius: 0 0 10px 10px;
}

/* --- کارت‌های آمار --- */
.stat-card {
  border: none;
  border-radius: 1rem;
  background: white;
  padding: 1rem 0.5rem;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-bottom: 3px solid transparent;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}
.stat-card .card-body {
  padding: 1.5rem 1.2rem;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon img {
  width: 1.8rem;
  height: 1.8rem;
  filter: brightness(0) invert(1);
}
.stat-icon.total {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.stat-icon.active {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}
.stat-icon.inactive {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}
.stat-icon.last-login {
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

.card-customers {
  background-color: rgba(33, 150, 243, 0.08);
  border-bottom-color: #2196f3;
}
.card-debt {
  background-color: rgba(244, 67, 54, 0.08);
  border-bottom-color: #f44336;
}
.card-remaining {
  background-color: rgba(76, 175, 80, 0.08);
  border-bottom-color: #4caf50;
}
.card-overdue {
  background-color: rgba(255, 152, 0, 0.08);
  border-bottom-color: #ff9800;
}
.card-upcoming {
  background-color: rgba(156, 39, 176, 0.08);
  border-bottom-color: #9c27b0;
}

/* --- کارت‌های عمومی --- */
.card-custom {
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  background: white;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
  transition: all 0.2s;
  width: 100%;
  cursor: pointer;
}
.card-custom:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #7380ec;
}

.customer-grid,
.sellers-grid,
.audit-grid {
  display: flex;
  flex-direction: column;
}
.customer-grid {
  gap: 0.5rem;
}
.sellers-grid {
  gap: 1.2rem;
}
.audit-grid {
  gap: 1rem;
}

/* --- چیدمان داخلی کارت‌ها --- */
.card-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.customer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 2;
  min-width: 200px;
}
.customer-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1d2430;
  margin-bottom: 5px;
}
.customer-id {
  color: #6f7b91;
  font-size: 0.8rem;
}

.detail-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 3;
  justify-content: space-around;
}
.detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #424c62;
  font-size: 0.9rem;
  white-space: nowrap;
}

.action-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1.2;
  justify-content: flex-end;
}

/* --- کارت بدهی‌ها --- */
.debt-card-row {
  display: grid;
  grid-template-columns: 10% auto 25%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.debt-detail-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 1rem;
  justify-content: space-around;
}

/* --- کارت فروشندگان --- */
.seller-card {
  background: white;
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}
.seller-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #7380ec;
}
.seller-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1.8;
  min-width: 180px;
}
.seller-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1d2430;
}
.seller-username {
  color: #6f7b91;
  font-size: 0.85rem;
}
.action-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1.2;
  justify-content: flex-end;
}

/* --- کارت حسابرسی --- */
.audit-card {
  background: white;
  border-radius: 20px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.audit-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #7380ec;
}
.audit-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex-wrap: wrap;
  min-width: 200px;
}
.audit-contact {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}
.audit-amount {
  font-weight: 800;
  font-size: 1.2rem;
  color: #0f172a;
  background: #f1f5f9;
  padding: 4px 14px;
  border-radius: 30px;
}
.audit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ظرف مبلغ و دکمه‌های تماس */
.audit-amount-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 200px;
  flex: 1;
  position: relative;
}

/* دکمه‌های تماس و پیامک - فقط موبایل */
.mobile-actions {
  display: none !important;
}

/* ==================== وضعیت‌ها ==================== */
.status-badge {
  border-radius: 40px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}
.status-active {
  background: #2ed573;
  color: white;
}
.status-completed {
  background: #ecf3e4;
  color: #0d6b2c;
}
.status-debtor {
  background: #fee2e2;
  color: #991b1b;
}
.status-settled {
  background: #fafad1;
  color: #5f5606;
}

.overdue-badge {
  background: #f8d7da;
  color: #721c24;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
}
.overdue-clean {
  background: #48d080;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  display: inline-block;
}

/* ==================== دکمه‌ها ==================== */
.btn-gradient {
  background: linear-gradient(135deg, #4a6b8a 0%, #2c3e50 100%);
  border: none;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(74, 107, 138, 0.3);
  transition: all 0.3s ease;
}
.btn-gradient:hover {
  background: linear-gradient(135deg, #5a7b9a 0%, #3a4e60 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 107, 138, 0.4);
  color: white;
}

.btn-gradient-primary {
  background: linear-gradient(135deg, #4a6b8a 0%, #2c3e50 100%);
  border: none;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-gradient-primary:hover {
  background: linear-gradient(135deg, #5a7b9a 0%, #3a4e60 100%);
  transform: translateY(-2px);
  color: white;
}

.btn-gradient-success {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  border: none;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-gradient-success:hover {
  background: #3d9c6d;
  transform: translateY(-2px);
  color: white;
}

.btn-gradient-purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}
.btn-gradient-purple:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
  color: white;
}

.btn-print {
  background: linear-gradient(135deg, #4a6b8a 0%, #2c3e50 100%);
  color: white;
  border: none;
}
.btn-excel {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: white;
  border: none;
}

.btn-payment {
  background: #ff9f43;
  border: none;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
  box-shadow: 0 4px 10px rgba(255, 159, 67, 0.25);
  white-space: nowrap;
}
.btn-payment:hover {
  background: #e68a2e;
  color: white;
}

.btn-add {
  background: #5c5fea;
  border: none;
  color: white;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(92, 95, 234, 0.3);
}
.btn-add:hover {
  background: #4a4dd4;
  color: white;
}

.btn-icon-action {
  background: #f4f6fc;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.btn-icon-action:hover {
  background: #e4e8f4;
}
.btn-icon-action img {
  width: 20px;
  height: 20px;
}

.btn-soft {
  border-radius: 40px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: 0.2s;
  border: 1px solid transparent;
}
.btn-pay {
  background: #e0f2e9;
  color: #0b5e3c;
  border-color: #b8dfca;
}
.btn-pay:hover {
  background: #c8e6d4;
}
.btn-pay:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.btn-new-credit {
  background: #ffe9e0;
  color: #a13e1c;
  border-color: #f7ccb6;
}
.btn-new-credit:hover {
  background: #ffd9c6;
}
.btn-history-audit {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
}
.btn-history-audit:hover {
  background: #e0e7ff;
}

.btn-sm-icon {
  background: #f4f5fa;
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  color: #3b4a6b;
}
.btn-sm-icon:hover {
  background: #e2e5f0;
}

.btn-action {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 6px;
  position: relative;
}
.btn-action:hover {
  transform: scale(1.1);
}
.btn-detail:hover {
  background: #7380ec;
  border-color: #7380ec;
}
.btn-print:hover {
  background: #ffa502;
  border-color: #ffa502;
}
.btn-delete:hover {
  background: #ff4757;
  border-color: #ff4757;
}
.btn-action:hover img {
  filter: brightness(0) invert(1);
}
.btn-action::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -20px;
  right: 50%;
  transform: translateX(50%);
  background: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.btn-action:hover::after {
  opacity: 1;
}

/* دکمه طلایی */
.btn-gold {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000 !important;
  border: 2px solid #daa520;
  border-radius: 10px;
  padding: 0.375rem 0.75rem;
  font-weight: 700;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
  white-space: nowrap;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #ffe44d, #ffb347);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(218, 165, 32, 0.2);
  color: #000 !important;
}

.btn-gold img {
  transition: transform 0.3s;
}

.btn-gold:hover img {
  transform: rotate(15deg) scale(1.2);
}

/* دکمه چاپ گزارش */
.print-report-btn {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
  white-space: nowrap;
}

.print-report-btn:hover {
  background: linear-gradient(135deg, #138496, #117a8b);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.5);
  transform: translateY(-2px);
}

.print-report-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.print-report-btn i {
  font-size: 18px;
}

/* دکمه بازگشت با بک‌گراند شیشه‌ای */
.back-btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.back-btn-header:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  transform: translateX(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-btn-header:active {
  transform: translateX(-1px) scale(0.98);
}

.back-btn-header img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.back-btn-header:hover img {
  transform: translateX(2px);
}

/* اسپیسر برای تقارن */
.spacer {
  width: 70px;
}

/* ==================== فرم‌ها ==================== */
.login-form {
  max-width: 450px;
  margin: 0 auto;
}
.forgot-form {
  max-width: 400px;
  margin: 0 auto;
}

.input-icon-wrapper {
  position: relative;
}
.input-icon-wrapper .form-control,
.input-icon-wrapper .form-select {
  padding-right: 2.5rem;
}
.input-icon-wrapper .input-icon {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 5;
}

.input-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.form-check-input:checked {
  background-color: #4a6b8a;
  border-color: #4a6b8a;
}

.password-rule {
  font-size: 0.85rem;
  color: #6c757d;
}
.password-rule.valid {
  color: #198754;
}

.strength-meter {
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}
.strength-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.input-wrapper {
  margin-bottom: 1rem;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ==================== فیلترها ==================== */
.filter-header {
  background: linear-gradient(135deg, #4a6b8a 0%, #2c3e50 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem 0.75rem 0 0;
}

/* ==================== جدول‌ها ==================== */
.sortable {
  cursor: pointer;
  user-select: none;
}
.sortable:hover {
  background-color: #e9ecef;
}

/* ==================== صفحه‌بندی ==================== */
.pagination .page-link {
  border-radius: 12px;
  margin: 0 4px;
  color: #2b3a8c;
  font-weight: 500;
  border: none;
  background: #f4f5fa;
}
.pagination .page-item.active .page-link {
  background: #2b3a8c;
  color: white;
  box-shadow: 0 4px 10px rgba(43, 58, 140, 0.3);
}
.pagination .page-link:hover {
  background: #e0e2ff;
}

/* ==================== مودال‌ها ==================== */
.history-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}
.modal-credit .modal-content {
  border-radius: 24px;
  border: none;
}

.info-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.financial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.modal-purchase-info {
  background: #fafafa;
  border: 1px solid #e0e0e0;
}

.modal-purchase-info h6 {
  color: #333;
  font-size: 15px;
}

.modal-purchase-info .row > div {
  margin-bottom: 6px;
}

/* استایل تاگل ضامن در مودال */
.modal-guarantor-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f0f4ff;
  border: 1px solid #cce5ff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  user-select: none;
}

.modal-guarantor-toggle:hover {
  background: #dce9ff;
  border-color: #99c2ff;
}

.modal-guarantor-toggle .toggle-text {
  font-weight: 600;
  color: #004085;
  font-size: 13px;
}

.modal-guarantor-toggle .toggle-icon {
  font-size: 11px;
  color: #004085;
  transition: transform 0.3s ease;
}

.modal-guarantor-info {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    margin 0.4s ease;
  margin-bottom: 0;
}

.modal-guarantor-info.show {
  max-height: 300px;
  margin-bottom: 15px;
}

.modal-custom .modal-content {
  border-radius: 28px;
  border: none;
}

/* ==================== نمودارها ==================== */
.chart-container {
  position: relative;
  width: 100%;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-container .chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.chart-container .chart-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: "Qarziyar";
  font-size: 12px;
}

.chart-container .chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* ==================== طرح‌های اشتراک ==================== */
.plan-card {
  border: 2px solid #dee2e6;
  border-radius: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  height: 100%;
  background: white;
}
.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
  border-color: #667eea;
}
.plan-card.selected {
  border-color: #4a6b8a;
  background-color: rgba(74, 107, 138, 0.03);
}
.plan-card.popular {
  border-color: #ffc107;
}
.popular-badge {
  position: absolute;
  top: -10px;
  left: 10px;
  background: #ffc107;
  color: #212529;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
}

/* ==================== تیکت ==================== */
.ticket-item {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 12px;
  border-right: 4px solid transparent;
}
.ticket-item:hover {
  background-color: #f8f9fa;
}
.ticket-item.unread {
  border-right-color: #7380ec;
  background-color: #f0f7ff;
}
.ticket-status {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
}
.status-answered {
  background: #d4edda;
  color: #155724;
}
.status-pending {
  background: #fff3cd;
  color: #856404;
}
.ticket-reply {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  margin-top: 10px;
  margin-right: 30px;
  border-right: 3px solid #7380ec;
}

/* ==================== متفرقه ==================== */
.date-box {
  background: white;
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.variable-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #e9ecef;
  border-radius: 0.3rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0.2rem;
}
.variable-tag:hover {
  background-color: #4a6b8a;
  color: white;
}

.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}
.avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4a6b8a;
}
.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4a6b8a;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.avatar-edit-btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.text-debtor {
  color: #b91c1c;
  font-weight: 600;
}
.text-payment {
  color: #047857;
  font-weight: 600;
}

.history-item {
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Loading */
.global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 20px 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loading-content p {
  margin: 10px 0 0 0;
  font-size: 14px;
  color: #333;
}

/* 404 */
.error-page {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-404 {
  background: #fff;
  border-radius: 24px;
  padding: 50px 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.6s ease;
}

.number {
  font-size: 100px;
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.btn-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-404 {
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.btn-primary-404 {
  background: #4f46e5;
  color: #fff;
}

.btn-primary-404:hover {
  background: #fff;
  transform: translateY(-2px);
}

.btn-secondary-404 {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary-404:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
}

/* ==================== استایل‌های مراحل ==================== */
.steps-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  border: 3px solid #dee2e6;
}

.step-item.active .step-circle {
  background: #6f42c1;
  color: white;
  border-color: #6f42c1;
  box-shadow: 0 0 0 5px rgba(111, 66, 193, 0.2);
}

.step-item.completed .step-circle {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.step-line {
  flex: 1;
  height: 3px;
  background: #dee2e6;
  margin: 0 15px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.step-line.completed {
  background: #28a745;
}

.step-line.active {
  background: linear-gradient(to right, #28a745 50%, #dee2e6 50%);
}

/* خلاصه خرید */
.purchase-summary {
  border: 2px dashed #6f42c1;
}

.purchase-summary h6 {
  color: #6f42c1;
  font-weight: bold;
}

.purchase-summary strong {
  color: #495057;
}

/* ==================== استایل مراحل مودال احراز هویت ==================== */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.step-number {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s;
}

.step-label {
  margin-top: 8px;
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
  text-align: center;
}

.step.active .step-number {
  background-color: #8e44ad;
  color: white;
  box-shadow: 0 0 10px rgba(142, 68, 173, 0.5);
}

.step.active .step-label {
  color: #8e44ad;
  font-weight: bold;
}

.step.completed .step-number {
  background-color: #28a745;
  color: white;
}

/* استایل ورودی کد تایید */
.verification-digit {
  font-size: 24px !important;
  font-weight: bold;
  text-align: center !important;
}

.verification-digit:focus {
  border-color: #8e44ad;
  box-shadow: 0 0 10px rgba(142, 68, 173, 0.3);
}

.verification-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
  vertical-align: middle;
  letter-spacing: 0.3px;
  transition: all 0.2s;
}

.verification-badge.verified {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.verification-badge.unverified {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.verification-badge.pending {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* ==================== پیام نیاز به پلن حرفه‌ای ==================== */
.pro-plan-message {
  background: rgba(108, 117, 125, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(108, 117, 125, 0.2);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  direction: rtl;
}

.pro-plan-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
}

.pro-plan-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e2b4f;
  margin-bottom: 15px;
}

.pro-plan-text {
  font-size: 15px;
  color: #4a5568;
  margin-bottom: 15px;
  line-height: 1.8;
}

.pro-plan-desc {
  font-size: 13px;
  color: #6c7a91;
  line-height: 2;
  margin-bottom: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

/* ==================== کارت‌های آمار کوچک ==================== */
.stats-section {
  margin-bottom: 15px;
}

.stats-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin-bottom: 8px;
  padding-right: 5px;
  border-right: 3px solid #007bff;
}

.stats-row-sm {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-box-sm {
  padding: 10px 8px;
  border-radius: 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-box-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-box-sm .stat-label {
  font-size: 10px;
  color: #6c757d;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-box-sm .stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

/* رنگ طلایی برای کارت‌های طلا */
.stat-box-gold {
  background: linear-gradient(135deg, #fff9e6, #fff3cc);
  border-color: #ffd700;
}

.stat-box-gold .stat-label {
  color: #b8860b;
}

.stat-box-gold .stat-value {
  color: #8b6914;
}

.card-header.bg-warning {
  background: #ffc107 !important;
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%) !important;
}

/* ==================== سیستم اعلان‌های سفارشی ==================== */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  animation: fadeIn 0.3s ease;
  padding: 20px;
}

.custom-alert-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.custom-alert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6f42c1, #e83e8c, #fd7e14);
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
}

.custom-alert-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 20px;
  font-size: 35px;
  animation: bounceIn 0.6s ease;
}

.custom-alert-icon.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #28a745;
  box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
}

.custom-alert-icon.warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #ffc107;
  box-shadow: 0 5px 20px rgba(255, 193, 7, 0.3);
}

.custom-alert-icon.error {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #dc3545;
  box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
}

.custom-alert-icon.info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb);
  color: #17a2b8;
  box-shadow: 0 5px 20px rgba(23, 162, 184, 0.3);
}

.custom-alert-icon.confirm {
  background: linear-gradient(135deg, #e2d9f3, #c5b3e6);
  color: #6f42c1;
  box-shadow: 0 5px 20px rgba(111, 66, 193, 0.3);
}

.custom-alert-title {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #2d3436;
  margin-bottom: 12px;
  font-family: inherit;
}

.custom-alert-message {
  text-align: center;
  font-size: 15px;
  color: #636e72;
  margin-bottom: 25px;
  line-height: 1.8;
  white-space: pre-line;
  font-family: inherit;
}

.custom-alert-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.custom-alert-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.custom-alert-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.custom-alert-btn:hover::before {
  width: 300px;
  height: 300px;
}

.custom-alert-btn:active {
  transform: scale(0.95);
}

.custom-alert-btn.primary {
  background: linear-gradient(135deg, #6f42c1, #8551d9);
  color: white;
  box-shadow: 0 5px 15px rgba(111, 66, 193, 0.3);
}

.custom-alert-btn.primary:hover {
  box-shadow: 0 8px 25px rgba(111, 66, 193, 0.5);
  transform: translateY(-2px);
}

.custom-alert-btn.secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 2px solid #dee2e6;
}

.custom-alert-btn.secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.custom-alert-btn.danger {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.custom-alert-btn.danger:hover {
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
  transform: translateY(-2px);
}

.custom-alert-btn.success {
  background: linear-gradient(135deg, #28a745, #34ce57);
  color: white;
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.custom-alert-btn.success:hover {
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
  transform: translateY(-2px);
}

/* ==================== مودال پرداخت طلا - موبایل ==================== */
@media (max-width: 768px) {
  #goldPaymentModalBody .row.g-3,
  #goldPaymentModalBody .row.g-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  #goldPaymentModalBody .row.g-3 > div,
  #goldPaymentModalBody .row.g-2 > div {
    width: 100% !important;
    flex: none !important;
  }

  #goldPaymentModalBody .row.g-3 > div:first-child {
    grid-column: span 2 !important;
  }
}

/* ==================== Persian Datepicker ==================== */
.datepicker-plot-area {
  font-family: "Qarziyar", "Tahoma", sans-serif !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
  overflow: hidden !important;
  background: #ffffff !important;
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  position: fixed !important;
  z-index: 99999 !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
}

.datepicker-plot-area.datepicker-plot-area-inline {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
}

.datepicker-plot-area .datepicker-header {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #fff !important;
  padding: 12px 16px !important;
  border-radius: 12px 12px 0 0 !important;
}

.datepicker-plot-area .datepicker-header .datepicker-title {
  font-family: "Qarziyar", "Tahoma", sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #fff !important;
}

.datepicker-plot-area .datepicker-header .datepicker-prev,
.datepicker-plot-area .datepicker-header .datepicker-next {
  color: #fff !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s !important;
}

.datepicker-plot-area .datepicker-header .datepicker-prev:hover,
.datepicker-plot-area .datepicker-header .datepicker-next:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.datepicker-plot-area .datepicker-week-days {
  background: #f8fafc !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  display: flex !important;
  justify-content: space-around !important;
}

.datepicker-plot-area .datepicker-week-days .datepicker-week-day {
  color: #4f46e5 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  font-family: "Qarziyar", "Tahoma", sans-serif !important;
  width: 36px !important;
  text-align: center !important;
}

.datepicker-plot-area .datepicker-cells {
  padding: 4px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

.datepicker-plot-area .datepicker-cell {
  font-family: "Qarziyar", "Tahoma", sans-serif !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  transition: all 0.2s !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  margin: 2px !important;
  cursor: pointer !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.datepicker-plot-area .datepicker-cell:hover {
  background: #eef2ff !important;
  color: #4f46e5 !important;
}

.datepicker-plot-area .datepicker-cell.selected {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

.datepicker-plot-area .datepicker-cell.today {
  color: #4f46e5 !important;
  font-weight: 700 !important;
  border: 2px solid #4f46e5 !important;
  border-radius: 8px !important;
}

.datepicker-plot-area .datepicker-cell.today.selected {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #fff !important;
  border-color: #4f46e5 !important;
}

.datepicker-plot-area .datepicker-cell.other-month {
  color: #d1d5db !important;
}

.datepicker-plot-area .datepicker-cell.other-month:hover {
  background: #f9fafb !important;
  color: #9ca3af !important;
}

.datepicker-plot-area .datepicker-cell.disabled {
  color: #e5e7eb !important;
  cursor: not-allowed !important;
  opacity: 0.5 !important;
}

.datepicker-plot-area .datepicker-cell.disabled:hover {
  background: transparent !important;
  color: #d1d5db !important;
}

.datepicker-plot-area .datepicker-footer {
  padding: 10px 16px !important;
  border-top: 1px solid #f1f5f9 !important;
  background: #fafafa !important;
  border-radius: 0 0 12px 12px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.datepicker-plot-area .datepicker-footer .datepicker-today {
  color: #4f46e5 !important;
  font-family: "Qarziyar", "Tahoma", sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 4px 12px !important;
  border-radius: 6px !important;
  transition: background 0.2s !important;
  cursor: pointer !important;
}

.datepicker-plot-area .datepicker-footer .datepicker-today:hover {
  background: #eef2ff !important;
}

.datepicker-plot-area .datepicker-footer .datepicker-close {
  color: #6b7280 !important;
  font-family: "Qarziyar", "Tahoma", sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 4px 12px !important;
  border-radius: 6px !important;
  transition: background 0.2s !important;
  cursor: pointer !important;
}

.datepicker-plot-area .datepicker-footer .datepicker-close:hover {
  background: #f3f4f6 !important;
}

.datepicker-plot-area,
.datepicker-plot-area * {
  box-sizing: border-box !important;
}

.datepicker-plot-area .datepicker-day-view,
.datepicker-plot-area .datepicker-month-view,
.datepicker-plot-area .datepicker-year-view {
  width: 100% !important;
  max-width: 280px !important;
  overflow: hidden !important;
}

.datepicker-plot-area table {
  width: 100% !important;
  max-width: 280px !important;
  margin: 0 auto !important;
  border-collapse: collapse !important;
}

.datepicker-plot-area table td,
.datepicker-plot-area table th {
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.datepicker-plot-area::-webkit-scrollbar {
  display: none !important;
}

/* ورودی‌های تاریخ */
#filterStartDate,
#filterEndDate {
  cursor: pointer !important;
  background-color: #fff !important;
  font-family: "Qarziyar", "Tahoma", sans-serif !important;
  text-align: center !important;
  direction: ltr !important;
  letter-spacing: 1px !important;
  border-color: #d1d5db !important;
  transition: all 0.3s ease !important;
}

#filterStartDate:hover,
#filterEndDate:hover {
  border-color: #9ca3af !important;
}

#filterStartDate:focus,
#filterEndDate:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25) !important;
}

#filterStartDate::placeholder,
#filterEndDate::placeholder {
  color: #9ca3af !important;
  font-size: 13px !important;
  text-align: center !important;
  direction: rtl !important;
  letter-spacing: 0 !important;
}

.input-group-text {
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border-color: #d1d5db !important;
}

.input-group-text:hover {
  background-color: #eef2ff !important;
}

.input-group-text img {
  width: 18px !important;
  height: 18px !important;
  filter: brightness(0) saturate(100%) invert(28%) sepia(70%) saturate(2500%)
    hue-rotate(230deg) brightness(95%) contrast(90%);
}

.input-group-text:hover img {
  filter: brightness(0) saturate(100%) invert(28%) sepia(70%) saturate(2500%)
    hue-rotate(230deg) brightness(95%) contrast(90%);
}

.input-group {
  position: relative;
}

.input-group::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transition: all 0.3s ease;
  opacity: 0;
  border-radius: 0 0 4px 4px;
}

.input-group:focus-within::after {
  left: 0;
  right: 0;
  opacity: 1;
}

.input-group:has(#filterStartDate:not(:placeholder-shown))::after,
.input-group:has(#filterEndDate:not(:placeholder-shown))::after {
  left: 0;
  right: 0;
  opacity: 0.5;
}

/* ==================== استایل تب‌ها ==================== */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.settings-tab {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: #6c757d;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  font-family: "Qarziyar", Tahoma;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.settings-tab:hover {
  color: #4a6b8a;
  background: #f8f9fa;
}

.settings-tab.active {
  color: #4a6b8a;
  font-weight: 700;
  border-bottom-color: #4a6b8a;
  background: transparent;
}

.settings-tab .tab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.settings-tab.active .tab-icon {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(26%) sepia(12%) saturate(1850%)
    hue-rotate(175deg) brightness(57%) contrast(85%);
}

.settings-tab .tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* ==================== سامانه یادآوری پیامکی ==================== */

/* سوییچ یادآوری */
.toggle-reminder-card {
  border-radius: 16px !important;
  background: #ffffff;
  transition: all 0.2s;
}

.toggle-reminder-card:hover {
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.08) !important;
}

.toggle-reminder-card .form-check-input {
  background-color: #e5e7eb;
  border-color: #d1d5db;
  transition: all 0.3s;
}

.toggle-reminder-card .form-check-input:checked {
  background-color: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.toggle-reminder-card .form-check-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* کارت موجودی پیامکی */
.sms-credit-card {
  border-radius: 16px !important;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  transition: all 0.2s;
}

.sms-credit-card:hover {
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.1) !important;
}

.sms-icon-wrapper {
  display: flex;
  justify-content: center;
}

.sms-icon {
  width: 55px;
  height: 55px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
}

.sms-credit-card #smsCredit {
  font-size: 32px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  font-weight: 700;
}

.sms-credit-card .progress {
  background-color: #eef2ff;
  border-radius: 10px;
  overflow: hidden;
}

.sms-credit-card .progress-bar {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 10px;
}

.sms-credit-card .btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.sms-credit-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

/* فیلترهای یادآوری */
.filter-btn {
  border-radius: 10px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
}

.filter-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}

.filter-btn.active {
  background: #4f46e5;
  color: white;
  border-color: #4f46e5;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

/* جدول یادآوری */
.reminder-table {
  border-collapse: separate;
  border-spacing: 0 8px;
  width: 100%;
}

.reminder-table thead th {
  background: #f8fafc;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  padding: 12px 16px;
  border: none;
  white-space: nowrap;
  text-align: right;
}

.reminder-table thead th:first-child {
  border-radius: 0 12px 12px 0;
}

.reminder-table thead th:last-child {
  border-radius: 12px 0 0 12px;
}

.reminder-table tbody tr {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  cursor: pointer;
}

.reminder-table tbody tr:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  background: #fafbff;
}

.reminder-table tbody td {
  padding: 14px 16px;
  border: none;
  vertical-align: middle;
  font-size: 13px;
  color: #1e293b;
}

.reminder-table tbody td:first-child {
  border-radius: 0 12px 12px 0;
  font-weight: 600;
}

.reminder-table tbody td:last-child {
  border-radius: 12px 0 0 12px;
}

/* وضعیت‌های یادآوری */
.status-badge-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge-sm.sent {
  background: #d1fae5;
  color: #065f46;
}

.status-badge-sm.pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge-sm.failed {
  background: #fee2e2;
  color: #991b1b;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.sent {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot.pending {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.status-dot.failed {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* دکمه ارسال پیام */
.btn-send-sms {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-send-sms:hover {
  background: #4f46e5;
  color: white;
  border-color: #4f46e5;
}

.btn-send-sms:hover img,
.btn-send-sms:hover svg {
  filter: brightness(0) invert(1);
}

/* باکس‌های آمار کوچک */
.stat-mini-box {
  background: #f8fafc;
  border: 1px solid #e9edf2;
  transition: all 0.2s;
  min-height: 75px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-mini-box:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  transform: translateY(-1px);
}

.stat-mini-box strong {
  font-size: 20px;
  font-weight: 700;
}

/* ==================== customers details ==================== */
.page-header {
  background: linear-gradient(135deg, #1e2b4f 0%, #2d4a8c 100%);
  color: white;
  border-radius: 0 0 24px 24px;
  padding: 20px 24px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 20px;
  border-radius: 30px;
  transition: all 0.2s;
  font-weight: 500;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  color: white;
}

.add-purchase-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-purchase-btn:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  color: white;
}

.profile-card {
  background: white;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 28px;
  margin-bottom: 32px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid #eef2ff;
  padding-bottom: 20px;
  margin-bottom: 20px;
  justify-content: space-between;
}

.customer-title h3 {
  font-weight: 800;
  margin: 0;
  color: #1e2b4f;
  margin-bottom: 10px;
}

.customer-title .customer-code {
  color: #7380ec;
  font-weight: 500;
  font-size: 14px;
}

/* آمارها */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-box {
  flex: 1;
  min-width: 130px;
  background: #f8fafd;
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  border: 1px solid #e9edf2;
}

.stat-label {
  font-size: 12px;
  color: #6c7a91;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #1e2b4f;
}

.customer-info-toggle {
  background: #f8fafd;
  border: 1px solid #e9edf2;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s;
  margin-top: 16px;
}

.customer-info-toggle:hover {
  background: #eef2ff;
}

.customer-info-toggle .toggle-text {
  font-weight: 600;
  color: #1e2b4f;
}

.customer-info-toggle .toggle-icon {
  transition: transform 0.3s;
  font-size: 20px;
}

.customer-info-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

.customer-info-content {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px;
  background: #fafcff;
  border-radius: 0 0 12px 12px;
}

.customer-info-content.show {
  display: grid;
}

.info-card {
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid #e9edf2;
}

.info-card-title {
  font-size: 11px;
  color: #6c7a91;
  margin-bottom: 4px;
  font-weight: 600;
}

.info-card-value {
  font-size: 14px;
  font-weight: 700;
  color: #1e2b4f;
}

.warning-badge {
  background: #f8d7da;
  color: #721c24;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.clean-badge {
  background: #d4edda;
  color: #155724;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* کارت خرید */
.purchase-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
  overflow: hidden;
  cursor: pointer;
}

.purchase-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #7380ec;
}

.purchase-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
  background: white;
}

.product-info {
  flex: 2;
  min-width: 200px;
}

.product-name {
  font-weight: 800;
  font-size: 16px;
  color: #1e2b4f;
  margin-bottom: 4px;
}

.product-meta {
  font-size: 11px;
  color: #8e9aaf;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.amount-info {
  flex: 3;
  min-width: 180px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.amount-item {
  text-align: center;
  background: #f8fafd;
  padding: 6px 12px;
  border-radius: 14px;
  min-width: 85px;
}

.amount-label {
  font-size: 10px;
  color: #8e9aaf;
}

.amount-value {
  font-size: 14px;
  font-weight: 700;
}

.amount-value.remaining {
  color: #dc3545;
}

.amount-value.paid {
  color: #28a745;
}

.installment-info {
  flex: 1.5;
  min-width: 130px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.installment-badge {
  background: #eef2ff;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.action-buttons {
  flex: 1.2;
  min-width: 130px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f0f2f8;
}

.icon-btn img {
  width: 20px;
  height: 20px;
}

.icon-btn:hover {
  transform: scale(1.05);
}

.icon-btn.pay {
  background: #28a745;
}
.icon-btn.pay img {
  filter: brightness(0) invert(1);
}
.icon-btn.pay:hover {
  background: #218838;
}

.icon-btn.print {
  background: #17a2b8;
}
.icon-btn.print img {
  filter: brightness(0) invert(1);
}
.icon-btn.print:hover {
  background: #138496;
}

.icon-btn.delete {
  background: #dc3545;
}
.icon-btn.delete img {
  filter: brightness(0) invert(1);
}
.icon-btn.delete:hover {
  background: #c82333;
}

/* کارت‌های اقساط */
.installment-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.3s;
  cursor: pointer;
}

.installment-card:last-child {
  margin-bottom: 0;
}

.installment-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.installment-card.paid {
  background: #f5f5f5;
  border-color: #d0d0d0;
  opacity: 0.7;
  cursor: not-allowed;
}

.installment-card.selected {
  border-color: #28a745;
  background: #f0fff4;
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
}

.installment-card.border-success {
  border-color: #28a745 !important;
}
.installment-card.bg-success-light {
  background: #f0fff4;
}
.installment-card.border-danger {
  border-color: #dc3545 !important;
}
.installment-card.bg-danger-light {
  background: #fff5f5;
}
.installment-card.border-warning {
  border-color: #ffc107 !important;
}
.installment-card.bg-warning-light {
  background: #fffef5;
}

.installment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.installment-number {
  font-weight: 700;
  font-size: 14px;
  color: #333;
}

.installment-card-body {
  font-size: 13px;
}

.installment-card-body .row > div {
  margin-bottom: 8px;
}

.installment-card-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.installment-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.installment-status.paid-status {
  background: #d4edda;
  color: #155724;
}

.installment-status.unpaid-status {
  background: #fff3cd;
  color: #856404;
}

.installment-status.overdue-status {
  background: #f8d7da;
  color: #721c24;
}

.installment-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.installment-detail-item {
  font-size: 13px;
}

.installment-detail-label {
  color: #6c7a91;
  font-size: 11px;
}

.installment-detail-value {
  font-weight: 600;
  color: #1e2b4f;
}

.installment-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.installment-actions input,
.installment-actions select {
  font-size: 13px;
}

.purchase-details {
  font-size: 12px;
  color: #1e2b4f;
}

.sticky-bottom {
  position: sticky;
  bottom: 0;
  z-index: 10;
}

#paymentModal .modal-footer {
  background: #f8f9fa;
  border-top: 2px solid #dee2e6;
  padding: 12px 16px;
}

#paymentModal .modal-footer .w-100 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* استایل‌های اختصاصی برای تاگل و کارت‌ها */
.toggle-container {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-btn {
  flex: 1;
  padding: 12px 24px;
  border: 2px solid #e0e0e0;
  background: white;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.toggle-btn:first-child {
  border-radius: 0 12px 12px 0;
  border-left: none;
}

.toggle-btn:last-child {
  border-radius: 12px 0 0 12px;
}

.toggle-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  font-weight: 600;
}

.toggle-btn:hover:not(.active) {
  background: #f8f9fa;
}

.hidden {
  display: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ==================== انیمیشن‌ها ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideDown {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
}

.custom-alert-overlay.removing {
  animation: fadeOut 0.3s ease forwards;
}

.custom-alert-overlay.removing .custom-alert-card {
  animation: slideDown 0.3s ease forwards;
}

/* ==================== DARK MODE ==================== */
body.dark-mode,
body.dark-mode .modal-content {
  background: #1f2129 !important;
  color: #e0e0e0 !important;
}
body.dark-mode .sidebar,
body.dark-mode .offcanvas {
  background: #212529 !important;
  color: #e0e0e0 !important;
}
body.dark-mode .card,
body.dark-mode .stat-card,
body.dark-mode .card-custom,
body.dark-mode .seller-card,
body.dark-mode .audit-card,
body.dark-mode .date-box,
body.dark-mode .card-body,
body.dark-mode .modal-header,
body.dark-mode .history-item,
body.dark-mode .modal-body .bg-white,
body.dark-mode .form-access .bg-light,
body.dark-mode .profile-card,
body.dark-mode .purchase-row,
body.dark-mode .customer-info-toggle,
body.dark-mode .customer-info-content,
body.dark-mode .plan-card,
body.dark-mode .installment-card,
body.dark-mode .modal-guarantor-toggle {
  background: #2c3038 !important;
  color: #e0e0e0 !important;
  border-color: #3a3f47 !important;
}
body.dark-mode .card-body .bg-light {
  background: #383d46 !important;
}
body.dark-mode .card-body .bg-light .variable-tag,
body.dark-mode .stat-box {
  background: #414751 !important;
}
body.dark-mode .nav-link {
  color: #b0b3b8 !important;
}
body.dark-mode .nav-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}
body.dark-mode .nav-link.active {
  background: rgba(115, 128, 236, 0.2) !important;
  color: #8b93f0 !important;
}
body.dark-mode .text-secondary,
body.dark-mode .detail-item span,
body.dark-mode .modal-title {
  color: #9ca3af !important;
}
body.dark-mode h1,
body.dark-mode h3,
body.dark-mode .card-title,
body.dark-mode .customer-name,
body.dark-mode .seller-name,
body.dark-mode .audit-contact,
body.dark-mode p.fw-bold,
body.dark-mode .fw-bold,
body.dark-mode .detail-item,
body.dark-mode .stat-label,
body.dark-mode .stat-value,
body.dark-mode .product-name,
body.dark-mode .toggle-text,
body.dark-mode .info-card-value,
body.dark-mode .info-card-title,
body.dark-mode .purchase-details,
body.dark-mode .plan-card,
body.dark-mode .table {
  color: #f0f0f0 !important;
}
body.dark-mode .btn-outline-secondary {
  color: #d1d5db !important;
  border-color: #4b5563 !important;
}
body.dark-mode .btn-outline-secondary:hover {
  background: #fcff9a !important;
}
body.dark-mode .btn-outline-secondary.active {
  background: #4b5563 !important;
  border-color: #6b7280 !important;
  color: white !important;
}
body.dark-mode .profile-section {
  background: rgba(255, 255, 255, 0.05) !important;
}
body.dark-mode .border-top {
  border-color: #3a3f47 !important;
}
body.dark-mode .logo-text {
  color: #f0f0f0 !important;
}
body.dark-mode .icon,
body.dark-mode img[src*=".svg"],
body.dark-mode .stat-icon img,
body.dark-mode .nav-link img,
body.dark-mode .btn-close {
  filter: brightness(0) invert(0.8) !important;
}
body.dark-mode .btn-icon-action img {
  filter: brightness(0) !important;
}
body.dark-mode img[src*="profile"],
body.dark-mode img[src*="logo"],
body.dark-mode .rounded-circle {
  filter: none !important;
}
body.dark-mode .card .card-body {
  border-radius: 1rem !important;
}
body.dark-mode .amount-item,
body.dark-mode .installment-badge,
body.dark-mode .modal-body .bg-light,
body.dark-mode .info-card {
  background: #f8fafd1a !important;
}

body.dark-mode::-webkit-scrollbar-thumb {
  background: #555;
}
body.dark-mode::-webkit-scrollbar-thumb:hover {
  background: #777;
}

#lightBtn1 {
  border-radius: 0 10px 10px 0 !important;
  padding: 10px 10px 10px 5px;
}
#darkBtn1 {
  border-radius: 10px 0 0 10px !important;
  padding: 10px 5px 10px 10px;
}

/* Dark Mode - سامانه یادآوری */
body.dark-mode .toggle-reminder-card,
body.dark-mode .sms-credit-card,
body.dark-mode .stat-mini-box {
  background: #2c3038 !important;
  border-color: #3a3f47 !important;
  color: #e0e0e0 !important;
}

body.dark-mode .sms-credit-card {
  background: linear-gradient(135deg, #2c3038 0%, #2c3038 100%) !important;
}

body.dark-mode .reminder-table thead th {
  background: #383d46 !important;
  color: #9ca3af !important;
}

body.dark-mode .reminder-table tbody tr {
  background: #2c3038 !important;
}

body.dark-mode .reminder-table tbody tr:hover {
  background: #353942 !important;
}

body.dark-mode .reminder-table tbody td {
  color: #e0e0e0 !important;
}

body.dark-mode .sms-credit-card #smsCredit {
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .plan-features li {
  color: white;
}

body.dark-mode .sms-credit-card .progress {
  background-color: #383d46;
}

body.dark-mode .btn-send-sms {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.3);
  color: #a5b4fc;
}

body.dark-mode .btn-send-sms:hover {
  background: #4f46e5;
  color: white;
}

body.dark-mode .filter-btn {
  border-color: #3a3f47;
  color: #d1d5db;
  background: transparent;
}

body.dark-mode .filter-btn:hover {
  border-color: #4f46e5;
  color: #a5b4fc;
}

body.dark-mode .filter-btn.active {
  background: #4f46e5;
  color: white;
}

body.dark-mode .stat-mini-box strong {
  color: #f0f0f0 !important;
}

body.dark-mode .stat-mini-box .text-primary {
  color: #a5b4fc !important;
}

body.dark-mode .stat-mini-box .text-success {
  color: #6ee7b7 !important;
}

body.dark-mode .stat-mini-box .text-danger {
  color: #fca5a5 !important;
}

body.dark-mode .stat-mini-box .text-warning {
  color: #fcd34d !important;
}

/* Dark Mode - Pro Plan */
body.dark-mode .pro-plan-message {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .pro-plan-title {
  color: #f0f0f0;
}

body.dark-mode .pro-plan-text {
  color: #d1d5db;
}

body.dark-mode .pro-plan-desc {
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
}

/* ==================== MEDIA QUERIES ==================== */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .sidebar {
    padding: 0.5rem !important;
  }
  .detail-group,
  .debt-detail-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .modal-xl {
    max-width: 90% !important;
  }
}

@media (max-width: 767.98px) {
  .sidebar {
    display: none;
    min-height: auto;
  }

  .info-grid,
  .summary-grid,
  .financial-grid {
    grid-template-columns: 1fr;
  }

  .card-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .card-custom {
    padding: 1rem;
  }

  .customer-info div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
  }
  .detail-group,
  .debt-detail-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-content: start;
  }
  .action-area {
    justify-content: flex-end;
    margin-top: auto;
    width: 100%;
  }

  .debt-card-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .audit-card {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
  }

  .col.p-4 {
    padding: 1rem !important;
  }

  .chart-container {
    height: 200px !important;
  }

  .chart-container canvas {
    height: 100% !important;
  }

  .step-label {
    font-size: 11px;
  }

  .step-circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .profile-card {
    padding: 18px;
  }
  .purchase-row {
    flex-direction: column;
    align-items: stretch;
  }
  .action-buttons {
    justify-content: end;
    margin-top: 8px;
  }
  .amount-info {
    justify-content: space-between;
  }
  .installment-info {
    justify-content: space-between;
  }
  .stat-value {
    font-size: 16px;
  }

  .mobile-actions {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .audit-amount-wrapper {
    width: 100%;
    justify-content: space-between;
  }

  .stats-row-sm {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-box-sm {
    padding: 8px 6px;
  }

  .stat-box-sm .stat-value {
    font-size: 12px;
  }

  .settings-tabs {
    padding: 0 8px;
  }

  .settings-tab {
    padding: 12px 8px;
    font-size: 0.8rem;
    gap: 4px;
  }

  .settings-tab .tab-icon {
    width: 16px;
    height: 16px;
  }

  .print-report-btn {
    padding: 8px 15px;
    font-size: 13px;
  }

  .reminder-table {
    border-spacing: 0 6px;
  }

  .reminder-table thead th,
  .reminder-table tbody td {
    padding: 10px 10px;
    font-size: 12px;
  }

  .reminder-table thead th {
    font-size: 11px;
  }

  .sms-icon {
    width: 48px;
    height: 48px;
  }

  .sms-credit-card #smsCredit {
    font-size: 24px;
  }

  .stat-mini-box {
    min-height: 70px;
  }

  .stat-mini-box strong {
    font-size: 18px;
  }

  .filter-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .custom-alert-card {
    padding: 20px;
    margin: 10px;
  }

  .custom-alert-icon {
    width: 55px;
    height: 55px;
    font-size: 28px;
  }

  .custom-alert-title {
    font-size: 17px;
  }

  .custom-alert-message {
    font-size: 13px;
  }

  .custom-alert-btn {
    padding: 10px 20px;
    font-size: 13px;
    min-width: 100px;
  }

  #paymentModal .modal-footer .w-100 {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  #paymentModal .modal-footer .d-flex.gap-2 {
    justify-content: center;
  }

  .datepicker-plot-area {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
  }

  .datepicker-plot-area .datepicker-cell {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    margin: 1px !important;
    font-size: 12px !important;
  }

  .datepicker-plot-area .datepicker-week-days .datepicker-week-day {
    width: 32px !important;
    font-size: 11px !important;
  }

  .reminder-table thead th:nth-child(2),
  .reminder-table tbody td:nth-child(2) {
    display: none;
  }

  .reminder-table {
    border-spacing: 0 4px;
  }

  .reminder-table thead th,
  .reminder-table tbody td {
    padding: 8px 8px;
    font-size: 11px;
  }

  .status-badge-sm {
    padding: 4px 8px;
    font-size: 10px;
  }

  .btn-send-sms {
    padding: 5px 10px;
    font-size: 11px;
  }

  .sms-icon {
    width: 42px;
    height: 42px;
  }

  .sms-icon svg {
    width: 22px;
    height: 22px;
  }

  .sms-credit-card #smsCredit {
    font-size: 22px;
  }

  .stat-mini-box {
    min-height: 65px;
    padding: 8px 4px !important;
  }

  .stat-mini-box strong {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .amount-info {
    flex-wrap: wrap;
  }
  .amount-item {
    flex: 1;
  }
  .installment-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }
  .profile-header .add-purchase-btn {
    font-weight: 400;
    padding: 6px 14px;
  }

  .card-404 {
    padding: 30px 20px;
  }
  .number {
    font-size: 70px;
  }
  .btn-group {
    flex-direction: column;
  }
  .btn-404 {
    justify-content: center;
  }

  .settings-tab {
    padding: 10px 4px;
    font-size: 0.7rem;
    gap: 2px;
  }

  .settings-tab .tab-icon {
    width: 14px;
    height: 14px;
    margin-left: 2px;
  }

  .stats-row-sm {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .settings-tab .tab-icon {
    display: none;
  }

  .settings-tab {
    font-size: 0.65rem;
    padding: 8px 2px;
  }
}

/* ==================== Overlay پلن حرفه‌ای ==================== */
.reminder-panel-wrapper {
  position: relative;
  min-height: 500px;
}

.pro-plan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(108, 117, 125, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 20px;
}

.pro-plan-overlay .pro-plan-message {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 550px;
  width: 100%;
  animation: fadeInUp 0.5s ease;
}

/* غیرفعال کردن محتوای زیری */
.content-disabled {
  pointer-events: none;
  user-select: none;
  opacity: 0.7;
}

.content-disabled * {
  pointer-events: none;
}

/* انیمیشن */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* دارک مود */
body.dark-mode .pro-plan-overlay {
  background: rgba(0, 0, 0, 0.5);
}

body.dark-mode .pro-plan-overlay .pro-plan-message {
  background: rgba(44, 48, 56, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .pro-plan-overlay {
    padding: 15px;
    border-radius: 16px;
  }

  .pro-plan-overlay .pro-plan-message {
    padding: 30px 20px;
  }
}

/* ==================== وضعیت‌های یادآوری ==================== */
.status-badge-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ارسال موفق - سبز */
.status-badge-sm.sent {
  background: #d1fae5;
  color: #065f46;
}

/* نیاز به شارژ - زرد */
.status-badge-sm.pending {
  background: #fef3c7;
  color: #92400e;
}

/* ارسال ناموفق - قرمز */
.status-badge-sm.failed {
  background: #fee2e2;
  color: #991b1b;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.sent {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot.pending {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.status-dot.failed {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}
/* ==================== کارت پیش‌نمایش پیامک ==================== */
.sms-preview-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e9edf2;
  background: #fff;
  transition: all 0.2s;
}

.sms-preview-card:hover {
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.08);
}

.sms-preview-header {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.sms-preview-header svg {
  flex-shrink: 0;
}

.sms-preview-body {
  padding: 20px;
  background: #f8fafc;
}

.sms-preview-text {
  font-size: 14px;
  line-height: 2;
  color: #1e293b;
  margin: 0;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  border-right: 4px solid #4f46e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  direction: rtl;
}

.sms-preview-text strong {
  color: #4f46e5;
  font-weight: 700;
}

.sms-preview-footer {
  padding: 10px 18px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #fde68a;
}

.sms-preview-footer svg {
  flex-shrink: 0;
}

.sms-preview-link {
  color: #d97706;
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.2s;
}

.sms-preview-link:hover {
  color: #b45309;
}

/* Dark Mode */
body.dark-mode .sms-preview-card {
  background: #2c3038;
  border-color: #3a3f47;
}

body.dark-mode .sms-preview-body {
  background: #383d46;
}

body.dark-mode .sms-preview-text {
  background: #2c3038;
  color: #e0e0e0;
  border-right-color: #4f46e5;
}

body.dark-mode .sms-preview-text strong {
  color: #a5b4fc;
}

body.dark-mode .sms-preview-footer {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-top-color: rgba(245, 158, 11, 0.3);
}

body.dark-mode .sms-preview-link {
  color: #fcd34d;
}

body.dark-mode .sms-preview-link:hover {
  color: #fde68a;
}

/* Mobile */
@media (max-width: 576px) {
  .sms-preview-header {
    padding: 10px 14px;
    font-size: 13px;
  }

  .sms-preview-body {
    padding: 14px;
  }

  .sms-preview-text {
    font-size: 13px;
    padding: 12px 14px;
    line-height: 1.9;
  }

  .sms-preview-footer {
    padding: 8px 14px;
    font-size: 11px;
  }
}
/* ==================== لودینگ تاگل یادآوری ==================== */
.toggle-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 16px;
  transition: opacity 0.3s ease;
}

.toggle-loading-content {
  text-align: center;
  padding: 20px;
  max-width: 400px;
  width: 100%;
}

.toggle-loading-spinner {
  width: 45px;
  height: 45px;
  border: 4px solid #eef2ff;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: toggleSpin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes toggleSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.toggle-loading-text {
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
  margin: 0 0 15px 0;
}

.toggle-loading-progress {
  width: 100%;
  height: 6px;
  background: #eef2ff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.toggle-loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 10px;
  transition: width 0.05s linear;
}

.toggle-loading-hint {
  font-size: 12px;
  color: #6b7280;
  display: block;
}

/* دارک مود */
body.dark-mode .toggle-loading-overlay {
  background: rgba(44, 48, 56, 0.95);
}

body.dark-mode .toggle-loading-spinner {
  border-color: #3a3f47;
  border-top-color: #818cf8;
}

body.dark-mode .toggle-loading-text {
  color: #a5b4fc;
}

body.dark-mode .toggle-loading-progress {
  background: #383d46;
}

body.dark-mode .toggle-loading-hint {
  color: #9ca3af;
}

/* غیرفعال کردن تاگل در حین درخواست */
.toggle-reminder-card .form-check-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================== Splash Screen ==================== */
.app-splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #4a6b8a 0%, #2c3e50 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.app-splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-content {
  text-align: center;
  color: white;
  animation: splashFadeIn 0.8s ease;
}

.app-splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  margin-bottom: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: splashScale 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  object-fit: contain;
  background: white;
  padding: 10px;
}

.app-splash-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.app-splash-subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin: 0 0 40px;
  font-weight: 400;
}

.app-splash-loader {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: splashSpin 0.9s linear infinite;
  margin: 0 auto;
}

/* ==================== انیمیشن‌ها ==================== */
@keyframes splashFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splashScale {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes splashSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==================== دارک مود (اختیاری) ==================== */
body.dark-mode .app-splash {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
}

/* ==================== واکنش‌گرا ==================== */
@media (max-width: 576px) {
  .app-splash-logo {
    width: 100px;
    height: 100px;
    border-radius: 20px;
  }

  .app-splash-title {
    font-size: 26px;
  }

  .app-splash-subtitle {
    font-size: 13px;
    margin-bottom: 30px;
  }

  .app-splash-loader {
    width: 38px;
    height: 38px;
  }
}

/* ==================== حالت کاهش انیمیشن ==================== */
@media (prefers-reduced-motion: reduce) {
  .app-splash,
  .app-splash-logo,
  .app-splash-content {
    animation: none !important;
    transition: none !important;
  }
}

/* ==================== PWA Update Notification ==================== */
.pwa-update-notification {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0));
  left: calc(20px + env(safe-area-inset-left, 0));
  right: calc(20px + env(safe-area-inset-right, 0));
  max-width: 500px;
  margin: 0 auto;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 20px 60px rgba(79, 70, 229, 0.4);
  z-index: 9999999;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-update-notification.show {
  transform: translateY(0);
}

.pwa-update-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pwa-update-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.pwa-update-text {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pwa-update-text strong {
  font-size: 14px;
  font-weight: 700;
}

.pwa-update-text small {
  font-size: 12px;
  opacity: 0.9;
}

.pwa-update-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-update-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.pwa-update-now {
  background: white;
  color: #4f46e5;
}

.pwa-update-now:hover {
  background: #f0f0ff;
  transform: translateY(-2px);
}

.pwa-update-later {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.pwa-update-later:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* موبایل */
@media (max-width: 576px) {
  .pwa-update-notification {
    bottom: 10px;
    left: 10px;
    right: 10px;
    padding: 12px 16px;
  }

  .pwa-update-icon {
    width: 40px;
    height: 40px;
  }

  .pwa-update-actions {
    width: 100%;
  }

  .pwa-update-btn {
    flex: 1;
    padding: 10px;
  }
}

/* دارک مود */
body.dark-mode .pwa-update-notification {
  background: linear-gradient(135deg, #3730a3, #5b21b6);
}

/* ==================== PWA Install Button ==================== */
.pwa-install-btn {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0));
  left: 20px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  transition: all 0.3s ease;
  animation: pwaFadeInUp 0.5s ease;
}

.pwa-install-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.pwa-install-btn:active {
  transform: translateY(-1px);
}

.pwa-install-btn svg {
  width: 20px;
  height: 20px;
}

@keyframes pwaFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== PWA Toast ==================== */
.pwa-toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0));
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 24px;
  background: #1f2937;
  color: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: pwaSlideUp 0.3s ease;
  max-width: 90%;
  text-align: center;
}

.pwa-toast-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.pwa-toast strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.pwa-toast p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}

@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ==================== حالت Standalone ==================== */

body.pwa-standalone {
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  min-height: 100vh;
}

body.pwa-standalone .page-header {
  padding-top: calc(20px + env(safe-area-inset-top, 0));
}

body.pwa-standalone .container-fluid {
  padding-left: calc(15px + env(safe-area-inset-left, 0));
  padding-right: calc(15px + env(safe-area-inset-right, 0));
}

body.pwa-standalone .modal-dialog {
  margin-top: calc(0.5rem + env(safe-area-inset-top, 0));
  margin-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
}

.pull-indicator {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 9997;
  transition:
    transform 0.2s,
    opacity 0.2s;
  pointer-events: none;
}

.pull-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.pull-indicator span {
  font-size: 12px;
  color: #6b7280;
}

/* ==================== Offline Indicator ==================== */
body.is-offline::before {
  content: "📡 اتصال اینترنت قطع است";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ef4444;
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
  animation: pwaSlideDown 0.3s ease;
  padding-top: calc(8px + env(safe-area-inset-top, 0));
}

@keyframes pwaSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* اگر در حالت standalone هستید، به هدر فاصله بدهید */
body.pwa-standalone.is-offline .page-header {
  margin-top: 40px;
}
body.dark-mode.is-offline::before {
  background: #dc2626;
}
@media (max-width: 576px) {
  .pwa-install-btn {
    bottom: calc(15px + env(safe-area-inset-bottom, 0));
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 18px;
    font-size: 13px;
  }

  .pwa-install-btn:active {
    transform: translateX(-50%) scale(0.98);
  }
}
body.splash-active {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}
body.dark-mode .pwa-install-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
}

body.dark-mode .pwa-install-btn:hover {
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.info-box {
  background: #f8fafd;
  border: 1px solid #e9edf2;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s;
}

.info-box:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.info-box small {
  font-size: 12px;
  color: #6c7a91;
  font-weight: 500;
}

.info-box strong {
  font-size: 15px;
  color: #1e2b4f;
  font-weight: 700;
}

.info-box .badge {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
}

/* ==================== Plan Cards ==================== */
.plan-card {
  background: white;
  border: 2px solid #e9edf2;
  border-radius: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(79, 70, 229, 0.12);
  border-color: #c7d2fe;
}

.plan-card.selected {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.2);
}

.plan-card.selected::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: #4f46e5;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  animation: checkPop 0.3s ease;
}

@keyframes checkPop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.plan-card.popular {
  border-color: #f59e0b;
}

.plan-card.premium {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fff5f5, #ffffff);
}

.popular-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
}

/* ==================== Plan Icons ==================== */
.plan-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.plan-icon img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

.bg-secondary-soft {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.bg-primary-soft {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.bg-warning-soft {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.bg-gradient-gold {
  background: linear-gradient(135deg, #f59e0b, #dc2626);
}

/* ==================== Plan Features ==================== */
.plan-features {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eef2ff;
}

.plan-features li {
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.6;
  color: #1e293b;
}

.feature-check {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(1000%)
    hue-rotate(85deg) brightness(95%) contrast(88%);
}

.feature-x {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* ==================== Info Box ==================== */
.info-box {
  background: #f8fafd;
  border: 1px solid #e9edf2;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s;
}

.info-box:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.info-box small {
  font-size: 12px;
  color: #6c7a91;
  font-weight: 500;
}

.info-box strong {
  font-size: 15px;
  color: #1e2b4f;
  font-weight: 700;
}

.info-box .badge {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  width: fit-content;
}

/* ==================== Responsive ==================== */
@media (max-width: 992px) {
  .plan-card {
    margin-bottom: 20px;
  }
}

@media (max-width: 576px) {
  .plan-icon {
    width: 50px;
    height: 50px;
  }

  .plan-icon img {
    width: 24px;
    height: 24px;
  }

  .plan-features li {
    font-size: 12px;
  }
}

/* ==================== SMS Package Item ==================== */
.sms-package-item {
  background: #fff;
  transition: all 0.2s ease;
}

.sms-package-item:hover {
  border-color: #4f46e5 !important;
  background: #f8f9ff;
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.sms-package-item .sms-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  flex-shrink: 0;
}
