/* =========================================================
   WBD SMS Notifications — Main Styles
   نسخه: 2.4.0
   شامل: اطلاعیه‌ها + Excel + Batch + Recipients + Logs
         + Settings + Delivery + Retry
   ========================================================= */


/* ---------------------------------------------------------
   Variables
   --------------------------------------------------------- */

:root {
    --wbs-bg-primary:    #172238;
    --wbs-bg-secondary:  #1c2a42;
    --wbs-bg-tertiary:   #202d45;
    --wbs-bg-hover:      #24334d;

    --wbs-border:        #263650;
    --wbs-border-light:  #30405d;
    --wbs-border-focus:  #2db8f6;

    --wbs-text-primary:  #f1f5f9;
    --wbs-text-secondary:#b9c5d6;
    --wbs-text-muted:    #94a3b8;

    --wbs-accent:        #159bd7;
    --wbs-accent-hover:  #20aae8;
    --wbs-accent-light:  #55c8ff;

    --wbs-success:       #22c55e;
    --wbs-danger:        #ef4444;
    --wbs-warning:       #f59e0b;
    --wbs-info:          #3b82f6;
}


/* =========================================================
   Panel — Wrapper پایه
   =========================================================
   برای حالت مستقل (Shortcode) استفاده می‌شود.
*/

.wbs-panel {
    direction: rtl;
    padding: 20px;
    color: var(--wbs-text-primary);
}


/* =========================================================
   Notifications Page — کانتینر اصلی
   =========================================================
   والد تمام بخش‌ها (Tabs + Tab Panels).
   از flex و gap برای فاصله‌گذاری خودکار استفاده می‌کند.
*/

.wbs-notifications-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    direction: rtl;
}


/* =========================================================
   Tab Panels — ظرف محتوای هر تب
   =========================================================
   این کلاس روی تمام پنل‌ها (Dashboard / Recipients / Logs /
   Settings) اعمال می‌شود و باعث می‌شود بخش‌های مختلف داخل
   هر تب با فاصله مناسب قرار بگیرند (Excel، Batch، Notifications).

   بدون این کلاس، بخش‌های داخل Tab به هم می‌چسبند.
*/

.wbs-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    direction: rtl;
}


/* =========================================================
   Notifications Main — گروه اطلاعیه‌ها
   =========================================================
   ظرفی اختصاصی برای گروه «مدیریت اطلاعیه‌ها».
   در حال حاضر شامل view->render() است که لیست + مودال
   را تولید می‌کند.

   از flex و gap استفاده می‌کند تا در صورت افزودن
   بخش‌های جدید (مثلاً آمار، فیلتر سریع)، به‌صورت
   خودکار با فاصله‌ی صحیح چیده شوند.
*/

.wbs-notifications-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    direction: rtl;
}


/* =========================================================
   Responsive — کاهش فاصله‌ها در موبایل
   ========================================================= */

@media (max-width: 768px) {

    .wbs-notifications-page,
    .wbs-tab-panel,
    .wbs-notifications-main {
        gap: 14px;
    }
}


/* =========================================================
   Section Header (مشترک)
   ========================================================= */

.wbs-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--wbs-border);
}

.wbs-section-header h3 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
}

.wbs-section-header p {
    margin: 0;
    color: var(--wbs-text-muted);
    font-size: 13px;
}

.wbs-section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* =========================================================
   Buttons — عمومی
   ========================================================= */

.wbs-btn {
    padding: 11px 22px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wbs-btn--primary {
    background: var(--wbs-accent);
    border-color: var(--wbs-accent);
    color: #ffffff;
}

.wbs-btn--primary:hover:not(:disabled) {
    background: var(--wbs-accent-hover);
    border-color: var(--wbs-accent-hover);
    transform: translateY(-1px);
}

.wbs-btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wbs-btn--ghost {
    background: var(--wbs-bg-tertiary);
    border-color: #3b4a63;
    color: #b8c4d5;
}

.wbs-btn--ghost:hover {
    background: #293851;
    border-color: #53627a;
    color: #ffffff;
}


/* =========================================================
   Tabs
   ========================================================= */

.wbs-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 12px;
    /* margin-bottom حذف شد — gap والد مدیریت می‌کند */
}

