﻿/*.sweet-alert {
    position: fixed !important;*/
/*    top: 5% !important;*/
/*left: auto !important;
    right: 0px !important;
    transform: none !important;
    max-width: 500px;
    min-height: 100vh;
    overflow-y: auto;
}*/
body {
    color: #0b0b0c;
}

/*.form-group {
    margin-bottom: 3px;
}*/

.sweet-overlay {
    background: #00000073 !important;
}

.sweet-alert .confirm {
    color: #000 !important;
    background-color: #eee !important;
    border: none !important;
}

    .sweet-alert .confirm:hover {
        background-color: #bbb !important;
        color: #000 !important;
        opacity: 1 !important;
    }

.sweet-alert .cancel {
    color: #000 !important;
    background-color: #eee !important;
    border: none !important;
}

    .sweet-alert .cancel:hover {
        background-color: #bbb !important;
        color: #000 !important;
        opacity: 1 !important;
    }

.btn-sm {
    font-size: 0.85rem;
    padding: 6px 12px;
}

.tbl-icon {
    font-size: 1.5em;
    display: -webkit-inline-box;
    margin-left: 10px
}

.score-btn-add {
    margin-top: 22px;
    margin-right: 10px;
    padding-top: 3px;
    padding-right: 5px;
    color: green;
    border: 1px solid;
    border-radius: 50%;
    height: 25px;
    width: 25px;
}

    .score-btn-add:hover {
        cursor: pointer;
        background: green;
        color: white;
    }


.table tr td {
    padding: 3px !important;
}

.vtabs .tabs-vertical {
    width: 180px;
}

canvas {
    font-family: 'IranSans' !important;
}

.readonly-section {
    opacity: 0.5 !important;
    pointer-events: none !important;
}


/* overlay */
#loaderOverlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
}

.hidden {
    display: none;
}

.loader-box {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 260px;
}

.spinner {
    width: 48px;
    height: 48px;
}

    .spinner circle {
        stroke: #2563eb;
        stroke-linecap: round;
        stroke-dasharray: 80;
        stroke-dashoffset: 60;
        transform-origin: 50% 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 15px;
    color: #111;
}

.form-control {
    border-color: #9e9e9e;
}

.control-label {
    margin-top: 3px !important;
}

.dropdown-menu > li > a {
    color: #ebebeb !important;
}

.dropdown-menu > li :hover {
    background: #ebebeb !important;
    color: #7341c4fa !important;
}


/*.form-element .form-control {
    border: 0;
    background-color: transparent;*/
/* خط فعال (بالایی) و خط پایه (پایینی) */
/*background-image: linear-gradient(#aaa, #aaa),*/ /* خط اصلی پررنگ */
/*linear-gradient(#bbb, #bbb);*/ /* خط کم‌رنگ پایه */
/*background-position: center bottom, center calc(100% - 1px);
background-repeat: no-repeat;
background-size: 100% 1px, 100% 1px;*/ /* ضخیم‌تر: 2px */
/*-webkit-background-clip: padding-box;
box-shadow: none;
border-radius: 0;
min-height: 38px;
padding: 0;
transition: background-size .2s ease-out, background-image .2s ease-out;
background-image: linear-gradient(#aaa, #aaa),*/ /* خط اصلی پررنگ */
/*linear-gradient(#bbb, #bbb);
}

   .form-element .form-control:focus {*/
/* در فوکِس تیره‌تر/ضخیم‌تر شود */
/*background-image: linear-gradient(#111, #111), linear-gradient(#bbb, #bbb);
background-size: 100% 1px, 100% 1px;*/ /* حتی شارپ‌تر در فوکِس */
/*outline: none;
}*/

/* خاکستری پررنگ + خط پایهٔ کمرنگ */
/*.theme-purple .form-element .form-control {
    background-image: linear-gradient(#aaa, #aaa), linear-gradient(#ffffff, #ffffff);
    background-size: 100% 1px, 100% 1px;*/ /* ضخامت شارپ */
