@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/PeydaWeb-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/peydaWeb-extralight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/peydaWeb-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/PeydaWeb-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/PeydaWeb-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/PeydaWeb-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/PeydaWeb-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/PeydaWeb-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Peyda";
  src: url("../fonts/peyda/PeydaWeb-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Nabz — Admin UI
 * تم سبز مدرن با فونت پلاک
 * ------------------------------------------------------------------ */

/* ============== متغیرها ============== */
.nabz-wrap {
    --ss-bg: #fafafa;
    --ss-surface: #ffffff;
    --ss-surface-2: #f4f4f5;
    --ss-border: #e4e4e7;
    --ss-border-2: #d4d4d8;
    --ss-text: #0a0a0a;
    --ss-text-2: #52525b;
    --ss-text-3: #71717a;
    --ss-accent: #059669;
    --ss-accent-fg: #ffffff;
    --ss-success: #059669;
    --ss-danger: #dc2626;
    --ss-warning: #ca8a04;
    --ss-radius-sm: 8px;
    --ss-radius: 12px;
    --ss-radius-lg: 16px;
    --ss-radius-xl: 22px;
    --ss-shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .03);
    --ss-shadow: 0 4px 14px rgba(0, 0, 0, .06), 0 2px 4px rgba(0, 0, 0, .04);
    --ss-shadow-lg: 0 10px 30px rgba(0, 0, 0, .08), 0 4px 10px rgba(0, 0, 0, .05);
    --ss-transition: 200ms cubic-bezier(.4, 0, .2, 1);
}

/* ============== ریست و پایه ============== */
.nabz-wrap,
.nabz-wrap * {
    box-sizing: border-box;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, -apple-system, sans-serif !important;
}

/* استایل آیتم منوی نبض به assets/css/admin-menu.css منتقل شد
 * تا روی همهٔ صفحات wp-admin لود شود. */

.nabz-wrap {
    direction: rtl;
    color: var(--ss-text);
    font-size: 14px;
    line-height: 1.7;
    margin: 10px auto 40px;
    max-width: 1400px;
    padding-inline: 24px;
}

/* License-entry step: size the surface to its content and center it. */
.nabz-wrap.nabz-wrap--license-entry {
    width: max-content;
    max-width: 100%;
    margin-inline: auto !important;
}

.nabz-wrap.nabz-wrap--license-entry input.nbz-license-key-input[type="text"] {
    width: 100%;
    max-width: none;
}

.nabz-wrap.nabz-wrap--license-entry input.nbz-license-key-input[type="text"]::placeholder {
    direction: rtl;
    text-align: right;
}

/* WP پیش‌فرض‌ها را مهار می‌کنیم */
.nabz-wrap .wp-heading-inline,
.nabz-wrap h1,
.nabz-wrap h2,
.nabz-wrap h3 {
    color: var(--ss-text);
    font-weight: 700;
    margin: 0;
    padding: 0;
}

/* ============== هدر صفحه ============== */
.ss-header {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: var(--ss-radius-xl);
    margin-bottom: 24px;
    box-shadow: var(--ss-shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.ss-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, .06) 0%, transparent 60%);
    pointer-events: none;
}

.ss-header__title {
    color: #fff !important;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ss-header__title .nbz-icon {
    width: 26px;
    height: 26px;
    color: #fff;
}

.ss-header__logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    flex: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.ss-header__subtitle {
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    margin: 0;
    font-weight: 400;
}

.ss-header__badge {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ============== کارت‌ها ============== */
.ss-card {
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-lg);
    box-shadow: var(--ss-shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow var(--ss-transition);
}

.ss-card:hover {
    box-shadow: var(--ss-shadow);
}

/* کارت قفل‌شونده — وقتی پیش‌نیاز (ورود با پیامک) غیرفعال است */
.ss-card--lockable {
    position: relative;
}
.ss-card__lock {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    color: var(--ss-text-2);
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: var(--ss-radius-lg);
}
.ss-card__lock svg {
    width: 30px;
    height: 30px;
    color: var(--ss-text);
}
.ss-card--lockable.is-locked .ss-card__lock {
    display: flex;
}
/* محتوای زیر قفل غیرفعال و محو می‌شود */
.ss-card--lockable.is-locked .ss-card__header,
.ss-card--lockable.is-locked .ss-card__body {
    filter: blur(2px);
    opacity: .6;
    pointer-events: none;
    user-select: none;
}

/* ── custom select (username source) ── */
.ss-cust-sel {
    position: relative;
}
.ss-cust-sel__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: var(--ss-surface);
    border: 1.5px solid var(--ss-border-2);
    border-radius: var(--ss-radius-sm);
    cursor: pointer;
    font-family: inherit;
    text-align: right;
    transition: border-color var(--ss-transition), box-shadow var(--ss-transition);
}
.ss-cust-sel__trigger:hover {
    border-color: var(--ss-text-3);
}
.ss-cust-sel.is-open .ss-cust-sel__trigger {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 3px rgba(10,10,10,.08);
}
.ss-cust-sel__val {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}
.ss-cust-sel__val strong { font-size: 13px; color: var(--ss-text); }
.ss-cust-sel__hint { font-size: 11px; color: var(--ss-text-3); font-family: monospace; }
.ss-cust-sel__chevron {
    width: 16px; height: 16px;
    color: var(--ss-text-3);
    flex-shrink: 0;
    transition: transform var(--ss-transition);
}
.ss-cust-sel.is-open .ss-cust-sel__chevron { transform: rotate(180deg); }

.ss-cust-sel__panel {
    /* position/top/right/width set by JS (portal appended to body) */
    background: #ffffff;
    border: 1.5px solid #e4e4e7;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.05);
    overflow: hidden;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif;
    direction: rtl;
}
.ss-cust-sel__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid #e4e4e7;
    cursor: pointer;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif;
    text-align: right;
    transition: background 200ms ease;
}
.ss-cust-sel__item:last-child { border-bottom: none; }
.ss-cust-sel__item:hover:not(.is-locked) { background: #f4f4f5; }
.ss-cust-sel__item.is-selected { background: #f4f4f5; }
.ss-cust-sel__item.is-locked { opacity: .45; cursor: not-allowed; }
.ss-cust-sel__item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}
.ss-cust-sel__item-body strong { font-size: 13px; color: #0a0a0a; font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif; }
.ss-cust-sel__item-hint { font-size: 11px; color: #71717a; font-family: monospace; }
#ss-cust-sel-tip {
    position: absolute;
    z-index: 100000;
    max-width: 260px;
    padding: 7px 11px;
    background: #0a0a0a;
    color: #fff;
    font-size: 12px;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif;
    line-height: 1.6;
    border-radius: 6px;
    pointer-events: none;
    direction: rtl;
    text-align: right;
    white-space: normal;
}
#ss-cust-sel-tip[hidden] { display: none; }
.ss-cust-sel__item-lock-icon, .ss-cust-sel__item-lock svg, .ss-cust-sel__check {
    width: 15px; height: 15px;
    color: #71717a;
    flex-shrink: 0;
}
.ss-cust-sel__check { color: #0a0a0a; }

.ss-card__header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--ss-border);
    background: var(--ss-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ss-card__title {
    font-size: 16px !important;
    font-weight: 700;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ss-card__title .nbz-icon {
    width: 20px;
    height: 20px;
    color: var(--ss-text-2);
}

/* Contextual links to the matching nabz.business help article. */
.nbz-help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-inline-start: 2px;
    padding: 0;
    flex: 0 0 22px;
    color: var(--ss-text-3);
    background: var(--ss-surface-2);
    border: 1px solid var(--ss-border);
    border-radius: 7px;
    box-shadow: none;
    text-decoration: none;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.nbz-help-link:hover,
.nbz-help-link:focus-visible {
    color: var(--ss-accent, #7c3aed);
    background: var(--ss-surface);
    border-color: currentColor;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .13);
    transform: translateY(-1px);
}

.nbz-help-link .nbz-icon,
.ss-header__title .nbz-help-link .nbz-icon,
.ss-card__title .nbz-help-link .nbz-icon {
    width: 14px;
    height: 14px;
    color: currentColor;
    flex: none;
}

.ss-header__title .nbz-help-link {
    color: rgba(255, 255, 255, .84);
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .24);
}

.ss-header__title .nbz-help-link:hover,
.ss-header__title .nbz-help-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .55);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
}

.ss-card__desc {
    font-size: 13px;
    color: var(--ss-text-3);
    margin: 4px 0 0;
    font-weight: 400;
}

.ss-card__body {
    padding: 24px;
}

.ss-card__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ss-border);
    background: var(--ss-surface-2);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ============== صفحه‌بندی ============== */
.nbz-pagination {
    justify-content: space-between;
    flex-wrap: wrap;
}
.nbz-pagination__info {
    font-size: 13px;
    color: var(--ss-text-2);
}
.nbz-pagination__nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nbz-pagination__pages {
    font-size: 13px;
    color: var(--ss-text-2);
    white-space: nowrap;
}
.nbz-pagination .button.disabled {
    opacity: .5;
    pointer-events: none;
    cursor: default;
}

/* ============== شبکه آماری ============== */
.ss-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.ss-stat {
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    padding: 18px 20px;
    box-shadow: var(--ss-shadow-sm);
    transition: transform var(--ss-transition), box-shadow var(--ss-transition);
}

.ss-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--ss-shadow);
}

.ss-stat__label {
    font-size: 12px;
    color: var(--ss-text-3);
    text-transform: none;
    margin: 0 0 6px;
    font-weight: 500;
}

.ss-stat__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ss-text);
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ss-stat__value .nbz-icon {
    width: 22px;
    height: 22px;
}

.ss-stat--success .ss-stat__value {
    color: var(--ss-success);
}

.ss-stat--danger .ss-stat__value {
    color: var(--ss-danger);
}

.ss-stat--warning .ss-stat__value {
    color: var(--ss-warning);
}

