/* ==========================================================================
   کلاغ (Kalagh) | سیستم طراحی پخته و گرم سازمانی (Melije Warm Design System)
   طراحی اختصاصی چت‌بات هوش مصنوعی، کشف خدمات و پنل مدیریت
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Vazirmatn', ui-monospace, monospace;

  /* پالت رنگی گرم کلاغ */
  --paper: #FAF8F5;
  --white: #FFFFFF;
  --ink: #262421;
  --muted: #7E7870;
  --line: #ECE7DF;
  --line-light: #F4EFEB;

  --accent: #E06B55;
  --accent-hover: #CC5742;
  --accent-dark: #A9402E;
  --peach: #FBF0EE;
  --soft: #F6F3EE;
  --green: #10B981;
  --warning: #F59E0B;
  --danger: #F43F5E;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 2px 8px rgba(38, 36, 33, 0.04);
  --shadow-md: 0 8px 24px rgba(38, 36, 33, 0.07);
  --shadow-lg: 0 16px 40px rgba(38, 36, 33, 0.1);

  color-scheme: light;
}

html.dark {
  --paper: #13100E;
  --white: #1F1A17;
  --ink: #EDEDED;
  --muted: #9E968F;
  --line: #2D2520;
  --line-light: #241E1A;

  --accent: #E06B55;
  --accent-hover: #F27A64;
  --accent-dark: #CC5742;
  --peach: rgba(224, 107, 85, 0.15);
  --soft: #181412;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: var(--accent);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(224, 107, 85, 0.25);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 107, 85, 0.5);
}

a {
  color: inherit;
  text-decoration: none;
}

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

select {
  direction: rtl;
  text-align: right;
  text-align-last: right;
  box-sizing: border-box;
  max-width: 100%;
}

select option {
  direction: rtl;
  text-align: right;
  padding: 0;
  margin: 0;
  line-height: normal;
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.2s ease;
}

svg {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

i[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  flex-shrink: 0;
}

/* ================== ساختار اصلی شل وب‌اپ (App Shell) ================== */
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100dvh;
  min-height: 500px;
  max-width: 100vw;
  margin: 0;
  transition: grid-template-columns 0.22s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  background: var(--paper);
}

/* حالت بسته شدن سایدبار: تبدیل به نوار باریک آیکونی مثل عکس دوم کاربر */
.app-shell.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 16px 12px 14px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  min-height: 0;
  z-index: 30;
  transition: width 0.22s cubic-bezier(0.2, 0, 0, 1), padding 0.22s ease;
  overflow: hidden;
  user-select: none;
}

/* اسکریمی که در نسخه دسکتاپ مطلقاً نباید وارد گرید شود */
.sidebar-scrim {
  display: none !important;
}

/* هدر بالای سایدبار */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 44px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sidebar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-brand .brand-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar-brand .brand-version-badge {
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  padding: 1.5px 3.5px;
  border-radius: 4px;
  background: rgba(224, 107, 85, 0.12);
  color: var(--accent);
  border: 1px solid rgba(224, 107, 85, 0.22);
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand .brand-text {
  font-size: 19px;
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

/* دکمه تاگل سایدبار با آیکون مستطیل و خط عمودی */
.sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--soft);
  color: var(--ink);
}

/* دکمه گفت‌وگوی جدید (New Chat) */
.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
}

.new-chat-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--peach);
}

/* ناوبری اصلی */
.sidebar-nav {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.18s ease;
}

.sidebar-nav .nav-item:hover {
  background: var(--soft);
  color: var(--ink);
}

.sidebar-nav .nav-item.active {
  background: var(--peach);
  color: var(--accent-dark);
  font-weight: 700;
}

.sidebar-nav .nav-item .active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: auto;
}

.sidebar-nav .nav-item .count-badge {
  background: var(--soft);
  color: var(--muted);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10px;
  margin-right: auto;
}

/* بخش تاریخچه گفت‌وگوها */
.history-block {
  margin-top: 18px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.2px;
}

.history-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-clear-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  color: var(--muted);
  border-radius: 4px;
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.history-clear-btn:hover {
  opacity: 1;
  color: var(--danger);
  background: rgba(244, 63, 94, 0.1);
}

.history-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 3px;
  padding: 4px 0;
}

.history-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 8px 10px;
  text-align: right;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  text-align: right;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.history-item:hover {
  background: var(--soft);
  color: var(--ink);
}

.history-item.active {
  background: var(--peach);
  color: var(--accent-dark);
  font-weight: 700;
}

.history-item-body {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  text-align: right;
}

.history-item-body span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-del {
  opacity: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 4px;
  color: var(--muted);
  transition: all 0.15s ease;
  background: none;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
}

.history-item:hover .history-item-del {
  opacity: 0.7;
}

.history-item-del:hover {
  opacity: 1 !important;
  color: var(--danger);
  background: rgba(244, 63, 94, 0.12);
}

.history-footer {
  padding: 3px 0 6px;
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.history-more-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.history-more-btn:hover {
  background: var(--paper);
  border-color: var(--accent);
  color: var(--accent);
}

.history-more-btn:active {
  transform: scale(0.98);
}

.history-more-btn i,
.history-more-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.history-more-btn:hover i,
.history-more-btn:hover svg {
  transform: translateY(1px);
}

/* بخش پایینی سایدبار */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.18s ease;
}

.sidebar-action:hover {
  background: var(--soft);
  color: var(--ink);
}

/* دکمه اختصاصی ثبت شغل و کسب و کار پرو (مشابه ارتقای بسته در تصویر) */
.sidebar-upgrade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: normal;
  overflow: visible;
  margin: 6px 0;
  flex-shrink: 0;
}

.sidebar-upgrade-item:hover {
  background: var(--soft);
  color: var(--ink);
}

.upgrade-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: right;
  flex: 1;
}

.upgrade-item-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.upgrade-item-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upgrade-item-sparkle {
  color: var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-right: 8px;
  opacity: 0.9;
  transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-upgrade-item:hover .upgrade-item-sparkle {
  color: var(--accent);
  transform: scale(1.15);
}

/* ردیف پروفایل کاربر + سوییچ ماه و خورشید */
.sidebar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  background: transparent;
  position: relative;
}

.sidebar-user-row .user-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  color: var(--ink);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.18s ease;
  text-decoration: none;
}

.sidebar-user-row .user-link:hover {
  background: var(--soft);
}

