/*!
 * NitronPay admin — Limitless 4 (RTL) theme layer
 * فونت Vazirmatn، نگاشت متغیرهای قدیمی --np-* به توکن‌های Limitless و کامپوننت‌های اختصاصی پنل.
 */

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

:root,
[data-color-theme=light] {
    --font-sans-serif: 'Vazirmatn', Tahoma, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --body-font-family: var(--font-sans-serif);

    /* سازگاری با پلاگین‌های قدیمی (np-tags، persian-datepicker، ...) */
    --np-bg: var(--body-bg);
    --np-card: #fff;
    --np-surface: #fff;
    --np-border: var(--gray-300);
    --np-text: var(--gray-600);
    --np-dark: var(--body-color);
    --np-accent: var(--primary);
    --np-table-head: var(--gray-100);
    --np-input-bg: #fff;
    --np-input-border: var(--gray-400);
    --np-muted: var(--gray-600);
    --np-soft: var(--gray-100);
}

html[data-color-theme=dark] {
    --np-card: #2c2d33;
    --np-surface: #2c2d33;
    --np-border: var(--gray-300);
    --np-text: rgba(255, 255, 255, .65);
    --np-table-head: #32333a;
    --np-input-bg: #2c2d33;
    --np-input-border: var(--gray-400);
    --np-muted: rgba(255, 255, 255, .6);
    --np-soft: rgba(255, 255, 255, .04);
}

body {
    font-family: var(--font-sans-serif);
}

code, kbd, pre, samp, .font-monospace {
    font-family: var(--font-monospace);
}

/* ───── Navbar ───── */
.np-navbar {
    min-height: 3.5rem;
}

.np-brand {
    text-decoration: none;
    font-size: 1rem;
}

.np-brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: .625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--indigo));
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), .3);
}

.np-brand-mark i {
    font-size: 1.125rem;
}

.np-brand-mark--lg {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
}

.np-brand-mark--lg i {
    font-size: 1.875rem;
}

.np-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    background: rgba(var(--primary-rgb), .12);
}

.np-theme-toggle {
    cursor: pointer;
}

.np-theme-icon {
    display: none;
}

html[data-theme=light] .np-theme-icon--light,
html[data-theme=dark] .np-theme-icon--dark,
html[data-theme=system] .np-theme-icon--system,
html:not([data-theme]) .np-theme-icon--system {
    display: inline-block;
}

/* ───── Page header ───── */
.np-page-heading {
    font-weight: 600;
}

/* ───── Sidebar ───── */
.np-nav-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: start;
    font: inherit;
    cursor: pointer;
}

.np-sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .np-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1034;
        background: rgba(0, 0, 0, .45);
    }

    body.np-sidebar-open .np-sidebar-backdrop {
        display: block;
    }

    body.np-sidebar-open {
        overflow: hidden;
    }

    .sidebar-main.sidebar-mobile-expanded {
        z-index: 1035;
        box-shadow: -6px 0 24px rgba(0, 0, 0, .25);
    }
}

/* ───── Cards / stats ───── */
.np-stat-card {
    transition: transform .15s ease, box-shadow .15s ease;
}

.np-stat-card:hover {
    transform: translateY(-2px);
}

.np-stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-inline-start: .75rem;
}

.np-stat-icon i {
    font-size: 1.375rem;
}

.np-step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.np-form-wrap {
    max-width: 52rem;
}

.np-fieldset {
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacer);
}

.np-fieldset legend {
    float: none;
    width: auto;
    padding: 0 .5rem;
    margin-bottom: .5rem;
}

.np-dl dt {
    font-weight: 500;
    color: var(--np-muted);
}

.np-dl dd {
    margin-bottom: .75rem;
    word-break: break-word;
}

.np-json {
    max-height: 420px;
    overflow: auto;
    padding: .75rem;
    border-radius: var(--border-radius);
    background: var(--np-soft);
    border: 1px solid var(--border-color-translucent);
    font-size: .75rem;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
}

.np-live-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: currentColor;
    animation: npPulse 1.4s ease-in-out infinite;
}

@keyframes npPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.75); }
}

/* ───── Badges ───── */
.badge.bg-claim {
    background-color: rgba(var(--indigo-rgb), .15) !important;
    color: var(--indigo);
}

html[data-color-theme=dark] .badge.bg-claim {
    color: #aab4f3;
}

