@import '../fonts/all.css';
@import './duDialog.min.css';
@import './datatables.min.css';
@import './popupwindow.min.css';
@import './persian-datepicker.min.css';
@import './tooltipster.bundle.min.css';

:root {
    --primary-bg  : #CCC;
    --secondary-bg: #D8D8D8;
    --primary-cl  : #000;
    --button-bg   : #457B9D;
    --button-cl   : #FFF;
    --active-bg   : #1D3557;
    --active-cl   : #FFF;
    --font        : 'IRANSans', sans-serif;
    --radius      : 0.25rem;
    --red         : #E63946;

    /* رنگ‌های اصلی */
    --silent-color : #CCCCCC;
    --primary-color: #1D3557;
    --secondary-color: #457B9D;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #E63946;

    /* رنگ‌های پس‌زمینه */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-dark: #1e293b;
    --bg-light: #f1f5f9;
    --bg-oasis: #fff2cc;

    /* رنگ‌های متن */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #F1FAEE;
    --text-white: #ffffff;

    /* سایه‌ها */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* شعاع گوشه‌ها */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* فاصله‌ها */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* سایز نوشته‌ها */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;

    --border-invoice: 3px solid black;
}

* {
    box-sizing: border-box;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    outline: none;
    border: none;
    font-family: var(--font);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--primary-bg);
}

a, button {cursor: pointer}
textarea {resize: vertical}
ul {list-style: none}

::-webkit-scrollbar {width: 5px;height: 5px}
::-webkit-scrollbar-track {background: #f1f1f1}
::-webkit-scrollbar-thumb {background: var(--secondary-color)}
::-webkit-scrollbar-thumb:hover {background: var(--primary-color)}

.container {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 2rem;
}

.login-container {
    min-width: 300px;
    max-width: 320px;
    min-height: 200px;
    height: fit-content;

    .login-title {
        width: 100%;
        height: 50px;
        background: var(--secondary-bg);
        color: var(--primary-cl);
        border-radius: 4px;
    }

    .login-form {
        background: var(--secondary-bg);
        width : 100%;
        height: fit-content;
        padding-bottom: 15px;

        button[type="submit"] {
            color: var(--button-cl);
            background: var(--button-bg);
        }
    }

    .login-header {
        width: 100%;
        height: 50px;

        button {
            font-size: 15px;
            font-weight: bold;
        }
        button:nth-child(1) {
            border-left: 1px solid #4b4b4b;
            border-radius: 0 var(--radius) 0 0;
        }
        button:nth-child(2) {
            border-radius: var(--radius) 0 0 0;
        }
        button.active {
            background: var(--active-bg);
            color: var(--active-cl);
        }
    }

    input {
        padding: 0 0.3rem;
    }
}
.login-container .captcha {
    width: 80%;
    height: 100px;
    display: flex;

    canvas {
        width: 120px;
        height: 40px;
        margin-bottom: 0.5rem;
        background: var(--bg-light);
        border-radius: var(--radius);
        cursor: pointer;
    }

    input {
        width: 100%;
    }
}

/* فضای ادمین */
.admin-container { display: flex; min-height: 100vh; }

/* سایدبار */
.sidebar {
    width: 280px;
    background: var(--secondary-bg);
    border-left: 1px solid #4b4b4b;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0; height: 100vh;
    z-index: 1000;
    transition: transform .3s ease;
    overflow-y: auto;
}
.sidebar-header {
    min-height: 3rem;
    max-height: 3rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid #4b4b4b;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: inherit;
    position: sticky;
    top: 0;
    z-index: 1;
}
.sidebar-title { font-size: var(--text-base); font-weight: 700; }

/* منوهای سایدبار */
.sidebar-nav { flex: 1; padding: var(--spacing-sm) 0; }
.nav-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-sm);
    font-size: var(--text-base);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all .2s ease;
    margin: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
}
.nav-item:hover, .nav-item.active {
    background: var(--active-bg);
    color: var(--active-cl);
}
.nav-item i {
    width: 0.6rem;
    margin-left: var(--spacing-md);
    font-size: var(--text-base);
}