/*background-position: center bottom, center calc(100% - 1px);
background-repeat: no-repeat;
}*/

/*rahil*/
.form-element .form-control {
    border: none;
    border-bottom: 1px solid #8d8d8d;
    border-radius: 0;
    background: transparent !important;
    min-height: 38px;
    padding: 4px 0;
    box-shadow: none;
    color: #4c4141;
    font-weight: 500;
    transition: border-color 0.2s ease-in-out;
}

    .form-element .form-control:focus {
        outline: none;
        border-bottom: 1px solid #000;
    }

.control-label {
    margin-top: 20px !important;
}

/*.select2-container--default .select2-selection--single {
    border: none !important;
    border-bottom: 1px solid #aaa !important;
    border-radius: 0px !important;
}

.select2-container--default .select2-selection--multiple {
    border: none !important;
    border-radius: 0px;
    border-bottom: 1px solid #aaa !important;
}*/

.theme-purple .form-element .form-control::placeholder {
    color: #777;
    opacity: 0.8;
    font-weight: 400;
}

.table-bordered {
    border: 1px solid #aaa;
}

    .table-bordered > thead > tr > td, .table-bordered > thead > tr > th {
        border: 1px solid #aaa;
        border-bottom-width: 1px;
    }

.table tr td {
    /*    padding: 13px !important;*/
    border: 1px solid #aaa !important;
}

table.table-bordered.dataTable th, table.table-bordered.dataTable td {
    border-left-width: 1px;
}

    table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable td:last-child, table.table-bordered.dataTable td:last-child {
        border-right-width: 1px;
    }


.pagination li a {
    min-width: 25px !important;
    padding: 5px !important;
    border-radius: 2px;
}

    .pagination li a :hover {
        background: #fff;
    }

/* Popup shell (same visuals as before) */
.sa-fancy__popup {
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, .32);
    background: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .86) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(18, 24, 40, .18), 0 0 0 1px rgba(17, 24, 39, .03) inset;
}

.sa-fancy__container {
    padding: 22px 22px 18px;
}

.sa-fancy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    color: #111827;
}

.sa-fancy__title {
    font-weight: 800;
    font-size: 18px;
    color: #1f2459;
    letter-spacing: .2px;
}

.sa-fancy__text {
    font-size: 14.5px;
    line-height: 2;
    color: #374151;
}

    .sa-fancy__text b {
        color: #111827;
    }

/* Icon base state (hidden until animation starts) */
.sa-fancy__icon-wrap {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(120% 120% at 50% 0%, #fff 0%, #fdf5e6 70%, #fff0 100%);
    box-shadow: 0 8px 24px rgba(255, 165, 0, .16);
    opacity: 0;
    transform: translateY(8px) scale(.94);
}

.sa-fancy__icon {
    width: 48px;
    height: 48px;
}

/* Icon entrance — slower & smoother */
@keyframes saIconIn {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(.92);
    }

    55% {
        opacity: 1;
        transform: translateY(-1px) scale(1.03);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sa-fancy__icon--in {
    animation: saIconIn .55s cubic-bezier(.16, .84, .36, 1) forwards;
}

/* POPUP animation (replace Swal default): slightly slower */
.sa-pop {
    will-change: transform, opacity;
}

@keyframes saPopIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes saPopOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(6px) scale(.98);
    }
}

.sa-pop--in {
    animation: saPopIn .28s cubic-bezier(.2, .75, .25, 1) both;
}

.sa-pop--out {
    animation: saPopOut .22s ease both;
}