/* ============== آیکون‌های SVG (جایگزین Dashicons) ============== */
.nbz-icon {
    width: 18px;
    height: 18px;
    flex: none;
    display: inline-block;
    vertical-align: -3px;
}

.nbz-icon--btn {
    width: 17px;
    height: 17px;
}

.nbz-icon--empty {
    width: 34px;
    height: 34px;
    display: block;
    margin: 0 auto 8px;
    opacity: .4;
}

/* واحد پول همیشه در سمت چپ مبلغ قرار می‌گیرد: ۳۰۰٬۰۰۰ تومان. */
.nbz-money {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: .3em;
    direction: rtl;
    white-space: nowrap;
}

.nbz-money__unit,
.nbz-money__amount {
    display: inline-block;
}

.nbz-money__amount {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ============== نوار ذخیره‌ی چسبان (کارت شناور ۲۰۰px) ============== */
.nbz-savebar {
    position: fixed;
    bottom: 24px;
    left: 50%; /* وسط افقی صفحه */
    width: 200px;
    z-index: 9989;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
    direction: rtl;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif;
    transform: translateX(-50%) translateY(180%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.nbz-savebar.is-visible { transform: translateX(-50%) translateY(0); }

.nbz-savebar__inner {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nbz-savebar__msg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #3f3f46;
    line-height: 1.5;
}
.nbz-savebar__dot {
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
    animation: nbz-pulse 1.8s ease-in-out infinite;
}
@keyframes nbz-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
    50%      { box-shadow: 0 0 0 7px rgba(245, 158, 11, .08); }
}
.nbz-savebar__btn {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.nbz-savebar__btn:hover { transform: translateY(-1px); }
.nbz-savebar__btn--save {
    background: #059669;
    color: #fff;
    box-shadow: 0 8px 20px rgba(5, 150, 105, .25);
}
.nbz-savebar__btn--save:hover { background: #047857; box-shadow: 0 10px 26px rgba(5, 150, 105, .32); }

@media (prefers-reduced-motion: reduce) {
    .nbz-savebar { transition: none; }
    .nbz-savebar__dot { animation: none; }
}

/* ============== فرم‌ها ============== */
.nabz-wrap .form-table {
    background: transparent !important;
}

.nabz-wrap .form-table th,
.nabz-wrap .form-table td {
    padding: 14px 0;
    vertical-align: middle;
}

.nabz-wrap .form-table th {
    width: 240px;
    font-weight: 600;
    color: var(--ss-text);
    font-size: 14px;
    padding-left: 24px;
}

.nabz-wrap .form-table label {
    color: var(--ss-text);
    font-weight: 600;
}

.nabz-wrap .form-table .description,
.nabz-wrap .description {
    color: var(--ss-text-3);
    font-size: 12px;
    font-style: normal;
    margin-top: 6px;
}

/* فیلدهای ورودی */
.nabz-wrap input[type=text],
.nabz-wrap input[type=url],
.nabz-wrap input[type=number],
.nabz-wrap input[type=email],
.nabz-wrap input[type=tel],
.nabz-wrap input[type=password],
.nabz-wrap input[type=search],
.nabz-wrap select,
.nabz-wrap textarea {
    background: var(--ss-surface) !important;
    border: 1px solid var(--ss-border-2) !important;
    border-radius: var(--ss-radius-sm) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: var(--ss-text) !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color var(--ss-transition), box-shadow var(--ss-transition);
    min-height: 40px;
    line-height: 1.5;
    width: 100%;
    max-width: 480px;
    font-family: 'Peyda', sans-serif !important;
}

.nabz-wrap input[type=number] {
    max-width: 180px;
}

.nabz-wrap textarea {
    min-height: 80px;
    resize: vertical;
}

.nabz-wrap input:focus,
.nabz-wrap select:focus,
.nabz-wrap textarea:focus {
    border-color: var(--ss-accent) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .08) !important;
}

.nabz-wrap input::placeholder,
.nabz-wrap textarea::placeholder {
    color: #a1a1aa;
}

/* چک‌باکس و رادیو — مربع بزرگ‌تر با تیک SVG سفید در مرکز */
.nabz-wrap input[type=checkbox],
.nabz-wrap input[type=radio] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    flex: 0 0 auto;
    border: 1.5px solid var(--ss-border-2) !important;
    border-radius: 6px !important;
    margin: 0 0 0 8px !important;
    padding: 0 !important;
    background-color: var(--ss-surface) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 16px 16px !important;
    transition: all var(--ss-transition);
    cursor: pointer;
    vertical-align: middle;
    position: relative;
}

.nabz-wrap input[type=radio] {
    border-radius: 50% !important;
    background-size: 22px 22px !important;
}

.nabz-wrap input[type=checkbox]:checked,
.nabz-wrap input[type=radio]:checked {
    background-color: var(--ss-accent) !important;
    border-color: var(--ss-accent) !important;
}

/* تیک سفید (آیکون SVG) در مرکز چک‌باکس فعال */
.nabz-wrap input[type=checkbox]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") !important;
}

/* نقطه‌ی سفید در مرکز رادیوی فعال */
.nabz-wrap input[type=radio]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5' fill='%23ffffff'/%3E%3C/svg%3E") !important;
}

/* WordPress core ::before checkmark را روی چک‌باکس‌های سفارشی حذف کن */
.nabz-wrap input[type=checkbox]::before,
.nabz-wrap input[type=checkbox]:checked::before,
.nabz-wrap input[type=radio]::before,
.nabz-wrap input[type=radio]:checked::before {
    content: none !important;
    display: none !important;
}

.nabz-wrap input[type=checkbox]:focus-visible,
.nabz-wrap input[type=radio]:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ss-accent) 30%, transparent) !important;
    outline: none !important;
}

/* سوییچ — iOS-style toggle (RTL: off=راست، on=چپ) */
.ss-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.ss-switch,
.ss-switch *,
.ss-switch *::before,
.ss-switch *::after {
    box-sizing: border-box;
}

.ss-switch input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    outline: 0;
    width: 4em !important;
    height: 2em !important;
    min-width: 4em;
    background: #fbfbfb !important;
    border: 1px solid #e8eae9 !important;
    border-radius: 2em !important;
    padding: 2px !important;
    position: relative;
    cursor: pointer;
    margin: 0 !important;
    transition: background 0.4s ease, border-color 0.4s ease;
    box-shadow: none !important;
}

/* WordPress core checkmark (::before) را روی toggle حذف کن */
.nabz-wrap .ss-switch input[type=checkbox]::before,
.nabz-wrap .ss-switch input[type=checkbox]:checked::before,
.ss-switch input[type=checkbox]::before,
.ss-switch input[type=checkbox]:checked::before {
    content: none !important;
    display: none !important;
    background: none !important;
}

.ss-switch input[type=checkbox]::after {
    content: '';
    position: absolute;
    top: 2px;
    /* RTL: knob شروع از سمت راست (off). برای انیمیشن نرم فقط یک property (right) تغییر می‌کند. */
    right: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: #fbfbfb;
    border-radius: 2em;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 4px 0 rgba(0, 0, 0, .08);
    transition: right 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.32s ease;
}

.ss-switch input[type=checkbox]:checked {
    background: var(--ss-accent, #86d993) !important;
    border-color: var(--ss-accent, #86d993) !important;
}

.ss-switch input[type=checkbox]:checked::after {
    /* on: knob به سمت چپ می‌لغزد */
    right: 50%;
}

.ss-switch input[type=checkbox]:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .08) !important;
}

.ss-switch__label {
    font-weight: 500;
    color: var(--ss-text-2);
    font-size: 13px;
}

/* ============== دکمه‌ها ============== */
.nabz-wrap .button,
.nabz-wrap .button-primary,
.nabz-wrap .button-secondary {
    border-radius: var(--ss-radius-sm) !important;
    border: 1px solid var(--ss-border-2) !important;
    background: var(--ss-surface) !important;
    color: var(--ss-text) !important;
    padding: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: pointer;
    transition: all var(--ss-transition);
    font-family: 'Peyda', sans-serif !important;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nabz-wrap .button:hover {
    background: var(--ss-surface-2) !important;
    border-color: var(--ss-accent) !important;
    color: var(--ss-accent) !important;
}

.nabz-wrap .button-primary {
    background: var(--ss-accent) !important;
    color: var(--ss-accent-fg) !important;
    border-color: var(--ss-accent) !important;
}

.nabz-wrap .button-primary:hover {
    background: #047857 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, .2) !important;
}

.nabz-wrap .button:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .12) !important;
    outline: none !important;
}

.nabz-wrap p.submit {
    padding: 0;
    margin: 0;
}

/* ============== جداول ============== */
.nabz-wrap table.widefat,
.nabz-wrap table.ss-table {
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    border-spacing: 0;
    border-collapse: separate;
    overflow: hidden;
    box-shadow: none;
    width: 100%;
}

/* تیبل‌هایی که مستقیم داخل بدنه‌ی کارت‌اند، گوشه‌های بالا صاف باشند */
.nabz-wrap .ss-card__body > table.widefat {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.nabz-wrap table.widefat thead th,
.nabz-wrap table.ss-table thead th {
    background: var(--ss-surface-2);
    color: var(--ss-text-2);
    font-weight: 600;
    font-size: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ss-border);
    text-align: right;
}

.nabz-wrap table.widefat tbody th,
.nabz-wrap table.widefat tbody td,
.nabz-wrap table.ss-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ss-border);
    color: var(--ss-text);
    background: var(--ss-surface);
    text-align: right;
    vertical-align: middle;
}

.nabz-wrap table.widefat tbody tr:last-child td,
.nabz-wrap table.widefat tbody tr:last-child th,
.nabz-wrap table.ss-table tbody tr:last-child td {
    border-bottom: none;
}

.nabz-wrap table.widefat.striped tbody tr:nth-child(2n) td,
.nabz-wrap table.widefat.striped tbody tr:nth-child(2n) th {
    background: #fafafa;
}

