@font-face {
    font-family: "Vazirmatn";
    src: url("/fonts/vazirmatn/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: normal;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("/fonts/vazirmatn/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: bold;
}

:root {
    --color-carbon-blue: #102A43;
    --color-carbon-blue-dark: #0B1F33;
    --color-gray-bg: #F3F4F6;
    --color-gray-border: #D1D5DB;
    --color-gray-text: #4B5563;
    --color-copper-orange: #C46A2B;
    --color-copper-orange-dark: #A9551F;
    --color-white: #FFFFFF;
}

* {
    box-sizing: border-box;
}

body.erp-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Vazirmatn", sans-serif;
    background: var(--color-gray-bg);
    color: var(--color-carbon-blue);
}

/* Header */

.erp-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 72px;
    z-index: 1000;
    background: var(--color-carbon-blue);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.erp-header__right,
.erp-header__left {
    display: flex;
    align-items: center;
}

.erp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.erp-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: var(--color-white);
    border-radius: 10px;
    padding: 4px;
}

.erp-header__left {
    gap: 18px;
}

.erp-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    font-size: 14px;
}

.erp-user__avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.erp-user__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.erp-user__avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.erp-user i {
    color: var(--color-copper-orange);
}

.erp-user__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    line-height: 1.25;
    text-align: left;
}

.erp-user__name {
    font-size: 14px;
    font-weight: 700;
}

.erp-user__date,
.erp-user__time {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    direction: rtl;
    text-align: left;
}

.erp-logout-form {
    margin: 0;
}

.erp-logout-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    cursor: pointer;
    font-size: 17px;
    transition: all 0.25s ease;
}

.erp-logout-btn:hover {
    background: var(--color-copper-orange);
    transform: translateY(-2px);
}

/* Main */

.erp-main {
    padding-top: 96px;
    min-height: 100vh;
}

/* Dashboard */

.dashboard-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.dashboard-heading {
    margin-bottom: 32px;
}

.dashboard-heading h1 {
    margin: 0 0 10px;
    font-size: 28px;
    color: var(--color-carbon-blue);
}

.dashboard-heading p {
    margin: 0;
    color: var(--color-gray-text);
    font-size: 15px;
}

/* GRID */

.subsystem-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
}

/* CARD */

.subsystem-card {
    min-height: 120px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-carbon-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 8px 18px rgba(16, 42, 67, 0.08);
    transition: all 0.28s ease;
    position: relative;
    overflow: hidden;
}

/* TOP COLOR BAR */

.subsystem-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 6px;
    width: 100%;
    background: #ccc;
}

/* ICON */

.subsystem-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    transition: all 0.28s ease;
}
.subsystem-card__icon i {
    font-size: 24px;
}

/* TITLE */

.subsystem-card__title {
    font-size: 16px;
    font-weight: 700;
    transition: all 0.25s ease;
}

/* CARD HOVER */

.subsystem-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.12);
}

/* MODULE COLORS */

/* MANAGEMENT */

.module-management::before {
    background: #2563EB;
}

.module-management .subsystem-card__icon {
    background: #2563EB;
}

.module-management:hover {
    background: #2563EB;
    color: white;
}

.module-management:hover .subsystem-card__icon {
    background: white;
    color: #2563EB;
}

/* COMMERCE */

.module-commerce::before {
    background: #16A34A;
}

.module-commerce .subsystem-card__icon {
    background: #16A34A;
}

.module-commerce:hover {
    background: #16A34A;
    color: white;
}

.module-commerce:hover .subsystem-card__icon {
    background: white;
    color: #16A34A;
}

/* INVENTORY */

.module-inventory::before {
    background: #D97706;
}

.module-inventory .subsystem-card__icon {
    background: #D97706;
}

.module-inventory:hover {
    background: #D97706;
    color: white;
}

.module-inventory:hover .subsystem-card__icon {
    background: white;
    color: #D97706;
}

/* PRODUCTION */

.module-production::before {
    background: #0F766E;
}

.module-production .subsystem-card__icon {
    background: #0F766E;
}

.module-production:hover {
    background: #0F766E;
    color: white;
}