.avatar-small {
  background: var(--peach);
  color: var(--accent);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-row .user-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.sidebar-user-row .user-name {
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-row .profile-arrow {
  color: var(--muted);
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

/* سوییچ پیل ماه و خورشید (Moon / Sun Switch) */
.theme-switch-btn {
  width: 50px;
  height: 26px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.theme-switch-btn:hover {
  border-color: var(--accent);
}

.theme-switch-btn .theme-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: all 0.2s ease;
}

.theme-switch-btn .theme-icon i,
.theme-switch-btn .theme-icon svg {
  width: 13px;
  height: 13px;
}

.theme-switch-btn .sun-icon {
  color: #f59e0b;
  opacity: 1;
}

.theme-switch-btn .moon-icon {
  color: var(--muted);
  opacity: 0.45;
}

/* دستگیره لغزنده سوئیچ */
.theme-switch-btn::before {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  z-index: 1;
}

/* در حالت دارک مود */
html.dark .theme-switch-btn {
  background: #25201a;
  border-color: #3f362c;
}

html.dark .theme-switch-btn::before {
  transform: translateX(-24px);
  background: #383025;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

html.dark .theme-switch-btn .sun-icon {
  color: var(--muted);
  opacity: 0.4;
}

html.dark .theme-switch-btn .moon-icon {
  color: #60a5fa;
  opacity: 1;
}

/* فلش پروفایل */
.profile-arrow {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
}

.profile-arrow:hover {
  color: var(--accent);
}

.sidebar-footer-note {
  text-align: center;
  padding-top: 4px;
}

.sidebar-footer-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.version-badge {
  font-size: 10px;
  color: var(--muted);
  background: var(--soft);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.35;
  transition: all 0.18s ease;
}

a.version-badge:hover,
.sidebar-footer-link:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong, #cbd5e1);
}

/* ================== حالت جمع‌شده (Collapsed Slim Rail) ================== */
/* دقیقاً شبیه عکس دوم کاربر */
.app-shell.sidebar-collapsed .sidebar {
  padding: 16px 8px 14px;
  align-items: center;
}

.app-shell.sidebar-collapsed .sidebar-header {
  justify-content: center;
  width: 100%;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  display: none;
}

.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .brand-info,
.app-shell.sidebar-collapsed .brand-version-badge,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .active-dot,
.app-shell.sidebar-collapsed .count-badge,
.app-shell.sidebar-collapsed .history-block,
.app-shell.sidebar-collapsed .action-body,
.app-shell.sidebar-collapsed .user-meta,
.app-shell.sidebar-collapsed .user-arrow,
.app-shell.sidebar-collapsed .sidebar-footer-note {
  display: none !important;
}

.app-shell.sidebar-collapsed .new-chat-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 6px auto;
}

.app-shell.sidebar-collapsed .sidebar-nav {
  width: 100%;
  justify-items: center;
}

.app-shell.sidebar-collapsed .sidebar-nav .nav-item {
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.app-shell.sidebar-collapsed .sidebar-bottom {
  width: 100%;
  justify-items: center;
}

.app-shell.sidebar-collapsed .sidebar-action {
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.app-shell.sidebar-collapsed .sidebar-upgrade-item {
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.app-shell.sidebar-collapsed .sidebar-upgrade-item .upgrade-item-text {
  display: none !important;
}

.app-shell.sidebar-collapsed .sidebar-upgrade-item .upgrade-item-sparkle {
  margin: 0;
}

.app-shell.sidebar-collapsed .sidebar-user-row {
  flex-direction: column;
  padding: 0;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.app-shell.sidebar-collapsed .sidebar-user-row .user-meta,
.app-shell.sidebar-collapsed .sidebar-user-row .profile-arrow {
  display: none !important;
}

.app-shell.sidebar-collapsed .theme-switch-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  justify-content: center;
}

.app-shell.sidebar-collapsed .theme-switch-btn::before {
  display: none;
}

.app-shell.sidebar-collapsed .theme-switch-btn .sun-icon {
  display: flex;
}

.app-shell.sidebar-collapsed .theme-switch-btn .moon-icon {
  display: none;
}

html.dark .app-shell.sidebar-collapsed .theme-switch-btn .sun-icon {
  display: none;
}

html.dark .app-shell.sidebar-collapsed .theme-switch-btn .moon-icon {
  display: flex;
}

.app-shell.sidebar-collapsed .avatar-small {
  width: 34px;
  height: 34px;
}

/* ================== فضای کاری اصلی (Workspace) ================== */
.workspace {
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

.main-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  height: 100%;
  position: relative;
}

.scroll-area {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* ================== چت‌بات سبک Duck.ai (لوگو وسط + چت‌باکس زیرش) ================== */
.chat-container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 30px 20px 24px;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  transition: all 0.25s ease;
  position: relative;
}

/* وقتی چت شروع نشده است، ناحیه پیام‌ها کاملاً بسته است و چت‌باکس با مرکز ثقل دیداری بالاتر و فضای بازتر قرار دارد */
.chat-container:not(.chat-active) {
  min-height: 100%;
  height: 100%;
  justify-content: center;
  padding-bottom: 6vh;
  margin: auto;
}

.chat-container:not(.chat-active) .chat-stream {
  display: none !important;
}

.chat-container:not(.chat-active) .composer-container {
  margin-top: 18px;
}

/* کادر مرکزی لوگو و عنوان (در حالت قبل از چت) */
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 22px;
  width: 100%;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.center-logo-badge {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 22px;
}

.center-logo-badge img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

.logo-aura {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(224, 107, 85, 0.45);
  animation: rotateGlow 25s linear infinite;
  pointer-events: none;
}

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

.center-title {
  font-size: 26px;
  font-weight: 850;
  color: var(--ink);
  letter-spacing: -0.4px;
  margin: 0 0 26px;
  line-height: 1.5;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.center-title .title-line {
  display: block;
}

.center-title .title-line-1 {
  font-size: 24px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.35;
}

.center-title .title-line-2 {
  font-size: 28px;
  /* ۲ سایز بزرگتر از خط اول */
  font-weight: 850;
  color: var(--ink);
  line-height: 1.35;
}

/* ================== اسلایدر تبلیغاتی کارت‌های روی هم (Stacked Banner Slider) ================== */
.stacked-slider-wrap {
  width: 100%;
  max-width: 555px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.stacked-card-deck {
  position: relative;
  width: calc(100% - 24px);
  margin-right: 18px;
  /* ایجاد فضا برای بیرون‌زدگی لایه‌های راست جهت بالانس تقارن */
  height: 204px;
}

/* لایه‌های کارت پشتی برای نمایش افکت سه‌بعدی روی هم بودن (دقیقاً مثل تصویر ارسالی) */
.deck-layer {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.3s ease;
}

.deck-layer-2 {
  transform: translate(8px, 0px) scale(0.985);
  background: #fde68a;
  /* زرد پاستلی ملایم شبیه تصویر ارسالی */
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.18);
  z-index: 2;
  opacity: 0.95;
}

.deck-layer-3 {
  transform: translate(16px, 0px) scale(0.96);
  background: #4a3e30;
  /* لایه تیره پشتی */
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  z-index: 1;
  opacity: 0.88;
}

html.dark .deck-layer-2 {
  background: #d97706;
  opacity: 0.75;
}

html.dark .deck-layer-3 {
  background: #25201a;
  opacity: 0.95;
}

/* ویوپورت و اسلایدهای اصلی */
.slider-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.09);
  z-index: 5;
  cursor: grab;
  touch-action: pan-y;
  background: var(--paper);
}

.slider-viewport:active {
  cursor: grabbing;
}

.banner-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0, 0, 1), visibility 0.35s ease;
  cursor: pointer;
  border-radius: 20px;
  overflow: hidden;
}

.banner-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.banner-slide.slide-out-left {
  transform: translateX(-120%) scale(0.92) rotate(-3deg);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), opacity 0.35s ease;
}

.banner-slide.slide-out-right {
  transform: translateX(120%) scale(0.92) rotate(3deg);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), opacity 0.35s ease;
}