.nabz-wrap table.widefat tbody tr:hover td,
.nabz-wrap table.widefat tbody tr:hover th {
    background: var(--ss-surface-2);
}

.nabz-wrap table.widefat code {
    background: var(--ss-surface-2);
    color: var(--ss-text);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    border: 1px solid var(--ss-border);
}

/* جدول کلید/مقدار وضعیت */
.ss-kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--ss-border);
    border-radius: var(--ss-radius);
    overflow: hidden;
    border: 1px solid var(--ss-border);
}

.ss-kv__row {
    background: var(--ss-surface);
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 14px 18px;
    align-items: center;
    gap: 12px;
}

.ss-kv__key {
    color: var(--ss-text-3);
    font-size: 13px;
    font-weight: 500;
}

.ss-kv__key--with-help {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
}

.nbz-capacity-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--ss-border-2);
    border-radius: 50%;
    background: var(--ss-surface);
    color: var(--ss-text-2);
    cursor: pointer;
    transition: color var(--ss-transition), background var(--ss-transition), border-color var(--ss-transition), transform var(--ss-transition);
}

.nbz-capacity-help:hover,
.nbz-capacity-help:focus-visible {
    color: #fff;
    background: var(--ss-text);
    border-color: var(--ss-text);
    transform: translateY(-1px);
    outline: none;
}

.nbz-capacity-help .nbz-icon {
    width: 14px;
    height: 14px;
}

.nbz-capacity-tooltip {
    position: fixed;
    z-index: 100010;
    max-width: 190px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: #111;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    font-size: 11px;
    font-weight: 600;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, -apple-system, sans-serif !important;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
}

.nbz-capacity-tooltip[hidden] {
    display: none;
}

.nbz-inline-tooltip {
    width: min(300px, calc(100vw - 24px));
    max-width: none;
    white-space: normal;
}

.ss-kv__val {
    color: var(--ss-text);
    font-weight: 600;
    font-size: 14px;
}

/* ============== نشانگرها (badges/pills) ============== */
.ss-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--ss-surface-2);
    color: var(--ss-text-2);
    border: 1px solid var(--ss-border);
    line-height: 1.4;
}

.ss-badge--success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.ss-badge--danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.ss-badge--warning {
    background: #fefce8;
    color: #854d0e;
    border-color: #fde68a;
}

.ss-badge--dark {
    background: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
}

.ss-badge--info {
    background: #f4f4f5;
    color: #27272a;
    border-color: #d4d4d8;
}

.ss-badge .ss-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* ============== اعلان‌ها ============== */
.nabz-wrap,
.nabz-wrap .ss-notice {
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    border-left: none !important;
    border-right: 4px solid var(--ss-text-2);
    padding: 14px 18px !important;
    margin: 0 0 18px !important;
    box-shadow: var(--ss-shadow-sm);
    color: var(--ss-text);
}

.nabz-wrap .notice p {
    color: var(--ss-text);
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.nabz-wrap .notice-success {
    border-right-color: var(--ss-success);
    background: #f0fdf4;
}

.nabz-wrap .notice-success p {
    color: #166534;
}

.nabz-wrap .notice-error,
.nabz-wrap .notice-warning {
    background: #fefce8;
}

.nabz-wrap .notice-warning {
    border-right-color: var(--ss-warning);
}

.nabz-wrap .notice-warning p {
    color: #854d0e;
}

.nabz-wrap .notice-error {
    background: #fef2f2;
    border-right-color: var(--ss-danger);
}

.nabz-wrap .notice-error p {
    color: #991b1b;
}

/* ============== کد و ابزارها ============== */
.nabz-wrap code,
.nabz-wrap .ss-code {
    background: var(--ss-surface-2);
    border: 1px solid var(--ss-border);
    color: var(--ss-text);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Vazir', monospace !important;
    direction: ltr;
    display: inline-block;
}

.ss-shortcode {
    background: #0a0a0a;
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--ss-radius-sm);
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 13px;
    direction: ltr;
    display: inline-block;
    border: none;
}

/* ============== تب‌های گروه‌بندی ============== */
.ss-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--ss-border);
}
.ss-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--ss-text-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: 8px 8px 0 0;
    transition: color var(--ss-transition), background var(--ss-transition), border-color var(--ss-transition);
}
.ss-tab .nbz-icon { width: 17px; height: 17px; }
.ss-tab:hover { color: var(--ss-text); background: var(--ss-surface-2); }
.ss-tab.is-active { color: var(--ss-accent); border-bottom-color: var(--ss-accent); }
.ss-tab__count {
    background: var(--ss-surface-2);
    color: var(--ss-text-3);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
}
.ss-tab.is-active .ss-tab__count { background: var(--ss-accent); color: var(--ss-accent-fg); }

.ss-tab-panel { display: none; }
.ss-tab-panel.is-active { display: block; animation: ss-tab-fade .22s ease; }
@keyframes ss-tab-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============== چینش پیام‌ها ============== */
.ss-msg-grid {
    display: grid;
    gap: 14px;
}

.ss-msg-item {
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    padding: 18px;
    transition: border-color var(--ss-transition);
}

.ss-msg-item:hover {
    border-color: var(--ss-border-2);
}

.ss-msg-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--ss-border);
}

.ss-msg-item__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ss-text);
    margin: 0;
}

.ss-msg-item--event:not(.ss-msg-item--has-admin) .ss-msg-item__head {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.ss-msg-item__identity,
.nbz-admin-variant__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ss-msg-item__identity > div { min-width: 0; }
.ss-msg-item__identity code {
    display: inline-block;
    margin-top: 5px;
}

.nbz-message-preview-button {
    width: 36px;
    height: 36px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--ss-text-2);
    background: var(--ss-surface-2);
    border: 1px solid var(--ss-border-2);
    border-radius: 11px;
    cursor: pointer;
    transition: color var(--ss-transition), background var(--ss-transition), border-color var(--ss-transition), transform var(--ss-transition);
}
.nbz-message-preview-button:hover {
    color: var(--ss-accent-fg);
    background: var(--ss-accent);
    border-color: var(--ss-accent);
    transform: translateY(-1px);
}
.nbz-message-preview-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ss-accent) 20%, transparent);
    outline-offset: 2px;
}
.nbz-message-preview-button:disabled {
    opacity: .38;
    cursor: not-allowed;
    transform: none;
}
.nbz-message-preview-button .nbz-icon { width: 18px; height: 18px; }
.nbz-message-preview-button--small {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}
.nbz-message-preview-button--small .nbz-icon { width: 16px; height: 16px; }

/* ============== Toast کپی ============== */
.nbz-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    z-index: 100000;
    direction: rtl;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif;
    font-size: 13px;
    color: #fff;
    background: #0a0a0a;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: var(--ss-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ss-transition), transform var(--ss-transition);
}

.nbz-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nbz-toast--success { background: #0a7a4a; }
.nbz-toast--error   { background: #b00020; }

/* ============== تب‌های اطلاعات ============== */
.ss-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* ============== جدول لاگ ============== */
.ss-log-level {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .5px;
}

.ss-log-level--info {
    background: #f4f4f5;
    color: #18181b;
}

.ss-log-level--warning {
    background: #fefce8;
    color: #854d0e;
}

.ss-log-level--error {
    background: #fef2f2;
    color: #991b1b;
}

.ss-log-level--debug {
    background: #ecfdf5;
    color: #047857;
}

/* Override آیکون منو به assets/css/admin-menu.css منتقل شد. */

/* ============== ریسپانسیو ============== */
@media (max-width: 782px) {
    .ss-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .ss-card__body {
        padding: 18px;
    }

    .nabz-wrap .form-table th {
        width: auto;
        padding-bottom: 6px;
        padding-left: 0;
    }

    .ss-kv__row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 14px;
    }

    .ss-kv__key {
        font-size: 12px;
    }

    .nabz-wrap input[type=text],
    .nabz-wrap input[type=url],
    .nabz-wrap input[type=number],
    .nabz-wrap input[type=tel],
    .nabz-wrap textarea {
        max-width: 100%;
    }
}

/* جدا کننده */
.nabz-wrap hr {
    display: none;
}

/* اطمینان از RTL در فیلدهای فارسی */
.nabz-wrap [dir="rtl"] {
    text-align: right;
}

/* لینک‌ها */
.nabz-wrap a {
    color: var(--ss-text);

}

.nabz-wrap a:hover {
    text-decoration-color: var(--ss-accent);
}

/* فاصله بین کارت‌های متوالی */
.ss-card+.ss-card {
    margin-top: 0;
}

/* راهنما/توضیحات داخل کارت */
.ss-help {
    background: var(--ss-surface-2);
    border-right: 3px solid var(--ss-accent);
    border-radius: var(--ss-radius-sm);
    padding: 12px 16px;
    color: var(--ss-text-2);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.7;
}

.ss-help strong {
    color: var(--ss-text);
}

/* فرم‌فیلد عمودی نوین */
.ss-field {
    margin-bottom: 18px;
}

.ss-field__label {
    display: block;
    font-weight: 600;
    color: var(--ss-text);
    font-size: 13px;
    margin-bottom: 8px;
}

.ss-field__hint {
    color: var(--ss-text-3);
    font-size: 12px;
    margin-top: 6px;
}

/* لایه دو-ستونه */
.ss-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* پیکرهای سه‌گزینه‌ای: همیشه کنار هم با عرض مساوی */
.ss-layout-picker,
.nbz-cta-trigger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* پیکرهای دو‌گزینه‌ای: همیشه کنار هم با عرض مساوی */
.nbz-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 480px;
}
@media (max-width: 600px) {
    .ss-layout-picker,
    .nbz-cta-trigger,
    .nbz-pair {
        grid-template-columns: 1fr;
    }
}

