/* ==========================================================================
   Liquid Glass — اجزای فروشگاه: دکمه‌ها، کارت‌ها، سبد/تسویه/سفارش‌ها، ورود،
   اعلان‌ها، تیکت‌ها، جدول‌ها و پنل‌های مدیریتی. وابسته به توکن‌های glass.css.
   (آخرین لایه‌ی CSS؛ همه‌ی انتخابگرها عمداً با html body قوی‌تر شده‌اند)
   ========================================================================== */

:root {
  --lg-radius-card: 26px;
  --lg-radius-panel: 28px;
  --lg-card-shadow: 0 1px 2px rgba(20, 24, 40, 0.04), 0 8px 28px rgba(20, 24, 40, 0.07);
  --lg-card-shadow-hover: 0 2px 4px rgba(20, 24, 40, 0.05), 0 16px 40px rgba(20, 24, 40, 0.12);
  --lg-sep: rgba(60, 60, 67, 0.14);
}

[data-theme="dark"] {
  --lg-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.45);
  --lg-card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.6);
  --lg-sep: rgba(84, 84, 88, 0.55);
}

/* ---------- تایپوگرافی عنوان‌ها ---------- */
html body h1,
html body .page-head h1 {
  letter-spacing: -0.025em;
}

html body .sec-head h2 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

html body .sec-head a,
html body .link-more {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

html body .page-head p {
  color: var(--text-muted);
}

/* ---------- دکمه‌ها: کپسول، فنری، بدون خط ---------- */
html body .btn {
  border-radius: 999px;
  font-weight: 600;
  transition: background-color 0.2s var(--lg-spring), color 0.2s var(--lg-spring), box-shadow 0.2s var(--lg-spring), transform 0.3s var(--lg-spring);
}

html body .btn:active:not(:disabled) {
  transform: scale(0.96);
}

html body .btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  box-shadow: 0 4px 14px color-mix(in oklch, var(--accent) 38%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

html body .btn-primary:hover:not(:disabled) {
  background: var(--accent-dim);
}

html body .btn-secondary {
  color: var(--text-primary);
  background: var(--lg-fill);
  border: 0;
  box-shadow: none;
}

html body .btn-secondary:hover:not(:disabled) {
  background: var(--lg-fill-hover);
}

html body .btn-ghost {
  border: 0;
  background: transparent;
  color: var(--accent);
}

html body .btn-ghost:hover:not(:disabled) {
  background: var(--lg-fill);
}

html body .btn:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--accent) 40%, transparent);
  outline-offset: 2px;
}

html body .btn:disabled {
  opacity: 0.45;
}

/* ---------- چیپ‌ها ---------- */
html body .chip {
  border: 0;
  background: var(--lg-fill);
  color: var(--text-primary);
  font-weight: 500;
  transition: background-color 0.2s var(--lg-spring), transform 0.3s var(--lg-spring);
}

html body .chip:hover {
  background: var(--lg-fill-hover);
}

html body .chip:active {
  transform: scale(0.96);
}

html body .chip.active {
  color: #fff;
  background: var(--accent);
}

/* ---------- کارت محصول ---------- */
html body .product-card {
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius-card);
  box-shadow: var(--lg-card-shadow);
  transition: transform 0.4s var(--lg-spring), box-shadow 0.4s var(--lg-spring);
}

@media (hover: hover) {
  html body .product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--lg-card-shadow-hover);
  }
}

html body .product-card:active {
  transform: scale(0.985);
}

html body .product-card .pc-icon {
  border-radius: 23%;
  box-shadow: 0 6px 16px rgba(20, 24, 40, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

html body .product-card .pc-title {
  font-weight: 700;
  letter-spacing: -0.015em;
}

html body .product-card .pc-foot {
  border-top: 0.5px solid var(--lg-sep);
}

html body .product-card .price {
  font-weight: 800;
  letter-spacing: -0.01em;
}

html body .badge,
html body .badge-uc {
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- کارت‌های ویژگی (چرا AiQio) ---------- */
html body .feature-card {
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius-card);
  box-shadow: var(--lg-card-shadow);
}

html body .feature-card .feature-icon {
  border-radius: 16px;
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  box-shadow: inset 0 1px 0 var(--lg-highlight);
}

html body .feature-card h3 {
  letter-spacing: -0.015em;
}

/* ---------- پنل‌ها و کارت‌های شیشه‌ای عمومی ---------- */
html body .panel,
html body .auth-card,
html body .cart-summary {
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius-panel);
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-card-shadow), inset 0 1px 0 var(--lg-highlight);
}

html body .auth-wrap {
  padding-block: 12px;
}

html body .auth-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