/* Button */
.sa-fancy__btn {
    margin: 10px 0 18px;
    padding: .62rem 1.25rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #6f66f6 0%, #5b4ce2 48%, #8e72ff 100%);
    color: #fff;
    font-weight: 800;
    letter-spacing: .2px;
    box-shadow: 0 10px 25px rgba(91, 76, 226, .28), 0 1px 0 rgba(255, 255, 255, .8) inset;
    transition: transform .08s ease, filter .15s ease, box-shadow .2s ease;
}

    .sa-fancy__btn:hover {
        filter: brightness(1.05)
    }

    .sa-fancy__btn:active {
        transform: translateY(1px) scale(.99)
    }

.sa-fancy__icon-wrap {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff; /* remove glow if you want */
    box-shadow: 0 6px 20px rgba(17,24,39,.08);
}

.sa-fancy__icon {
    width: 46px;
    height: 46px;
    color: #ff7a00; /* warning color */
}

/* ========= Tokens ========= */
:root {
    --brand: #6c5ce7;
    --brand2: #a66bff;
    --ink: #2b2f38;
    --ok: #22c55e;
    --ring: rgba(108, 92, 231, 0.35);
    --shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
    --shadow-sm: 0 6px 16px rgba(16, 24, 40, 0.08);
    --muted: #6b7280;
    --muted-placeholder: #9aa4b2;
    --surface: #ffffff;
    --surface-2: #f8fafc;
}

#serverError {
    overflow-wrap: anywhere;
}

/* ========= Responsive ========= */
@media (max-width: 576px) {
    .uploader__name {
        max-width: 18ch;
    }

    .uploader__drop {
        display: block;
    }

    .picker-title .name {
        max-width: 26ch;
    }

    .picker-list {
        max-height: 260px;
    }
}