/* انتخاب‌گر آیکون: خود آیکون‌ها کنار هم به‌صورت کارت‌های قابل انتخاب */
.nbz-icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.nbz-icon-picker__item {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #d4d4d8;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.nbz-icon-picker__item:hover {
    border-color: var(--ss-text-2);
    background: #f4f4f5;
}
.nbz-icon-picker__item svg {
    width: 24px;
    height: 24px;
    color: #27272a;
}
.nbz-icon-picker__item:has(input:checked) {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 1px var(--ss-accent);
    background: #fff;
}
.nbz-icon-picker__item:has(input:checked) svg { color: var(--ss-accent); }

/* سوآچ‌های رنگ پیشنهادی */
.nbz-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nbz-swatches {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}
.nbz-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .15);
    cursor: pointer;
    padding: 0;
    transition: transform .12s ease;
}
.nbz-swatch:hover { transform: scale(1.12); }

/* کارت‌های قابل انتخاب با رادیو پنهان (modern :has selector) */
.ss-card:has(input[type=radio]:checked),
.ss-msg-item:has(input[type=checkbox]:checked) {
    border-color: var(--ss-accent) !important;
    box-shadow: 0 0 0 1px var(--ss-accent), var(--ss-shadow-sm);
}

.ss-grid-2>label.ss-card {
    transition: all var(--ss-transition);
}

.ss-grid-2>label.ss-card:hover {
    border-color: var(--ss-text-2);
}

/* ============== دکمه پیش‌نمایش روی کارت‌های گزینه ============== */
.ss-pick {
    position: relative;
}

.ss-pick__preview {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ss-border);
    background: var(--ss-surface);
    color: var(--ss-text-2);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: all var(--ss-transition);
}

.ss-pick__preview:hover {
    background: var(--ss-accent);
    color: #fff;
    border-color: var(--ss-accent);
    transform: scale(1.05);
}

.ss-pick__preview .ss-icon-eye {
    width: 16px;
    height: 16px;
    display: block;
}

.nbz-setting-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ss-pick__preview--inline {
    position: static;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
}

.nbz-checkout-settings {
    display: grid;
    gap: 16px;
}

.nbz-checkout-activation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface);
}

.nbz-checkout-activation__copy {
    min-width: 0;
}

.nbz-checkout-activation__copy strong,
.nbz-checkout-option__title strong {
    color: var(--ss-text);
    font-size: 14px;
    font-weight: 700;
}

.nbz-checkout-activation .description,
.nbz-checkout-option .description {
    margin: 6px 0 0;
    line-height: 1.85;
}

.nbz-checkout-activation .ss-switch {
    flex: 0 0 auto;
}

.nbz-checkout-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
}

.nbz-checkout-option {
    min-width: 0;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 16px 18px;
}

.nbz-checkout-option:has(input[type=checkbox]:checked) {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 1px var(--ss-accent), var(--ss-shadow-sm);
}

.nbz-checkout-option__content {
    height: 100%;
    transition: filter var(--ss-transition), opacity var(--ss-transition);
}

.nbz-checkout-option__lock {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: inherit;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--ss-text-2);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
}

.nbz-checkout-option__lock .nbz-icon {
    width: 24px;
    height: 24px;
    color: var(--ss-text);
}

.nbz-checkout-option.is-locked .nbz-checkout-option__lock {
    display: flex;
}

.nbz-checkout-option.is-locked .nbz-checkout-option__content {
    filter: blur(2px);
    opacity: .45;
    pointer-events: none;
    user-select: none;
}

.nbz-checkout-option__title {
    width: fit-content;
    max-width: calc(100% - 44px);
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    cursor: pointer;
}

.nbz-checkout-option--text .nbz-checkout-option__title {
    cursor: default;
}

.nbz-checkout-option__field {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding-left: 44px;
}

.nbz-checkout-option__field .nbz-checkout-option__title {
    width: auto;
    max-width: none;
    white-space: nowrap;
}

.nbz-checkout-option input.regular-text {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0;
}

@media (max-width: 900px) {
    .nbz-checkout-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nbz-checkout-activation {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .nbz-checkout-option {
        min-height: 0;
    }

    .nbz-checkout-option__field {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-left: 0;
    }
}

.ss-checkout-preview {
    position: relative;
    min-height: 440px;
    overflow: hidden;
    border: 1px solid var(--ss-border);
    border-radius: 16px;
    background: #f4f4f5;
    direction: rtl;
}

.ss-checkout-preview__top {
    height: 58px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e4e4e7;
    background: #fff;
}

.ss-checkout-preview__top span:first-child {
    width: 94px;
    height: 16px;
    border-radius: 6px;
    background: #18181b;
}

.ss-checkout-preview__top span:last-child {
    width: 130px;
    height: 10px;
    border-radius: 5px;
    background: #d4d4d8;
}

.ss-checkout-preview__content {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 18px;
    padding: 28px;
}

.ss-checkout-preview__form,
.ss-checkout-preview__order {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    background: #fff;
}

.ss-checkout-preview__form i,
.ss-checkout-preview__order i {
    display: block;
    height: 38px;
    border-radius: 8px;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
}

.ss-checkout-preview__order i { height: 14px; border: 0; }
.ss-checkout-preview__order i:nth-child(2) { width: 82%; }
.ss-checkout-preview__order i:nth-child(3) { width: 68%; }

.ss-checkout-preview__order button {
    margin-top: auto;
    min-height: 42px;
    border: 1px solid var(--ss-accent);
    border-radius: 9px;
    background: var(--ss-accent);
    color: #fff;
    font-family: inherit;
}

.ss-checkout-preview__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.ss-checkout-preview__overlay.is-nabz {
    background: rgba(9, 9, 11, .72);
    backdrop-filter: blur(3px);
}

.ss-checkout-preview__overlay.is-woocommerce {
    background: rgba(255, 255, 255, .78);
}

.ss-checkout-preview__transfer {
    min-width: 280px;
    max-width: calc(100% - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 22px 28px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
    color: #18181b;
    text-align: center;
}

.ss-checkout-preview__spinner,
.ss-checkout-preview__wc-loader span {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 3px solid #e4e4e7;
    border-top-color: var(--ss-accent);
    border-radius: 50%;
    animation: nbz-spin .8s linear infinite;
}

.ss-checkout-preview__wc-loader {
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
}

/* ============== پیش‌نمایش باکس ترغیب به ورود ============== */
.ss-cta-preview {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    border: 1px solid var(--ss-border);
    border-radius: 16px;
    background: #f4f4f5;
    direction: rtl;
}

.ss-cta-preview__top {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
    border-bottom: 1px solid #e4e4e7;
    background: #fff;
}

.ss-cta-preview__top span {
    width: 76px;
    height: 10px;
    border-radius: 999px;
    background: #d4d4d8;
}

.ss-cta-preview__top span:first-child {
    width: 96px;
    height: 16px;
    background: #18181b;
}

.ss-cta-preview__page {
    padding: 30px;
}

.ss-cta-preview__hero {
    display: grid;
    gap: 14px;
    width: min(620px, 78%);
    padding: 26px;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    background: #fff;
}

.ss-cta-preview__hero i,
.ss-cta-preview__cards i {
    display: block;
    border-radius: 8px;
    background: #e4e4e7;
}

.ss-cta-preview__hero i:first-child { width: 48%; height: 20px; background: #a1a1aa; }
.ss-cta-preview__hero i:nth-child(2) { width: 88%; height: 12px; }
.ss-cta-preview__hero i:nth-child(3) { width: 68%; height: 12px; }

.ss-cta-preview__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.ss-cta-preview__cards i {
    height: 92px;
    border: 1px solid #e4e4e7;
    background: #fff;
}

.ss-cta-preview__box {
    position: absolute;
    bottom: 24px;
    z-index: 2;
    width: min(340px, calc(100% - 48px));
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .16), 0 4px 10px rgba(0, 0, 0, .06);
    color: #18181b;
    font-family: 'Peyda', 'Tahoma', sans-serif;
}

.ss-cta-preview__box.is-right { right: 24px; }
.ss-cta-preview__box.is-left { left: 24px; }

.ss-cta-preview__dismiss {
    position: absolute;
    top: 5px;
    left: 8px;
    color: #a1a1aa;
    font-size: 18px;
    line-height: 1;
}

.ss-cta-preview__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ss-accent);
    color: #fff;
    font-weight: 700;
}

.ss-cta-preview__icon svg {
    width: 22px;
    height: 22px;
}

.ss-cta-preview__body {
    min-width: 0;
    flex: 1 1 auto;
}

.ss-cta-preview__text {
    margin: 0 0 8px;
    color: #18181b;
    font-size: 13px;
    line-height: 1.65;
}

.ss-cta-preview__button {
    min-height: 36px;
    padding: 7px 16px;
    border: 1px solid var(--ss-accent);
    border-radius: 9px;
    background: var(--ss-accent);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.ss-cta-preview__code {
    display: none;
    align-items: stretch;
    gap: 6px;
    margin: 0 0 8px;
    direction: ltr;
}

.ss-cta-preview.is-user .ss-cta-preview__code {
    display: inline-flex;
}

.ss-cta-preview.is-user .ss-cta-preview__button {
    display: none;
}

.ss-cta-preview__code code {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px dashed #d4d4d8;
    border-radius: 8px;
    background: #f4f4f5;
    color: #0a0a0a;
    font-size: 13px;
    font-weight: 700;
}

.ss-cta-preview__copy {
    width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #f4f4f5;
    color: #52525b;
}

.ss-cta-preview__copy svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 680px) {
    .ss-cta-preview { min-height: 420px; }
    .ss-cta-preview__page { padding: 18px; }
    .ss-cta-preview__cards { grid-template-columns: 1fr; }
    .ss-cta-preview__cards i:not(:first-child) { display: none; }
    .ss-cta-preview__box { bottom: 16px; }
    .ss-cta-preview__box.is-right { right: 16px; }
    .ss-cta-preview__box.is-left { left: 16px; }
}

@media (max-width: 680px) {
    .ss-checkout-preview { min-height: 380px; }
    .ss-checkout-preview__content { grid-template-columns: 1fr; padding: 18px; }
    .ss-checkout-preview__order { display: none; }
    .ss-checkout-preview__transfer { min-width: 0; }
}