.wbs-tab {
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--wbs-text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wbs-tab:hover {
    background: var(--wbs-bg-tertiary);
    color: #ffffff;
}

.wbs-tab.is-active {
    background: var(--wbs-accent);
    border-color: var(--wbs-accent);
    color: #ffffff;
}


/* =========================================================
   Excel Upload Section
   ========================================================= */

.wbs-excel-upload {
    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 14px;
    padding: 22px 26px;
    direction: rtl;
}

.wbs-excel-upload__header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--wbs-border);
}

.wbs-excel-upload__header h3 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.wbs-excel-upload__header p {
    margin: 0;
    color: var(--wbs-text-muted);
    font-size: 13px;
}

.wbs-excel-upload__row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: flex-end;
}

.wbs-excel-upload__field {
    display: flex;
    flex-direction: column;
}

.wbs-excel-upload__field label {
    margin-bottom: 8px;
    color: var(--wbs-text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.wbs-excel-upload__field select,
.wbs-excel-upload__field input[type="file"] {
    padding: 11px 14px;
    background: var(--wbs-bg-tertiary);
    border: 1px solid var(--wbs-border-light);
    border-radius: 10px;
    color: var(--wbs-text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.wbs-excel-upload__field select:focus,
.wbs-excel-upload__field input[type="file"]:focus {
    border-color: var(--wbs-border-focus);
    box-shadow: 0 0 0 3px rgba(45, 184, 246, 0.12);
}

.wbs-excel-upload__field--action {
    justify-content: flex-end;
}


/* =========================================================
   Notifications Container
   ========================================================= */

.gravity-notifications {
    direction: rtl;
    color: var(--wbs-text-primary);
    font-family: inherit;
}


/* Header */

.gravity-notifications__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;

    padding: 20px 24px;
    margin-bottom: 20px;

    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 14px;
}

.gravity-notifications__header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.gravity-notifications__header p {
    margin: 6px 0 0;
    color: var(--wbs-text-muted);
    font-size: 13px;
}

.gravity-notifications__header button {
    padding: 11px 22px;

    border: 1px solid var(--wbs-accent);
    border-radius: 10px;

    background: var(--wbs-accent);
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.gravity-notifications__header button:hover {
    background: var(--wbs-accent-hover);
    transform: translateY(-1px);
}


/* Content */

.gravity-notifications__content {
    padding: 20px 24px;

    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 14px;
}

.gravity-notifications__empty {
    color: var(--wbs-text-muted);
    text-align: center;
    padding: 30px;
}


/* =========================================================
   Notification List Table
   ========================================================= */

.gravity-notification-list table,
.gravity-notifications__table {
    width: 100%;
    border-collapse: collapse;
    color: var(--wbs-text-primary);
}

.gravity-notification-list thead th,
.gravity-notifications__table thead th {
    padding: 14px 12px;

    background: var(--wbs-bg-tertiary);
    color: var(--wbs-text-secondary);

    font-size: 13px;
    font-weight: 600;
    text-align: right;

    border-bottom: 1px solid var(--wbs-border-light);
}

.gravity-notification-list thead th:first-child,
.gravity-notifications__table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.gravity-notification-list thead th:last-child,
.gravity-notifications__table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.gravity-notification-list tbody td,
.gravity-notifications__table tbody td {
    padding: 14px 12px;

    border-bottom: 1px solid var(--wbs-border);
    font-size: 13px;
}

.gravity-notification-list tbody tr:hover,
.gravity-notifications__table tbody tr:hover {
    background: var(--wbs-bg-hover);
}

.gravity-notification-list tbody tr:last-child td,
.gravity-notifications__table tbody tr:last-child td {
    border-bottom: none;
}


/* =========================================================
   Row Buttons — Notification List
   ========================================================= */

.gravity-notifications__table .wbs-row-btn,
.gravity-notification-list .wbs-row-btn {
    width: auto;                       /* ← override width: 32px */
    height: auto;                      /* ← override height: 32px */
    padding: 7px 12px;
    margin-left: 4px;
    border: 1px solid var(--wbs-border-light);
    border-radius: 7px;
    background: var(--wbs-bg-secondary);
    color: var(--wbs-text-secondary);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gravity-notifications__table .wbs-row-btn--edit:hover,
.gravity-notification-list .wbs-row-btn--edit:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--wbs-info);
    color: #60a5fa;
}

.gravity-notifications__table .wbs-row-btn--delete:hover,
.gravity-notification-list .wbs-row-btn--delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--wbs-danger);
    color: #f87171;
}


/* =========================================================
   Notification Modal (افزودن / ویرایش اطلاعیه)
   ========================================================= */

.gravity-notification-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background: rgba(3, 12, 24, 0.78);

    direction: rtl;
}


