.w-17 {
    width: 17px;
}

.w-14 {
    width: 14px;
}

.h-16 {
    height: 16px;
}

.h-17 {
    height: 17px;
}

.width-50 {
    width: 50px !important;
}

.width-85 {
    width: 85px !important;
}

.indicate-text {
    font-size: 12px;
    color: red;
}

.form-control.error {
    border-color: red;
    padding: 0.375rem 0.75rem;
}

.image-wrapper.error {
    border-color: red;
    padding: 0.375rem 0.75rem;
}

.error-alert {
    font-size: 11px;
    color: red;
}

.error {
    color: red !important;
}

.budget-form .form-control[readonly] {
    background-color: #fff !important;
}

.budget-form ::placeholder {
    font-size: 12px;
}

.avatar {
    background: #292be9;
    border-radius: 50%;
    color: #e3eaef;
    display: inline-block;
    font-size: 16px;
    font-weight: 300;
    margin: 0;
    position: relative;
    vertical-align: middle;
    line-height: 1.28;
    height: 45px;
    width: 45px;
}

.avatar.avatar-sm {
    font-size: 12px;
    height: 30px;
    width: 30px;
}

.avatar img {
    border-radius: 50%;
    height: 100%;
    position: relative;
    width: 100%;
    z-index: 1;
}

.btn-custom-warning {
    background-color: #292be9 !important;
    color: #fff;
}

.btn-custom-warning:hover {
    color: #fff;
}

.custom-warning-color {
    color: #292be9;
}

.roles-permissions table td {
    color: black;
}

.img-preview {
    margin-top: 4px;
    height: auto;
    width: 100px;
}

.side-bar-logo img {
    height: auto;
}

.folders-files tr a {
    font-size: 18px !important;
}

.gradient-row {
    background: linear-gradient(270deg, #dbe4df 0%, #65e4a6 50%, #ffffff 100%);
}

@media print {
    .table-two thead td {
        padding: 0px !important;
    }
}

.order-form-section label {
    left: 10px;
    white-space: nowrap;
}

.table-form-section .responsive-table,
.party-list-folder-table {
    min-height: unset !important;
}

.custom-dropdown-action .dropdown-menu a {
    padding: 6px 15px !important;
}

.table-title-three h5 {
    font-weight: 600 !important;
}

.loss-profit-custom-color1 {
    background-color: rgba(255, 132, 0, 0.15);
}

.loss-profit-custom-color2 {
    background-color: rgba(255, 181, 101, 1);
    font-weight: bold;
}

.production-wrap {
    padding-right: 60px;
}

.print-wrapper .responsive-table {
    min-height: unset;
}

.print-wrapper .table th,
.print-wrapper .table td {
    white-space: nowrap;
}

.print-wrapper {
    min-height: 700px !important;
}

.table-header h3,
.table-header h4 {
    font-weight: 700;
}

.erp-new-invice .invice-detaisl {
    padding: 20px 0;
}

.commercial-invoice {
    margin-bottom: 30px;
}

.invoice-payment-details {
    margin-top: 40px;
}

.erp-new-invice {
    min-height: 650px !important;
}

.dashboard-card-body strong {
    font-size: 16px;
    font-weight: 400;
    color: #7e7e7e;
}

#monthly-statistics {
    width: 100% !important;
    max-height: 290px !important;
    min-height: 210px;
}

#salesRatio {
    width: 100% !important;
    max-height: 290px !important;
    min-height: 210px;
}

#sales-by-country {
    width: 100% !important;
    max-height: 220px !important;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #292be9;
}

.nav-link {
    color: #292be9;
}

.role-reset-btn {
    font-weight: bold;
    color: #292be9;
    border: 1px solid #292be9;
    padding: 0.2rem 0.5rem !important;
}

.role-reset-btn:hover {
    color: #fff !important;
    background-color: #292be9;
    border: 1px solid transparent;
}

/* =========================
   New Design Sidebar (safe overrides)
   Scope: only when `.nd-sidebar` is present
========================= */
.nd-sidebar.side-bar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    padding: 8px 10px;
    width: 240px;
    left: 10px;
    top: 10px;
    height: calc(100% - 20px);
    overflow-y: auto;
    overflow-x: hidden;
}