/* ============== مودال پیش‌نمایش ============== */
.ss-preview {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
}

.ss-preview[hidden] {
    display: none !important;
}

.ss-preview__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, .55);
    backdrop-filter: blur(2px);
    animation: ss-fade-in .18s ease;
}

.ss-preview__box {
    position: relative;
    background: var(--ss-surface);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    width: min(1000px, calc(100vw - 40px));
    max-height: calc(100vh - 60px);
    overflow: auto;
    padding: 22px 22px 18px;
    animation: ss-pop-in .22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ss-preview__close {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ss-text-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}

.ss-preview__close:hover {
    background: var(--ss-surface-2);
    color: var(--ss-text);
}

.ss-preview__title {
    margin: 0 0 14px;
    padding-left: 36px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ss-text);
}

.ss-preview__body {
    font-size: 13px;
    color: var(--ss-text);
}

/* پیش‌نمایش زنده‌ی فرم ورود (iframe) */
.ss-preview__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 320px;
    color: var(--ss-text-2);
    font-weight: 600;
    font-size: 14px;
}
.ss-preview__spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--ss-border);
    border-top-color: var(--ss-accent);
    border-radius: 50%;
    animation: nbz-spin .8s linear infinite;
}
@keyframes nbz-spin { to { transform: rotate(360deg); } }
.ss-preview__frame {
    width: 100%;
    height: 72vh;
    border: 0;
    border-radius: 12px;
    background: #fff;
    display: block;
    box-shadow: inset 0 0 0 1px var(--ss-border);
}

@keyframes ss-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes ss-pop-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.96);
    }

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

/* ============== Mockupهای داخل مودال پیش‌نمایش ============== */
.ss-mock {
    --m-accent: var(--ss-accent, #0a0a0a);
}

.ss-mock__brand {
    text-align: center;
    margin-bottom: 14px;
}

.ss-mock__mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--m-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
}

.ss-mock__title {
    font-weight: 700;
    font-size: 14px;
}

.ss-mock__sub {
    font-size: 12px;
    color: var(--ss-text-3);
    margin-top: 4px;
}

.ss-mock--form {
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: 14px;
    padding: 20px 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .05);
    max-width: 380px;
    margin: 0 auto;
}

.ss-mock__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.ss-mock__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ss-text-2);
}

.ss-mock__input {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--ss-border);
    border-radius: 10px;
    background: var(--ss-surface-2);
    color: var(--ss-text-3);
    direction: ltr;
    text-align: right;
    font-size: 13px;
}

.ss-mock__btn {
    display: block;
    text-align: center;
    background: var(--m-accent);
    color: #fff;
    border-radius: 10px;
    padding: 10px;
    font-weight: 600;
    margin-top: 8px;
}

.ss-mock__note {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--ss-text-3);
    line-height: 1.7;
}

.ss-mock__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--ss-border);
}

.ss-mock__tab {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--ss-text-3);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.ss-mock__tab.is-active {
    color: var(--m-accent);
    border-bottom-color: var(--m-accent);
    font-weight: 600;
}

/* Mockup صفحه (shortcode/popup/page) */
.ss-mock--page {
    background: #f4f4f5;
    border: 1px solid var(--ss-border);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.ss-mock__bar {
    height: 28px;
    background: linear-gradient(to bottom, #fff, #fafafa);
    border-bottom: 1px solid var(--ss-border);
    position: relative;
}

.ss-mock__bar::before {
    content: '';
    position: absolute;
    top: 9px;
    right: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e4e4e7;
    box-shadow: 16px 0 0 #e4e4e7, 32px 0 0 #e4e4e7;
}

.ss-mock__page-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 16px;
    background: #fff;
}

.ss-mock__page-body--blur {
    filter: blur(1.5px);
    min-height: 240px;
}

.ss-mock__col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ss-mock__h1 {
    height: 14px;
    width: 60%;
    background: #d4d4d8;
    border-radius: 4px;
}

.ss-mock__p {
    height: 8px;
    width: 90%;
    background: #e4e4e7;
    border-radius: 4px;
}

.ss-mock__embed {
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}

/* Popup: overlay + مودال شناور */
.ss-mock__overlay {
    position: absolute;
    inset: 28px 0 0 0;
    background: rgba(10, 10, 10, .45);
}

.ss-mock__modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--ss-surface);
    border-radius: 12px;
    padding: 16px;
    width: 70%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}

/* Page: split layout */
.ss-mock--full .ss-mock__split {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    min-height: 260px;
}

.ss-mock__split-visual {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .2), transparent 50%),
        linear-gradient(135deg, var(--m-accent), #3f3f46);
}

.ss-mock__split-form {
    padding: 22px;
    background: var(--ss-surface);
}

/* فاصله بین آیتم‌های تنظیمات (مثل تیک مشتریان و تیک ادمین) که مستقیم
   داخل بدنه‌ی کارت‌اند؛ قالب‌های پیام داخل .ss-msg-grid هستند و تأثیری نمی‌گیرند. */
.ss-card__body > .ss-msg-item + .ss-msg-item {
    margin-top: 16px;
}

/* این آیتم‌های تنظیمات (تیک مشتریان/ادمین) نباید خط جداکننده‌ی نقطه‌چین داشته باشند */
.ss-card__body > .ss-msg-item > .ss-msg-item__head {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* نوار فیلتر وضعیت پیامک‌ها (لینک‌های لنگری با ظاهر تب) */
.nbz-filter {
    margin-bottom: 0;
    padding: 0 16px;
}
.nbz-filter .ss-tab {
    text-decoration: none;
}

/* بخش قفل‌شونده‌ی درون‌کارتی — وقتی تیک پیش‌نیاز خاموش است محو/قفل می‌شود */
.nbz-lockable {
    position: relative;
    margin-top: 12px;
}
.nbz-lock {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    text-align: center;
    color: var(--ss-text-2);
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: var(--ss-radius-lg);
}
.nbz-lock svg {
    width: 26px;
    height: 26px;
    color: var(--ss-text);
}
.nbz-lockable.is-locked .nbz-lock {
    display: flex;
}
.nbz-lockable.is-locked .nbz-lockable__content {
    filter: blur(2px);
    opacity: .6;
    pointer-events: none;
    user-select: none;
}

/* ── لیست مدیران دریافت‌کننده پیامک (افزودن/حذف) ── */
.nbz-admins {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.nbz-admins__empty {
    padding: 14px;
    border: 1px dashed var(--ss-border, #e4e4e7);
    border-radius: 10px;
    color: #71717a;
    font-size: 13px;
    text-align: center;
}

.nbz-admin-row,
.nbz-admin-add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nbz-admin-row > input[type=text] {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.nbz-admin-row > input[dir=ltr],
.nbz-admin-add > input[dir=ltr] {
    flex: 0 0 180px;
}

.nbz-admin-row__del {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b91c1c;
}

.nbz-admin-row__del:hover {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.nbz-admin-add {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ss-border, #e4e4e7);
}
.notice{
    display: none;
}
.nbz-admin-add > input[type=text] {
    flex: 1;
    min-width: 0;
    margin: 0;
}

/* ============== CRM / RFM (مشتریان و کمپین هدف‌مند) ============== */

/* اکشن‌های هدر صفحه‌ی مشتریان (دکمه + آخرین محاسبه) */
.nbz-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.nbz-btn-light.button,
.nbz-btn-light.button:hover,
.nbz-btn-light.button:focus {
    background: #fff;
    border-color: #fff;
    color: #0a0a0a;
    box-shadow: var(--ss-shadow-sm);
}
.nbz-btn-light.button .nbz-icon {
    color: #0a0a0a;
    vertical-align: middle;
}
.nbz-last-computed {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

/* کارت‌های سگمنت (به‌عنوان فیلتر) — همگی یک‌شکل، بدون بوردر رنگی */
.nbz-seg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.nbz-seg-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    background: var(--ss-surface);
    box-shadow: var(--ss-shadow-sm);
    text-decoration: none;
    color: var(--ss-text);
    transition: transform var(--ss-transition), box-shadow var(--ss-transition), border-color var(--ss-transition);
}
.nbz-seg-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ss-shadow);
    color: var(--ss-text);
}
.nbz-seg-card.is-active {
    background: var(--ss-accent);
    border-color: var(--ss-accent);
    color: #fff;
}
.nbz-seg-card.is-active .nbz-seg-card__label {
    color: rgba(255, 255, 255, .8);
}
.nbz-seg-card.is-active .nbz-seg-card__icon {
    color: #fff;
}
/* tooltip استایل‌دار روی کارت سگمنت (به‌جای title خام مرورگر) */
.nbz-seg-host {
    overflow: visible;
}
.nbz-seg-card {
    position: relative;
}
.nbz-seg-card[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 9px);
    right: 50%;
    transform: translateX(50%) translateY(4px);
    width: max-content;
    max-width: 220px;
    padding: 8px 11px;
    background: #0a0a0a;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.7;
    text-align: right;
    white-space: normal;
    border-radius: var(--ss-radius-sm);
    box-shadow: var(--ss-shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--ss-transition), transform var(--ss-transition);
    z-index: 60;
}
.nbz-seg-card[data-tip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    right: 50%;
    transform: translateX(50%);
    border: 6px solid transparent;
    border-top-color: #0a0a0a;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--ss-transition);
    z-index: 61;
}
.nbz-seg-card[data-tip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
}
.nbz-seg-card[data-tip]:hover::before {
    opacity: 1;
    visibility: visible;
}
.nbz-seg-card__icon {
    color: var(--ss-text);
    line-height: 0;
}
.nbz-seg-card__icon .nbz-icon {
    width: 22px;
    height: 22px;
}
.nbz-seg-card__count {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}
.nbz-seg-card__label {
    font-size: 12px;
    color: var(--ss-text-2);
}

/* چیپ تگ مشتری (فقط نمایشی، داخل جدول) */
.nbz-tag-chip {
    display: inline-block;
    padding: 2px 10px;
    margin: 1px;
    border-radius: 999px;
    background: var(--ss-surface-2);
    color: var(--ss-text-2);
    border: 1px solid var(--ss-border);
    font-size: 11px;
    font-weight: 600;
}

/* کارت‌های پیشنهاد هوشمند کمپین (Playbooks) */
.nbz-pb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}
.nbz-pb-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow-sm);
    transition: box-shadow var(--ss-transition), transform var(--ss-transition);
}
.nbz-pb-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ss-shadow);
}
.nbz-pb-card__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ss-text);
}
.nbz-pb-card__icon {
    color: var(--ss-text);
    line-height: 0;
}
.nbz-pb-card__icon .nbz-icon {
    width: 20px;
    height: 20px;
}
.nbz-pb-card__desc {
    margin: 0;
    flex: 1;
    font-size: 12px;
    line-height: 1.8;
    color: var(--ss-text-2);
}
.nbz-pb-card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2px;
}
.nbz-pb-card__aud {
    font-size: 12px;
    color: var(--ss-text-2);
}
.nbz-pb-card__aud strong {
    color: var(--ss-text);
    font-weight: 700;
}
/* دکمه‌ی قفل‌شده وقتی هیچ مخاطبی در سگمنت نیست (blur + قفل) */
.nbz-cta-locked {
    position: relative;
    cursor: not-allowed;
    pointer-events: none;
    overflow: hidden;
    opacity: .85;
}
.nbz-cta-locked__text {
    filter: blur(2.5px);
    opacity: .7;
}
.nbz-cta-locked__lock {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nbz-cta-locked__lock .nbz-icon {
    width: 15px;
    height: 15px;
    color: #fff;
}

/* چیپ‌های انتخاب مخاطب کمپین (سگمنت/تگ) — پیل قابل‌انتخاب */
.nbz-aud-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.nbz-aud-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface);
    color: var(--ss-text-2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: border-color var(--ss-transition), background var(--ss-transition), color var(--ss-transition), box-shadow var(--ss-transition);
}
/* چک‌باکس کاملاً مخفی است؛ کل پیل به‌عنوان کلید عمل می‌کند */
.nbz-aud-chip input[type=checkbox] {
    display: none !important;
}
.nbz-aud-chip b {
    font-weight: 700;
    color: var(--ss-text);
}
.nbz-aud-chip:hover {
    border-color: var(--seg, var(--ss-border-2));
    color: var(--ss-text);
}
/* حالت انتخاب‌شده: پیل با رنگ سگمنت پر می‌شود (کلاس از JS + پشتیبان :has) */
.nbz-aud-chip.is-on,
.nbz-aud-chip:has(input:checked) {
    background: var(--seg, var(--ss-accent));
    border-color: var(--seg, var(--ss-accent));
    color: #fff;
    box-shadow: var(--ss-shadow-sm);
}
.nbz-aud-chip.is-on b,
.nbz-aud-chip:has(input:checked) b {
    color: #fff;
}
.nbz-aud-chip.is-disabled,
.nbz-aud-chip:has(input:disabled) {
    opacity: .45;
    cursor: not-allowed;
    background: var(--ss-surface-2);
}
.nbz-aud-chip.is-disabled:hover,
.nbz-aud-chip:has(input:disabled):hover {
    border-color: var(--ss-border);
    color: var(--ss-text-2);
}