.module-production:hover .subsystem-card__icon {
    background: white;
    color: #0F766E;
}

/* SALES */

.module-sales::before {
    background: #9333EA;
}

.module-sales .subsystem-card__icon {
    background: #9333EA;
}

.module-sales:hover {
    background: #9333EA;
    color: white;
}

.module-sales:hover .subsystem-card__icon {
    background: white;
    color: #9333EA;
}

/* REPORTS */

.module-reports::before {
    background: #DC2626;
}

.module-reports .subsystem-card__icon {
    background: #DC2626;
}

.module-reports:hover {
    background: #DC2626;
    color: white;
}

.module-reports:hover .subsystem-card__icon {
    background: white;
    color: #DC2626;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .subsystem-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .subsystem-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .subsystem-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .subsystem-grid {
        grid-template-columns: 1fr;
    }
}


















/**********************begin customer **********/
.erp-modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.45);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal-content{
    background:#fff;
    padding:25px;
    border-radius:8px;
    width:650px;
    max-width:90%;
}

/**********************end customer **********/
/**********************begin inv_panel **********/
body {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    background: #f3f4f6;
}

.main-header {
    height: 70px;
    background: #102A43;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.logo-img {
    height: 40px;
}

.logo-text {
    font-weight: 700;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

.page-wrapper {
    padding-top: 70px;
}

.page-with-sidebar {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 70px);
}

.erp-sidebar {
    width: 270px;
    background: #102A43;
    color: #fff;
    min-height: calc(100vh - 70px);
    position: fixed;
    top: 70px;
    right: 0;
    overflow-y: auto;
}

.page-content {
    margin-right: 270px;
    width: calc(100% - 270px);
    padding: 24px;
}

.sidebar-header {
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #C46A2B;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    transition: 0.3s;
}

.menu-link:hover {
    background: #1B3A57;
    color: #C46A2B;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #0B1F33;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.menu-item:hover .submenu {
    max-height: 400px;
}

.submenu li a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    padding: 10px 42px;
    transition: 0.3s;
}

.submenu li a:hover {
    color: #C46A2B;
    background: rgba(255,255,255,0.03);
}

.form-box {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.form-header h2 {
    margin-top: 0;
    color: #102A43;
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 12px;
    font-family: 'Vazirmatn', sans-serif;
    box-sizing: border-box;
}

.buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    height: 44px;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
}

.btn-login {
    background: #C46A2B;
    color: #fff;
}

.btn-reset {
    background: #e5e7eb;
    color: #111827;
}

.alert-success-box {
    padding: 10px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-error-box {
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-error-box ul {
    margin: 0;
    padding-right: 20px;
}
/*********************begin custome***********/
.textarea-control {
    width: 100%;
    border: 1px solid #d6dbe6;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    padding: 12px 14px;
    transition: all 0.2s ease;
    outline: none;
}

.textarea-control {
    min-height: 95px;
    resize: vertical;
    line-height: 1.9;
    font-family: inherit;
}

.form-control:focus,
.textarea-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fdfefe;
}
/*********************end customers report*************/
.report-search {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
}

.report-search input {
    flex: 1;
    border: 1px solid #d6dbe6;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    color: #1f2937;
    background: #ffffff;
}

.report-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/**********************begin users report ***********/
/* وضعیت فعال/غیرفعال */
.status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}
.status-inactive {
    background-color: #dfc2c4;
    color:#b02a37;
}
/* نشانگر تعداد */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.badge-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* دکمه‌های آیکون‌دار داخل جدول */
.btn-icon {
    background: none;
    border: 1px solid black;
    cursor: pointer;
    padding: 5px;
    color: #b02a37;
    /*color: #64748b;*/
    /*transition: color 0.2s;*/
}

.btn-icon:hover {
    color: #2563eb;
}

.btn-icon.delete:hover {
    color: #dc2626;
}

.font-bold {
    font-weight: 700;
    color: #111827;
}

/**********************end users report ***********/
/**********************begin table ***********/
table {
    border-collapse: collapse;
    width: 100%;
}