.gravity-notification-modal__box {
    position: relative;

    width: 100%;
    max-width: 920px;
    max-height: 88vh;

    overflow: hidden;

    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 22px;

    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);

    color: var(--wbs-text-primary);
}


.gravity-notification-modal__box::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 8px;
    height: 100%;

    background: #27b7f4;
    border-radius: 22px 0 0 22px;
}


/* Modal Header */

.gravity-notification-modal__header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 82px;
    padding: 0 28px;

    border-bottom: 1px solid #2c3a52;
    background: var(--wbs-bg-primary);
}

.gravity-notification-modal__header > div {
    text-align: right;
}

.gravity-notification-modal__header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
}

.gravity-notification-modal__header p {
    margin: 6px 0 0;
    color: var(--wbs-text-muted);
    font-size: 13px;
}

.gravity-notification-modal__header button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 42px;

    border: 1px solid #8c394b;
    border-radius: 10px;

    background: rgba(120, 35, 55, 0.25);
    color: #ff9aaa;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.gravity-notification-modal__header button:hover {
    background: rgba(145, 42, 62, 0.45);
    border-color: #b84b60;
    color: #ffffff;
}


/* Modal Body */

.gravity-notification-modal__body {
    max-height: calc(88vh - 82px);
    overflow-y: auto;
    padding: 28px 32px 34px;
}

.gravity-notification-modal__body::-webkit-scrollbar {
    width: 7px;
}

.gravity-notification-modal__body::-webkit-scrollbar-track {
    background: #111a2c;
}

.gravity-notification-modal__body::-webkit-scrollbar-thumb {
    background: #33435f;
    border-radius: 10px;
}

.gravity-notification-modal__body::-webkit-scrollbar-thumb:hover {
    background: #45607f;
}


/* Form Row */

.gravity-notification-modal .form-row {
    margin-bottom: 18px;
}

.gravity-notification-modal label {
    display: block;
    margin-bottom: 8px;

    color: var(--wbs-text-secondary);
    font-size: 14px;
    font-weight: 600;

    text-align: right;
}


/* Inputs */

.gravity-notification-modal input,
.gravity-notification-modal select,
.gravity-notification-modal textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 13px 15px;

    border: 1px solid var(--wbs-border-light);
    border-radius: 11px;
    outline: none;

    background: var(--wbs-bg-tertiary);
    color: #f8fafc;

    font-family: inherit;
    font-size: 14px;

    transition: all 0.2s ease;
}

.gravity-notification-modal input::placeholder,
.gravity-notification-modal textarea::placeholder {
    color: #718096;
}

.gravity-notification-modal input:focus,
.gravity-notification-modal select:focus,
.gravity-notification-modal textarea:focus {
    border-color: var(--wbs-border-focus);
    background: var(--wbs-bg-hover);
    box-shadow: 0 0 0 3px rgba(45, 184, 246, 0.12);
}

.gravity-notification-modal textarea {
    min-height: 145px;
    resize: vertical;
    line-height: 1.8;
}