.np-gw-chip {
    font-weight: 500;
}

/* ───── Legacy form helpers (markup ساخته‌شده با JS) ───── */
.form-group > label:not(.np-switch):not(.form-check) {
    display: inline-block;
    margin-bottom: var(--form-label-margin-bottom, .5rem);
    font-weight: 500;
}

.np-copy-link {
    text-decoration: none;
}

.np-link-btn {
    text-decoration: none;
    font-weight: 500;
}

/* ───── Switch (np-switch, هماهنگ با form-switch) ───── */
label.np-switch,
.np-switch {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
    position: relative;
    line-height: 1.4;
}

.np-switch-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.np-switch-track {
    position: relative;
    display: block;
    width: 2.375rem;
    height: 1.375rem;
    min-width: 2.375rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--gray-400);
    transition: background-color .2s ease, box-shadow .2s ease;
}

.np-switch-thumb {
    position: absolute;
    top: .1875rem;
    right: .1875rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}

.np-switch-input:checked + .np-switch-track {
    background: var(--primary);
}

.np-switch-input:checked + .np-switch-track .np-switch-thumb {
    transform: translateX(-1rem);
}

.np-switch-input:focus-visible + .np-switch-track {
    box-shadow: var(--focus-ring-box-shadow);
}

.np-switch-input:disabled + .np-switch-track {
    opacity: .5;
    cursor: not-allowed;
}

.np-switch-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

/* ───── Table: لیست‌ها ───── */
.np-list-table .table > :not(caption) > * > * {
    vertical-align: middle;
}

.np-actions-cell {
    width: 1%;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .np-list-table .table-responsive {
        overflow: visible;
    }

    .np-list-table .table thead {
        display: none;
    }

    .np-list-table .table,
    .np-list-table .table tbody,
    .np-list-table .table tr,
    .np-list-table .table td {
        display: block;
        width: 100%;
    }

    .np-list-table .table {
        white-space: normal !important;
    }

    .np-list-table .table tr {
        position: relative;
        padding: .75rem 1rem .5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .np-list-table .table tbody tr:last-child {
        border-bottom: 0;
    }

    .np-list-table .table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: .3rem 0;
        border: 0;
        text-align: left;
    }

    .np-list-table .table td::before {
        content: attr(data-label);
        color: var(--np-muted);
        font-size: .75rem;
        text-align: right;
        flex-shrink: 0;
    }

    .np-list-table .table td[colspan] {
        justify-content: center;
    }

    .np-list-table .table td[colspan]::before {
        content: none;
    }

    .np-list-table .table td.np-actions-cell {
        position: absolute;
        top: .5rem;
        left: .5rem;
        width: auto;
        padding: 0;
    }

    .np-list-table .table td.np-actions-cell::before {
        content: none;
    }

    .np-list-table .table td:first-child {
        padding-left: 2.5rem;
    }
}

/* ───── Pager (pagination.nitron*) با ظاهر Bootstrap ───── */
.np-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.np-pager__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    color: var(--np-muted);
    font-size: var(--body-font-size-sm);
}

.np-pager__meta strong {
    color: var(--body-color);
}

.np-pager__badge {
    display: inline-flex;
    align-items: center;
    padding: .125rem .5rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(var(--primary-rgb), .1);
}

.np-pager__badge--simple {
    color: var(--warning);
    background: rgba(var(--warning-rgb), .12);
}

.np-pager__list.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.np-pager__list li > a,
.np-pager__list li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .625rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    color: var(--body-color);
    text-decoration: none;
    font-size: var(--body-font-size);
    transition: background-color .15s ease, color .15s ease;
}

.np-pager__list li > a:hover {
    background: var(--gray-200);
}

.np-pager__list li.active > span {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), .35);
}

.np-pager__list li.disabled > span {
    color: var(--gray-500);
    pointer-events: none;
}

/* ───── Row action menu ───── */
.np-action-menu {
    position: relative;
    display: inline-flex;
}

.np-action-dropdown {
    min-width: 11rem;
    padding: .375rem 0;
    background: var(--np-surface);
    color: var(--body-color);
    border: 1px solid var(--border-color-translucent);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    opacity: 0;
    transform: scale(.96);
    transition: opacity .12s ease, transform .12s ease;
}

.np-action-dropdown[hidden] {
    display: none !important;
}