td, th {
    border: 1px solid #ddd;
    padding: 8px;
}

tr:nth-child(even){background-color: #f2f2f2;}

tr:hover {background-color: #ddd;}

th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #04AA6D;
    color: white;
}
/**********************end table *************/
/**********************begin edit user ***********/

 .btn-edit-user {
     background-color: #f59e0b;
     color: #fff;
     border: none;
     border-radius: 8px;
     padding: 8px 16px;
     font-family: inherit;
     font-size: 13px;
     font-weight: 700;
     cursor: pointer;
     transition: 0.3s ease;
 }

.btn-edit-user:hover {
    background-color: #d97706;
}

.custom-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-modal.show {
    display: flex;
}

.custom-modal-content {
    width: 100%;
    max-width: 700px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #64748b;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 22px;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.form-control {
    height: 44px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 22px 22px;
}

.btn-save-user {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
}

.btn-cancel {
    background: #e5e7eb;
    color: #334155;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 768px) {
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
}


/**********************end edit user ***********/
/**********************begin register user ***********/
 :root {
     --primary: #1d4ed8;
     --primary-hover: #1e40af;
     --primary-soft: rgba(29, 78, 216, 0.08);

     --secondary: #0f172a;
     --text-main: #1e293b;
     --text-muted: #64748b;

     --bg-main: #f1f5f9;
     --card-bg: #ffffff;
     --input-bg: #f8fafc;

     --border: #dbe3ee;
     --border-focus: #2563eb;

     --success-bg: #dcfce7;
     --success-text: #166534;
     --success-border: #86efac;

     --danger-bg: #fee2e2;
     --danger-text: #991b1b;
     --danger-border: #fecaca;

     --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
     --radius-lg: 18px;
     --radius-md: 12px;
     --radius-sm: 10px;
 }

* {
    box-sizing: border-box;
}

.register-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Vazirmatn", sans-serif;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(15, 23, 42, 0.03)),
        var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--text-main);
}

.register-wrapper {
    width: 100%;
    max-width: 560px;
}

.register-card {
    background: var(--card-bg);
    width: 100%;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.register-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), #3b82f6, #60a5fa);
}

.register-header {
    text-align: center;
    margin-bottom: 28px;
}

.register-header .logo-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.register-header h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
}

.register-header p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.9;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 2;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.alert-danger {
    background-color: var(--danger-bg);
    color: var(--danger-text);
    border-color: var(--danger-border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background-color: var(--input-bg);
    transition: all 0.25s ease;
}

.form-control::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.form-control.ltr {
    direction: ltr;
    text-align: left;
}

.error-text {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

.form-actions {
    margin-top: 22px;
}

.btn-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.22);
}

.btn-submit:active {
    transform: translateY(0);
}

.login-link {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-muted);
}

.login-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.login-link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.form-footer-note {
    margin-top: 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.9;
}

@media (max-width: 640px) {
    .register-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    .register-header h1 {
        font-size: 21px;
    }

    .register-header p {
        font-size: 13px;
    }
}

/**********************end register user ***********/
/* =========================================
   Unified Grid & Form Layout (چیدمان یکپارچه گرید)
========================================= */
.grid-container,
.modal-form-grid,
.form-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px 20px !important;
}

.full-width,
.form-group.full-width {
    grid-column: 1 / -1 !important;
}

@media (max-width: 640px) {
    .grid-container,
    .modal-form-grid,
    .form-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Header responsive layout */
@media (max-width: 768px) {
    .erp-header {
        height: 68px;
        padding: 0 14px;
    }

    .erp-logo {
        gap: 8px;
        font-size: 15px;
    }

    .erp-logo img {
        width: 38px;
        height: 38px;
    }

    .erp-header__left {
        gap: 10px;
        min-width: 0;
    }

    .erp-user {
        gap: 6px;
        min-width: 0;
    }

    .erp-user__info {
        gap: 5px;
        min-width: 0;
    }

    .erp-user__name {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }

    .erp-user__date,
    .erp-user__time {
        font-size: 10px;
    }

    }

@media (max-width: 480px) {
    .erp-header {
        padding: 0 10px;
    }

    .erp-logo span {
        display: none;
    }

    .erp-header__left {
        gap: 7px;
    }

    .erp-user__name {
        max-width: 88px;
    }

    .erp-user__date,
    .erp-user__time {
        font-size: 9px;
    }
}


/* وضعیت کاربر - سوییچ فعال/غیرفعال */
.user-status-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    cursor: pointer;
    user-select: none;
}