/* زیرمنو */
.has-submenu .submenu {
    display: none;
    flex-direction: column;
    margin-right: 1rem;
    padding: 0 1rem 0 1.5rem;
}
.has-submenu.open > .submenu { display: flex; }
.submenu .nav-item { font-size: var(--text-sm); margin: 2px 0; }

/* فلش کنار منوی دارای زیرمنو */
.has-submenu > .nav-item::after {
    content: "\f104"; /* fa-chevron-left */
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    margin-right: auto;
    transition: transform .2s ease;
}
.has-submenu.open > .nav-item::after { transform: rotate(-90deg); }

/* فوتر سایدبار */
.sidebar-footer {
    border-top: 1px solid #4b4b4b;
    position: sticky;
    bottom: 0;
    background: inherit;
    z-index: 1;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: .2s;
}
.user-profile:hover { background: var(--secondary-bg); }
.user-info {
    width: 65%;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 600;
    font-size: var(--text-2xl);
}
.user-name { font-size: var(--text-sm); font-weight: 600; }
.user-role { font-size: var(--text-xs); color: var(--text-secondary); }

/* داشبورد */
.main-content {
    flex: 1;
    margin-right: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.header {
    min-height: 3rem;
    max-height: 3rem;
    background: var(--secondary-bg);
    border-bottom: 1px solid #4b4b4b;
    padding: var(--spacing-sm) var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}
.header-datetime span {
    font-size: var(--text-sm);
    font-weight: bold;
    margin-top: var(--spacing-xs);
    margin-left: var(--spacing-sm);
}
.header-datetime i {

}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--text-xl);
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
}
.menu-toggle:hover {
    background: var(--bg-light);
}
.page-title {
    font-size: var(--text-lg);
    font-weight: 700;
}
.dashboard-content {
    max-width: calc(100vw - 280px);
    height: 100%;
    max-height: calc(100vh - 50px);
    padding: var(--spacing-sm);
    overflow: auto;
}
body:not(:has(.admin-container)) .dashboard-content {
    min-width: 100%;
    max-width: 100%;
    min-height: 100%;
    max-height: 100%;
}

/* فرم افزودن/ویرایش کاربر */
.user-form {
    max-width: 680px;
    margin: var(--spacing-md) auto;
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    direction: rtl;
}
.user-form .form-row {
    margin-bottom: var(--spacing-md);
}
.user-form .form-group {
    display: flex;
    flex-direction: column;
}
.user-form label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}
.user-form input,
.user-form select,
.user-form textarea {
    font-family: var(--font);
    font-size: var(--text-sm);
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.user-form input:focus,
.user-form select:focus,
.user-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.15);
}
.user-form input[required] + label::after,
.user-form select[required] + label::after {
    content: " *";
    color: var(--danger-color);
}
.user-form .hint {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: 0.2rem;
}
.user-form .form-actions {
    margin-top: var(--spacing-lg);
    gap: var(--spacing-sm);
}
.user-form .cancel-btn {
    background: var(--silent-color);
    color: var(--text-primary);
}
.user-form .cancel-btn:hover {
    background: #b8b8b8;
}
/* مجوزها */
.permissions-fieldset {
    margin-top: var(--spacing-lg);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    background: #f8fafc;
}
.permissions-fieldset legend {
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--primary-color);
    padding: 0 var(--spacing-sm);
}
.select-all-row {
    margin-bottom: var(--spacing-sm);
    font-size: var(--text-sm);
}
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
}
.perm-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
}
.perm-item h4 {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}
.perm-checks {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}
.perm-checks label {
    font-size: var(--text-xs);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    user-select: none;
}
.perm-checks input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 14px;
    height: 14px;
}