@media (max-width: 768px) {
    .step + .step::after {
        content: "";
        position: absolute;
        right: -6px;
        left: calc(100% - 1rem);
        top: 50%;
        height: 4px;
        transform: translateY(-50%);
        background: linear-gradient(90deg, #e5e7eb, #d1d5db);
        border-radius: 2px;
        z-index: -1;
    }

    .step.completed + .step::after {
        background: linear-gradient(90deg, #22c55e, #b0e5c5);
    }

    .bankdebt-col .bd-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .form-grid-row {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }

        .form-grid-row > label {
            justify-self: start;
            white-space: normal;
            text-overflow: clip;
        }

    .uploader__name {
        max-width: 22ch;
    }
}

@media (max-width: 1200px) {
    .grid-2 {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }

    .form-grid-row {
        grid-template-columns: max(150px, 20ch) minmax(220px, 1fr);
    }
}

/* ========= Shell / Cards ========= */
.wizard-shell {
    max-width: clamp(900px, 92vw, 1200px);
    width: 100%;
}

.card-glass {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(140%) blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 5px;
    margin: 15px;
    width: 100%;
    margin-top: 0px;
}

.rounded-16 {
    border-radius: 16px;
}

.card {
    border: none !important;
    padding: 0.7rem;
    margin-bottom: 0px !important;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eef2ff;
}

    .card-header h6 {
        font-weight: 800;
        color: var(--brand);
    }

.card:hover {
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.1);
}

/* ========= Stepper ========= */
.stepper {
    direction: rtl;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    grid-gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 2rem 2rem 0;
    counter-reset: step;
}

.step {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    background: #fff;
    border-radius: 14px;
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

    .step::before {
        counter-increment: step;
        content: counter(step);
        position: absolute;
        right: 0.6rem;
        top: 50%;
        transform: translateY(-50%);
        width: 2rem;
        height: 2rem;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #eef2ff;
        color: var(--brand);
        font-weight: 800;
        padding: 0.1rem 0 0 0.1rem;
    }

    .step > .step-title {
        padding-right: 2.6rem;
        width: 100%;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .step.active {
        background: linear-gradient(180deg, #fff, #f7f8ff);
        outline: 2px solid rgba(108, 92, 231, 0.15);
    }

        .step.active::before {
            background: linear-gradient(135deg, var(--brand), var(--brand2));
            color: #fff;
        }

    .step.completed {
        background: #ecfff3;
        color: #14532d;
    }

        .step.completed::before {
            content: "\2713";
            background: var(--ok);
            color: #fff;
            padding-top: 0.15rem;
        }

/* ========= Panes ========= */
.step-pane {
    display: none;
}

    .step-pane.active {
        display: block;
        animation: fadeIn 0.2s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(2px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ========= Typography ========= */
h6,
.h6 {
    font-size: 1.4rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand);
    font-weight: 800;
}

    .section-title::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--brand2);
    }

/* ========= Forms (RTL) ========= */
label {
    font-weight: 700;
    color: #111827;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control,
.custom-select {
    border-radius: 0.65rem;
    border: 1px solid #e5e7eb;
    background-clip: padding-box;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    height: 40px;
}

textarea.form-control {
    height: auto;
}

.form-control:hover {
    background-color: #fcfdff;
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem var(--ring);
}

input[type="file"].form-control {
    height: auto;
    padding: 0.5rem;
}

/* Validation */
.form-group .invalid-feedback {
    display: none;
    text-align: right;
}

.form-control.is-invalid ~ .invalid-feedback,
.custom-select.is-invalid ~ .invalid-feedback,
textarea.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-control.is-invalid {
    padding-left: 2.25rem;
    padding-right: 0.75rem;
    border-color: #fca5a5;
    box-shadow: 0 0 0 0.12rem rgba(239, 68, 68, 0.1);
    background-position: left calc(0.375em + 0.1875rem) center;
}

.form-control.is-valid {
    border-color: #86efac;
    background-position: left calc(0.375em + 0.1875rem) center;
}

/* Radios & Checkboxes */
.custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.custom-control-label::before {
    box-shadow: none;
    border: 1px solid #d1d5db;
}

/* Input groups */
.input-group-text {
    background: #f7f7fb;
    border-color: #e5e7eb;
}

/* --- Uploader core --- */
/* Layout inside table cells */
.mini-table .file-cell {
    min-width: 320px;
}

/* keep space for button+name */
.mini-table .preview-cell {
    width: 120px;
    text-align: center;
}

/* Container */
.uploader {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.25rem;
    direction: rtl;
}

/* 1) Hide native input (keep accessible) */
.uploader__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* 2) Faux button (label[for]) */
.uploader__btn {
    grid-column: 1 / 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid var(--brand);
    color: var(--brand);
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

    .uploader__btn:hover {
        background: #f7f7ff;
    }

    .uploader__btn:active {
        transform: translateY(1px);
    }

    .uploader__btn:focus-visible {
        outline: 2px solid var(--ring);
        outline-offset: 2px;
    }

    .uploader__btn svg {
        width: 18px;
        height: 18px;
        display: inline-block;
    }

/* 3) Filename */
.uploader__name {
    grid-column: 2 / 3;
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 26ch;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 4) Drop zone (optional) */
.uploader__drop {
    grid-column: 1 / -1;
    margin-top: 0.15rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
    color: var(--muted);
    border: 1px dashed #e5e7eb;
    border-radius: 0.5rem;
    text-align: center;
    background: #fbfdff;
}

    .uploader__drop.is-dragover {
        border-color: var(--brand);
        background: #f5f6ff;
    }

/* 5) Preview box (in a separate table cell) */
.preview-cell .uploader__preview {
    width: 104px;
    height: 78px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #e1e6eb;
    background: var(--surface);
}

/* States (error/success) applied to the hidden input via JS) */
.uploader__input.is-invalid ~ .uploader__btn {
    border-color: #ef4444;
    color: #b91c1c;
}

.uploader__input.is-valid ~ .uploader__btn {
    border-color: #22c55e;
    color: #15803d;
}

/* Compact variant (optional) -> add .uploader--sm on .uploader to tighten spacing */
.uploader.uploader--sm .uploader__btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.uploader.uploader--sm .uploader__name {
    font-size: 0.8rem;
    max-width: 20ch;
}

.preview-cell {
    text-align: center;
}

.preview-empty {
    width: 104px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #e5e7eb;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #94a3b8;
}

/* ========= Tables ========= */
.table thead th {
    white-space: nowrap;
}

.table-sm td,
.table-sm th {
    padding: 0.5rem 0.75rem;
}

.rtl-table th,
.rtl-table td {
    text-align: right;
    vertical-align: middle;
}

.seasonal-table input.form-control {
    height: 38px;
}

/* ========= Buttons ========= */
.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    border-radius: 0.45rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    min-width: 8rem !important;
}

    .btn-brand:hover {
        background: var(--brand2);
        border-color: var(--brand2);
    }

.btn-outline-primary {
    border-color: var(--brand);
    color: var(--brand);
}

    .btn-outline-primary:hover {
        background: var(--brand);
        color: #fff;
    }

.btn[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* ========= Quill ========= */
.quill-host .ql-toolbar.ql-snow {
    border-radius: 12px 12px 0 0;
    border-color: #eef2ff;
    background: #fafafe;
}

.quill-host .ql-container.ql-snow {
    border-radius: 0 0 12px 12px;
    border-color: #eef2ff;
    min-height: 160px;
}

.ql-snow * {
    box-sizing: border-box;
    text-align: right;
}

/* ========= Layout helpers ========= */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(360px, 1fr));
    gap: 14px 24px;
    direction: rtl;
}

.form-grid-row {
    display: grid;
    grid-template-columns: max(160px, 22ch) minmax(260px, 1fr);
    align-items: center;
    column-gap: 12px;
}

    .form-grid-row > label {
        justify-self: end;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 160px;
    }

    .form-grid-row > .form-control,
    .form-grid-row > .custom-select,
    .form-grid-row > select,
    .form-grid-row > textarea {
        width: 100%;
        min-width: 0;
    }

/* Sticky utilities (برای هدرهای داخل صفحه) */
.sticky-top {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.radio .radio-control {
    margin: 0;
    display: flex;
    gap: 1rem;
}

.radio-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.mini-table {
    display: inline-block;
    min-width: 320px;
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(22, 28, 45, 0.06);
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
    /*    overflow: hidden;*/
    /*min-height: 400px !important;*/
}

.mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.25rem 0.6rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px dashed #e7eaee;
}

    .mini-head span {
        font-weight: 700;
        font-size: 0.95rem;
        letter-spacing: 0.2px;
    }

.btn-xxs {
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1;
    border-radius: 0.35rem;
}

.mini-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.mini-table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7d8b97;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: none;
    background: transparent;
    padding: 0.25rem 0.5rem;
}

.mini-table tbody tr {
    background: #f9fbfc;
    border-radius: 10px;
    /*    transition: transform .12s ease, box-shadow .12s ease, background .12s ease*/
}

    .mini-table tbody tr:hover {
        background: #f4f8fb;
        box-shadow: 0 4px 10px rgba(22, 28, 45, 0.05);
        /*        transform: translateY(-1px)*/
    }

.mini-table tbody td {
    border: none !important;
    padding: 0.5rem 0.5rem;
}

.mini-table select.form-control,
.mini-table input.form-control {
    height: 34px;
    font-size: 0.9rem;
    border: 1px solid #e1e6eb;
    border-radius: 8px;
    box-shadow: none;
}

    .mini-table input.form-control:focus,
    .mini-table select.form-control:focus {
        border-color: var(--brand);
        outline: 0;
        box-shadow: 0 0 0 0.2rem var(--ring);
    }

.mini-table .cell-actions {
    width: 1%;
    white-space: nowrap;
}

.mini-table .btn-remove {
    padding: 0.15rem 0.45rem;
    line-height: 1;
    border-radius: 8px;
}

/* wrapper */
.input-with-icon {
    position: relative;
}

    /* give room for the icon (RTL-friendly logical padding) */
    .input-with-icon > .form-control {
        padding-inline-end: 2.25rem; /* space for the icon */
    }

    /* icon button positioned on the right side */
    .input-with-icon > .icon-btn {
        position: absolute;
        inset-inline-end: 0.5rem; /* right in LTR / left in RTL automatically */
        top: 50%;
        transform: translateY(-50%);
        border: 0;
        background: transparent;
        color: var(--brand);
        padding: 0;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        pointer-events: auto; /* clickable */
    }

        .input-with-icon > .icon-btn:hover,
        .input-with-icon > .icon-btn:focus {
            color: var(--brand2);
            outline: none;
        }

.input-with-label > .icon-btn {
    border: none !important;
    outline: none; /* remove default outline */
    box-shadow: none; /* remove UA/BS shadows */
    background: transparent; /* no background */
    color: var(--brand); /* ← set your desired color */
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
}

    .input-with-label > .icon-btn:hover,
    .input-with-label > .icon-btn:focus {
        color: var(--brand2);
    }

.input-with-label {
    display: flex; /* put children on one line */
    align-items: center; /* vertical align */
    gap: 0.5rem; /* space between label and input */
    flex-wrap: nowrap; /* keep them on one line */
}

    .input-with-label > label {
        margin: 0; /* remove default label margin */
        white-space: nowrap; /* prevent label from breaking to next line */
    }

    .input-with-label > .form-control {
        flex: 1 1 auto;
        text-align: right; /* RTL-friendly text/placeholder alignment */
        direction: rtl;
    }

    .input-with-label > .form-control {
        padding-inline-end: 2.25rem;
    }

/* 2) Icon INSIDE the input (background image) + safe padding for placeholder */
.input-icon-bg {
    background-repeat: no-repeat;
    background-position: center left 0.6rem; /* right side in RTL */
    background-size: 20px 20px; /* slightly larger for crispness */
    padding-inline-end: 2.75rem; /* more room: icon + gap */
    color: var(--brand);
    /* calendar SVG (you had this already; kept, just size-tuned above) */
    background-image: url('data:image/svg+xml;utf8,\
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none">\
    <path d="M7 2v3M17 2v3M3 9h18M5 7h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2z" stroke="%236c5ce7" stroke-width="2" stroke-linecap="round"/>\
  </svg>');
}

    /* nicer placeholder + ensure it inherits alignment */
    .input-icon-bg::placeholder {
        color: var(--muted-placeholder);
        opacity: 1;
        text-align: right;
    }

.bankdebt-col .bd-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding-block: 0.15rem 0.6rem; /* extra bottom space for the line */
    position: relative;
}

    .bankdebt-col .bd-head::before {
        content: "";
        position: absolute;
        inset-inline: 0.25rem; /* start/end in RTL-safe way */
        bottom: -0.35rem; /* was top: -0.35rem; -> now bottom */
        height: 2px;
        background: #e5e7eb;
        border-radius: 2px;
    }