.banner-slide.slide-in-right {
  transform: translateX(80px) scale(0.95);
  opacity: 0;
  visibility: hidden;
}

.banner-slide.slide-in-left {
  transform: translateX(-80px) scale(0.95);
  opacity: 0;
  visibility: hidden;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

/* دات‌های نشانگر اسلاید */
.slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}

.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.slider-dot.active {
  width: 18px;
  border-radius: 999px;
  background: #f59e0b;
  /* رنگ زرد/طلایی شبیه تصویر کاربر */
}

/* کادر چت‌باکس شناور زیر لوگو */
.composer-container {
  width: 100%;
  max-width: 760px;
  transition: all 0.25s ease;
}

.composer-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(224, 107, 85, 0.14);
}

.composer-box textarea {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  line-height: 24px;
  height: 24px;
  min-height: 24px;
  max-height: 130px;
  resize: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  overflow-y: hidden;
}

.composer-box textarea::placeholder {
  color: var(--muted);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.voice-btn,
.submit-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.18s ease;
}

.voice-btn {
  background: transparent;
  color: var(--muted);
}

.voice-btn:hover {
  background: var(--soft);
  color: var(--accent);
}

.voice-btn.recording,
.voice-btn.listening {
  background: #fde8e8;
  color: #e02424;
  animation: pulse 1.2s infinite;
}

.submit-btn {
  background: var(--accent);
  color: #fff;
}

.submit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.submit-btn:not(:disabled):hover {
  transform: scale(1.05);
  background: var(--accent-dark);
}

/* ================== حالت چت فعال (پیام‌ها) ================== */
.chat-container.chat-active {
  justify-content: flex-start;
  height: 100%;
  padding-bottom: 16px;
}

.chat-container.chat-active .hero-center {
  display: none !important;
}

.chat-stream {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
}

.chat-container.chat-active .composer-container {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: var(--white);
  padding-top: 10px;
}

/* پاورقی کوچک زیر باکس چت (شبکه‌های اجتماعی، اینستاگرام، ایکس و...) */
.composer-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.6;
  transition: opacity 0.2s ease;
  user-select: none;
}

.composer-footer-note p,
.composer-footer-note div {
  margin: 0;
}

.composer-footer-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

.composer-footer-note a:hover {
  color: var(--accent);
}

/* نوار شبکه‌های اجتماعی زیر چت‌باکس */
.composer-social-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.composer-social-title {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.composer-social-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-icon-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted) !important;
  background: var(--paper, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.social-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.social-icon-btn:hover svg {
  transform: scale(1.1);
}

/* رنگ اختصاصی هر شبکه در هاور */
.social-icon-btn.social-x:hover {
  color: #000000 !important;
  background: #f5f5f5;
  border-color: #000000;
}

[data-theme="dark"] .social-icon-btn.social-x:hover {
  color: #ffffff !important;
  background: #202020;
  border-color: #ffffff;
}

.social-icon-btn.social-instagram:hover {
  color: #e1306c !important;
  background: rgba(225, 48, 108, 0.08);
  border-color: rgba(225, 48, 108, 0.3);
}

.social-icon-btn.social-telegram:hover {
  color: #24a1de !important;
  background: rgba(36, 161, 222, 0.08);
  border-color: rgba(36, 161, 222, 0.3);
}

.social-icon-btn.social-threads:hover {
  color: #000000 !important;
  background: #f5f5f5;
  border-color: #000000;
}

[data-theme="dark"] .social-icon-btn.social-threads:hover {
  color: #ffffff !important;
  background: #202020;
  border-color: #ffffff;
}

.social-icon-btn.social-whatsapp:hover {
  color: #25d366 !important;
  background: rgba(37, 211, 102, 0.08);
  border-color: rgba(37, 211, 102, 0.3);
}

.social-icon-btn.social-facebook:hover {
  color: #1877f2 !important;
  background: rgba(24, 119, 242, 0.08);
  border-color: rgba(24, 119, 242, 0.3);
}

/* پنهان‌سازی خودکار پاورقی به محض شروع چت */
.chat-container.chat-active .composer-footer-note {
  display: none !important;
}

/* دکمه شناور موبایل */
.mobile-toggle-btn {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-toggle-btn {
    display: grid !important;
    place-items: center;
    position: fixed;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink);
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  body.sidebar-open .mobile-toggle-btn,
  .mobile-toggle-btn.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

.hero-art {
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art>img {
  position: relative;
  width: 220px;
  height: 220px;
  z-index: 1;
  transform: rotate(-3deg);
}

.orbit {
  border: 1px dashed var(--line);
  border-radius: 50%;
  position: absolute;
  width: 200px;
  height: 200px;
}

.orbit-two {
  width: 240px;
  height: 180px;
  transform: rotate(-30deg);
  opacity: 0.6;
}

.art-note {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  position: absolute;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.note-one {
  top: 24px;
  right: 10px;
  color: var(--green);
}

.note-two {
  bottom: 20px;
  left: 10px;
  color: var(--accent);
}

.art-spark {
  position: absolute;
  color: var(--accent);
  font-size: 20px;
}

.spark-one {
  left: 24px;
  top: 40px;
}

.spark-two {
  right: 28px;
  bottom: 30px;
}

/* اسلایدر دسته‌بندی‌ها */
.category-slider-wrap {
  margin: 18px 0 24px;
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.cat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}

.cat-chip i {
  color: var(--accent);
}

.cat-chip:hover,
.cat-chip.active {
  background: var(--peach);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* پرامپت برجسته و سریع */
.start-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.start-heading h2 {
  font-size: 14px;
  font-weight: 700;
}

.start-heading span {
  font-size: 11px;
  color: var(--muted);
}

.featured-prompt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.featured-prompt:hover {
  background: var(--peach);
  border-color: var(--accent);
}

.prompt-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--accent);
  border: 1px solid var(--line);
}

.featured-prompt strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.featured-prompt small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.prompt-arrow {
  margin-right: auto;
  color: var(--accent);
}

.quick-prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.quick-prompts button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  flex-grow: 1;
  justify-content: center;
}

.quick-prompts button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--peach);
}