/* * وسایل نقلیه*/
#vehicle-chain {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* * فرم افزودن/ویرایش شرکت*/
.company-form .logo-box {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--secondary-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .3s;
}
.company-form .logo-box:hover {
    border-color: var(--primary-color);
}
.company-form #logo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.company-form .logo-box button {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    flex-direction: column;
    font-size: 0.5rem;

    i {
        font-size: 1rem;
    }
}
.company-form input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* ---------- فرم چند مرحله‌ای ---------- */
.form-step-container {
    width: 100%;
    padding: 1.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    direction: rtl;
    font-family: var(--font);
}
.step-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2rem;
}
.step-indicator::before {          /* خط اتصال افقی */
    content: "";
    position: absolute;
    top: 1rem;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--silent-color);
    z-index: 0;
}
.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}
.step-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--silent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .875rem;
    font-weight: 600;
    transition: background .3s;
}
.step-label {
    margin-top: .5rem;
    font-size: .75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.step.active .step-circle { background: var(--primary-color); }
.step.done  .step-circle { background: var(--success-color); }
.step-panel { display: none; animation: fadeIn .3s ease; }
.step-panel.active { display: block; }
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}
.step-actions .btn { min-width: 5.5rem; }

/* ---------- حوالجات ---------- */
table#remittances tbody tr {
    cursor: pointer;
}
.preview-remittance-row {
    width: 100%;
    height: 100%;
    padding: var(--spacing-sm);
}

/* ---------- رسید حواله ---------- */
.invoice-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
}
.invoice-section {
    min-width: 900px;
    max-width: 900px;
    position: relative;
    margin: auto;
    left: 0; right: 0;
}
.invoice-header {
    height: 5rem;
    border: var(--border-invoice);

    section:not(:last-child) {
        border-left: var(--border-invoice);
    }
}
.invoice-corner {
    width: 2rem !important;
    max-width: 2rem !important;
    background: var(--bg-oasis);
    border-left: var(--border-invoice);
    display: flex;
    align-items: center;
    justify-content: center;
}
.invoice-corner h5 {
    transform: rotate(-90deg);
    white-space: nowrap;
    font-size: var(--text-sm);
}
.invoice-buyer-info {
    height: 7rem;
    border: var(--border-invoice);
}
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
    text-align: center;
    font-family: sans-serif;
}
.invoice-table th,
.invoice-table td {
    border: var(--border-invoice);
    padding: 4px 2px;
}
.invoice-table .main-header th:not(.need-border) {
    border-bottom: none !important;
}
.invoice-table .sub-header th {
    border-top: none !important;
}
.invoice-table thead th {
    background: var(--bg-oasis);
    font-weight: bold;
    font-size: var(--text-base);
}
.invoice-table thead tr {
    height: 1rem;
    max-height: 1rem;
}
.invoice-table th {
    height: 2rem !important;
    max-height: 2rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}
.invoice-table thead th span {
    position: relative;
    top: 1rem;
}
.sub-header th {
    background: var(--bg-oasis);
}
.invoice-considerations {
    height: fit-content;
    min-height: fit-content;

    .invoice-corner {
        border: var(--border-invoice);
        border-left: none;
    }
}
.invoice-driver-section {
    border: var(--border-invoice);
    min-height: 6rem;
}
.invoice-driver-section .invoice-corner {
    width: 2.5rem;
    background: var(--bg-oasis);
    border-left: var(--border-invoice);
}
.driver-content {
    width: 100%;
    padding: 1rem;
    font-size: var(--text-base);
    line-height: 2.2rem;
    direction: rtl;
}
.driver-text {
    margin: 0;
    text-align: justify;
}
.driver-sign-row {
    margin-top: 1rem;
    font-weight: bold;
}
.invoice-fare {
    border: var(--border-invoice);
    padding: 1rem;
    font-size: var(--text-base);
    line-height: 2.2rem;
    direction: rtl;
}
.fare-row {
    margin-bottom: 0.4rem;
}
.invoice-sign-section {
    border: var(--border-invoice);
    min-height: 6.5rem;
}
.invoice-sign-section .invoice-corner {
    width: 2.5rem;
    background: var(--bg-oasis);
    border-left: var(--border-invoice);
}
.sign-content {
    padding: 1rem 2rem;
}
.sign-box {
    width: 30%;
    text-align: center;
    font-size: var(--text-base);
    line-height: 2rem;
}
.invoice-footer {
    margin-top: 1rem;
    font-size: var(--text-base);
    direction: rtl;
}