.np-action-dropdown.is-open {
    opacity: 1;
    transform: scale(1);
}

.np-action-form {
    margin: 0;
}

.np-action-divider {
    height: 1px;
    margin: .375rem 0;
    background: var(--border-color);
}

.np-action-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    width: 100%;
    padding: .45rem 1rem;
    border: 0;
    background: transparent;
    color: var(--body-color);
    font: inherit;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.np-action-item:hover,
.np-action-item:focus {
    background: var(--gray-200);
    color: var(--body-color);
    outline: none;
}

.np-action-item i {
    font-size: 1rem;
    opacity: .75;
}

.np-action-danger,
.np-action-danger:hover,
.np-action-danger:focus {
    color: var(--danger);
}

/* ───── Overlay modals (hidden-attribute; JS قبلی دست نخورده) ───── */
.np-modal {
    /* همان متغیرهای .modal بوت‌استرپ تا modal-content/header/footer درست رنگ بگیرند */
    --modal-padding: var(--spacer);
    --modal-bg: var(--white);
    --modal-border-color: var(--border-color-translucent);
    --modal-border-width: var(--border-width);
    --modal-border-radius: var(--border-radius-lg);
    --modal-box-shadow: var(--box-shadow-lg);
    --modal-inner-border-radius: calc(var(--modal-border-radius) - (var(--modal-border-width)));
    --modal-header-padding-x: var(--spacer);
    --modal-header-padding-y: var(--spacer);
    --modal-header-padding: var(--spacer) var(--spacer);
    --modal-header-border-color: var(--border-color);
    --modal-header-border-width: var(--border-width);
    --modal-title-line-height: var(--body-line-height);
    --modal-footer-gap: var(--spacer-2);
    --modal-footer-border-color: var(--border-color);
    --modal-footer-border-width: var(--border-width);
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

html[data-color-theme=dark] .np-modal {
    color-scheme: dark;
    --modal-bg: #2c2d33;
}

html[data-color-theme=dark] .np-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.np-modal[hidden] {
    display: none !important;
}

.np-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    animation: npFade .15s ease-out;
}

.np-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    animation: npRise .2s ease-out;
}

.np-modal__dialog--lg {
    max-width: 42rem;
}

.np-modal__dialog > .modal-content {
    max-height: 100%;
    overflow: hidden;
    box-shadow: var(--box-shadow-lg);
}

.np-modal__body,
.np-modal__dialog > .modal-content > .modal-body {
    overflow: auto;
}

body.np-tl-open,
body.np-inq-open,
body.np-help-modal-open,
body.np-plugins-modal-open {
    overflow: hidden;
}

@keyframes npFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes npRise {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

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

/* راهنما */
.np-help-modal-body h4 {
    font-size: .9375rem;
    font-weight: 600;
    margin: 1rem 0 .5rem;
}

.np-help-modal-body ul,
.np-help-modal-body ol {
    padding-right: 1.25rem;
}

.np-help-modal-body li {
    margin-bottom: .35rem;
}

.np-help-modal-body code {
    direction: ltr;
    unicode-bidi: embed;
}

.np-help-note {
    padding: .625rem .875rem;
    border-radius: var(--border-radius);
    background: rgba(var(--info-rgb), .1);
    color: var(--body-color);
    font-size: var(--body-font-size-sm);
}

/* ───── Payment timeline ───── */
.np-tl-summary {
    margin-bottom: 1rem;
}

.np-tl-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .625rem 1rem;
    padding: .875rem 1rem;
    border-radius: var(--border-radius-lg);
    background: var(--np-soft);
    border: 1px solid var(--border-color-translucent);
}

.np-tl-meta-grid .k,
.np-inq-meta-item .k {
    display: block;
    font-size: .75rem;
    color: var(--np-muted);
    margin-bottom: 2px;
}

.np-tl-meta-grid .v,
.np-inq-meta-item .v {
    display: block;
    font-weight: 600;
    word-break: break-word;
}

.np-tl-meta-grid small,
.np-inq-meta-item .v small {
    font-weight: 400;
    opacity: .7;
}

.np-tl-progress-wrap {
    margin-bottom: 1rem;
}

.np-tl-progress-bar {
    transition: width .45s ease;
}

.np-tl-progress-bar.is-fail {
    background-color: var(--danger) !important;
}