.gravity-notification-modal select:disabled {
    opacity: 1;
    color: var(--wbs-text-primary);
    background: var(--wbs-bg-tertiary);
    cursor: not-allowed;
}


/* Placeholder Box */

.notification-placeholders {
    margin-top: -6px;
    margin-bottom: 20px;
    padding: 15px;

    border: 1px solid #2d3e59;
    border-radius: 12px;

    background: #111b2d;
}

.notification-placeholders strong {
    display: block;
    margin-bottom: 12px;

    color: #cbd5e1;
    font-size: 13px;
}

.notification-placeholder-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin: 4px;
    padding: 8px 11px;

    border: 1px solid #334560;
    border-radius: 8px;

    background: var(--wbs-bg-secondary);
    color: #dbe7f3;

    cursor: pointer;

    transition: all 0.2s ease;
}

.notification-placeholder-item:hover {
    background: #263853;
    border-color: var(--wbs-border-focus);
    transform: translateY(-1px);
}

.placeholder-label {
    color: #d8e2ef;
    font-size: 13px;
}

.placeholder-key {
    direction: ltr;
    color: var(--wbs-accent-light);
    font-size: 12px;
}


/* Form Actions */

.gravity-notification-modal .form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;

    margin-top: 25px;
}

.gravity-notification-modal .form-actions button[type="submit"] {
    padding: 11px 24px;

    border: 1px solid #1c9bd8;
    border-radius: 10px;

    background: var(--wbs-accent);
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.gravity-notification-modal .form-actions button[type="submit"]:hover {
    background: var(--wbs-accent-hover);
    transform: translateY(-1px);
}

.gravity-notification-modal .form-actions button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gravity-notification-modal .form-actions button[type="button"] {
    padding: 11px 20px;

    border: 1px solid #3b4a63;
    border-radius: 10px;

    background: var(--wbs-bg-tertiary);
    color: #b8c4d5;

    font-family: inherit;
    font-size: 14px;

    cursor: pointer;

    transition: all 0.2s ease;
}

.gravity-notification-modal .form-actions button[type="button"]:hover {
    background: #293851;
    border-color: #53627a;
    color: #ffffff;
}


/* Body Lock */

body.gravity-notification-modal-open {
    overflow: hidden;
}


/* =========================================================
   Log Modal (Excel Upload + Batch)
   ========================================================= */

.wbs-log-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background: rgba(3, 12, 24, 0.78);
    direction: rtl;
}

.wbs-log-modal__box {
    position: relative;

    width: 100%;
    max-width: 900px;
    max-height: 88vh;

    overflow: hidden;

    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 20px;

    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);

    display: flex;
    flex-direction: column;
}

.wbs-log-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 26px;

    border-bottom: 1px solid var(--wbs-border);
    background: var(--wbs-bg-secondary);
}

.wbs-log-modal__header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.wbs-log-modal__header p {
    margin: 6px 0 0;
    color: var(--wbs-text-muted);
    font-size: 12px;
}

.wbs-log-modal__close {
    width: 42px;
    height: 38px;

    border-radius: 10px;
    border: 1px solid #8c394b;

    background: rgba(120, 35, 55, 0.25);
    color: #ff9aaa;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.wbs-log-modal__close:hover {
    background: rgba(145, 42, 62, 0.5);
    color: #ffffff;
}

.wbs-log-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 26px;
}

.wbs-log-modal__body::-webkit-scrollbar {
    width: 7px;
}

.wbs-log-modal__body::-webkit-scrollbar-track {
    background: #111a2c;
}

.wbs-log-modal__body::-webkit-scrollbar-thumb {
    background: #33435f;
    border-radius: 10px;
}

.wbs-log-modal__footer {
    padding: 16px 26px;
    border-top: 1px solid var(--wbs-border);

    display: flex;
    justify-content: flex-start;

    background: var(--wbs-bg-secondary);
}


/* =========================================================
   Log Summary Grid (کارت‌های آماری)
   ========================================================= */