/* ---------- اعلان‌ها (پیام‌های Flash) و حالت‌های خالی ---------- */
html body .notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 18px;
  color: var(--text-primary);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  box-shadow: inset 0 1px 0 var(--lg-highlight);
}

html body .notice[role="alert"] {
  background: color-mix(in oklch, #ff3b30 11%, transparent);
}

html body .notice a {
  color: var(--accent);
  font-weight: 600;
}

html body .empty,
html body .cart-empty {
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius-panel);
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-card-shadow);
}

html body .empty-icon,
html body .cart-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-inline: auto;
  border-radius: 22px;
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 12%, transparent);
}

/* ---------- حساب کاربری: کارت پروفایل + لیست‌های گروه‌بندی‌شده مثل تنظیمات iOS ---------- */
html body .account {
  display: grid;
  gap: 18px;
  max-width: 640px;
  padding-top: 8px;
}

html body .account-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius-panel);
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-card-shadow), inset 0 1px 0 var(--lg-highlight);
}

html body .account-card h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
}

html body .account-card p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

html body .account-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 1.625rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #7cc0ff, #0a74ff);
  box-shadow: 0 6px 16px rgba(10, 116, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

html body .set-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--lg-border);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: var(--lg-card-shadow);
}

html body .set-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px 11px 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s var(--lg-spring);
}

/* خط جداکننده‌ی مویی که از زیر آیکون شروع می‌شود (مثل iOS) */
html body .set-list > li + li .set-row::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 60px;
  inset-inline-end: 0;
  height: 0.5px;
  background: var(--lg-sep);
}

html body .set-row:hover,
html body .set-row:active {
  background: var(--lg-fill);
}

html body .set-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: var(--c, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

html body .set-label {
  flex: 1;
  font-weight: 500;
}

html body .set-badge {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #ff3b30;
}

html body .set-chev {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  opacity: 0.7;
}

html body .account-logout .btn {
  color: #ff3b30;
}

/* ---------- سبد خرید / تسویه / سفارش‌ها ---------- */
html body .cart-list > li {
  border: 1px solid var(--lg-border);
  border-radius: 24px;
  box-shadow: var(--lg-card-shadow);
}

/* ستون تصویر ردیف سبد ۷۲ پیکسل است؛ آیکون/تصویر هم‌اندازه‌ی آن (استایل inline را باید override کرد) */
html body .cart-list > li .pc-icon {
  width: 72px !important;
  height: 72px !important;
  border-radius: 23%;
}

html body .cart-list > li .pc-icon svg {
  width: 36px;
  height: 36px;
}

/* لیست سفارش‌ها (بدون ستون تصویر): کارت انعطاف‌پذیر */
html body .order-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

html body .order-list > li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--lg-border);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: var(--lg-card-shadow);
}

html body .order-list .cart-item-main {
  flex: 1 1 240px;
  min-width: 0;
}

html body .order-list .cart-item-main h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

html body .order-list .cart-item-main h3 a {
  color: var(--accent);
}

html body .order-list .cart-item-side {
  flex: none;
  align-self: center;
  white-space: nowrap;
}

html body .order-list code {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.8125rem;
  background: var(--lg-fill);
  overflow-wrap: anywhere;
}

html body .cart-item-main h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

html body .cart-item-remove {
  border-radius: 999px;
  color: #ff3b30;
  background: color-mix(in oklch, #ff3b30 10%, transparent);
  border: 0;
}

html body .cart-item-remove:hover {
  background: color-mix(in oklch, #ff3b30 18%, transparent);
}

html body .summary-rows > div {
  border-bottom: 0;
}

html body .summary-rows .total {
  padding-top: 12px;
  border-top: 0.5px solid var(--lg-sep);
  font-size: 1.125rem;
  font-weight: 800;
}

html body .coupon-form {
  display: flex;
  gap: 8px;
}

html body .coupon-form .input {
  flex: 1;
  border-radius: 999px;
}

html body .cart-checkout-btn {
  height: 52px;
  font-size: 1rem;
  font-weight: 700;
}

html body .breadcrumb ol {
  color: var(--text-muted);
}

html body .breadcrumb a {
  text-decoration: none;
}

/* ---------- تب‌های پنل (کنترل سگمنتی اپل) ---------- */
html body .dash-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--lg-fill);
  /* یک ردیف؛ اگر تب‌ها جا نشدند افقی اسکرول می‌شود (تب فعال خودکار وسط می‌آید) */
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  width: max-content;
  -webkit-overflow-scrolling: touch;
}

html body .dash-tabs::-webkit-scrollbar {
  display: none;
}

html body .dash-tab {
  flex: none;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  transition: color 0.2s var(--lg-spring), background-color 0.2s var(--lg-spring), box-shadow 0.2s var(--lg-spring);
}