/* badge row */
.bd-seg {
    display: inline-flex;
    gap: 0.35rem;
}

/* badge pill */
.bd-badge {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    padding: 0.22rem 0.65rem;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    border: 1px solid #e6eaf0;
    color: #e6eaf0;
    user-select: none;
    pointer-events: none; /* non-interactive */
}

/* two inputs side-by-side in the same cell */
.bankdebt-col .bd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.year-row:first-child td {
    border-top: none !important;
}

.year-row + .year-row td {
    border-top: 1px dashed #e7eaee !important;
}

/* a11y-only label */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ───────── Wrapper ───────── */
.intake-picker {
    width: 100%;
    max-width: 760px; /* cap the width */
    margin-inline: auto; /* center in its column */
}

/* ───────── Input shell ───────── */
.picker-input {
    position: relative;
}

.picker-control {
    height: 44px;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding-inline: 1rem;
    box-shadow: none;
    background: #fff;
}

    .picker-control:focus {
        border-color: var(--brand);
        box-shadow: 0 0 0 0.2rem var(--ring);
        outline: none;
    }

/* hint */
.picker-hint {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ───────── Dropdown (listbox) ───────── */
.picker-list {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 0.4rem);
    z-index: 35;
    background: var(--surface);
    border: 1px solid #eef0f2;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    max-height: 320px;
    overflow: auto;
    padding: 0.25rem; /* gives items some breathing room */
}

    /* Optional nicer scrollbar (webkit) */
    .picker-list::-webkit-scrollbar {
        height: 10px;
        width: 10px;
    }

    .picker-list::-webkit-scrollbar-thumb {
        background: #dfe4ff;
        border-radius: 8px;
    }

        .picker-list::-webkit-scrollbar-thumb:hover {
            background: #cfd6ff;
        }