.wbs-log-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.wbs-log-summary-card {
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid transparent;
}

.wbs-log-summary-card__value {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    direction: ltr;
}

.wbs-log-summary-card__label {
    font-size: 12px;
    color: var(--wbs-text-muted);
}

.wbs-log-summary-card--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

.wbs-log-summary-card--success .wbs-log-summary-card__value {
    color: #4ade80;
}

.wbs-log-summary-card--danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.wbs-log-summary-card--danger .wbs-log-summary-card__value {
    color: #f87171;
}

.wbs-log-summary-card--warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.wbs-log-summary-card--warning .wbs-log-summary-card__value {
    color: #fbbf24;
}

.wbs-log-summary-card--info {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.wbs-log-summary-card--info .wbs-log-summary-card__value {
    color: #60a5fa;
}


/* =========================================================
   Log Preview Table
   ========================================================= */

.wbs-log-preview h4 {
    margin: 0 0 12px;
    color: var(--wbs-text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.wbs-log-preview__table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--wbs-border);
    border-radius: 10px;
}

.wbs-log-preview__table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--wbs-text-primary);
}

.wbs-log-preview__table-wrapper thead th {
    padding: 10px 12px;

    background: var(--wbs-bg-tertiary);
    color: var(--wbs-text-secondary);

    font-weight: 600;
    text-align: right;

    border-bottom: 1px solid var(--wbs-border-light);
    white-space: nowrap;
}

.wbs-log-preview__table-wrapper tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--wbs-border);

    direction: ltr;
    text-align: right;
}

.wbs-log-preview__table-wrapper tbody tr:last-child td {
    border-bottom: none;
}


/* Body Lock برای Log Modal */

body.wbs-log-modal-open {
    overflow: hidden;
}


/* =========================================================
   Batch Send
   ========================================================= */

.wbs-batch-send {
    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 14px;
    padding: 22px 26px;
    direction: rtl;
}

.wbs-batch-send__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: flex-end;
}

.wbs-batch-send__field {
    display: flex;
    flex-direction: column;
}

.wbs-batch-send__field label {
    margin-bottom: 8px;
    color: var(--wbs-text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.wbs-batch-send__field select {
    padding: 11px 14px;
    background: var(--wbs-bg-tertiary);
    border: 1px solid var(--wbs-border-light);
    border-radius: 10px;
    color: var(--wbs-text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.wbs-batch-send__field select:focus {
    border-color: var(--wbs-border-focus);
    box-shadow: 0 0 0 3px rgba(45, 184, 246, 0.12);
}

.wbs-hint {
    display: block;
    margin-top: 8px;
    color: var(--wbs-text-muted);
    font-size: 12px;
}


/* Progress Bar */

.wbs-batch-progress {
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--wbs-bg-secondary);
    border: 1px solid var(--wbs-border);
    border-radius: 12px;
}

.wbs-batch-progress__bar {
    height: 8px;
    background: #0d1726;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wbs-batch-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, #159bd7, #20aae8);
    transition: width 0.3s ease;
    border-radius: 8px;
}

.wbs-batch-progress__text {
    color: var(--wbs-text-secondary);
    font-size: 13px;
    text-align: center;
}


/* =========================================================
   Recipients List
   ========================================================= */

.wbs-recipients {
    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 14px;
    padding: 22px 26px;
    direction: rtl;
}

.wbs-recipients__toolbar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 16px;
}

.wbs-recipients__search input,
.wbs-recipients__filter select {
    width: 100%;
    padding: 11px 14px;
    background: var(--wbs-bg-tertiary);
    border: 1px solid var(--wbs-border-light);
    border-radius: 10px;
    color: var(--wbs-text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.wbs-recipients__search input:focus,
.wbs-recipients__filter select:focus {
    border-color: var(--wbs-border-focus);
    box-shadow: 0 0 0 3px rgba(45, 184, 246, 0.12);
}

.wbs-recipients__table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--wbs-border);
    border-radius: 12px;
}

#wbs-recipients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--wbs-text-primary);
}

#wbs-recipients-table thead th {
    padding: 12px 14px;
    background: var(--wbs-bg-tertiary);
    color: var(--wbs-text-secondary);
    font-weight: 600;
    text-align: right;
    border-bottom: 1px solid var(--wbs-border-light);
    white-space: nowrap;
}