/* فیلدهای انتخابی ثبت‌نام؛ همان user_meta در نبض و Digits. */
.nbz-custom-fields {
    position: relative;
}
.nbz-register-fields-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 84px;
    align-items: stretch;
}
.nbz-register-fields-grid > .ss-msg-item {
    min-height: 100px;
}
.nbz-custom-add-card {
    width: 84px;
    height: 100px;
    min-width: 0;
    min-height: 100px;
    align-self: center;
    padding: 8px;
    border: 1.5px dashed var(--ss-border-2);
    border-radius: var(--ss-radius);
    background: var(--ss-surface-2);
    color: var(--ss-text-2);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    transition: color var(--ss-transition), border-color var(--ss-transition), background var(--ss-transition), transform var(--ss-transition), box-shadow var(--ss-transition);
}
.nbz-custom-add-card:hover,
.nbz-custom-add-card:focus-visible {
    color: var(--ss-text);
    border-color: var(--ss-accent);
    background: var(--ss-surface);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, .06);
    outline: none;
    transform: translateY(-1px);
}
.nbz-custom-add-card:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.nbz-custom-add-card__icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 12px;
    background: var(--ss-surface);
}
.nbz-custom-add-card__icon .nbz-icon {
    width: 17px;
    height: 17px;
}
.nbz-custom-add-card strong {
    font-size: 11px;
    font-weight: 700;
}
.nbz-custom-fields__saved {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--ss-border);
}
.nbz-custom-fields__saved-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.nbz-custom-fields__saved-head strong {
    color: var(--ss-text);
    font-size: 13px;
}
.nbz-custom-fields__saved-head span {
    color: var(--ss-text-3);
    font-size: 11px;
}
.nbz-custom-fields__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}
.nbz-custom-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface-2);
}
.nbz-custom-field-row__copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}
.nbz-custom-field-row__copy strong {
    overflow: hidden;
    color: var(--ss-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nbz-custom-field-row__copy span {
    color: var(--ss-text-3);
    font-size: 11px;
}
.nbz-custom-field-row__copy code {
    font-size: 11px;
}
.nbz-custom-field-row__requirement {
    color: var(--ss-text-3);
    font-weight: 700;
}
.nbz-custom-field-row__requirement.is-required {
    color: #b91c1c;
}
.nbz-custom-field-row__actions,
.nbz-custom-option-item__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
}
.nbz-custom-icon-btn,
.nbz-custom-option-action,
.nbz-custom-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--ss-border);
    border-radius: 8px;
    background: var(--ss-surface);
    color: var(--ss-text-2);
    cursor: pointer;
    transition: color var(--ss-transition), border-color var(--ss-transition), background var(--ss-transition);
}
.nbz-custom-icon-btn {
    width: 32px;
    height: 32px;
}
.nbz-custom-icon-btn .nbz-icon,
.nbz-custom-option-action svg {
    width: 15px;
    height: 15px;
}
.nbz-custom-icon-btn:hover,
.nbz-custom-option-action:hover {
    color: var(--ss-text);
    border-color: var(--ss-text-2);
    background: var(--ss-surface-2);
}
.nbz-custom-icon-btn--danger:hover,
.nbz-custom-option-action--danger:hover {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

/* مدال ساخت و ویرایش فیلد سفارشی */
body.nbz-custom-modal-open {
    overflow: hidden;
}
.nbz-custom-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}
.nbz-custom-modal[hidden] {
    display: none !important;
}
.nbz-custom-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .54);
    backdrop-filter: blur(3px);
}
.nbz-custom-modal__dialog {
    position: relative;
    width: min(650px, 100%);
    max-height: min(780px, calc(100vh - 44px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 20px;
    background: var(--ss-surface);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    animation: nbz-custom-modal-in .18s ease-out;
}
@keyframes nbz-custom-modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.nbz-custom-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--ss-border);
}
.nbz-custom-modal__header h3 {
    margin: 0;
    color: var(--ss-text);
    font-size: 18px;
}
.nbz-custom-modal__header p {
    margin: 6px 0 0;
    color: var(--ss-text-3);
    font-size: 12px;
}
.nbz-custom-modal__close {
    width: 34px;
    height: 34px;
    flex: none;
    font-family: Arial, sans-serif;
    font-size: 24px;
    line-height: 1;
}
.nbz-custom-modal__close:hover {
    color: var(--ss-text);
    border-color: var(--ss-text-2);
    background: var(--ss-surface-2);
}
.nbz-custom-modal__body {
    overflow: auto;
    padding: 22px 24px;
}
.nbz-custom-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.nbz-custom-modal__field {
    display: grid;
    align-content: start;
    gap: 7px;
}
.nbz-custom-modal__field > span,
.nbz-custom-options-editor > label {
    color: var(--ss-text);
    font-size: 12px;
    font-weight: 700;
}
.nbz-custom-modal__field input,
.nbz-custom-options-editor__input input {
    width: 100%;
    min-height: 42px;
    margin: 0;
    border-color: var(--ss-border-2);
    border-radius: 10px;
    font-family: inherit;
}
.nbz-custom-modal__field input:focus,
.nbz-custom-options-editor__input input:focus {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 2px rgba(10, 10, 10, .08);
}
.nbz-custom-modal__field small {
    color: var(--ss-text-3);
    font-size: 10px;
}
.nbz-custom-requirement {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
}
.nbz-custom-requirement > legend {
    margin-bottom: 8px;
    color: var(--ss-text);
    font-size: 12px;
    font-weight: 700;
}
.nbz-custom-requirement__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.nbz-custom-requirement__options > label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--ss-border);
    border-radius: 10px;
    background: var(--ss-surface-2);
    cursor: pointer;
}
.nbz-custom-requirement__options > label:has(input:checked) {
    border-color: var(--ss-accent);
    background: var(--ss-surface);
    box-shadow: 0 0 0 2px rgba(10, 10, 10, .06);
}
.nbz-custom-requirement__options input {
    margin: 3px 0 0;
}
.nbz-custom-requirement__options span {
    display: grid;
    gap: 3px;
}
.nbz-custom-requirement__options strong {
    color: var(--ss-text);
    font-size: 12px;
}
.nbz-custom-requirement__options small {
    color: var(--ss-text-3);
    font-size: 10px;
    line-height: 1.7;
}
.nbz-custom-options-editor {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--ss-border);
}
.nbz-custom-options-editor__input {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.nbz-custom-options-editor__input button {
    min-width: 92px;
    padding: 0 14px;
    border: 1px solid var(--ss-accent);
    border-radius: 10px;
    background: var(--ss-accent);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}
.nbz-custom-options-editor > p {
    margin: 7px 0 12px;
    color: var(--ss-text-3);
    font-size: 11px;
}
.nbz-custom-options-list {
    display: grid;
    gap: 7px;
    max-height: 245px;
    overflow: auto;
}
.nbz-custom-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border: 1px solid var(--ss-border);
    border-radius: 10px;
    background: var(--ss-surface-2);
    color: var(--ss-text);
    font-size: 12px;
}
.nbz-custom-option-item.is-editing {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 1px var(--ss-accent);
}
.nbz-custom-option-action {
    width: 28px;
    height: 28px;
}
.nbz-custom-options-empty {
    padding: 18px;
    border: 1px dashed var(--ss-border-2);
    border-radius: 10px;
    color: var(--ss-text-3);
    font-size: 11px;
    text-align: center;
}
.nbz-custom-options-empty[hidden] {
    display: none;
}
.nbz-custom-modal__error {
    margin: 14px 0 0;
    padding: 9px 12px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 11px;
}
.nbz-custom-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 15px 24px;
    border-top: 1px solid var(--ss-border);
    background: var(--ss-surface-2);
}
.nbz-custom-modal__footer .button {
    min-height: 38px;
    padding-inline: 18px;
    border-radius: 9px;
}
.nbz-campaign-custom-field {
    display: grid;
    gap: 6px;
}
.nbz-campaign-custom-field > span {
    color: var(--ss-text);
    font-size: 12px;
    font-weight: 700;
}
.nbz-campaign-custom-field select {
    width: 100%;
}
.nbz-campaign-custom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