/* ---------- تنظیمات ---------- */
.settings-header {
    background: var(--secondary-color);
    color: var(--text-white);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}
.settings-header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
}
.settings-form {
    padding: var(--spacing-xl);
}
.form-section {
    margin-bottom: var(--spacing-xl);
}
.section-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--bg-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}
.form-group input,
.form-group textarea,
.form-group select {
    font-family: var(--font);
    font-size: var(--text-sm);
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.15);
    outline: none;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.lockout-section {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
}
.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}
.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}
.checkbox-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--bg-light);
}
.help-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}
.icon-upload-box {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px dashed var(--secondary-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .3s;
}
.icon-upload-box:hover {
    border-color: var(--primary-color);
}
.icon-upload-box input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.icon-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}
.icon-upload-box .upload-trigger {
    position: absolute;
    bottom: 8px;
    right: 50%;
    transform: translateX(50%);
    pointer-events: none;
}

/* * سفارشی سازی کتابخانه ها*/
.du-dialog .dlg-header {
    font-size: var(--text-base) !important;
}
div.dt-container {height: fit-content !important;padding-top: 5px !important;}
.dt-container .dt-layout-row:has(.dt-search) {direction: ltr !important}
.dt-container .dt-layout-row .dt-search {direction: rtl !important}
.dt-layout-full .dt-processing div div {background: var(--primary-color) !important}
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
    background: var(--button-bg) !important;
    color: var(--button-cl) !important;
    border: 0;
}
div.dt-container {
    width: 100%;
    max-width: 100%;
    height: 800px;
    margin: 0 auto;
    overflow: auto;
}
.dt-buttons {
    display: inline-block;
    float: left;
    direction: ltr;
}
.dt-search {
    display: inline-block;
}
.dt-search label {
    display: none !important;
}
div.dt-container thead {
    background: var(--primary-bg);
    position: sticky;
    top: 0;
    z-index: 1;
}
.dt-info {
    width: 100%;
    text-align: center;
    margin-top: var(--spacing-md);
}
.dt-paging {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-sm);
}
.dataTable .table-logo {
    width: 25px;
    height: 25px;
    border-radius: 6px;
}
.du-dialog .dlg-select-item .dlg-select-radio+.dlg-select-lbl:before {
    left: 0 !important;
    right: 6px !important;
}
.du-dialog .dlg-select-item .dlg-select-lbl .select-item {
    padding-right: 2rem !important;
}
.du-dialog .dlg-action.cancel-action {
    color: var(--danger-color) !important;
}
.popupwindow_container {
    direction: ltr;

    .popupwindow_content {
        width: 100%;
        min-height: 200px;
        background: var(--primary-bg);
        direction: rtl;
        padding: 0;

        iframe {
            width: 100%;
            height: 100%;
        }
    }
}
.datepicker-container {
    z-index: 99999999 !important;
}
.datepicker-grid-view {
    display: block !important;
}

/* گرید آمار */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: transform .25s ease, box-shadow .25s ease;
}
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    flex-shrink: 0;
}
.stat-icon.customers { background: var(--success-color); }
.stat-icon.drivers   { background: var(--secondary-color); }
.stat-icon.products  { background: var(--warning-color); }
.stat-icon.invoices  { background: var(--danger-color); }
.stat-content {
    flex: 1;
}
.stat-title {
    font-size: var(--text-sm);
    color: #000000;
    margin-bottom: var(--spacing-xs);
}
.stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
}