.nd-sidebar {
    --nd-sidebar-item-radius: 7px;
    --nd-sidebar-item-height: 32px;
    --nd-sidebar-font-size: 14px;
    --nd-sidebar-icon-size: 19px;
    --nd-sidebar-chevron-size: 13px;
    --nd-sidebar-primary: #2563eb; /* Tailwind blue-600 (new design default) */
    --nd-sidebar-hover: #f3f4f6; /* gray-100 (slimmer look) */
    --nd-sidebar-text: #0f172a; /* slate-900 */
    --nd-sidebar-muted: #64748b; /* slate-500 */
    --nd-sidebar-link: #111827; /* gray-900 (like screenshot) */
}

.nd-sidebar,
.nd-sidebar * {
    font-family:
        "Manrope",
        "Roboto",
        system-ui,
        -apple-system,
        "Segoe UI",
        Arial,
        sans-serif;
}

.nd-sidebar .side-bar-logo {
    padding: 8px 8px 8px 8px;
    border-bottom: 1px solid #eef2f7;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 2;
    overflow: visible;
}

.nd-sidebar__brand {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--nd-sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nd-sidebar__brandShort {
    display: none;
}

.nd-sidebar.side-bar.active .nd-sidebar__brand {
    padding: 6px 0;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}

.nd-sidebar.side-bar.active .nd-sidebar__brandFull {
    display: none;
}

.nd-sidebar.side-bar.active .nd-sidebar__brandShort {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #111827;
    margin: 0 auto;
}

.nd-sidebar .close-btn {
    color: #0f172a;
}

.nd-sidebar .side-bar-manu ul {
    padding: 6px 0 0 0;
}

.nd-sidebar__category {
    margin: 6px 0 4px 0;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280; /* gray-500 */
    user-select: none;
}

.nd-sidebar .side-bar-manu li {
    margin: 2px 0;
    font-size: 14px;
}

/* Extra spacing between top-level items only */
.nd-sidebar .side-bar-manu > ul > li {
    margin: 6px 0;
}

/* =====================================================
   Global New-Design UI Skin (tables, fields, buttons)
   Scope: section-container only (no backend logic changes)
   ===================================================== */

/* Global typography to match new design template */
body,
button,
input,
select,
textarea {
    font-family:
        "Manrope",
        "Roboto",
        system-ui,
        -apple-system,
        "Segoe UI",
        Arial,
        sans-serif !important;
    font-weight: 500;
    letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-container .table-header h3,
.section-container .table-header h4 {
    font-family:
        "Manrope",
        "Roboto",
        system-ui,
        -apple-system,
        "Segoe UI",
        Arial,
        sans-serif !important;
    font-weight: 700 !important;
}

.section-container .table td,
.section-container .table th,
.section-container .form-control,
.section-container label,
.section-container .nice-select,
.section-container .select2-container .select2-selection--single {
    font-family:
        "Manrope",
        "Roboto",
        system-ui,
        -apple-system,
        "Segoe UI",
        Arial,
        sans-serif !important;
}

.section-container {
    --nd-primary: #2563eb;
    --nd-primary-hover: #1d4ed8;
    --nd-border: #e5e7eb;
    --nd-border-soft: #edf2f7;
    --nd-text: #0f172a;
    --nd-text-muted: #64748b;
    --nd-bg: #ffffff;
    --nd-bg-soft: #f8fafc;
    --nd-radius: 12px;
}

/* Generic cards/wrappers around table pages */
.section-container .erp-table-section,
.section-container .dashboard-card,
.section-container .cards {
    border-radius: var(--nd-radius);
}

/* Table page container polish */
.section-container .erp-table-section {
    background: #ffffff !important;
    border: 1px solid var(--nd-border-soft) !important;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 12px 28px rgba(15, 23, 42, 0.06) !important;
    /* margin-top: space below navbar; padding-top: was lost when shorthand padding replaced style.css */
    margin-top: 14px !important;
    padding: 22px 16px 16px !important;
    margin-bottom: 18px;
}

.section-container .erp-table-section .table-header {
    margin-bottom: 12px;
}

/* Summary stat cards (parties, dues, party-dues, loss-profit, transactions, party-ledger, etc.) */
.section-container .total-count-area {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0 20px;
}

.section-container .total-count-area .count-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
    border: 1px solid #e8eef5 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 8px 18px rgba(15, 23, 42, 0.05) !important;
    padding: 12px 14px 12px 78px !important;
    overflow: hidden;
}

.section-container .total-count-area .count-item::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #dcfce7;
}

.section-container .total-count-area .count-item::after {
    content: "$";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    font-weight: 700;
    color: #22c55e;
}

.section-container .total-count-area .count-item h5 {
    order: 2;
    margin: 1px 0 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.08;
}

.section-container .total-count-area .count-item p {
    order: 1;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #475467 !important;
    line-height: 1.2;
}