.np-tl-loading,
.np-tl-error,
.np-tl-skeleton {
    text-align: center;
    padding: 1.5rem .5rem;
    color: var(--np-muted);
}

.np-tl-error {
    color: var(--danger);
}

.np-tl-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: .5rem;
    border: 2px solid rgba(var(--primary-rgb), .25);
    border-top-color: var(--primary);
    border-radius: 50%;
    vertical-align: -3px;
    animation: npSpin .7s linear infinite;
}

.np-tl-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.np-tl-step {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: .75rem;
    position: relative;
    padding-bottom: .875rem;
    animation: npRise .35s ease both;
    animation-delay: calc(var(--i, 0) * .04s);
}

.np-tl-rail {
    position: relative;
    display: flex;
    justify-content: center;
}

.np-tl-rail::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    bottom: -.75rem;
    width: 2px;
    background: var(--border-color);
}

.np-tl-step:last-child .np-tl-rail::before {
    display: none;
}

.np-tl-dot {
    position: relative;
    z-index: 1;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: .3rem;
    border-radius: 50%;
    border: 2px solid var(--gray-400);
    background: var(--np-surface);
}

.np-tl-step.is-done .np-tl-dot {
    border-color: var(--success);
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(var(--success-rgb), .16);
}

.np-tl-step.is-done .np-tl-dot::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 4px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.np-tl-step.is-fail .np-tl-dot {
    border-color: var(--danger);
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(var(--danger-rgb), .16);
}

.np-tl-step.is-fail .np-tl-dot::after {
    content: '×';
    display: block;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    line-height: .875rem;
    text-align: center;
}

.np-tl-step.is-current .np-tl-dot {
    border-color: var(--warning);
    background: var(--np-surface);
    animation: npTlPulse 1.2s ease infinite;
}

.np-tl-step.is-done .np-tl-rail::before {
    background: rgba(var(--success-rgb), .45);
}

.np-tl-step.is-current .np-tl-rail::before {
    background: linear-gradient(var(--warning), var(--border-color));
}

.np-tl-step.is-pending .np-tl-dot,
.np-tl-step.is-skipped .np-tl-dot {
    opacity: .55;
}

@keyframes npTlPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(var(--warning-rgb), .22); }
    50% { box-shadow: 0 0 0 8px rgba(var(--warning-rgb), .08); }
}

.np-tl-card {
    background: var(--np-soft);
    border: 1px solid var(--border-color-translucent);
    border-radius: var(--border-radius-lg);
    padding: .625rem .875rem;
}

.np-tl-step.is-current .np-tl-card {
    border-color: rgba(var(--warning-rgb), .45);
    background: rgba(var(--warning-rgb), .06);
}

.np-tl-step.is-fail .np-tl-card {
    border-color: rgba(var(--danger-rgb), .35);
    background: rgba(var(--danger-rgb), .06);
}

.np-tl-step.is-done .np-tl-card {
    border-color: rgba(var(--success-rgb), .3);
}

.np-tl-card-top {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.np-tl-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.np-tl-state {
    font-size: .6875rem;
    font-weight: 600;
    padding: .125rem .5rem;
    border-radius: 999px;
    background: var(--gray-200);
    color: var(--np-muted);
    white-space: nowrap;
}

.np-tl-step.is-done .np-tl-state { background: rgba(var(--success-rgb), .14); color: var(--success); }
.np-tl-step.is-fail .np-tl-state { background: rgba(var(--danger-rgb), .14); color: var(--danger); }
.np-tl-step.is-current .np-tl-state { background: rgba(var(--warning-rgb), .16); color: var(--warning); }

.np-tl-card-sub {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .75rem;
    font-size: .75rem;
    color: var(--np-muted);
    direction: rtl;
}

.np-tl-msg {
    margin: .4rem 0 0;
    font-size: .8125rem;
    line-height: 1.6;
}

.np-tl-details,
.np-inq-details {
    margin-top: .5rem;
    font-size: .75rem;
}

.np-tl-details summary,
.np-inq-details summary {
    cursor: pointer;
    color: var(--link-color);
    font-weight: 500;
}

.np-tl-details pre,
.np-inq-details pre {
    margin: .4rem 0 0;
    padding: .625rem;
    border-radius: var(--border-radius);
    background: var(--np-surface);
    border: 1px solid var(--border-color-translucent);
    font-size: .6875rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow: auto;
    direction: ltr;
    text-align: left;
}

/* ───── Payment inquiry ───── */
.np-inq-body {
    min-height: 11rem;
}

.np-inq-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 10rem;
}