html body .dash-tab:hover {
  color: var(--text-primary);
}

html body .dash-tab.active {
  color: var(--text-primary);
  background: var(--lg-lens-bg);
  box-shadow: var(--lg-lens-shadow);
}

/* ---------- جدول‌ها (پنل ادمین/فروشنده) ---------- */
html body .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--lg-border);
  border-radius: 22px;
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-card-shadow), inset 0 1px 0 var(--lg-highlight);
}

html body .table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border-bottom: 0.5px solid var(--lg-sep);
}

html body .table td {
  border-bottom: 0.5px solid var(--lg-sep);
}

html body .table tbody tr:last-child td {
  border-bottom: 0;
}

html body .table tbody tr:hover {
  background: var(--lg-fill);
}

html body .table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

html body .status {
  padding: 3px 11px;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- کارت‌های آمار مدیریتی ---------- */
html body .stat-card {
  border: 1px solid var(--lg-border);
  border-radius: 24px;
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-card-shadow), inset 0 1px 0 var(--lg-highlight);
}

html body .stat-card .value {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- فیلتر پنل‌ها ---------- */
html body .filter-form {
  gap: 10px;
}

html body .filter-form .search-input,
html body .filter-form .select {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background-color: var(--lg-fill);
}

/* .search-input در aiqio.css برای داخل .search-form شفاف و !important است؛ اینجا مستقل است */
html body .filter-form .search-input {
  flex: 1 1 220px;
  padding: 0 18px !important;
  background: var(--lg-fill) !important;
}

html body .filter-form .search-input:focus {
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 35%, transparent) !important;
}

html body .filter-form {
  flex-wrap: wrap;
  align-items: center;
}

html body .filter-form .select {
  width: auto;
  flex: 0 1 200px;
}

@media (max-width: 620px) {
  html body .filter-form .select {
    flex: 1 1 100%;
  }
}

/* جدول‌های پهن روی موبایل اسکرول افقی بشوند، نه اینکه ستون‌ها له شوند */
html body .table {
  min-width: 620px;
}

/* ---------- لیست‌های منوی کشویی: همه‌ی <select>ها شورون بالا/پایین ---------- */
html body .select {
  -webkit-appearance: none;
  appearance: none;
  padding-inline: 14px 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}

[data-theme="dark"] .select option {
  background: #2c2c2e;
  color: #fff;
}

/* ---------- تیکت: حباب‌های گفتگو مثل Messages ---------- */
html body .ticket-thread {
  gap: 10px;
}

html body .ticket-msg {
  max-width: min(100%, 560px);
  padding: 12px 16px;
  border: 0;
  border-radius: 22px;
  border-end-start-radius: 8px;
  background: color-mix(in oklch, var(--accent) 13%, transparent);
  margin-inline-end: auto;
}

html body .ticket-msg.staff {
  border-end-start-radius: 22px;
  border-end-end-radius: 8px;
  background: var(--lg-fill);
  margin-inline-end: 0;
  margin-inline-start: auto;
}

html body .ticket-meta strong {
  font-size: 0.8125rem;
}

/* ---------- فوتر ---------- */
html body .site-footer {
  border-top: 0.5px solid var(--lg-sep);
}

html body .site-footer h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

html body .site-footer a:not(.logo) {
  color: var(--text-primary);
  text-decoration: none;
}

html body .site-footer a:not(.logo):hover {
  color: var(--accent);
}

/* ---------- نشان‌های تعداد ---------- */
html body .badge-count {
  background: #ff3b30;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--bg-base);
}

/* ---------- جزئیات (details/summary) و چک‌باکس ---------- */
html body details > summary {
  cursor: pointer;
  font-weight: 600;
}