.section-container .total-count-area .count-item.light-blue::before {
    background: #dcfce7;
}

.section-container .total-count-area .count-item.light-blue::after {
    content: "$";
    color: #22c55e;
}

.section-container .total-count-area .count-item.light-green::before {
    background: #dbeafe;
}

.section-container .total-count-area .count-item.light-green::after {
    content: "Q";
    color: #3b82f6;
}

.section-container .total-count-area .count-item.light-orange::before {
    background: #ede9fe;
}

.section-container .total-count-area .count-item.light-orange::after {
    content: "@";
    color: #8b5cf6;
}

.section-container .total-count-area .count-item.light-red::before {
    background: #fee2e2;
}

.section-container .total-count-area .count-item.light-red::after {
    content: "!";
    color: #ef4444;
}

@media (max-width: 1199.98px) {
    .section-container .total-count-area {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .section-container .total-count-area {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .section-container .total-count-area .count-item {
        min-height: 78px;
        padding: 10px 12px 10px 66px !important;
    }

    .section-container .total-count-area .count-item::before,
    .section-container .total-count-area .count-item::after {
        left: 12px;
        width: 34px;
        height: 34px;
    }

    .section-container .total-count-area .count-item h5 {
        font-size: 16px !important;
    }

    .section-container .total-count-area .count-item p {
        font-size: 13px !important;
    }
}

/* ---------- Buttons ---------- */
.section-container .theme-btn,
.section-container .btn-custom-warning,
.section-container .btn.btn-primary,
.section-container .submit-btn {
    background: var(--nd-primary) !important;
    border: 1px solid var(--nd-primary) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        transform 120ms ease;
}

.section-container .theme-btn:hover,
.section-container .btn-custom-warning:hover,
.section-container .btn.btn-primary:hover,
.section-container .submit-btn:hover {
    background: var(--nd-primary-hover) !important;
    border-color: var(--nd-primary-hover) !important;
    color: #fff !important;
}

.section-container .theme-btn.border-btn,
.section-container .btn-outline-primary {
    background: #fff !important;
    border: 1px solid var(--nd-primary) !important;
    color: var(--nd-primary) !important;
}

.section-container .theme-btn.border-btn:hover,
.section-container .btn-outline-primary:hover {
    background: #eff6ff !important;
    color: var(--nd-primary-hover) !important;
    border-color: var(--nd-primary-hover) !important;
}

/* ---------- Inputs / Selects ---------- */
.section-container .form-control,
.section-container input[type="text"],
.section-container input[type="email"],
.section-container input[type="number"],
.section-container input[type="password"],
.section-container input[type="date"],
.section-container textarea {
    border: 1px solid var(--nd-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--nd-text) !important;
    min-height: 40px;
    box-shadow: none !important;
}

.section-container .form-control:focus,
.section-container input:focus,
.section-container textarea:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.section-container .nice-select,
.section-container .select2-container .select2-selection--single {
    border: 1px solid var(--nd-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    min-height: 40px !important;
    line-height: 38px !important;
    color: var(--nd-text) !important;
}

.section-container .nice-select .list,
.section-container .select2-dropdown {
    border: 1px solid var(--nd-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}

/* ---------- Table ---------- */
.section-container .responsive-table,
.section-container .table-form-section .responsive-table {
    border: 1px solid var(--nd-border-soft) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 10px 24px rgba(15, 23, 42, 0.05) !important;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.section-container .table {
    margin-bottom: 0;
    min-width: 100%;
    white-space: nowrap;
}

.section-container .table thead th,
.section-container .table th {
    background: #f8fafc !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--nd-border) !important;
}

.section-container .table th,
.section-container .table td {
    padding: 12px 14px !important;
    border-color: #eef2f7 !important;
    vertical-align: middle;
}

.section-container .table tbody tr {
    transition: background-color 150ms ease;
}

.section-container .table tbody tr:hover {
    background: #f9fbff !important;
}

/* ---------- DataTables controls ---------- */
.section-container .dataTables_wrapper .dataTables_filter label input,
.section-container .dataTables_wrapper .dataTables_length label select {
    border: 1px solid var(--nd-border) !important;
    border-radius: 10px !important;
    min-height: 38px;
    background: #fff !important;
}

.section-container .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid var(--nd-border) !important;
    background: #fff !important;
    color: #334155 !important;
}

.section-container
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button.current,
.section-container
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button.current:hover,
.section-container
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button:hover {
    background: var(--nd-primary) !important;
    border-color: var(--nd-primary) !important;
    color: #fff !important;
}

/* Tab buttons - navlink look */
.section-container .add-report-btn,
.section-container .add-order-btn {
    background: #ffffff !important;
    color: #2563eb !important;
}

.section-container .add-report-btn:hover,
.section-container .add-order-btn:hover {
    background: #ffffff !important;
    color: #2563eb !important;
}

.section-container .add-report-btn.active,
.section-container .add-order-btn.active,
.section-container .add-report-btn.nav-link.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

.section-container .add-report-btn.active:hover,
.section-container .add-report-btn.active:focus,
.section-container .add-report-btn.active:active,
.section-container .add-report-btn.nav-link.active:hover,
.section-container .add-report-btn.nav-link.active:focus,
.section-container .add-report-btn.nav-link.active:active,
.section-container .add-order-btn.active:hover,
.section-container .add-order-btn.active:focus,
.section-container .add-order-btn.active:active {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Form + buttons (color only) */
.section-container .order-form-section .modal-btn-ctg,
.section-container .order-form-section .input-group-append .input-group-text {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

.section-container .order-form-section .modal-btn-ctg:hover,
.section-container
    .order-form-section
    .input-group-append
    .input-group-text:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

/* Order summary top tab buttons (force new blue) */
.section-container .table-header .button-group {
    border-bottom-color: #2563eb !important;
}

.section-container .table-header .button-group a.active,
.section-container .add-order-btn {
    background: #2563eb !important;
    color: #ffffff !important;
}

.section-container .add-order-btn:hover,
.section-container .add-order-btn:focus,
.section-container .add-order-btn:active {
    color: #ffffff !important;
    background: #2563eb !important;
}

/* Form action buttons (Cancel/Save) stable hover colors */
.section-container .order-form-section .button-group .theme-btn.submit-btn,
.section-container
    .order-form-section
    .button-group
    .theme-btn:not(.border-btn) {
    background: #2563eb !important;
    border: 1px solid #2563eb !important;
    color: #ffffff !important;
}

.section-container
    .order-form-section
    .button-group
    .theme-btn.submit-btn:hover,
.section-container
    .order-form-section
    .button-group
    .theme-btn:not(.border-btn):hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.section-container .order-form-section .button-group .theme-btn.border-btn {
    background: #ffffff !important;
    border: 1px solid #2563eb !important;
    color: #2563eb !important;
}

.section-container
    .order-form-section
    .button-group
    .theme-btn.border-btn:hover {
    background: #eff6ff !important;
    border-color: #1d4ed8 !important;
    color: #1d4ed8 !important;
}

.section-container .table-header .button-group a:not(.active):hover {
    color: inherit !important;
}

.section-container .table-header .button-group .add-order-btn.active:hover,
.section-container .table-header .button-group .add-report-btn.active:hover {
    color: #ffffff !important;
    background: #2563eb !important;
}

/* ---------- Order Form (strong override) ---------- */
.section-container .order-form-section label {
    position: static !important;
    display: block !important;
    background: transparent !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    left: auto !important;
    top: auto !important;
    text-align: left !important;
}

.section-container .order-form-section .form-control,
.section-container .order-form-section input.form-control,
.section-container .order-form-section textarea.form-control {
    min-height: 42px !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    padding: 10px 12px !important;
    box-shadow: none !important;
}

.section-container .order-form-section .form-control::placeholder {
    color: #94a3b8 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.section-container .order-form-section .form-control:focus,
.section-container .order-form-section input:focus,
.section-container .order-form-section textarea:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.section-container .order-form-section .nice-select,
.section-container .order-form-section .table-select {
    min-height: 42px !important;
    line-height: 40px !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    padding-left: 12px !important;
}

.section-container .order-form-section .nice-select::after {
    border-color: #64748b !important;
}

.section-container .order-form-section .nice-select .list {
    border: 1px solid #dbe3ee !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}

.section-container .order-form-section .input-wrapper > .form-control,
.section-container .order-form-section .input-wrapper .form-select {
    margin: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 10px !important;
}

.section-container .order-form-section .input-wrapper .position-absolute {
    right: 10px !important;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

/* Keep submenu items tighter */
.nd-sidebar .side-bar-manu > ul > li ul > li {
    margin: 3px 0;
}

/* Keep hover/active "pill" visually slim */
.nd-sidebar .side-bar-manu li > a {
    box-shadow: none;
}

.nd-sidebar .side-bar-manu li a {
    min-height: var(--nd-sidebar-item-height);
    padding: 5px 10px;
    border-radius: var(--nd-sidebar-item-radius);
    color: var(--nd-sidebar-link);
    font-size: var(--nd-sidebar-font-size);
    line-height: 1.1;
    font-weight: 400;
}

.nd-sidebar .side-bar-manu li a .sidebar-icon {
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b; /* slate-500 (not black) */
}

.nd-sidebar .side-bar-manu li a .sidebar-icon svg {
    width: var(--nd-sidebar-icon-size);
    height: var(--nd-sidebar-icon-size);
    stroke-width: 1.6; /* thinner like new design */
    opacity: 0.95;
    fill: none !important;
    stroke: currentColor !important;
}

/* Prevent any global CSS from filling svg paths */
.nd-sidebar .side-bar-manu li a .sidebar-icon svg * {
    fill: none !important;
    stroke: currentColor !important;
}

/* Only non-dropdown rows: dropdown chevrons need translateY(-50%) — do not reset transform here */
.nd-sidebar .side-bar-manu li:not(.dropdown):hover::before,
.nd-sidebar .side-bar-manu li:not(.dropdown).active::before {
    color: #64748b;
    transform: none;
}

/* Don't change dropdown chevron on hover (only on open) */
.nd-sidebar .side-bar-manu li.dropdown:hover::before {
    color: #94a3b8;
    transform: translateY(-50%) rotate(0deg);
}

.nd-sidebar .side-bar-manu li:hover > a,
.nd-sidebar .side-bar-manu li.active > a {
    background-color: var(--nd-sidebar-hover);
    color: var(--nd-sidebar-text) !important;
}

.nd-sidebar .side-bar-manu .dropdown.active > a,
.nd-sidebar .side-bar-manu .dropdown.active .active,
.nd-sidebar
    .side-bar-manu
    .dropdown.active
    > .dropdown-menu
    .dropdown.active
    > a,
.nd-sidebar
    .side-bar-manu
    .dropdown.active
    > .dropdown-menu
    .dropdown.active
    .active {
    background: var(--nd-sidebar-primary);
    color: #ffffff !important;
}

.nd-sidebar .side-bar-manu .dropdown::before {
    position: absolute;
    z-index: 3;
    display: block;
    color: #94a3b8;
    top: 50%;
    content: "\f107"; /* fa-chevron-down (cleaner) */
    font-family:
        "Font Awesome 5 Pro", "Font Awesome 5 Free", "Font Awesome 6 Free",
        sans-serif !important;
    font-weight: 400;
    font-size: var(--nd-sidebar-chevron-size);
    right: 12px;
    transform: translateY(-50%) rotate(0deg);
    transition:
        transform 180ms ease,
        color 180ms ease;
}

/* Inner submenu dropdowns (e.g. Commercial / General): align chevron like top-level — override style.css inner top:5px */
.nd-sidebar .side-bar-manu li .dropdown-menu li.dropdown::before {
    top: 50% !important;
    right: 12px !important;
    transform: translateY(-50%) rotate(0deg) !important;
}

.nd-sidebar .side-bar-manu li .dropdown-menu li.dropdown:hover::before {
    transform: translateY(-50%) rotate(0deg) !important;
}

/* Room for chevron on nested dropdown row labels */
.nd-sidebar .side-bar-manu li .dropdown-menu li.dropdown > a {
    padding-right: 34px !important;
}

/* Top-level module rows: same right padding so label + chevron match inner dropdown */
.nd-sidebar .side-bar-manu > ul > li.dropdown > a {
    padding-right: 34px !important;
}

/* Hide dropdown chevron while module is expanded; show again when collapsed */
.nd-sidebar .side-bar-manu li.dropdown.active::before {
    content: "" !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    transform: translateY(-50%) rotate(0deg) !important;
}

.nd-sidebar .side-bar-manu li.dropdown.active:hover::before {
    opacity: 0 !important;
    visibility: hidden !important;
}

.nd-sidebar .side-bar-manu li .dropdown-menu {
    margin-left: 16px;
    border-left: 0;
}

/* Remove the "box/border" look from Bootstrap dropdown-menu */
.nd-sidebar .side-bar-manu ul.dropdown-menu {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    min-width: unset !important;
}

.nd-sidebar .side-bar-manu li.dropdown.active > ul.dropdown-menu {
    margin-top: 4px;
}

.nd-sidebar .side-bar-manu li .dropdown-menu li {
    padding-left: 12px;
}

.nd-sidebar .side-bar-manu li .dropdown-menu li {
    margin: 0;
}

.nd-sidebar .side-bar-manu li .dropdown-menu li a {
    padding: 5px 10px;
    color: var(--nd-sidebar-muted);
    border-radius: var(--nd-sidebar-item-radius);
}

.nd-sidebar .side-bar-manu li .dropdown-menu li a:hover,
.nd-sidebar .side-bar-manu li .dropdown-menu li a.active {
    color: #0f172a !important;
    background: #f1f5f9;
}

/* When dropdown opens, avoid "boxed" look */
.nd-sidebar .side-bar-manu li.dropdown.active > a {
    box-shadow: none !important;
    outline: none !important;
}

/* Active item: blue pill + white icon */
.nd-sidebar .side-bar-manu li.active > a {
    background: var(--nd-sidebar-primary);
    color: #ffffff !important;
}

.nd-sidebar .side-bar-manu li:hover > a .sidebar-icon {
    color: #334155; /* slate-700 */
}

.nd-sidebar .side-bar-manu li.active > a .sidebar-icon {
    color: #ffffff !important;
}

.nd-sidebar .side-bar-manu li.active > a .sidebar-icon svg {
    stroke: currentColor;
}

/* Collapsed sidebar (existing behavior) – make it look cleaner */
.nd-sidebar.side-bar.active {
    width: 76px;
    padding-left: 8px;
    padding-right: 8px;
}

.nd-sidebar.side-bar.active .side-bar-logo {
    padding-left: 8px;
    padding-right: 8px;
}

.nd-sidebar.side-bar.active:hover {
    width: 76px;
}

/* Icon-only collapsed sidebar (DESKTOP only) */
@media (min-width: 1151px) {
    .nd-sidebar.side-bar.active .nd-sidebar__label {
        display: none;
    }

    /* Hard fallback: never show text in collapsed mode */
    .nd-sidebar.side-bar.active .side-bar-manu > ul > li > a {
        font-size: 0;
        line-height: 0;
        gap: 0;
    }

    /* Center each module row; override legacy style.css .side-bar.active icon nudge */
    .nd-sidebar.side-bar.active .side-bar-manu > ul > li {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .nd-sidebar.side-bar.active .side-bar-manu li a {
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 52px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box;
    }

    .nd-sidebar.side-bar.active .side-bar-manu > ul > li.dropdown > a {
        padding-right: 0 !important;
    }

    .nd-sidebar.side-bar.active .side-bar-manu li a .sidebar-icon {
        margin-right: 0 !important;
        margin-left: 0 !important;
        left: 0 !important;
        position: relative !important;
    }

    .nd-sidebar.side-bar.active .side-bar-manu .dropdown::before {
        display: none;
    }

    /* Hide any open dropdown menus in collapsed sidebar */
    .nd-sidebar.side-bar.active .side-bar-manu ul.dropdown-menu {
        display: none !important;
    }
}

/* MOBILE: off-canvas drawer behavior (slide in/out) */
@media (max-width: 1150px) {
    .nd-sidebar.side-bar {
        left: 0 !important;
        top: 0 !important;
        height: 100% !important;
        width: 280px !important;
        border-radius: 0 !important;
        padding: 10px 10px !important;
        transform: translateX(-110%);
        transition: transform 280ms ease;
    }

    .nd-sidebar.side-bar.active {
        transform: translateX(0);
    }

    /* show close button on mobile */
    .nd-sidebar .close-btn {
        display: block;
    }

    .nd-sidebar .side-bar-logo {
        position: relative;
        padding-top: 14px;
    }

    .nd-sidebar__closeBtn {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        border-radius: 14px;
        border: 0;
        background: #ffffff;
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
        color: #111827;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
    }

    .nd-sidebar__closeBtn:hover {
        background: #f3f4f6;
    }

    .nd-sidebar__closeIcon {
        width: 18px;
        height: 18px;
        stroke: currentColor;
    }

    /* on mobile, no content shift */
    .nd-sidebar + .section-container,
    .nd-sidebar + .section-container.active {
        padding-left: 0 !important;
        padding-top: 0 !important;
        margin-left: 0 !important;
    }
}

/* Match content spacing with new sidebar width/margins */
.nd-sidebar + .section-container {
    padding-left: 270px;
    padding-top: 10px;
    /* style.css sets padding-bottom: 80px on .section-container — removes gap below footer */
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nd-sidebar + .section-container .section-container__main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.nd-sidebar + .section-container.active {
    padding-left: 96px;
}

/* Ensure top dropdown never overflows sidebar */
.nd-sidebar__project,
.nd-sidebar__projectBtn,
.nd-sidebar__projectMenu {
    max-width: 100%;
}

/* Modern header (rounded corners + clean hamburger) */
.main-header-section {
    flex-shrink: 0;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    margin-left: 10px;
    margin-top: 10px;
    margin-right: 10px;
    padding: 12px 18px;
}

.nd-hamburger {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    color: #111827;
    cursor: pointer;
    user-select: none;
}

.nd-hamburger:hover {
    background: #f3f4f6;
}

.nd-hamburger__icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Dashboard stat cards: 4 columns; second row of 4 sits after Income vs Expense chart */
.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1199px) {
    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .dashboard-stat-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dashboard-stat-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        0 1px 2px rgba(2, 8, 20, 0.04),
        0 4px 12px rgba(15, 23, 42, 0.06);
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.dashboard-stat-card:hover {
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.1),
        0 2px 6px rgba(2, 8, 20, 0.06);
    border-color: #d4d4d8;
}

.dashboard-stat-card__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.dashboard-stat-card__label {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #71717a;
}

.dashboard-stat-card__value {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #18181b;
    letter-spacing: -0.02em;
}

.dashboard-stat-card__loader {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* Chart cards: don’t lock to 360px — lets x-axis labels stay inside the white card */
.dashboard-card.dashboard-card--chart-auto {
    height: auto !important;
    min-height: 380px;
    overflow: visible;
}

/* Income vs Expense + chart body: space for axis labels + canvas */
.erp-graph-box .dashboard-card:has(#monthly-statistics) .dashboard-card-body,
.erp-graph-box--income-expense-full .dashboard-card-body {
    min-height: 300px;
    position: relative;
    padding-bottom: 20px !important;
}

.erp-graph-box .dashboard-card:has(#salesRatio) .dashboard-card-body {
    min-height: 260px;
    padding-bottom: 20px !important;
}

.dashboard-card-body.dashboard-card-body--chart {
    padding-bottom: 20px !important;
}

/* Plain graph headers (override global blue bar + white text on .dashboard-card-header) */
.dashboard-card .dashboard-card-header.dashboard-card-header--plain {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 16px 20px !important;
    align-items: center;
    border-bottom: 1px solid #e4e4e7;
}

.dashboard-card .dashboard-card-header--plain .dashboard-graph-heading {
    flex: 1 1 auto;
    max-width: 100%;
}

/* Must win over .dashboard-card .dashboard-card-header h4,h5,p { color: #fff !important } */
.dashboard-card .dashboard-card-header--plain .dashboard-graph-heading h4,
.dashboard-card .dashboard-card-header--plain h4 {
    margin: 0 0 4px 0;
    font-style: normal;
    font-weight: 700 !important;
    font-size: 18px;
    line-height: 1.3;
    color: #0f172a !important;
    letter-spacing: -0.02em;
}

.dashboard-card .dashboard-card-header--plain .dashboard-graph-heading__sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400 !important;
    color: #71717a !important;
}

.dashboard-card .dashboard-card-header--plain .nice-select {
    background: #ffffff !important;
    border: 1px solid #d4d4d8 !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

.dashboard-card .dashboard-card-header--plain .nice-select .current {
    color: #0f172a !important;
}

.dashboard-card .dashboard-card-header--plain .nice-select::after {
    border-color: #71717a !important;
}

/* Dashboard: New Order card redesign */
.dashboard-order-customer {
    border: 1px solid #e8edf5;
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(2, 8, 20, 0.03),
        0 10px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.dashboard-order-customer .dashboard-card-header.new-order-header {
    background: #ecfccb;
    border-bottom: 1px solid #d9f99d;
    padding: 12px 14px !important;
}

.dashboard-order-customer .dashboard-card-header.new-order-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.dashboard-order-customer .dashboard-card-header .nice-select {
    height: 36px;
    line-height: 34px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    min-width: 120px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.dashboard-order-customer .dashboard-card-body {
    padding: 8px 14px 12px 14px;
}

.dashboard-order-customer .top-customer-table {
    margin-top: 6px !important;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
}

.dashboard-order-customer .top-customer-table .table {
    margin-bottom: 0;
}

.dashboard-order-customer .top-customer-table .table td {
    padding: 10px 0;
    vertical-align: top;
    border-bottom: 1px solid #f1f5f9;
}

.dashboard-order-customer .top-customer-table .table tr:last-child td {
    border-bottom: 0;
}

.nd-new-order-no {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a !important;
    text-decoration: underline;
}

.nd-new-order-no:hover {
    color: #334155 !important;
}

.nd-new-order-title {
    display: inline-block;
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.2;
    color: #0f172a;
    font-weight: 600;
}

.nd-new-order-date {
    font-size: 11px;
    line-height: 1.3;
    color: #64748b;
    white-space: nowrap;
}

.nd-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 10px;
}

.nd-status-badge.is-pending {
    color: #b45309;
    background: #fef3c7;
}

.nd-status-badge.is-approved {
    color: #1d4ed8;
    background: #dbeafe;
}

.nd-status-badge.is-completed {
    color: #166534;
    background: #dcfce7;
}

.nd-status-badge.is-reject {
    color: #991b1b;
    background: #fee2e2;
}

/* New Orders full-width table (same header look as Income vs Expense) */
.erp-graph-box--new-orders-full .dashboard-card {
    height: auto !important;
    min-height: unset;
}

.erp-graph-box--new-orders-full .dashboard-card-body {
    padding: 0 !important;
}

.new-orders-table-wrap {
    max-height: 370px;
    overflow-y: auto;
    overflow-x: auto;
}

.new-orders-table {
    margin-bottom: 0;
    width: 100%;
}

.new-orders-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e4e4e7;
    white-space: nowrap;
    text-align: left;
}

.new-orders-table tbody td {
    padding: 12px 20px;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.new-orders-table tbody tr:last-child td {
    border-bottom: 0;
}

.new-orders-table tbody tr:hover {
    background: #f8fafc;
}

/* Bank & Cash cards: center content, space title/value */
.state-overview-box .count-content-wrapper {
    width: 100%;
    text-align: center;
    padding: 10px 15px;
}

.state-overview-box .count-content-wrapper p {
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 6px;
}

.state-overview-box .count-content-wrapper h2 {
    font-weight: 600;
    font-size: 26px;
    color: #0f172a;
    margin: 0;
}

/* Dashboard graph headers: use navlink blue */
.dashboard-card .dashboard-card-header {
    background: #2563eb !important;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.dashboard-card .dashboard-card-header h4,
.dashboard-card .dashboard-card-header h5,
.dashboard-card .dashboard-card-header p,
.dashboard-card .dashboard-card-header a {
    color: #ffffff !important;
}

.dashboard-card .dashboard-card-header .nice-select {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

.dashboard-card .dashboard-card-header .nice-select .current {
    color: #ffffff !important;
}

.dashboard-card .dashboard-card-header .nice-select::after {
    border-color: #ffffff !important;
}

.dashboard-card .dashboard-card-header .nice-select .list,
.dashboard-card .dashboard-card-header .nice-select .option {
    color: #111827 !important;
}

/* Plain headers: must follow blue-bar rules above — higher specificity so title/subtitle stay dark */
.dashboard-card .dashboard-card-header.dashboard-card-header--plain {
    background: #ffffff !important;
    border-bottom: 1px solid #e4e4e7;
}

.dashboard-card .dashboard-card-header.dashboard-card-header--plain h4,
.dashboard-card
    .dashboard-card-header.dashboard-card-header--plain
    .dashboard-graph-heading
    h4 {
    color: #0f172a !important;
}

.dashboard-card
    .dashboard-card-header.dashboard-card-header--plain
    .dashboard-graph-heading__sub {
    color: #71717a !important;
}

.dashboard-card
    .dashboard-card-header.dashboard-card-header--plain
    .nice-select {
    background: #ffffff !important;
    border: 1px solid #d4d4d8 !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

.dashboard-card
    .dashboard-card-header.dashboard-card-header--plain
    .nice-select
    .current {
    color: #0f172a !important;
}

.dashboard-card
    .dashboard-card-header.dashboard-card-header--plain
    .nice-select::after {
    border-color: #71717a !important;
}

/* App footer (master layout) — slim strip; bottom of viewport when content short (via .section-container__main flex-grow, not fixed) */
.section-container .nd-app-footer {
    flex-shrink: 0;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 14px;
    margin-top: 14px;
    padding: 7px 14px 8px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.section-container .nd-app-footer__text {
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.section-container .nd-app-footer__company {
    color: #334155;
    font-weight: 600;
}

.section-container .nd-app-footer__sep {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
    vertical-align: middle;
}

@media (max-width: 575.98px) {
    .section-container .nd-app-footer {
        margin-left: 8px;
        margin-right: 8px;
        margin-top: 12px;
        margin-bottom: 12px;
        padding: 6px 12px 7px;
    }

    .section-container .nd-app-footer__sep {
        display: none;
    }

    .section-container .nd-app-footer__text {
        flex-direction: column;
        gap: 2px;
    }
}