.np-inq-loading[hidden],
.np-inq-result[hidden] {
    display: none !important;
}

.np-inq-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .625rem 1rem;
    margin-bottom: 1rem;
    padding: .875rem 1rem;
    border-radius: var(--border-radius-lg);
    background: var(--np-soft);
    border: 1px solid var(--border-color-translucent);
}

.np-inq-mono {
    font-family: var(--font-monospace);
    font-size: .75rem;
    direction: ltr;
    text-align: right;
}

.np-inq-status-card {
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: .875rem 1rem;
}

.np-inq-status-card.is-success { border-color: rgba(var(--success-rgb), .35); background: rgba(var(--success-rgb), .07); }
.np-inq-status-card.is-fail,
.np-inq-status-card.is-error { border-color: rgba(var(--danger-rgb), .35); background: rgba(var(--danger-rgb), .07); }
.np-inq-status-card.is-warn { border-color: rgba(var(--warning-rgb), .35); background: rgba(var(--warning-rgb), .07); }

.np-inq-status-head {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.np-inq-status-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.is-success .np-inq-status-icon,
.is-success .np-inq-badge { background: rgba(var(--success-rgb), .16); color: var(--success); }
.is-fail .np-inq-status-icon,
.is-error .np-inq-status-icon,
.is-fail .np-inq-badge,
.is-error .np-inq-badge { background: rgba(var(--danger-rgb), .16); color: var(--danger); }
.is-warn .np-inq-status-icon,
.is-warn .np-inq-badge { background: rgba(var(--warning-rgb), .16); color: var(--warning); }

.np-inq-status-text {
    flex: 1;
    min-width: 0;
}

.np-inq-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.np-inq-badge {
    font-size: .6875rem;
    font-weight: 600;
    padding: .125rem .5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.np-inq-msg {
    margin: .35rem 0 0;
    font-size: .8125rem;
    line-height: 1.6;
}

.np-inq-bank {
    margin: .4rem 0 0;
    font-size: .75rem;
    color: var(--np-muted);
}

@media (max-width: 575.98px) {
    .np-tl-meta-grid,
    .np-inq-meta {
        grid-template-columns: 1fr;
    }
}

/* ───── Plugins ───── */
.np-plugin-card {
    transition: transform .15s ease, box-shadow .15s ease;
    animation: npRise .3s ease both;
    animation-delay: calc(var(--i, 0) * .04s);
}

.np-plugin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.np-plugin-card.is-disabled .card-body {
    opacity: .7;
}

.np-plugin-card.is-available {
    border-style: dashed;
    border-color: rgba(var(--primary-rgb), .35);
}

.np-plugin-logo {
    position: relative;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: .75rem;
    overflow: hidden;
    background: rgba(var(--primary-rgb), .08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.np-plugin-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .25rem;
    background: #fff;
    z-index: 1;
}

.np-plugin-logo-fallback {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.np-plugin-meta p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-plugins-dropzone {
    text-align: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    margin: var(--spacer);
    transition: border-color .15s ease, background-color .15s ease;
}

.np-plugins-dropzone.is-drag {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), .06);
}

.np-plugin-progress-dialog {
    max-width: 30rem;
}

.np-plugin-spinner {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 50%;
    border: 3px solid rgba(var(--primary-rgb), .2);
    border-top-color: var(--primary);
    animation: npSpin .7s linear infinite;
    flex-shrink: 0;
}

.np-plugin-spinner.is-done {
    animation: none;
    border-color: var(--success);
    background: var(--success);
    box-shadow: inset 0 0 0 .5rem var(--np-surface);
}

.np-plugin-spinner.is-error {
    animation: none;
    border-color: var(--danger);
    background: var(--danger);
    box-shadow: inset 0 0 0 .5rem var(--np-surface);
}

.np-plugin-bar > span {
    width: 6%;
    transition: width .35s ease;
}

.np-plugin-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.np-plugin-step {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    padding: .5rem .75rem;
    border-radius: var(--border-radius);
    background: var(--np-soft);
    border: 1px solid transparent;
}

.np-plugin-step strong {
    display: block;
    font-size: .8125rem;
}

.np-plugin-step em {
    display: block;
    font-style: normal;
    font-size: .75rem;
    color: var(--np-muted);
}

.np-plugin-step-mark {
    width: .875rem;
    height: .875rem;
    margin-top: .2rem;
    border-radius: 50%;
    border: 2px solid var(--gray-400);
    flex-shrink: 0;
}

.np-plugin-step.is-running { border-color: rgba(var(--primary-rgb), .35); }
.np-plugin-step.is-running .np-plugin-step-mark { border-color: var(--primary); border-top-color: transparent; animation: npSpin .7s linear infinite; }
.np-plugin-step.is-done .np-plugin-step-mark { border-color: var(--success); background: var(--success); }
.np-plugin-step.is-error { border-color: rgba(var(--danger-rgb), .35); }
.np-plugin-step.is-error .np-plugin-step-mark { border-color: var(--danger); background: var(--danger); }

.np-plugin-progress-detail {
    margin: .75rem 0 0;
    direction: ltr;
    text-align: left;
    font-size: .6875rem;
    word-break: break-all;
    color: var(--np-muted);
}

.np-plugin-progress-actions:not(:has(> :not([hidden]))) {
    display: none;
}

/* ───── System update ───── */
.np-upd-log {
    max-height: 320px;
    overflow: auto;
    background: #0f1f18;
    color: #d7efe4;
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    font-size: .8125rem;
}

.np-upd-msg:empty {
    display: none;
}

/* ───── DataTables ───── */
.datatable-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: var(--spacer);
    padding-top: 0;
}

.datatable-header .dataTables_filter {
    flex: 1 1 14rem;
    max-width: 22rem;
}

.datatable-header .dataTables_filter label,
.datatable-header .dataTables_length label {
    display: flex;
    align-items: center;
    margin: 0;
    width: 100%;
}

.datatable-scroll-wrap {
    overflow-x: auto;
}

.datatable-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: var(--spacer);
    border-top: 1px solid var(--border-color);
}