#wbs-recipients-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--wbs-border);
}

#wbs-recipients-table tbody tr:last-child td {
    border-bottom: none;
}

#wbs-recipients-table tbody tr:hover {
    background: var(--wbs-bg-hover);
}

.wbs-table-loading {
    text-align: center;
    color: var(--wbs-text-muted);
    padding: 30px !important;
}

/* Row Buttons */

.wbs-row-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    margin-left: 4px;
    border: 1px solid var(--wbs-border-light);
    border-radius: 8px;
    background: var(--wbs-bg-secondary);
    color: var(--wbs-text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wbs-row-btn--edit:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--wbs-info);
    color: #60a5fa;
}

.wbs-row-btn--delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--wbs-danger);
    color: #f87171;
}


/* Retry Button (Item 4) */

.js-wbs-retry {
    padding: 6px 10px;
    width: auto;
    height: auto;
    border: 1px solid var(--wbs-warning);
    border-radius: 7px;
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.js-wbs-retry:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    transform: translateY(-1px);
}

.js-wbs-retry:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Pagination */

.wbs-recipients__pagination {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.wbs-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--wbs-border-light);
    border-radius: 8px;
    background: var(--wbs-bg-secondary);
    color: var(--wbs-text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wbs-page-btn:hover {
    background: var(--wbs-bg-hover);
    color: #ffffff;
}

.wbs-page-btn.is-active {
    background: var(--wbs-accent);
    border-color: var(--wbs-accent);
    color: #ffffff;
    font-weight: 700;
}


/* Status Badges */

.wbs-status-ok {
    color: #4ade80;
    font-weight: 600;
}

.wbs-status-fail {
    color: #f87171;
    font-weight: 600;
}

.wbs-status-pending {
    color: #fbbf24;
    font-weight: 600;
}


/* =========================================================
   Settings
   ========================================================= */

.wbs-settings {
    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 14px;
    padding: 22px 26px;
}

.wbs-settings__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.wbs-settings__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--wbs-border);
}

.wbs-settings__test-result {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
}

.wbs-settings__test-result.is-success {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.wbs-settings__test-result.is-error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}


/* =========================================================
   Logs
   ========================================================= */

.wbs-logs {
    background: var(--wbs-bg-primary);
    border: 1px solid var(--wbs-border);
    border-radius: 14px;
    padding: 22px 26px;
}

.wbs-logs__toolbar {
    display: grid;
    grid-template-columns: 1fr 160px 160px 160px auto;
    gap: 10px;
    margin: 18px 0;
}

.wbs-logs__toolbar input,
.wbs-logs__toolbar select {
    padding: 10px 14px;
    background: var(--wbs-bg-tertiary);
    border: 1px solid var(--wbs-border-light);
    border-radius: 10px;
    color: var(--wbs-text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.wbs-logs__toolbar input:focus,
.wbs-logs__toolbar select:focus {
    border-color: var(--wbs-border-focus);
    box-shadow: 0 0 0 3px rgba(45, 184, 246, 0.12);
}

.wbs-logs__table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--wbs-border);
    border-radius: 12px;
}

#wbs-logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--wbs-text-primary);
}

#wbs-logs-table thead th {
    padding: 12px 14px;
    background: var(--wbs-bg-tertiary);
    color: var(--wbs-text-secondary);
    font-weight: 600;
    text-align: right;
    border-bottom: 1px solid var(--wbs-border-light);
    white-space: nowrap;
}

#wbs-logs-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--wbs-border);
}

#wbs-logs-table tbody tr:last-child td {
    border-bottom: none;
}