/* Empty state */
.picker-empty {
    padding: 0.7rem 0.8rem;
    color: var(--muted);
    text-align: center;
}

/* ───────── Intake item pill ───────── */
.picker-item {
    direction: rtl;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.2rem 0.7rem;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-radius: 0.65rem;
    background: #fbfbff;
    border: 1px solid #eef1ff;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03) inset;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    margin: 0.5rem 3rem 1rem 0;
}

    .picker-item + .picker-item {
        margin-top: 0.8rem;
    }

    /* hover/active/focus */
    .picker-item:hover {
        background: #f7f8ff;
        border-color: #dfe4ff;
    }

    .picker-item.is-active,
    .picker-item:focus-within {
        outline: 2px solid rgba(108, 92, 231, 0.25);
        outline-offset: 1px;
        background: #f5f6ff;
        box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.08) inset;
    }

/* badge (#letterNo) */
.picker-badge {
    grid-row: 1 / span 2;
    grid-column: 1;
    align-self: start;
    min-width: 3.2rem;
    text-align: center;
    font: 700 0.82rem/1.6 system-ui;
    color: #3b3b3b;
    background: #eef2ff;
    border: 1px solid #dfe4ff;
    border-radius: 0.55rem;
    padding: 0.1rem 0.5rem;
}