.user-status-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.user-status-slider {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color .2s ease;
    flex: 0 0 auto;
}

.user-status-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: transform .2s ease;
}

.user-status-switch input[type="checkbox"]:checked + .user-status-slider {
    background: #2F7D4A;
}

.user-status-switch input[type="checkbox"]:checked + .user-status-slider::after {
    transform: translateX(-22px);
}

.user-status-text {
    min-width: 48px;
    font-size: 13px;
    font-weight: 600;
}


/* Header user menu */
.erp-user__trigger{border:0;background:transparent;padding:0;margin:0;font:inherit;cursor:pointer;direction:rtl;}
.erp-user__trigger:focus-visible{outline:2px solid rgba(196,106,43,.85);outline-offset:4px;border-radius:10px;}
.erp-user-menu{position:absolute;top:calc(100% + 10px);left:32px;width:250px;background:#fff;border:1px solid #D1D5DB;border-radius:12px;box-shadow:0 10px 28px rgba(16,42,67,.18);padding:7px;direction:rtl;text-align:right;z-index:1400;}
.erp-user-menu[hidden]{display:none;}
.erp-user-menu__item{width:100%;min-height:44px;display:flex;align-items:center;gap:12px;padding:9px 11px;border:0;border-radius:9px;background:transparent;color:#102A43;text-decoration:none;font-family:"Vazirmatn",sans-serif;font-size:13px;font-weight:600;text-align:right;cursor:pointer;transition:background-color .2s ease,color .2s ease;}
.erp-user-menu__item:hover{background:#F3F4F6;color:#C46A2B;}
.erp-user-menu__item i{width:20px;flex:0 0 20px;text-align:center;font-size:15px;color:#C46A2B;}
.erp-user-menu__logout-form{margin:0;padding-top:4px;border-top:1px solid #E5E7EB;}
.erp-user-menu__logout{color:#DC2626;}
.erp-user-menu__logout i{color:#DC2626;}
.erp-user-menu__logout:hover{background:#FEF2F2;color:#B91C1C;}
@media(max-width:768px){.erp-user-menu{left:14px;width:min(250px,calc(100vw - 28px));}}


/* Change password modal */
body.erp-password-modal-open{overflow:hidden;}
.erp-password-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.52);z-index:10000;direction:rtl;}
.erp-password-modal[hidden]{display:none;}
.erp-password-modal__content{width:100%;max-width:500px;background:#fff;border:1px solid #D1D5DB;border-radius:16px;box-shadow:0 20px 50px rgba(16,42,67,.22);overflow:hidden;}
.erp-password-modal__header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #E5E7EB;background:#F8FAFC;}
.erp-password-modal__header>div{display:flex;align-items:center;gap:10px;}
.erp-password-modal__header h3{margin:0;color:#102A43;font-size:17px;font-weight:800;}
.erp-password-modal__icon{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:rgba(196,106,43,.10);color:#C46A2B;}
.erp-password-modal__close{width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:#64748B;cursor:pointer;font-size:20px;}
.erp-password-modal__close:hover{background:#F1F5F9;color:#102A43;}
.erp-password-form{padding:20px;}
.erp-password-form__fields{display:grid;grid-template-columns:1fr;gap:16px;}
.erp-password-form__group{display:flex;flex-direction:column;gap:7px;}
.erp-password-form__group label{font-size:13px;font-weight:700;color:#334155;}
.erp-password-form__input{width:100%;height:44px;border:1px solid #DBE3EE;border-radius:10px;padding:0 12px;font-family:"Vazirmatn",sans-serif;font-size:14px;color:#1E293B;background:#fff;outline:none;direction:ltr;text-align:left;transition:border-color .2s ease,box-shadow .2s ease;}
.erp-password-form__input:focus{border-color:#2563EB;box-shadow:0 0 0 3px rgba(37,99,235,.10);}
.erp-password-form__group small{font-size:11px;color:#64748B;line-height:1.8;}
.erp-password-form__actions{display:flex;justify-content:flex-start;gap:10px;margin-top:22px;}
.erp-password-form__submit,.erp-password-form__cancel{height:42px;border:0;border-radius:10px;padding:0 18px;font-family:"Vazirmatn",sans-serif;font-size:13px;font-weight:700;cursor:pointer;}
.erp-password-form__submit{background:#C46A2B;color:#fff;}
.erp-password-form__submit:hover{background:#A9551F;}
.erp-password-form__submit:disabled{opacity:.65;cursor:wait;}
.erp-password-form__cancel{background:#E5E7EB;color:#334155;}
.erp-password-form__cancel:hover{background:#D1D5DB;}
.erp-password-modal__errors{margin:16px 20px 0;padding:10px 14px;border:1px solid #FECACA;border-radius:10px;background:#FEF2F2;color:#B91C1C;font-size:12px;line-height:1.9;}
.erp-password-modal__errors ul{margin:0;padding-right:18px;}
@media(max-width:520px){.erp-password-modal{padding:12px;}.erp-password-modal__content{border-radius:14px;}.erp-password-form{padding:16px;}.erp-password-modal__header{padding:16px;}.erp-password-modal__errors{margin:14px 16px 0;}.erp-password-form__actions{flex-direction:column-reverse;}.erp-password-form__submit,.erp-password-form__cancel{width:100%;}}


/* Account information modal */
body.erp-account-modal-open{overflow:hidden;}
.erp-account-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.52);z-index:10000;direction:rtl;}
.erp-account-modal[hidden]{display:none;}
.erp-account-modal__content{width:100%;max-width:760px;max-height:90vh;overflow:auto;background:#fff;border:1px solid #D1D5DB;border-radius:16px;box-shadow:0 20px 50px rgba(16,42,67,.22);}
.erp-account-modal__header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #E5E7EB;background:#F8FAFC;}
.erp-account-modal__header>div{display:flex;align-items:center;gap:10px;}
.erp-account-modal__header h3{margin:0;color:#102A43;font-size:17px;font-weight:800;}
.erp-account-modal__icon{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:rgba(196,106,43,.10);color:#C46A2B;}
.erp-account-modal__close{width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:#64748B;cursor:pointer;font-size:20px;}
.erp-account-modal__close:hover{background:#F1F5F9;color:#102A43;}
.erp-account-form{padding:20px;}
.erp-account-form__grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.erp-account-form__group{display:flex;flex-direction:column;gap:7px;}
.erp-account-form__group label{font-size:13px;font-weight:700;color:#334155;}
.erp-account-form__input{width:100%;height:44px;border:1px solid #DBE3EE;border-radius:10px;padding:0 12px;font-family:"Vazirmatn",sans-serif;font-size:14px;color:#1E293B;background:#fff;outline:none;direction:rtl;transition:border-color .2s ease,box-shadow .2s ease;}
.erp-account-form__input[readonly]{background:#F8FAFC;color:#64748B;cursor:not-allowed;}
.erp-account-form__input:focus:not([readonly]){border-color:#2563EB;box-shadow:0 0 0 3px rgba(37,99,235,.10);}
.erp-account-form__file{width:100%;min-height:44px;border:1px dashed #CBD5E1;border-radius:10px;padding:9px 10px;font-family:"Vazirmatn",sans-serif;font-size:12px;background:#F8FAFC;}
.erp-account-form__group small{font-size:11px;color:#64748B;line-height:1.8;}
.erp-account-form__image-preview{width:76px;height:76px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#F3F4F6;color:#64748B;font-size:20px;font-weight:800;border:1px solid #E5E7EB;margin-bottom:2px;}
.erp-account-form__image-preview img{width:100%;height:100%;object-fit:cover;}
.erp-account-form__actions{display:flex;justify-content:flex-start;gap:10px;margin-top:22px;}
.erp-account-form__submit,.erp-account-form__cancel{height:42px;border:0;border-radius:10px;padding:0 18px;font-family:"Vazirmatn",sans-serif;font-size:13px;font-weight:700;cursor:pointer;}
.erp-account-form__submit{background:#C46A2B;color:#fff;}
.erp-account-form__submit:hover{background:#A9551F;}
.erp-account-form__submit:disabled{opacity:.65;cursor:wait;}
.erp-account-form__cancel{background:#E5E7EB;color:#334155;}
.erp-account-form__cancel:hover{background:#D1D5DB;}
@media(max-width:640px){.erp-account-modal{padding:12px;}.erp-account-modal__content{max-height:94vh;border-radius:14px;}.erp-account-form{padding:16px;}.erp-account-modal__header{padding:16px;}.erp-account-form__grid{grid-template-columns:1fr;}.erp-account-form__actions{flex-direction:column-reverse;}.erp-account-form__submit,.erp-account-form__cancel{width:100%;}}

/* Profile stock movement chart */
.profile-stock-chart-panel{margin:0 0 24px;padding:18px;border:1px solid #D1D5DB;border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(16,42,67,.08);direction:rtl;}
.profile-stock-chart-panel[hidden]{display:none;}
.profile-stock-chart-panel__header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px;}
.profile-stock-chart-panel__header h3{margin:0 0 6px;color:#102A43;font-size:16px;font-weight:800;}
.profile-stock-chart-panel__header h3 i{color:#C46A2B;margin-left:7px;}
.profile-stock-chart-breadcrumb{font-size:12px;color:#64748B;font-weight:600;}
.profile-stock-chart-panel__controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.profile-stock-chart-panel__controls label{font-size:12px;font-weight:700;color:#334155;}
.profile-stock-chart-panel__controls select{height:40px;min-width:120px;padding:0 10px;border:1px solid #DBE3EE;border-radius:9px;background:#fff;color:#1E293B;font-family:"Vazirmatn",sans-serif;}
.profile-stock-chart-bars{height:390px;display:flex;align-items:flex-end;gap:10px;overflow-x:auto;padding:22px 12px 0;border-bottom:1px solid #CBD5E1;direction:rtl;}
.profile-stock-chart-group{min-width:72px;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:9px;}
.profile-stock-chart-columns{height:100%;width:64px;display:flex;align-items:flex-end;justify-content:center;gap:5px;border-bottom:0;}
.profile-stock-chart-bar{position:relative;width:27px;min-height:0;border:0;border-radius:7px 7px 0 0;cursor:pointer;padding:0;background:#CBD5E1;transition:filter .18s ease,transform .18s ease;}
.profile-stock-chart-bar:hover{filter:brightness(.92);transform:translateY(-2px);}
.profile-stock-chart-bar--in{background:#C46A2B;}
.profile-stock-chart-bar--out{background:#64748B;}
.profile-stock-chart-bar span{position:absolute;bottom:100%;right:50%;transform:translateX(50%);margin-bottom:5px;white-space:nowrap;font-size:10px;font-weight:700;color:#334155;}
.profile-stock-chart-month{font-size:11px;font-weight:700;color:#475569;white-space:nowrap;}
.profile-stock-chart-legend{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;margin-top:14px;color:#475569;font-size:12px;font-weight:600;}
.profile-stock-chart-legend span{display:inline-flex;align-items:center;gap:7px;}
.profile-stock-chart-legend i{width:12px;height:12px;border-radius:3px;display:inline-block;}
.profile-stock-chart-legend__in{background:#16A34A;}.profile-stock-chart-legend__out{background:#DC2626;}
.profile-stock-chart-empty{min-height:260px;display:flex;align-items:center;justify-content:center;color:#64748B;font-size:13px;}
.profile-stock-chart-profile-list{display:flex;flex-direction:column;gap:14px;padding:12px 4px;}
.profile-stock-chart-profile-row{display:flex;flex-direction:column;gap:7px;}
.profile-stock-chart-profile-meta{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#475569;}
.profile-stock-chart-profile-meta strong{color:#102A43;}
.profile-stock-chart-profile-track{height:20px;background:#F1F5F9;border-radius:999px;overflow:hidden;direction:rtl;}
.profile-stock-chart-profile-fill{height:100%;border-radius:999px;min-width:3px;transition:width .25s ease;}
.profile-stock-chart-profile-fill--in{background:#16A34A;}.profile-stock-chart-profile-fill--out{background:#DC2626;}
@media(max-width:640px){.profile-stock-chart-panel{padding:14px;}.profile-stock-chart-bars{height:330px;gap:7px;padding-left:4px;padding-right:4px;}.profile-stock-chart-group{min-width:64px;}.profile-stock-chart-columns{width:58px;}.profile-stock-chart-bar{width:24px;}.profile-stock-chart-bar span{font-size:9px;}.profile-stock-chart-panel__controls{width:100%;}.profile-stock-chart-panel__controls select{flex:1;}.profile-stock-chart-panel__controls .btn{flex:1;}}


/* Header quick actions */
.erp-header__left{
    direction:ltr;
}
.erp-header__quick-actions{
    display:flex;
    align-items:center;
    gap:8px;
    direction:rtl;
}
.erp-header__quick-action{
    width:34px;
    height:38px;
    min-width:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    border:0;
    background:transparent;
    color:rgba(255,255,255,.9);
    cursor:pointer;
    font-size:17px;
    line-height:1;
    transition:color .2s ease,transform .2s ease;
}
.erp-header__quick-action:hover{
    color:#fff;
    transform:translateY(-1px);
}
.erp-header__quick-action:focus-visible{
    outline:2px solid rgba(196,106,43,.85);
    outline-offset:3px;
    border-radius:8px;
}
.erp-header__quick-action i{
    pointer-events:none;
}
@media(max-width:768px){
    .erp-header{
        padding-inline:14px;
    }
    .erp-header__left{
        gap:9px;
    }
    .erp-header__quick-actions{
        gap:4px;
    }
    .erp-header__quick-action{
        width:30px;
        min-width:30px;
        height:34px;
        font-size:15px;
    }
}


/* Header stock alerts */
body.erp-alerts-modal-open{overflow:hidden;}
.erp-header__quick-action{position:relative;}
.erp-header__quick-action[data-tooltip]::after{content:attr(data-tooltip);}
.erp-header__alert-badge{
    position:absolute;
    top:-3px;
    right:-4px;
    min-width:18px;
    height:18px;
    padding:0 4px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#DC2626;
    color:#fff;
    border:2px solid var(--color-carbon-blue);
    font-family:"Vazirmatn",sans-serif;
    font-size:10px;
    font-weight:800;
    line-height:1;
    direction:ltr;
    box-sizing:border-box;
}
.erp-header__alert-badge[hidden]{display:none;}
.erp-header__quick-action--alert{
    animation:erp-header-bell-shake 1.35s ease-in-out infinite;
    transform-origin:50% 18%;
}
@keyframes erp-header-bell-shake{
    0%,100%{transform:rotate(0deg);}
    10%{transform:rotate(10deg);}
    20%{transform:rotate(-9deg);}
    30%{transform:rotate(7deg);}
    40%{transform:rotate(-5deg);}
    50%{transform:rotate(0deg);}
}
.erp-header__quick-action[title]{position:relative;}
.erp-header__quick-action[title]::after{
    content:attr(title);
    position:absolute;
    top:calc(100% + 9px);
    right:50%;
    transform:translateX(50%);
    padding:6px 9px;
    border-radius:7px;
    background:#102A43;
    color:#fff;
    font-family:"Vazirmatn",sans-serif;
    font-size:11px;
    font-weight:600;
    line-height:1.4;
    white-space:nowrap;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .16s ease,visibility .16s ease;
    z-index:1600;
}
.erp-header__quick-action[title]:hover::after,
.erp-header__quick-action[title]:focus-visible::after{
    opacity:1;
    visibility:visible;
}
.erp-alerts-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.52);z-index:10000;direction:rtl;}
.erp-alerts-modal[hidden]{display:none;}
.erp-alerts-modal__content{width:100%;max-width:500px;max-height:80vh;background:#fff;border:1px solid #D1D5DB;border-radius:16px;box-shadow:0 20px 50px rgba(16,42,67,.22);overflow:hidden;}
.erp-alerts-modal__header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #E5E7EB;background:#F8FAFC;}
.erp-alerts-modal__header-title{display:flex;align-items:center;gap:10px;}
.erp-alerts-modal__header-actions{display:flex;align-items:center;gap:6px;}
.erp-alerts-modal__header>div{display:flex;align-items:center;gap:10px;}
.erp-alerts-modal__header h3{margin:0;color:#102A43;font-size:17px;font-weight:800;}
.erp-alerts-modal__icon{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:rgba(220,38,38,.10);color:#DC2626;}
.erp-alerts-modal__history,.erp-alerts-modal__close{width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:#64748B;cursor:pointer;font-size:20px;}
.erp-alerts-modal__history,.erp-alerts-modal__close{height:34px;border:0;border-radius:9px;background:transparent;color:#64748B;cursor:pointer;font-size:17px;display:inline-flex;align-items:center;justify-content:center;}
.erp-alerts-modal__history:hover,.erp-alerts-modal__history:focus-visible{background:#FEF2F2;color:#DC2626;}
.erp-alerts-modal__close:hover{background:#F1F5F9;color:#102A43;}
.erp-alerts-modal__history:focus-visible,.erp-alerts-modal__close:focus-visible{outline:2px solid rgba(220,38,38,.20);outline-offset:2px;}
.erp-alerts-modal__body{padding:16px 20px;max-height:calc(80vh - 74px);overflow:auto;}
.erp-alerts-modal__list{display:flex;flex-direction:column;gap:10px;}
.erp-alerts-modal__item{display:flex;align-items:flex-start;gap:10px;padding:12px 13px;border:1px solid #FECACA;border-radius:10px;background:#FEF2F2;color:#334155;}
.erp-alerts-modal__item-icon{flex:0 0 28px;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#fff;color:#DC2626;}
.erp-alerts-modal__item p{margin:2px 0 0;font-size:13px;font-weight:600;line-height:2;color:#334155;flex:1;}
.erp-alerts-modal__ack{flex:0 0 32px;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;margin-inline-start:auto;border:1px solid #FCA5A5;border-radius:8px;background:#fff;color:#64748B;cursor:pointer;transition:background-color .16s ease,color .16s ease,border-color .16s ease;}
.erp-alerts-modal__ack:hover,.erp-alerts-modal__ack:focus-visible{background:#FEE2E2;color:#DC2626;border-color:#F87171;}
.erp-alerts-modal__ack:focus-visible{outline:2px solid rgba(220,38,38,.25);outline-offset:2px;}
.erp-alerts-modal__empty{padding:28px 12px;text-align:center;color:#64748B;font-size:13px;line-height:2;}
.erp-alerts-modal__history-item{padding:12px 13px;border:1px solid #E2E8F0;border-radius:10px;background:#F8FAFC;color:#334155;}
.erp-alerts-modal__history-item-head{display:flex;align-items:center;gap:9px;font-size:13px;color:#102A43;}
.erp-alerts-modal__history-icon{flex:0 0 28px;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#ECFDF5;color:#16A34A;}
.erp-alerts-modal__history-meta{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:9px;font-size:11px;font-weight:600;color:#64748B;}
.erp-alerts-modal__history-date{margin-top:9px;padding-top:8px;border-top:1px solid #E2E8F0;font-size:10px;color:#94A3B8;}
.erp-alerts-modal__history-date i{margin-left:4px;}
@media(max-width:520px){
    .erp-alerts-modal{padding:12px;}
    .erp-alerts-modal__content{max-height:94vh;border-radius:14px;}
    .erp-alerts-modal__header{padding:16px;}
    .erp-alerts-modal__body{padding:14px 16px;max-height:calc(94vh - 70px);}
    .erp-header__alert-badge{top:-2px;right:-3px;min-width:17px;height:17px;font-size:9px;}
}