@media (prefers-reduced-transparency: reduce) {
  html body .panel,
  html body .auth-card,
  html body .cart-summary,
  html body .empty,
  html body .cart-empty,
  html body .table-wrap,
  html body .stat-card {
    background: var(--bg-card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .btn,
  html body .chip,
  html body .product-card,
  html body .dash-tab {
    transition: none;
  }
  html body .btn:active:not(:disabled),
  html body .chip:active,
  html body .product-card:hover,
  html body .product-card:active {
    transform: none;
  }
}

/* ==========================================================================
   چک‌باکس و رادیوی اپلی (در .check): مربع گرد با پرکننده‌ی سیستمی، تیک سفید روی آبی
   ========================================================================== */
html body .check,
html body .field .check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.7;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html body .check input[type="checkbox"],
html body .check input[type="radio"],
html body .field .check input[type="checkbox"],
html body .field .check input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: var(--lg-fill);
  box-shadow: inset 0 0 0 1.5px color-mix(in oklch, var(--text-muted) 55%, transparent);
  cursor: pointer;
  transition: background-color 0.2s var(--lg-spring), box-shadow 0.2s var(--lg-spring), transform 0.25s var(--lg-spring);
}

html body .check input[type="radio"] {
  border-radius: 50%;
}

/* حالت‌ها باید از قاعده‌ی پایه (که .field .check هم دارد) قوی‌تر باشند */
html body .check input[type="checkbox"]:hover,
html body .check input[type="radio"]:hover,
html body .field .check input[type="checkbox"]:hover,
html body .field .check input[type="radio"]:hover {
  background: var(--lg-fill-hover);
}

html body .check input[type="checkbox"]:active,
html body .check input[type="radio"]:active,
html body .field .check input[type="checkbox"]:active,
html body .field .check input[type="radio"]:active {
  transform: scale(0.92);
}

html body .check input[type="checkbox"]:checked,
html body .check input[type="radio"]:checked,
html body .field .check input[type="checkbox"]:checked,
html body .field .check input[type="radio"]:checked {
  background: var(--accent);
  box-shadow: 0 3px 10px color-mix(in oklch, var(--accent) 38%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* تیک */
html body .check input[type="checkbox"]::after {
  content: "";
  width: 11px;
  height: 6px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 0 2.5px 2.5px;
  border-radius: 1px;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.2s var(--lg-spring);
}

html body .check input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}

/* نقطه‌ی رادیو */
html body .check input[type="radio"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.2s var(--lg-spring);
}

html body .check input[type="radio"]:checked::after {
  transform: scale(1);
}

html body .check input:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--accent) 40%, transparent);
  outline-offset: 2px;
}

html body .check span a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

html body .check span a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  html body .check input,
  html body .check input::after {
    transition: none;
  }
}

/* ---------- نمودار فروش و پرفروش‌ها (پنل فروشنده) ---------- */
.chart-card { padding: 16px; border: 1px solid var(--lg-border); border-radius: 24px; background: var(--lg-bg); box-shadow: inset 0 1px 0 var(--lg-highlight); }
.sales-chart { display: block; width: 100%; height: auto; max-height: 240px; direction: ltr; }
.sales-chart .bar rect { fill: var(--accent); transition: opacity 0.2s; }
.sales-chart .bar.zero rect { fill: var(--lg-fill-hover, rgba(118, 118, 128, 0.25)); }
.sales-chart .bar:hover rect { opacity: 0.75; }
.sales-chart .axis { fill: var(--text-muted); font-size: 11px; }
.top-products { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tp-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9375rem; }
.tp-row a { font-weight: 700; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.tp-row span { color: var(--text-muted); white-space: nowrap; font-size: 0.8125rem; }
.tp-bar { height: 8px; margin-top: 6px; border-radius: 99px; background: var(--lg-fill); overflow: hidden; }
.tp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), oklch(0.65 0.2 300)); }

/* ---------- نظرهای من ---------- */
.my-reviews { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.my-reviews .panel { padding: 16px 18px; }
.mr-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.mr-title { font-weight: 800; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.mr-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.mr-text { margin: 8px 0 0; line-height: 1.9; overflow-wrap: anywhere; white-space: pre-line; }
.mr-actions { display: flex; gap: 8px; margin-top: 12px; }
.mr-actions form { margin: 0; }

/* ---------- اقدام‌های جدول کاربران: قرص‌های نقش + پیوندهای ثانویه ---------- */
.u-actions { display: grid; gap: 10px; min-width: 250px; justify-items: start; }
.u-actions form { margin: 0; }

.u-roles { display: flex; flex-wrap: wrap; gap: 6px; }

.u-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--lg-fill);
  cursor: pointer;
  transition: background-color 0.2s var(--lg-spring), color 0.2s var(--lg-spring), transform 0.2s var(--lg-spring);
}
.u-chip:hover:not(:disabled) { background: var(--lg-fill-hover); color: var(--text-primary); }
.u-chip:active:not(:disabled) { transform: scale(0.95); }
.u-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.u-chip.on {
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  border-color: color-mix(in oklch, var(--accent) 35%, transparent);
}
.u-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.u-chip [data-icon] { display: inline-flex; }

.u-more { display: flex; gap: 14px; }
.u-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}
.u-link:hover:not(:disabled) { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.u-link.danger { color: oklch(0.62 0.2 25); }
.u-link:disabled { opacity: 0.4; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .u-chip { transition: none; } }

/* برچسب‌های وضعیت/نقش در جدول نشکنند */
html body .table .status { white-space: nowrap; }
html body .table td .status + .status { margin-inline-start: 4px; }