/* کمپین هدفمند: یک فرم فشرده با سه منبع مخاطب. */
#nbz-campaign .ss-card__body > .ss-field:last-of-type {
    margin-bottom: 18px;
}
#nbz-campaign textarea,
#nbz-campaign input[type=url] {
    max-width: none;
}
.nbz-campaign-notice {
    margin: 12px 24px 0 !important;
}
.nbz-campaign-notice p {
    display: flex;
    align-items: center;
    gap: 8px 14px;
    flex-wrap: wrap;
}
.nbz-campaign-notice p > span {
    color: var(--ss-text-2);
}
.nbz-campaign-sources {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.nbz-campaign-source {
    min-width: 0;
    cursor: pointer;
}
.nbz-campaign-source > input {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    opacity: 0;
    pointer-events: none;
}
.nbz-campaign-source > span {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    min-height: 68px;
    padding: 10px 12px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface);
    color: var(--ss-text-2);
    transition: border-color var(--ss-transition), background var(--ss-transition), color var(--ss-transition), box-shadow var(--ss-transition);
}
.nbz-campaign-source .nbz-icon {
    grid-row: 1 / 3;
    width: 21px;
    height: 21px;
    margin-inline: auto;
}
.nbz-campaign-source b,
.nbz-campaign-source small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.nbz-campaign-source b {
    color: var(--ss-text);
    font-size: 13px;
    line-height: 1.45;
}
.nbz-campaign-source small {
    color: var(--ss-text-3);
    font-size: 11px;
    line-height: 1.45;
}
.nbz-campaign-source:hover > span {
    border-color: var(--ss-border-2);
    background: var(--ss-surface-2);
}
.nbz-campaign-source.is-selected > span,
.nbz-campaign-source:has(input:checked) > span {
    border-color: var(--ss-accent);
    background: var(--ss-text);
    color: #fff;
    box-shadow: var(--ss-shadow-sm);
}
.nbz-campaign-source.is-selected b,
.nbz-campaign-source.is-selected small,
.nbz-campaign-source:has(input:checked) b,
.nbz-campaign-source:has(input:checked) small {
    color: #fff;
}
.nbz-campaign-source:has(input:focus-visible) > span {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}
.nbz-campaign-source-panel {
    padding-top: 18px;
    border-top: 1px solid var(--ss-border);
}
.nbz-campaign-source-panel[hidden] {
    display: none !important;
}
.nbz-campaign-all-hint {
    margin: -4px 0 18px;
}
#campaign_numbers {
    direction: ltr;
    text-align: left;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}
.nbz-recipient-stats {
    display: flex;
    align-items: center;
    gap: 8px 22px;
    flex-wrap: wrap;
    margin: -6px 0 18px;
    padding: 10px 12px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface-2);
    color: var(--ss-text-3);
    font-size: 12px;
}
.nbz-recipient-stats strong {
    margin-inline-start: 3px;
    color: var(--ss-text);
}
.nbz-campaign-file {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px dashed var(--ss-border-2);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface-2);
    color: var(--ss-text-2);
    cursor: pointer;
    transition: border-color var(--ss-transition), background var(--ss-transition);
}
.nbz-campaign-file:hover {
    border-color: var(--ss-text-2);
    background: var(--ss-surface);
}
.nbz-campaign-file .nbz-icon {
    width: 24px;
    height: 24px;
}
.nbz-campaign-file > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.nbz-campaign-file b {
    color: var(--ss-text);
    overflow-wrap: anywhere;
}
.nbz-campaign-file small {
    color: var(--ss-text-3);
    font-size: 11px;
}
#campaign_csv {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.nbz-campaign-file:has(+ #campaign_csv:focus-visible) {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}
.nbz-campaign-variables {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 8px;
    color: var(--ss-text-3);
    font-size: 11px;
}
.nabz-wrap .nbz-campaign-variables .button {
    min-height: 28px;
    padding: 1px 8px;
    direction: ltr;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 11px;
}
.nbz-campaign-link-field .ss-field__label > span {
    margin-inline-start: 5px;
    color: var(--ss-text-3);
    font-size: 11px;
    font-weight: 400;
}
#campaign_url {
    direction: ltr;
    text-align: left;
}
.nbz-campaign-estimate {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-border);
}
.nbz-campaign-estimate > span {
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 66px;
    padding: 10px 13px;
    background: var(--ss-surface-2);
    color: var(--ss-text-3);
    font-size: 11px;
}
.nbz-campaign-estimate strong {
    color: var(--ss-text);
    font-size: 13px;
}
.nbz-campaign-estimate__total {
    background: #f0fdf4 !important;
}
.nbz-campaign-estimate__total strong {
    color: #166534;
}
@media (max-width: 1180px) {
    .nbz-register-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) 84px;
    }
}
@media (max-width: 782px) {
    .nbz-register-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nbz-custom-add-card {
        min-height: 100px;
    }
    .nbz-custom-fields__saved-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .nbz-campaign-estimate {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .nbz-register-fields-grid,
    .nbz-custom-modal__grid {
        grid-template-columns: 1fr;
    }
    .nbz-custom-modal {
        align-items: flex-end;
        padding: 0;
    }
    .nbz-custom-modal__dialog {
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
    }
    .nbz-custom-modal__header,
    .nbz-custom-modal__body,
    .nbz-custom-modal__footer {
        padding-inline: 17px;
    }
    .nbz-custom-options-editor__input {
        align-items: stretch;
        flex-direction: column;
    }
    .nbz-custom-options-editor__input button {
        min-height: 40px;
    }
    .nbz-campaign-sources,
    .nbz-campaign-estimate {
        grid-template-columns: 1fr;
    }
    .nbz-campaign-source > span {
        min-height: 62px;
    }
    .nbz-campaign-notice {
        margin-inline: 17px !important;
    }
}

/* نوار برآورد مخاطب و هزینه‌ی کمپین */
.nbz-estimate {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--ss-surface-2);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    font-size: 13px;
    color: var(--ss-text-2);
}
.nbz-estimate strong {
    color: var(--ss-text);
    font-weight: 700;
}


/* ── دکمه‌ی اطلاعات (i) در هدر کارت ── */
.nbz-info-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--ss-border);
    border-radius: 50%;
    background: var(--ss-surface);
    color: var(--ss-text);
    cursor: pointer;
    transition: background var(--ss-transition), border-color var(--ss-transition);
}
.nbz-info-btn:hover {
    background: var(--ss-surface-2);
    border-color: var(--ss-border-2);
}
.nbz-info-btn .nbz-icon { width: 18px; height: 18px; }

/* ── آکاردئون ── */
.nbz-acc__header { cursor: pointer; user-select: none; }
.nbz-acc__chevron {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--ss-text-3);
    transition: transform var(--ss-transition);
}
.nbz-acc.is-open .nbz-acc__chevron { transform: rotate(180deg); }
.nbz-acc__body { display: none; }
.nbz-acc.is-open .nbz-acc__body { display: block; }
/* اجازه می‌دهیم پاپ‌آپ تاریخ‌گیر از مرز کارت (overflow:hidden پیش‌فرض ss-card) بیرون بزند */
.nbz-acc { overflow: visible; }

/* ── ردیف‌های فیلتر ── */
.nbz-filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid var(--ss-border);
}
.nbz-filter-row:last-child { border-bottom: none; }
.nbz-filter-row__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 130px;
    color: var(--ss-text);
}
.nbz-filter-row__label .nbz-icon { width: 16px; height: 16px; color: var(--ss-text-2); }
.nbz-daterange {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    flex-wrap: wrap;
}
.nbz-daterange input[type=date] {
    padding: 4px 8px;
    border: 1px solid var(--ss-border-2);
    border-radius: var(--ss-radius-sm);
    font-family: inherit;
}