/* ================== کارت‌های خدمات و تأمین‌کنندگان ================== */
.nearby-section {
  margin-top: 36px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 14px;
  font-weight: 700;
}

.section-heading span {
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.provider-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 16px;
  text-align: right;
  min-width: 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.provider-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.provider-top {
  display: flex;
  gap: 10px;
  align-items: center;
}

.provider-avatar {
  width: 44px;
  height: 44px;
  background: var(--peach);
  color: var(--accent);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  border: 2px solid var(--line);
}

.provider-identity {
  min-width: 0;
}

.provider-name {
  font-size: 13px;
  font-weight: 750;
  margin: 0;
}

.provider-job {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 0;
}

.bookmark-button {
  margin-right: auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.bookmark-button:hover {
  background: var(--soft);
}

.bookmark-button.saved {
  color: var(--accent);
  background: var(--peach);
}

.provider-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

.rating {
  color: #D97706;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

.rating svg {
  width: 14px;
  height: 14px;
  fill: #F59E0B;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}

.provider-skills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.skill-tag {
  background: var(--soft);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
}

.provider-footer {
  padding-top: 12px;
  border-top: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.availability {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--green);
}

.availability:before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.availability.busy {
  color: var(--warning);
}

.availability.busy:before {
  background: var(--warning);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-call {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.btn-call:hover {
  background: var(--green);
  color: #fff;
}

.btn-profile {
  font-size: 11px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
}

.btn-profile:hover {
  background: var(--peach);
}

.card-actions-full {
  width: 100%;
}

.provider-card .btn-profile {
  font-size: 12px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: var(--accent);
  background: var(--peach);
  border: 1px solid rgba(224, 107, 85, 0.2);
  padding: 9px 14px;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.provider-card .btn-profile:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(224, 107, 85, 0.3);
  transform: translateY(-1px);
}

.provider-card .btn-profile svg,
.provider-card .btn-profile i {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.provider-card .btn-profile:hover svg,
.provider-card .btn-profile:hover i {
  transform: translateX(-4px);
}

.avatar-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(224, 107, 85, 0.22) 0%, rgba(224, 107, 85, 0.08) 100%);
  color: var(--accent);
  font-weight: 800;
  font-size: 16px;
}

/* ================== محیط چت و پیام‌ها (Chat View) ================== */
.chat-view {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 0 30px;
}

.chat-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.small-crow {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--peach);
  display: grid;
  place-items: center;
}

.chat-intro strong {
  font-size: 13px;
  display: block;
}

.chat-intro span {
  font-size: 11px;
  color: var(--muted);
}

.chat-intro .demo-pill {
  margin-right: auto;
  font-size: 10px;
  background: var(--soft);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.message {
  margin-bottom: 24px;
  animation: enter 0.25s ease-out;
}

.user-message {
  text-align: left;
}

.user-bubble {
  display: inline-block;
  text-align: right;
  background: var(--peach);
  border: 1px solid rgba(224, 107, 85, 0.2);
  border-radius: 18px 18px 4px 18px;
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.8;
  max-width: 85%;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.assistant-message {
  text-align: right;
}

.assistant-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}

.assistant-label img {
  width: 22px;
  height: 22px;
}

.assistant-text {
  font-size: 13.5px;
  line-height: 2;
  color: var(--ink);
  margin: 0 0 16px;
}

.assistant-plain-text {
  white-space: pre-wrap;
  line-height: 2.1;
}

.chat-text-paragraph {
  margin: 0 0 12px;
  line-height: 2;
}

.chat-text-link {
  color: var(--accent, #e06b55);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.chat-text-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* کارت‌های شیک معرفی و استعلام کسب‌وکار در چت کلاغ */
.chat-biz-header-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.chat-biz-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 850;
  color: var(--ink);
  margin-bottom: 6px;
}

.chat-biz-icon {
  font-size: 18px;
}

.chat-biz-field {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* کارت معرفی و مشخصات (متن تحلیل کارشناسی کلاغ) */
.chat-desc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-right: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.chat-desc-card-header {
  margin-bottom: 10px;
}

.chat-desc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  background: var(--peach);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(224, 107, 85, 0.2);
}

.chat-desc-card-body {
  font-size: 13px;
  line-height: 2.2;
  color: var(--ink);
  white-space: pre-line;
  text-align: justify;
}

/* کارت راه‌های ارتباطی و نشانی */
.chat-contacts-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.chat-contacts-header {
  margin-bottom: 12px;
}

.chat-contacts-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #0369a1;
  background: #f0f9ff;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #bae6fd;
}

html.dark .chat-contacts-badge {
  background: #082f49;
  color: #38bdf8;
  border-color: #0284c7;
}

.chat-contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-pill .pill-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.contact-pill .pill-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-pill .pill-title {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}

.contact-pill .pill-value {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-pill .pill-cta {
  margin-right: auto;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* چیپ اینستاگرام */
.contact-pill-instagram {
  border-color: #fbcfe8;
  background: #fdf2f8;
}

.contact-pill-instagram:hover {
  background: #fce7f3;
  border-color: #f472b6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.contact-pill-instagram .pill-cta {
  color: #db2777;
}

html.dark .contact-pill-instagram {
  background: #380d22;
  border-color: #701a45;
  color: #fbcfe8;
}

html.dark .contact-pill-instagram .pill-value {
  color: #fdf2f8;
}

/* چیپ تلفن */
.contact-pill-phone {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.contact-pill-phone:hover {
  background: #dcfce7;
  border-color: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.contact-pill-phone .pill-cta {
  color: #16a34a;
}

html.dark .contact-pill-phone {
  background: #062b17;
  border-color: #14532d;
  color: #bbf7d0;
}

html.dark .contact-pill-phone .pill-value {
  color: #f0fdf4;
}

/* لینک‌های متنی مستقیم در چت */
.chat-insta-link {
  color: #d946ef;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  direction: ltr;
  display: inline-block;
  transition: color 0.15s ease;
}

.chat-insta-link:hover {
  color: #c026d3;
}

html.dark .chat-insta-link {
  color: #f472b6;
}

html.dark .chat-insta-link:hover {
  color: #fbcfe8;
}

.chat-phone-link {
  color: #16a34a;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  direction: ltr;
  display: inline-block;
  transition: color 0.15s ease;
}

.chat-phone-link:hover {
  color: #15803d;
}

html.dark .chat-phone-link {
  color: #4ade80;
}

html.dark .chat-phone-link:hover {
  color: #86efac;
}

.message .provider-grid {
  margin-top: 14px;
}

/* کارت فرم ثبت نیاز بدون نتیجه (Lead Card) */
.lead-card {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 18px;
}

.lead-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--accent);
}

.lead-card p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 12px;
}

.lead-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}

.lead-btn {
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
}

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

/* ================== فیلد ارسال پیام و صدا (Composer Area) ================== */
.composer-area {
  padding: 14px 32px 18px;
  background: linear-gradient(rgba(255, 255, 255, 0.9), var(--white) 25%);
  flex-shrink: 0;
  position: relative;
  border-top: 1px solid var(--line-light);
}

html.dark .composer-area {
  background: linear-gradient(rgba(31, 26, 23, 0.9), var(--white) 25%);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 860px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px 10px 16px;
  background: var(--white);
  transition: all 0.2s;
}

.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 107, 85, 0.15);
}

.composer textarea {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  padding: 6px 4px;
  line-height: 1.8;
  font-size: 13px;
  max-height: 140px;
  color: var(--ink);
}

.composer textarea::placeholder {
  color: var(--muted);
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.voice-button:hover {
  background: var(--peach);
  color: var(--accent);
}

.voice-button.listening {
  background: var(--accent);
  color: #fff;
  animation: pulse 1.2s infinite;
}

.composer-separator {
  height: 20px;
  border-left: 1px solid var(--line);
}

.send-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: var(--radius-sm);
  background: var(--ink);
}

.send-button:hover:not(:disabled) {
  background: var(--accent);
}

.send-button:disabled {
  background: var(--line);
  color: var(--muted);
}

.composer-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  margin: 8px auto 0;
  max-width: 860px;
}

.voice-status {
  max-width: 860px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--accent-dark);
  background: var(--peach);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.voice-status button {
  margin-right: auto;
  text-decoration: underline;
  font-size: 11px;
  color: var(--accent-dark);
}

.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 1.2s infinite;
}

/* ================== ستون راهنما (Insight Rail) ================== */
.insight-rail {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.rail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}

.close-rail-btn {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-rail-btn:hover {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line);
}

.orange-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.insight-rail h2 {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 750;
  margin: 0;
}

.insight-rail h2 span {
  color: var(--accent);
}

.rail-description {
  font-size: 11px;
  line-height: 2;
  color: var(--muted);
  margin-top: 10px;
}

.steps {
  padding: 0;
  list-style: none;
  margin: 24px 0 0;
}

.steps li {
  display: flex;
  gap: 12px;
  position: relative;
  margin-bottom: 22px;
}

.step-number {
  font-size: 11px;
  font-weight: 700;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--accent);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}