/* نسخه نرم‌افزار */
.version-badge {
    position: fixed;
    bottom: var(--spacing-lg);
    left: var(--spacing-sm);
    background: var(--primary-color) !important;
    color: var(--text-white) !important;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    border-radius: var(--radius-md);
    font-size: var(--text-xs) !important;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}
.version-badge i {
    font-size: var(--text-base);
}

/* بخش اطلاعیه */
.dashboard-notif-container .list-notifs {
    height: 400px;
    max-height: 400px;
    overflow: auto;
}
.dashboard-notif-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    border-right: 3px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    margin-bottom: 1rem;
}
.dashboard-notif-content {
    flex: 1;
    direction: rtl;
}
.dashboard-notif-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}
.dashboard-notif-text {
    font-size: var(--text-base);
    color: var(--text-primary);
    line-height: 1.5;
}
.dashboard-notif-date {
    font-size: var(--text-sm);
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0.5rem;
    display: block;
}
.dashboard-notif-card .delete-notif {
    color: var(--danger-color);
    font-size: var(--text-2xl);
}

/* ---------- صفحه گزارشات ---------- */
.reports-filters {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}
.reports-filters .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
}
.reports-filters button#applyFilter {
    height: 2.8rem;
}
.reports-charts {
    margin-bottom: var(--spacing-lg);
}
.chart-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    text-align: center;
}
.chart-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}
.reports-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    overflow: auto;
}
.reports-charts canvas {
    max-height: 300px;
}

/* کلاس های آماده */
.width-25   {width: 1.5rem}
.width-100  {width: 6.25rem}
.width-fit  {width: 100%}
.max-width-fit  {max-width: 100%}
.height-25  {height: 1.5rem}
.height-40  {height: 2.5rem}
.height-50  {height: 3rem}
.height-fit {height: 100%}
.max-height-fit {max-height: 100%}

.font-size-1 {font-size: 0.8rem}
.font-size-2 {font-size: 0.9rem}
.font-size-3 {font-size: 1rem}
.font-bold {font-weight: bold}
.text-center {text-align: center}
.text-danger {color: var(--danger-color)}

.flex {display: flex}
.justify-center {justify-content: center}
.align-center {align-items: center}
.space-between {justify-content: space-between}
.space-around {justify-content: space-around}
.direction-column {flex-direction: column}
.flex-wrap {flex-wrap: wrap}

[class*='grid'] {display: grid}
.grid-2 {grid-template-columns: repeat(2, 1fr)}
.grid-3 {grid-template-columns: repeat(3, 1fr)}
.grid-4 {grid-template-columns: repeat(4, 1fr)}

.gap-sm {gap: 0.5rem}
.gap-1 {gap: 1rem}
.gap-2 {gap: 2rem}

.relative {position: relative}
.absolute {position: absolute}
.center {
    margin: auto;
    top : 0;bottom: 0;
    left: 0;right : 0;
}

.mt-02 {margin-top: 0.25rem}
.mt-05 {margin-top: 0.5rem}
.mt-1 {margin-top: 1rem}
.mt-2 {margin-top: 2rem}
.mt-3 {margin-top: 3rem}

.mb-1 {margin-bottom: 1rem}
.mb-2 {margin-bottom: 2rem}
.mb-3 {margin-bottom: 3rem}

.padding-sm {padding: 0.3rem}
.padding-1  {padding: 1rem}
.padding-2  {padding: 2rem}
.padding-3  {padding: 3rem}

.padding-rl-sm {padding: 0 0.3rem}
.padding-rl-1  {padding: 0 1rem}
.padding-rl-2  {padding: 0 2rem}
.padding-rl-3  {padding: 0 3rem}

.radius {border-radius: var(--radius)}

.dn {display: none}
.db {display: block}

[class*='notice'] {
    background: #ccc;
    border-right: 4px solid;
}
.notice-danger {border-color: var(--red)}

[class*='badge'] {
    min-width: 1rem;
    font-size: var(--text-xs);
    padding: 0 var(--spacing-xs);
    border-radius: var(--radius);
    background: var(--silent-color);
    color: var(--text-light);
}
.success {background: var(--success-color)}
.danger {background: var(--danger-color)}