.np-report-table {
    margin-bottom: 0;
}

/* ───── Select2 ───── */
.select2-container {
    font-family: inherit;
}

/* select بدون گزینه هم ارتفاع یک input را داشته باشد */
.select2-selection--single .select2-selection__rendered:empty::before {
    content: '\00a0';
}

/* ───── Persian datepicker: وقتی سیستم تیره است ولی کاربر تم روشن را انتخاب کرده ───── */
@media (prefers-color-scheme: dark) {
    html[data-color-theme=light] .datepicker-plot-area {
        background-color: #fff;
        color: var(--body-color);
        border-color: var(--gray-300);
    }

    html[data-color-theme=light] .datepicker-plot-area * {
        color: inherit;
    }

    html[data-color-theme=light] .datepicker-plot-area .datepicker-day-view .table-days td span:hover,
    html[data-color-theme=light] .datepicker-plot-area .datepicker-year-view .year-item:hover,
    html[data-color-theme=light] .datepicker-plot-area .datepicker-month-view .month-item:hover {
        background-color: var(--gray-200);
    }
}

/* np-tags منبع select را با left:-9999px پنهان می‌کند که در RTL اسکرول افقی می‌سازد */
.np-tags {
    position: relative;
}

.np-tags select.np-tags-source {
    left: auto !important;
    right: 0;
    top: 0;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}

/* ───── np-tags در تم تیره (در حالت system هم) ───── */
html[data-color-theme=dark] .np-tag {
    color: #fff;
}

/* ───── Noty ───── */
.noty_layout {
    font-family: var(--font-sans-serif);
}

/* اگر Noty لود نشد */
.np-fallback-toasts {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.np-fallback-toast {
    min-width: 16rem;
    padding: .75rem 1rem;
    border-radius: var(--border-radius);
    color: #fff;
    background: var(--info);
    box-shadow: var(--box-shadow-lg);
    cursor: pointer;
}

.np-fallback-toast.is-success { background: var(--success); }
.np-fallback-toast.is-error { background: var(--danger); }
.np-fallback-toast.is-warning { background: var(--warning); }

/* ───── Login ───── */
.np-login-body .content {
    min-height: 100vh;
}

.np-login-form {
    width: 100%;
    max-width: 22rem;
}

.np-login-form .card {
    box-shadow: var(--box-shadow-lg);
}