.steps li:not(:last-child):before {
  content: '';
  border-right: 1px dashed var(--line);
  position: absolute;
  right: 13px;
  top: 30px;
  height: calc(100% - 6px);
}

.steps h3 {
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  line-height: 26px;
}

.steps p {
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
  margin: 2px 0 0;
}

.rail-divider {
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.rail-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.rail-categories button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 11px;
  background: var(--white);
  color: var(--ink);
}

.rail-categories button:hover {
  background: var(--peach);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.rail-categories button i {
  color: var(--accent);
}

/* ================== دیالوگ‌ها و مدال‌ها (Dialog) ================== */
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: var(--ink);
  background: var(--white);
  max-height: 85dvh;
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(19, 16, 14, 0.6);
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.dialog-header h2 {
  font-size: 16px;
  font-weight: 750;
  margin: 0;
}

.profile-large {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-large .provider-avatar {
  width: 60px;
  height: 60px;
  font-size: 22px;
}

.profile-large h3 {
  font-size: 16px;
  margin: 0;
}

.profile-large p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.profile-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.profile-tags span {
  padding: 3px 8px;
  background: var(--soft);
  border-radius: var(--radius-sm);
  font-size: 11px;
}

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

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
}

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

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 12.5px;
  background: var(--white);
  color: var(--ink);
}

.secondary-button:hover {
  background: var(--soft);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(224, 107, 85, 0.35);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  max-width: 90vw;
  text-align: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
  animation: enter 0.25s ease-out;
}

#flashes-container {
  display: none !important;
}

/* انیمیشن‌ها */
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathe {

  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 107, 85, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(224, 107, 85, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(224, 107, 85, 0);
  }
}

.loading-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  padding: 12px 0;
}

.loading-dots>span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: breathe 1.1s infinite;
}

.loading-dots>span:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-dots>span:nth-child(3) {
  animation-delay: 0.3s;
}

.loading-dots small {
  margin-right: 8px;
  font-weight: 600;
}

/* ریسپانسیو */
@media (max-width: 1080px) {
  .workspace-body {
    grid-template-columns: 1fr;
  }

  .insight-rail {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-shell {
    display: block;
    height: 100dvh;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 275px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 30;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim:not([hidden]) {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(19, 16, 14, 0.45);
    backdrop-filter: blur(2px);
    z-index: 25;
  }

  .mobile-menu {
    display: inline-grid !important;
  }

  .brand-title {
    font-size: 16px !important;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-art {
    display: none;
  }

  .scroll-area {
    padding: 0 14px;
  }

  /* جلوگیری قطعی از زوم شدن خودکار صفحه در موبایل هنگام فوکوس روی فیلدها */
  input,
  textarea,
  select,
  .composer-box textarea {
    font-size: 16px !important;
  }

  /* صفحه اول چت در موبایل: تعادل دیداری بالا با فواصل مناسب */
  .chat-container:not(.chat-active) {
    min-height: 100%;
    height: 100%;
    padding: 16px 8px 26px;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
  }

  .scroll-area:has(.chat-container:not(.chat-active)) {
    overflow-y: hidden;
  }

  .hero-center {
    margin-bottom: 12px;
  }

  .center-logo-badge {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
  }

  .center-logo-badge img {
    width: 72px;
    height: 72px;
  }

  .center-title {
    font-size: 19px;
    line-height: 1.45;
    margin: 0 0 14px;
    gap: 8px;
  }

  .center-title .title-line-1 {
    font-size: 17px;
    line-height: 1.35;
  }

  .center-title .title-line-2 {
    font-size: 21px;
    /* ۲ سایز بزرگتر در نمای موبایل */
    line-height: 1.35;
  }

  .stacked-slider-wrap {
    max-width: 100%;
    margin-bottom: 12px;
  }

  .stacked-card-deck {
    height: 134px;
    margin-right: 10px;
  }

  .slider-dots {
    margin-top: 10px;
  }

  .composer-container {
    margin-top: 12px;
  }

  .composer-footer-note {
    font-size: 11px;
    margin-top: 10px;
  }

  .composer-box {
    padding: 8px 12px;
    border-radius: 20px;
    gap: 8px;
  }

  .composer-box textarea {
    line-height: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
  }

  .composer-box textarea::placeholder,
  #message-input::placeholder {
    font-size: 13px;
    /* ۲ سایز کوچکتر در نمای موبایل (از ۱۵px به ۱۳px) */
  }

  .voice-btn,
  .submit-btn {
    width: 34px;
    height: 34px;
  }

  .composer-area {
    padding: 10px 16px 14px;
  }

  .deck-layer-2 {
    transform: translate(6px, 0px) scale(0.985);
  }

  .deck-layer-3 {
    transform: translate(12px, 0px) scale(0.96);
  }
}

/* Trix Rich Text Editor Integration */
trix-toolbar {
  margin-bottom: 6px;
}

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

trix-toolbar .trix-button {
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  height: 32px;
  min-width: 32px;
}

trix-toolbar .trix-button:hover {
  border-color: var(--accent);
}

trix-toolbar .trix-button.trix-active {
  background: var(--peach);
  border-color: var(--accent);
  color: var(--accent-dark);
}

trix-toolbar .trix-button-group--file-tools {
  display: none !important;
}

trix-editor {
  min-height: 85px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  color: var(--ink);
}

trix-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 107, 85, 0.12);
  outline: none;
}