/* ── مدال ── */
.nbz-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.nbz-modal[hidden] { display: none; }
.nbz-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, .5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.nbz-modal__box {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow: auto;
    background: var(--ss-surface);
    border-radius: var(--ss-radius-lg);
    box-shadow: var(--ss-shadow-lg);
    direction: rtl;
}
.nbz-modal__head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    background: var(--ss-surface);
    border-bottom: 1px solid var(--ss-border);
}
.nbz-modal__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ss-text);
}
.nbz-modal__title .nbz-icon { width: 22px; height: 22px; }
.nbz-modal__close {
    flex: none;
    display: inline-flex;
    padding: 4px;
    border: none;
    background: none;
    color: var(--ss-text-3);
    cursor: pointer;
    border-radius: 50%;
}
.nbz-modal__close:hover { color: var(--ss-danger); }
.nbz-modal__close .nbz-icon { width: 22px; height: 22px; }
.nbz-modal__body { padding: 20px 24px; }
.nbz-modal__body p { margin: 0 0 12px; color: var(--ss-text-2); }
.nbz-modal__rfm {
    margin: 0 0 16px;
    padding: 14px 18px;
    list-style: none;
    background: var(--ss-surface-2);
    border-radius: var(--ss-radius-sm);
}
.nbz-modal__rfm li { margin: 4px 0; color: var(--ss-text-2); }
.nbz-modal__rfm strong { color: var(--ss-text); }
.nbz-modal__segs { display: flex; flex-direction: column; gap: 12px; }
.nbz-modal__seg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
}
.nbz-modal__seg-icon { flex: none; line-height: 0; margin-top: 2px; color: var(--ss-text); }
.nbz-modal__seg-icon .nbz-icon { width: 22px; height: 22px; }
.nbz-modal__seg strong { display: block; margin-bottom: 4px; color: var(--ss-text); }
.nbz-modal__seg p { margin: 0; font-size: 13px; line-height: 1.7; }

/* ── تاریخ‌گیر شمسی (Jalali date picker) ── */
.nbz-jdp { position: relative; display: inline-block; }
.nbz-jdp__display {
    width: 130px;
    padding: 5px 10px;
    border: 1px solid var(--ss-border-2);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface);
    font-family: inherit;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}
.nbz-jdp.is-open .nbz-jdp__display {
    border-color: var(--ss-accent);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, .08);
}
.nbz-jdp__pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 200;
    width: 260px;
    max-width: calc(100vw - 32px);
    padding: 10px;
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow-lg);
    direction: rtl;
}
.nbz-jdp__pop[hidden] { display: none; }
.nbz-jdp__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.nbz-jdp__title { font-weight: 700; font-size: 14px; color: var(--ss-text); }
.nbz-jdp__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface);
    color: var(--ss-text);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.nbz-jdp__nav:hover { background: var(--ss-surface-2); }
.nbz-jdp__nav svg { width: 16px; height: 16px; }
.nbz-jdp__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.nbz-jdp__wd {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--ss-text-3);
    padding: 4px 0;
}
.nbz-jdp__cell {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: var(--ss-radius-sm);
    background: transparent;
    color: var(--ss-text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--ss-transition);
}
.nbz-jdp__cell.is-empty { pointer-events: none; }
.nbz-jdp__cell:not(.is-empty):hover { background: var(--ss-surface-2); }
.nbz-jdp__cell.is-sel {
    background: var(--ss-accent);
    color: #fff;
    font-weight: 700;
}
.nbz-jdp__cell.is-today {
    box-shadow: inset 0 0 0 1.5px var(--ss-border-2);
    font-weight: 700;
}
.nbz-jdp__foot {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ss-border);
}
.nbz-jdp__btn {
    flex: 1;
    padding: 6px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    background: var(--ss-surface);
    color: var(--ss-text);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}
.nbz-jdp__btn:hover { background: var(--ss-surface-2); }
.nbz-jdp__btn--clear { color: var(--ss-danger); }

/* ریسپانسیو: روی صفحه‌های کوچک، پاپ‌آپ وسط‌چین و کمی بزرگ‌تر */
@media (max-width: 600px) {
    .nbz-jdp { display: block; }
    .nbz-jdp__display { width: 100%; }
    .nbz-jdp__pop {
        position: fixed;
        top: 50%;
        right: 50%;
        transform: translate(50%, -50%);
        width: min(320px, calc(100vw - 32px));
    }
    .nbz-jdp__cell { font-size: 15px; }
}


/* آیکون باز کردن حساب کاربری در تب جدید کنار نام مشتری */
.nbz-cust-name { display: inline-flex; align-items: center; gap: 6px; }
.nbz-user-link { display: inline-flex; color: var(--ss-text-3); line-height: 0; transition: color var(--ss-transition); }
.nbz-user-link:hover { color: var(--ss-accent); }
.nbz-user-link .nbz-icon { width: 14px; height: 14px; }


.nbz-admin-variant {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.nbz-admin-variant__label {
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    color: var(--ss-text);
}
.nbz-admin-variant__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ss-switch--sm { transform: scale(.9); transform-origin: left center; }

/* WordPress Media Library picker — login branding images */
.nbz-media-picker {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: min(100%, 620px);
    padding: 12px;
    background: var(--ss-surface-2);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
}
.nbz-media-picker__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 156px;
    height: 112px;
    padding: 10px;
    overflow: hidden;
    color: var(--ss-text-3);
    background:
        linear-gradient(45deg, #ececef 25%, transparent 25%),
        linear-gradient(-45deg, #ececef 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ececef 75%),
        linear-gradient(-45deg, transparent 75%, #ececef 75%),
        #fff;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    border: 1px solid var(--ss-border);
    border-radius: 10px;
    text-align: center;
}
.nbz-media-picker__preview img {
    display: none;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto;
    object-fit: contain !important;
    object-position: center center !important;
}
.nbz-media-picker.has-image .nbz-media-picker__preview img { display: block; }
.nbz-media-picker.has-image .nbz-media-picker__preview span { display: none; }
.nbz-media-picker__preview span {
    max-width: 80px;
    padding: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.7;
}
.nbz-media-picker__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}
.nbz-media-picker__content > strong {
    overflow: hidden;
    color: var(--ss-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nbz-media-picker__content > span {
    color: var(--ss-text-3);
    font-size: 11px;
    line-height: 1.7;
}
.nbz-media-picker__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 7px;
}
.nbz-media-picker__actions .button {
    min-height: 34px;
    border: 1px solid var(--ss-border-2) !important;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
}
.nbz-media-picker__select {
    color: #fff !important;
    background: #111 !important;
    border-color: #111 !important;
}
.nbz-media-picker__remove { color: var(--ss-danger) !important; }
.nbz-media-picker__remove:disabled { color: var(--ss-text-3) !important; }

@media (max-width: 600px) {
    .nbz-media-picker { grid-template-columns: 112px minmax(0, 1fr); }
    .nbz-media-picker__preview { width: 112px; height: 88px; padding: 8px; }
}

/* پیش‌نمایش Pattern پیامک */
body.nbz-message-preview-modal-open { overflow: hidden; }
.nbz-message-preview-modal__box {
    max-width: 620px;
    overflow: hidden;
    border: 1px solid var(--ss-border);
}
.nbz-message-preview-modal__box .nbz-modal__head {
    position: relative;
    padding-block: 20px;
}
.nbz-message-preview-modal__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--ss-text-3);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}
.nbz-message-preview-modal__body {
    overflow-y: auto;
    max-height: calc(85vh - 90px);
}
.nbz-message-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.nbz-message-preview-meta code {
    direction: ltr;
    padding: 5px 10px;
    color: var(--ss-text-2);
    background: var(--ss-surface-2);
    border: 1px solid var(--ss-border);
    border-radius: 8px;
    font-size: 12px;
}
.nbz-message-preview-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #087443;
    font-size: 12px;
    font-weight: 800;
}
.nbz-message-preview-status::before {
    width: 7px;
    height: 7px;
    content: '';
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
}
.nbz-message-preview-status[data-status='pending'] { color: #a05a00; }
.nbz-message-preview-status[data-status='rejected'] { color: var(--ss-danger); }
.nbz-message-preview-status[data-status='unknown'] { color: var(--ss-text-3); }

.nbz-message-preview-phone {
    width: min(100%, 440px);
    margin: 0 auto 18px;
    padding: 12px 12px 9px;
    color: #fff;
    background: linear-gradient(145deg, #171717, #050505);
    border: 1px solid #2f2f2f;
    border-radius: 22px 22px 7px 22px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .16);
}
.nbz-message-preview-phone__sender {
    display: block;
    margin-bottom: 8px;
    color: #a3a3a3;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    text-align: left;
}
.nbz-message-preview-phone pre {
    min-height: 84px;
    margin: 0;
    padding: 0;
    overflow: visible;
    white-space: pre-wrap;
    word-break: break-word;
    color: #fff;
    background: transparent;
    border: 0;
    direction: rtl;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif;
    font-size: 14px;
    line-height: 2;
    text-align: right;
}
.nbz-message-preview-phone time {
    display: block;
    margin-top: 8px;
    color: #8b8b8b;
    font-size: 10px;
    text-align: left;
}
.nbz-message-preview-vars {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--ss-surface-2);
    border-radius: var(--ss-radius-sm);
}
.nbz-message-preview-vars__label {
    margin-left: 3px;
    color: var(--ss-text-2);
    font-size: 12px;
    font-weight: 800;
}
.nbz-message-preview-vars code {
    padding: 3px 7px;
    background: var(--ss-surface);
    border: 1px solid var(--ss-border);
    border-radius: 7px;
    font-size: 10px;
}
.nbz-message-preview-raw {
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
}
.nbz-message-preview-raw summary {
    padding: 11px 13px;
    color: var(--ss-text-2);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}
.nbz-message-preview-raw pre {
    margin: 0;
    padding: 12px 14px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--ss-text);
    background: var(--ss-surface-2);
    border: 0;
    border-top: 1px solid var(--ss-border);
    direction: rtl;
    font-family: 'Peyda', 'IRANSans', 'Tahoma', system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.9;
}
.nbz-message-preview-note {
    margin: 12px 0 0 !important;
    color: var(--ss-text-3) !important;
    font-size: 11px;
    line-height: 1.8;
}

@media (max-width: 600px) {
    .ss-msg-item__identity,
    .nbz-admin-variant__identity { gap: 7px; }
    .nbz-message-preview-button { width: 34px; height: 34px; }
    .nbz-message-preview-modal { padding: 12px; }
    .nbz-message-preview-modal__body { padding: 16px; }
    .nbz-message-preview-meta { align-items: flex-start; flex-direction: column; }
}