/* ---- دکمه ها ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: none;
    border-radius: .35rem;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: all .25s ease;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}
.btn:focus{outline:2px solid rgba(0,123,255,.45);outline-offset:2px}
.btn:disabled{opacity:.55;cursor:not-allowed}

.btn-primary {background:var(--primary-color);color:var(--text-white)}
.btn-secondary {background:var(--secondary-color);color:var(--text-white)}
.btn-info    {background:#17a2b8;color:#fff}
.btn-warning {background:#ffc107;color:#212529}
.btn-danger  {background:#dc3545;color:#fff}
.btn-success {background:#28a745;color:#fff}

.btn-info:hover    {background:#138496}
.btn-warning:hover {background:#e0a800}
.btn-danger:hover  {background:#c82333}
.btn-success:hover {background:#218838}

.btn-sm {padding:.25rem .55rem;font-size:.75rem;border-radius:.25rem}

.cursor-pointer {cursor: pointer !important}
.cursor-wait    {cursor: wait !important}

.bg-none {background: none}
.bg-light {background: var(--secondary-bg)}
.shadow-none {box-shadow: none}

.accordion {
    direction: rtl;
    font-family: var(--font);
}
.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: var(--bg-secondary);
}
.accordion-header {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: background 0.2s ease;
}
.accordion-header:hover {
    background: var(--secondary-color);
    color: #fff;
}
.accordion-header:not(.leaf) .accordion-handle::after {
    content: "◀";
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}
.accordion-header.collapsed .accordion-handle::after {
    transform: rotate(90deg);
}
.accordion-body {
    display: none;
    background: #fff;
    padding: var(--spacing-md);
}
.accordion-body.show {
    display: block;
}
.leaf .accordion-header::after {
    display: none;
}
.accordion-header .btn-sm {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}
.accordion-header .btn i {
    pointer-events: none; /* کلیک روی آیکون باعث باز/بسته شدن آکاردئون نشود */
}

[class*='v-spacing-'] {
    display: flex;
    flex-direction: column;
}
.v-spacing-sm {
    gap: 0.3rem;
}

.text-under-dotted {
    min-width: 150px;
    display: inline-block;
    border-bottom: 2px dotted;
    height: 25px;
    text-align: center;
}

.bold-input {
    border: 3px solid var(--primary-color) !important;
    color: var(--primary-color) !important;

    &::placeholder {
        color: var(--primary-color) !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media print {
    html, body {
        direction: rtl;
        background: white;
    }
    body {
        padding: 18px;
    }
    #users { position: absolute; left: 0; top: 0; }
}

/* واکنشگرایی (ریسپانسیو) */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .menu-toggle { display: block; }
    .dashboard-content {max-width: 100vw;}
}
@media (max-width: 768px) {
    .header { padding: var(--spacing-md); }
    .dashboard-content { padding: var(--spacing-md); }

    .permissions-grid {grid-template-columns: 1fr;}
    .user-form {padding: var(--spacing-md);}
    .user-form .grid-2 {grid-template-columns: 1fr;}

    div.dt-container div.dt-layout-row:not(.dt-layout-table, :has(.dt-paging)) {
        display: flex !important;
    }

    .step-indicator {
        flex-wrap: wrap;
        gap: 1rem 0;
    }
    .step {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .step-label { font-size: .6rem; }
    .step-circle { width: 1.75rem; height: 1.75rem; font-size: .75rem; }

    .step-indicator::before { display: none; }

    .stats-grid { grid-template-columns: 1fr; }

    .version-badge { left: 1rem; bottom: 1rem; }

    .dashboard-notif-card {
        padding: 0.6rem 0.8rem;
        gap: 0.75rem;
    }

    .reports-filters .form-row {
        grid-template-columns: 1fr;
    }
    .reports-charts .grid-2 {
        grid-template-columns: 1fr;
    }
}