trix-editor a {
  color: var(--accent);
  text-decoration: underline;
}

/* ==========================================================================
   سیستم صفحات عمومی و صفحه‌ساز (Page Builder & Dynamic Pages)
   ========================================================================== */
.page-view-wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  width: 100%;
}

.page-header-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.page-header-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #F59E0B 100%);
}

.page-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.page-prose-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.page-prose {
  font-size: 14px;
  line-height: 2.1;
  color: var(--ink);
  direction: rtl;
  text-align: right;
}

.page-prose h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.page-prose h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 10px;
}

.page-prose p {
  margin: 0 0 16px;
}

.page-prose ul,
.page-prose ol {
  margin: 0 0 20px 24px;
  padding: 0;
}

.page-prose li {
  margin-bottom: 8px;
}

.page-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-prose blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  background: var(--peach);
  border-right: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
  font-style: italic;
}

/* کارت‌های پلن ارتقای بسته و ثبت کسب‌وکار پرو (۳ پلن) */
.pricing-section {
  margin-top: 28px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.pricing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(224, 107, 85, 0.4);
}

.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(224, 107, 85, 0.16);
  background: linear-gradient(180deg, rgba(224, 107, 85, 0.03) 0%, var(--white) 100%);
  position: relative;
}

.pricing-badge-wrap {
  position: absolute;
  top: -12px;
  right: 24px;
}

.pricing-badge {
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(224, 107, 85, 0.3);
  letter-spacing: -0.2px;
}

.pricing-header {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.pricing-plan-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
}

.pricing-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
  min-height: 38px;
}

.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pricing-price {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.pricing-period {
  font-size: 12px;
  color: var(--muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
}

.pricing-features .feat-icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-action {
  margin-top: auto;
}

.pricing-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pricing-btn.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(224, 107, 85, 0.3);
}

.pricing-btn.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(224, 107, 85, 0.45);
  transform: translateY(-2px);
}

.pricing-btn.btn-outline {
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.pricing-btn.btn-outline:hover {
  background: var(--line);
  color: var(--ink);
  border-color: var(--muted);
}

/* شبکه تماس با ما */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--peach);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-icon-wrap i,
.contact-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.contact-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.contact-val,
.contact-link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}

.contact-link:hover {
  color: var(--accent);
}

/* آکاردئون سوالات متداول */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  border-color: rgba(224, 107, 85, 0.4);
}

.faq-question {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  user-select: none;
  background: var(--white);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-arrow {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  padding: 0 20px 18px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink);
  border-top: 1px dashed var(--line);
  background: var(--soft);
}

.faq-answer p {
  margin: 14px 0 0;
}

/* ==========================================================================
   بخش نمونه قراردادهای رسمی مشاغل و اصناف (طراحی کارت‌های مدرن و زیبا)
   ========================================================================== */
.contracts-wrapper {
  margin-top: 18px;
}

.contracts-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.contracts-search-wrap {
  position: relative;
  width: 100%;
}

.contracts-search-wrap .contracts-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.contracts-search-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 16px !important;
  border-radius: 12px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.contracts-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 107, 85, 0.14);
  outline: none;
}

.contracts-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.contracts-filter-pills::-webkit-scrollbar {
  display: none;
}

.contract-pill-btn {
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.contract-pill-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong, #cbd5e1);
}

.contract-pill-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(224, 107, 85, 0.28);
}

/* شبکه کارت‌های قرارداد */
.contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.contract-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.contract-card:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 107, 85, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.contract-card-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contract-card-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contract-job-pill {
  background: rgba(224, 107, 85, 0.1);
  color: var(--accent);
  border: 1px solid rgba(224, 107, 85, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.contract-job-pill svg {
  color: var(--accent);
}

.contract-card-title {
  font-size: 15.5px;
  font-weight: 850;
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
}

.contract-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.contract-card-bottom {
  margin-top: auto;
  padding-top: 10px;
}

.contract-download-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #EA580C 100%);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(224, 107, 85, 0.28);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.contract-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(224, 107, 85, 0.42);
  color: #ffffff !important;
}

.contract-pending-box {
  background: var(--soft);
  color: var(--muted);
  border: 1px dashed var(--line);
  font-size: 12px;
  font-weight: 600;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.contracts-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 16px;
  margin-top: 16px;
  color: var(--muted);
}

.contracts-empty-state svg {
  margin-bottom: 12px;
  color: var(--muted);
}

.contracts-empty-state h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}

.contracts-empty-state p {
  font-size: 13px;
  margin: 0 0 16px;
}