/* title line */
.picker-title {
    grid-column: 2;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    color: #1f2937;
    font-weight: 800;
}

    .picker-title .name {
        font-size: 0.98rem;
        max-width: 38ch; /* avoid overflows */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .picker-title .sep {
        opacity: 0.35;
        font-weight: 400;
    }

    .picker-title .letter {
        color: #4b5563;
        font-weight: 700;
    }

/* meta/badges line */
.picker-sub {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    align-items: center;
    color: #6b7280;
    font-size: 0.85rem;
}

.picker-tag {
    background: #eef2ff;
    color: #475569;
    border: 1px solid #e5e7eb;
    padding: 0.08rem 0.5rem;
    border-radius: 0.6rem;
    font-weight: 600;
}

/* Optional: tighten cell padding for table-sc small */
.table-sc td .uploader {
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
}

.ratio-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}

    .ratio-wrap > input.form-control {
        width: 100%;
        padding-inline-end: 1.8rem; /* room for the suffix left in RTL */
    }

.ratio-wrap__pct {
    position: absolute;
    inset-inline-end: 0.6rem; /* "left" in RTL */
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-placeholder);
    pointer-events: none;
    font-weight: 700;
    line-height: 1;
}

.box-header {
    display: flex;
    justify-content: space-between;
}

.tbl-icon {
    font-size: 1.2em;
    margin-left: 15px;
}

.btn-action {
}

    .btn-action:hover {
        background-color: transparent !important;
        box-shadow: none;
    }