#wbs-logs-table tbody tr:hover {
    background: var(--wbs-bg-hover);
}

.wbs-log-message-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {

    .wbs-excel-upload__row {
        grid-template-columns: 1fr 1fr;
    }

    .wbs-excel-upload__field--action {
        grid-column: 1 / -1;
    }

    .wbs-log-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wbs-settings__grid {
        grid-template-columns: 1fr;
    }

    .wbs-logs__toolbar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .wbs-excel-upload {
        padding: 18px;
    }

    .wbs-excel-upload__row {
        grid-template-columns: 1fr;
    }

    .wbs-log-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .wbs-log-modal {
        padding: 12px;
    }

    .wbs-log-modal__box {
        max-height: 94vh;
        border-radius: 14px;
    }

    .wbs-log-modal__header,
    .wbs-log-modal__body,
    .wbs-log-modal__footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .gravity-notification-modal {
        padding: 12px;
    }

    .gravity-notification-modal__box {
        max-width: 100%;
        max-height: 94vh;
        border-radius: 17px;
    }

    .gravity-notification-modal__box::before {
        width: 5px;
        border-radius: 17px 0 0 17px;
    }

    .gravity-notification-modal__header {
        min-height: 70px;
        padding: 0 18px;
    }

    .gravity-notification-modal__header h3 {
        font-size: 18px;
    }

    .gravity-notification-modal__body {
        max-height: calc(94vh - 70px);
        padding: 20px 18px 25px;
    }

    .gravity-notifications__header {
        padding: 15px 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .gravity-notifications__content {
        padding: 15px 12px;
    }

    .wbs-batch-send,
    .wbs-recipients,
    .wbs-settings,
    .wbs-logs {
        padding: 18px;
    }

    .wbs-batch-send__row {
        grid-template-columns: 1fr;
    }

    .wbs-recipients__toolbar {
        grid-template-columns: 1fr;
    }

    .wbs-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wbs-logs__toolbar {
        grid-template-columns: 1fr;
    }

    .wbs-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .wbs-tab {
        white-space: nowrap;
        font-size: 13px;
        padding: 10px 16px;
    }

    .wbs-section-actions {
        width: 100%;
    }

    .wbs-section-actions .wbs-btn {
        flex: 1;
        text-align: center;
    }
}

/* =========================================================
   Radio Group (Dual Mode)
   ========================================================= */

.wbs-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
}

.wbs-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;

    border: 1px solid var(--wbs-border-light);
    border-radius: 10px;

    background: var(--wbs-bg-tertiary);
    color: var(--wbs-text-secondary);

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.2s ease;
}

.wbs-radio-item:hover {
    background: var(--wbs-bg-hover);
    border-color: var(--wbs-border-focus);
    color: #ffffff;
}

.wbs-radio-item input[type="radio"] {
    width: auto;
    height: auto;
    margin: 0;
    accent-color: var(--wbs-accent);
    cursor: pointer;
}

.wbs-radio-item input[type="radio"]:checked + span {
    color: #ffffff;
}

.wbs-radio-item:has(input:checked) {
    background: rgba(21, 155, 215, 0.15);
    border-color: var(--wbs-accent);
    color: #ffffff;
}


/* =========================================================
   Logs Placeholder (پیام راهنما)
   ========================================================= */

.wbs-logs__placeholder {
    padding: 40px 20px;
    text-align: center;

    background: var(--wbs-bg-secondary);
    border: 1px dashed var(--wbs-border-light);
    border-radius: 12px;

    color: var(--wbs-text-muted);
}

.wbs-logs__placeholder p {
    margin: 6px 0;
    font-size: 14px;
}

.wbs-logs__placeholder .wbs-hint {
    font-size: 12px;
    color: var(--wbs-text-muted);
    opacity: 0.8;
}

/* نمایش بهتر دکمه اعمال فیلتر */
#wbs-logs-apply-filter {
    min-width: 140px;
}

#wbs-logs-date-from,
#wbs-logs-date-to {
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.5px;
}