.btn-clear-search {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* سازگاری دارک مود اختصاصی */
html.dark .contract-card {
  background: #1c1815;
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark .contract-card:hover {
  border-color: rgba(224, 107, 85, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

html.dark .contracts-search-input {
  background: #1c1815;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

html.dark .contract-pill-btn {
  background: #1c1815;
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

html.dark .contract-pill-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .contracts-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   بنر شناور نصب وب‌اپلیکیشن کلاغ (PWA Install Prompt)
   طراحی اختصاصی با تم و هویت بصری گرم کلاغ
   ========================================================================== */
.pwa-install-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  max-width: 92vw;
  width: auto;
  min-width: 330px;
  animation: pwaSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pwaSlideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-22px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.pwa-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #E06B55 0%, #D45740 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(224, 107, 85, 0.35), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pwa-banner-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pwa-banner-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding: 4px;
}

.pwa-banner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pwa-banner-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: right;
  min-width: 0;
}

.pwa-banner-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.pwa-banner-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-install-action {
  background: #FFFFFF;
  color: #C8533D;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.pwa-install-action:hover {
  background: #FAF8F5;
  color: #B5422D;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pwa-dismiss-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}

.pwa-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .pwa-install-banner {
    top: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 20px);
    max-width: 440px;
    min-width: 0;
    animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .pwa-banner-card {
    padding: 7px 10px 7px 12px;
    gap: 10px;
  }

  .pwa-banner-sub {
    font-size: 10.5px;
    max-width: 140px;
  }

  .pwa-install-action {
    padding: 6px 14px;
    font-size: 12px;
  }
}

@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(24px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ================== صفحه اختصاصی کسب‌وکار و پروفایل (Business Profile Page) ================== */
.biz-page-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}

.biz-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.biz-breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s;
}

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

.biz-breadcrumbs .bc-sep {
  opacity: 0.4;
}

.biz-breadcrumbs .bc-current {
  color: var(--ink);
  font-weight: 700;
}

/* کارت سربرگ کسب‌وکار */
.biz-header-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.biz-header-cover {
  height: 130px;
  background: linear-gradient(135deg, #2D231E 0%, #3D2D24 50%, #4D3428 100%);
  position: relative;
  overflow: hidden;
}

.biz-header-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(224, 107, 85, 0.4), transparent 65%);
}

.biz-header-body {
  padding: 0 26px 20px;
  display: flex;
  gap: 20px;
  position: relative;
  align-items: flex-start;
}

.biz-avatar-wrap {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  margin-top: -46px;
  position: relative;
  flex-shrink: 0;
  background: var(--paper);
}

.biz-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.biz-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 34px;
  font-weight: 850;
  display: grid;
  place-items: center;
}

.biz-verified-badge {
  position: absolute;
  bottom: -4px;
  left: -4px;
  background: var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  padding: 2px;
}

.biz-header-info {
  flex: 1;
  padding-top: 12px;
}

.biz-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.biz-main-name {
  font-size: 21px;
  font-weight: 850;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
}

.biz-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.biz-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.biz-cov-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.biz-cov-badge.nationwide {
  background: #ecfdf5;
  color: #059669;
}

.biz-cov-badge.cities {
  background: var(--soft);
  color: var(--ink);
}

.biz-cov-badge.province {
  background: rgba(224, 107, 85, 0.1);
  color: var(--accent);
}

.biz-cov-badge.local {
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

.biz-job-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0 6px;
}

.biz-company-name {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.biz-company-name i {
  color: var(--accent);
}

.biz-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.biz-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink);
}

.biz-meta-item i {
  color: var(--muted);
}

.biz-rating-pill {
  color: var(--ink);
  font-weight: 700;
}

.biz-rating-pill .star-icon {
  color: #F59E0B;
  font-size: 13px;
}

.biz-rating-pill .reviews-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.biz-ai-impression {
  background: var(--peach);
  border-color: rgba(224, 107, 85, 0.25);
  color: var(--accent-dark);
}

.biz-ai-impression i {
  color: var(--accent);
}

.biz-ai-impression strong {
  color: var(--accent-dark);
}

.biz-link-pill code {
  font-size: 11px;
  color: var(--muted);
}

/* نوار اقدام دکمه‌ها */
.biz-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.biz-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.biz-btn-ai-chat {
  background: linear-gradient(135deg, #E06B55 0%, #C2410C 100%);
  border: 1px solid transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(224, 107, 85, 0.32);
}

.biz-btn-ai-chat:hover {
  background: linear-gradient(135deg, #EA580C 0%, #9A3412 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(224, 107, 85, 0.42);
}

.biz-btn-bookmark {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.biz-btn-bookmark:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* دکمه ذخیره فعال و هم‌رنگ قالب کلاغ */
.biz-btn-bookmark.saved,
.biz-btn-bookmark.active {
  background: var(--peach) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  box-shadow: 0 2px 8px rgba(224, 107, 85, 0.18);
}

.biz-btn-bookmark.saved svg,
.biz-btn-bookmark.active svg,
.biz-btn-bookmark.saved i,
.biz-btn-bookmark.active i {
  fill: var(--accent) !important;
  stroke: var(--accent) !important;
}

html.dark .biz-btn-bookmark.saved,
html.dark .biz-btn-bookmark.active {
  background: rgba(224, 107, 85, 0.16) !important;
  border-color: var(--accent) !important;
  color: #FF8A73 !important;
}

html.dark .biz-btn-bookmark.saved svg,
html.dark .biz-btn-bookmark.active svg,
html.dark .biz-btn-bookmark.saved i,
html.dark .biz-btn-bookmark.active i {
  fill: #FF8A73 !important;
  stroke: #FF8A73 !important;
}

/* ساختار تک ستونی محتوا */
.biz-content-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.biz-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.biz-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.biz-card-title i {
  color: var(--accent);
}

.biz-card-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* کارت تحلیل هوش مصنوعی */
.biz-ai-review-card {
  background: linear-gradient(135deg, rgba(224, 107, 85, 0.04) 0%, rgba(245, 158, 11, 0.03) 100%);
  border: 1px solid rgba(224, 107, 85, 0.25);
}

.biz-ai-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 12px;
}

.biz-ai-review-text {
  font-size: 13.5px;
  line-height: 2.1;
  color: var(--ink);
  margin: 0;
}

/* بخش نظرات */
.biz-reviews-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.biz-reviews-badge {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* فرم ثبت نظر فشرده و جمع‌وجور */
.review-form-card.compact {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.review-form-card.compact .review-form-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
}

.review-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.review-form-group {
  margin-bottom: 10px;
}

.review-form-group input,
.review-form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
}

.review-form-group input:focus,
.review-form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.review-form-group.star-group {
  display: flex;
  align-items: center;
}

.star-rating-picker {
  display: flex;
  align-items: center;
  gap: 3px;
}

.star-pick {
  background: none;
  border: none;
  font-size: 20px;
  color: #D1D5DB;
  cursor: pointer;
  padding: 0 1px;
  transition: transform 0.15s, color 0.15s;
}

.star-pick.active {
  color: #F59E0B;
}

.star-pick:hover {
  transform: scale(1.15);
}

.star-val-label {
  font-size: 11px;
  color: var(--muted);
  margin-right: 6px;
}

.review-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-submit-review-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
}

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

.review-msg-box {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  margin-bottom: 10px;
  font-weight: 600;
}

.review-msg-box.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.review-msg-box.pending {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.review-msg-box.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* لیست نظرات */
.biz-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.review-author-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--peach);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}

.review-author {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.review-date {
  font-size: 11px;
  color: var(--muted);
}

.review-stars {
  color: #F59E0B;
  font-size: 13px;
  letter-spacing: 1px;
}

.review-comment {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink);
}

.no-reviews-msg {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 24px 12px;
  margin: 0;
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.review-item.new-approved {
  animation: highlightNewReview 1.5s ease;
  border-color: #10B981;
}

@keyframes highlightNewReview {
  0% {
    background: rgba(16, 185, 129, 0.2);
  }

  100% {
    background: var(--paper);
  }
}

@media (max-width: 768px) {
  .biz-header-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px 20px;
  }

  .biz-avatar-wrap {
    margin-top: -46px;
  }

  .biz-title-row,
  .biz-meta-row,
  .biz-action-bar {
    justify-content: center;
  }

  .biz-action-bar {
    padding: 12px 16px;
  }

  .review-form-row {
    grid-template-columns: 1fr;
  }
}