/* ===== Inline no-data banner ===== */
.nd--inline {
    --nd-accent: var(--brand);
    --nd-accent-ink: #4b3acb;
    --nd-border: #e8e6ff;
    --nd-bg: linear-gradient(180deg, #faf9ff, #ffffff);
    direction: rtl;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--nd-border);
    background: var(--nd-bg);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.06);
}

    .nd--inline .nd-icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: #f1efff;
        color: var(--nd-accent);
        box-shadow: inset 0 0 0 1px #ded9ff;
    }

        /* crisp “info” glyph */
        .nd--inline .nd-icon > svg {
            width: 22px;
            height: 22px;
            display: block;
        }

    .nd--inline .nd-title {
        color: var(--brand);
        font-weight: 800;
        font-size: 0.92rem;
        margin: 0;
    }

    .nd--inline .nd-dot {
        opacity: 0.45;
        margin-inline: 0.35rem;
    }

    .nd--inline .nd-text {
        color: var(--ink);
        font-size: 0.9rem;
        line-height: 1.9;
        margin: 0;
    }

    .nd--inline .nd-strong {
        font-weight: 800;
    }

    .nd--inline .nd-badge {
        display: inline-block;
        padding: 1px 4px;
        margin: 0 0.25rem;
        font-weight: 800;
        color: var(--brand);
    }

.img-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1050;
}

    .img-modal.is-open {
        display: block;
    }

.img-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.img-modal__dialog {
    position: relative;
    inset: auto;
    margin: 4vh auto;
    max-width: min(92vw, 980px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.img-modal__figure {
    margin: 0;
    padding: 1rem;
}

    .img-modal__figure img {
        display: block;
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }

.img-modal__caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.img-modal__close {
    position: absolute;
    top: 0.25rem;
    left: 0.5rem;
    border: 0;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.uploader__preview {
    cursor: zoom-in;
}

.preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}


.main-sidebar {
    top: 0px !important;
}

/* جلوگیری از انتخاب متن در تگ‌های نمایشی و divهای عمومی */
div:not(.allow-select),
h1, h2, h3, h4, h5, h6,
p, span, label, strong, em, b, i,
small, code, pre, blockquote,
figcaption, caption, th, td {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.select2-container--default .select2-selection--single {
    border-radius: 0.65rem;
    border: 1px solid #e5e7eb;
    background-clip: padding-box;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    height: 40px;
    padding-top:9px
}

.select2-container--default .select2-selection--multiple {
    border-radius: 0.65rem;
    border: 1px solid #e5e7eb;
    background-clip: padding-box;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    height: 40px;
    padding-top: 9px
}
/* ===== Select2 - RTL + centered + pretty tags ===== */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple,
.select2-container--classic .select2-selection--multiple {
    min-height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: .375rem !important;
    padding: 6px 10px !important;
    display: flex !important;
    align-items: center !important; /* ✅ وسط چین عمودی */
    flex-wrap: wrap !important;
    gap: 6px !important;
    background: #fff !important;
}

    .select2-container--default .select2-selection--multiple .select2-selection__rendered,
    .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
        display: flex !important;
        align-items: center !important; /* ✅ وسط چین عمودی */
        flex-wrap: wrap !important;
        gap: 6px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice,
    .select2-container--classic .select2-selection--multiple .select2-selection__choice {
        background: #6f42c1 !important;
        color: #fff !important;
        border: none !important;
        border-radius: 999px !important;
        padding: 3px 10px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        font-size: 0.85rem !important;
    }

.select2-container--default .select2-selection__choice__remove,
.select2-container--classic .select2-selection__choice__remove {
    color: #fff !important;
    margin-left: 6px !important;
    opacity: .85 !important;
    font-weight: 700 !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--classic.select2-container--focus .select2-selection--multiple {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.25) !important;
}

/* RTL اصلاح فاصله ضربدر */
.select2-container[dir="rtl"] .select2-selection__choice__remove {
    margin-left: 6px !important;
    margin-right: 0 !important;
}