/* ================== دکمه انتخاب شهر و پاپ‌آپ استانی در پروفایل ================== */
.profile-city-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  text-align: right;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.profile-city-trigger:hover {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.city-trigger-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(224, 107, 85, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.city-trigger-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.city-trigger-info strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.city-trigger-info small {
  font-size: 11px;
  color: var(--muted);
}

.city-trigger-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(224, 107, 85, 0.08);
}

/* لایه اورلی و کادر دیالوگ پاپ‌آپ */
.geo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.geo-modal-overlay[hidden],
.geo-modal-overlay.is-hidden {
  display: none !important;
}

.geo-grid[hidden],
.geo-empty-state[hidden],
.geo-back-btn[hidden],
.geo-search-clear[hidden] {
  display: none !important;
}

.geo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: geoFadeIn 0.2s ease;
}

.geo-modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: geoScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes geoFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes geoScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.geo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}

.geo-modal-title {
  font-size: 15px;
  font-weight: 850;
  color: var(--ink);
  margin: 0;
}

.geo-modal-subtitle {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.geo-back-btn,
.geo-close-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.geo-back-btn:hover,
.geo-close-btn:hover {
  background: var(--soft);
  color: var(--ink);
}

/* کادر جست‌وجوی پاپ‌آپ */
.geo-search-wrap {
  position: relative;
  padding: 12px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.geo-search-icon {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: inline-flex;
  pointer-events: none;
}

.geo-search-input {
  width: 100%;
  height: 40px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 38px 0 36px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.geo-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 107, 85, 0.12);
}

.geo-search-clear {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--soft);
  border: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* محتوای پاپ‌آپ */
.geo-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  max-height: 52vh;
  flex: 1;
  background: var(--white);
}

.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.geo-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  transition: all 0.18s ease;
  width: 100%;
  box-sizing: border-box;
}

.geo-item-btn:hover {
  background: var(--soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.geo-item-btn.is-active {
  background: var(--peach);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
}

.geo-item-badge {
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.geo-search-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.geo-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
  box-sizing: border-box;
  text-align: right;
  font-family: inherit;
}

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

.geo-search-item strong {
  font-size: 13px;
}

.geo-search-item small {
  font-size: 11px;
  color: var(--muted);
  background: var(--white);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.geo-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ==========================================================================
   دکمه شناور ستاره‌ای ثبت‌نام و نام‌نویسی سمت چپ صفحه چت (Floating Star FAB)
   طراحی گرد، متمرکز بر ستاره درخشان، هاله نور شناور و تولتیپ بازشونده
   ========================================================================== */

.floating-register-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF6F4C 0%, #E06B55 50%, #C84630 100%);
  color: #FFFFFF !important;
  text-decoration: none !important;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 22px -3px rgba(224, 107, 85, 0.48),
              0 2px 6px rgba(0, 0, 0, 0.08),
              inset 0 1px 1px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s ease,
              border-color 0.22s ease,
              bottom 0.25s ease;
}

/* هاله نور درخشان و نبض ملایم پیرامون ستاره */
.floating-btn-aura {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 107, 85, 0.45) 0%, rgba(224, 107, 85, 0) 70%);
  z-index: -1;
  pointer-events: none;
  animation: floatingAuraPulse 3.2s ease-in-out infinite;
}

@keyframes floatingAuraPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.16);
    opacity: 0.18;
  }
}

/* ستاره طلایی کامل و پرمیوم */
.floating-btn-sparkle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FDE047;
  filter: drop-shadow(0 0 5px rgba(253, 224, 71, 0.85));
  animation: floatingSparkleTwinkle 3.2s ease-in-out infinite;
  flex-shrink: 0;
  line-height: 1;
}

@keyframes floatingSparkleTwinkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.15) rotate(16deg);
  }
}

/* تولتیپ متنی شیک و کوچک هنگام بردن ماوس روی دکمه */
.floating-btn-tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: rgba(38, 36, 33, 0.92);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 50;
}

.floating-btn-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: rgba(38, 36, 33, 0.92);
}

/* تعامل هنگام هاور */
.floating-register-btn:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 12px 28px -3px rgba(224, 107, 85, 0.65),
              0 4px 14px rgba(234, 88, 12, 0.35),
              inset 0 1px 1px rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.7);
  color: #FFFFFF !important;
}

.floating-register-btn:hover .floating-btn-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.floating-register-btn:hover .floating-btn-aura {
  opacity: 0.95;
  animation-duration: 1.6s;
}

/* حالت کلیک / فشرده شدن */
.floating-register-btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 4px 12px rgba(224, 107, 85, 0.4);
}

/* استایل حالت تاریک (Dark Mode) */
html.dark .floating-register-btn {
  background: linear-gradient(135deg, #E06B55 0%, #C2410C 55%, #9A3412 100%);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 26px -4px rgba(224, 107, 85, 0.55),
              0 0 20px rgba(224, 107, 85, 0.3),
              inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

html.dark .floating-btn-aura {
  background: radial-gradient(circle, rgba(224, 107, 85, 0.55) 0%, rgba(224, 107, 85, 0) 70%);
}

html.dark .floating-btn-tooltip {
  background: rgba(255, 255, 255, 0.94);
  color: #13100E;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html.dark .floating-btn-tooltip::before {
  border-right-color: rgba(255, 255, 255, 0.94);
}

/* واکنش‌گرایی در تبلت و موبایل (Responsive) */
@media (max-width: 768px) {
  .floating-register-btn {
    top: auto;
    bottom: 20px;
    left: 16px;
    width: 40px;
    height: 40px;
    box-shadow: 0 6px 18px -3px rgba(224, 107, 85, 0.45);
  }

  /* در موبایل هنگام شروع گفت‌وگو، دکمه کمی بالاتر می‌آید تا روی اینپوت چت قرار نگیرد */
  .chat-container.chat-active .floating-register-btn {
    bottom: 82px;
  }

  .floating-btn-sparkle svg {
    width: 20px;
    height: 20px;
  }

  /* پنهان‌سازی تولتیپ در صفحات لمسی موبایل */
  .floating-btn-tooltip {
    display: none !important;
  }

  /* پنهان‌سازی دکمه هنگام باز شدن منوی کشویی موبایل */
  body.sidebar-open .floating-register-btn {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

/* ==========================================================================
   پیوند متنی تک‌خطی به صفحه کسب‌وکار در جریان پیام چت‌بات
   ========================================================================== */

.chat-biz-links {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-biz-link-line {
  margin: 0;
  padding: 0;
  line-height: 1.9;
  font-size: 14px;
}

.chat-biz-category {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0.92;
  margin-left: 4px;
}

html.dark .chat-biz-category {
  color: #E2E8F0;
}

.chat-biz-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.chat-biz-link:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

.chat-biz-link .chat-biz-arrow {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.chat-biz-link:hover .chat-biz-arrow {
  transform: translate(-2px, -2px);
}

html.dark .chat-biz-link {
  color: #F27A64;
}