/* ============== Login ========== */
/* login-body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
}

.left-panel {
    background: #4f3cc9;
    color: white;
    border-top-right-radius: 60px;
    border-bottom-right-radius: 60px;
}

.login-card {
    max-width: 380px;
    width: 100%;
}


.btn-login {
    background-color: #ff7a4a;
    color: white;
    height: 48px;
    border-radius: 12px;
    font-weight: 600;
}

.btn-login:hover {
    background-color: #ff6732;
} */

/* Mobile View */
/* @media (max-width: 767px) {
    .left-panel {
        display: none;
    }
} */
:root {
    --primary: #2A1B70;
    --accent: #F07C29;
    --bg: #F8F9FD;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748B;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Table Loader Overlay */
.table-container {
    position: relative;
}

/* Loader Overlay */
.table-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(255, 255, 255, 0.7);
    z-index: 999;

    backdrop-filter: blur(2px);
    /* optional smooth effect */
}

/* Spinner */
.loader-spinner {
    position: relative;
    width: 60px;
    height: 60px;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* Rotating circle (separate layer) */
.loader-spinner::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border: 5px solid #FFC5B3;
    border-top: 5px solid #4D37B3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Logo (static rahega) */
.loader-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    z-index: 1;
}

.loader-logo {
    transform: none !important;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Sidebar Floating Effect */
.sidebar {
    width: 260px;
    height: calc(100vh - 40px);
    background: var(--primary);
    position: fixed;
    top: 20px;
    left: 20px;
    border-radius: 24px;
    padding: 0px 15px 25px 15px;
    z-index: 1001;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.sidebar .nav {
    padding-bottom: 70px;
    padding-top: 50%;
}



.nhm-gov-logo {
    height: 55px;
}

.logo-box {
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    border-radius: 10px;
    background: #2a1b70;
    position: fixed;
    width: 224px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: var(--accent) !important;
    box-shadow: 0 4px 15px rgba(240, 124, 41, 0.3);
}


.topbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 15px 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Card Styling */
.stat-card {
    padding: 25px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Soft Colors */
.bg-soft-purple {
    background: #EEF0FF;
}

.text-purple {
    color: #5B3CC4;
}

.bg-soft-green {
    background: #E7F7F0 !important;
}

.text-green {
    color: #28A745 !important;
}

.bg-soft-orange {
    background: #FFF4ED !important;
}

.text-orange {
    color: #F07C29 !important;
}

.bg-soft-blue {
    background: #E6F5FA !important;
}

.text-blue {
    color: #0DCAF0 !important;
}

/* ============ Main Css =========== */
/* :root {
    --primary: #2A1B70;
    --accent: #F07C29;
    --bg: #F8F9FD;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748B;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
} */

/* ===== SIDEBAR (FIXED) ===== */
/* .sidebar {
    width: 260px;
    height: 100vh;
    background: #fff;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
} */

.mt-auto.logout_bg {
    position: fixed;
    bottom: 0px;
    background: var(--primary);
    width: 215px;
    padding: 20px 0 0 0;
    bottom: 3%;
}

/* .logo-box {
    color: #fff;
    border-radius: 16px;
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 25px;
} */

.logo-box img {
    width: 100%;
    float: left;
}

/* .logo-box h6 {
    font-weight: bold;
    margin-top: 10px;
} */

.sidebar .nav-link {
    display: flex;
    align-items: center;
    /* gap: 12px;
    padding: 12px 15px; */
    margin-bottom: 0px;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    margin-bottom: 4px;
}

.sidebar .nav-link i {
    font-size: 15px;
    /* white-space: nowrap; */
}

.sidebar .nav-link span {
    font-size: 14px;
}

.topbar-left h5 span {
    color: #FC7850;
    font-weight: bold;
    margin: 0;
    font-size: 15px;
}

/* .nav-link:has(.bi-tools) {
    white-space: nowrap;
} */

/* .sidebar .nav-link.active {
    background: #5b3cc4;
    color: #fff;
} */

.sidebar .nav-link:hover {
    background: #f1edff;
    color: #000;
}

.sub-menu {
    padding-left: 42px;
    font-size: 13px;
}

.dropdown-toggle-icon {
    margin-left: auto;
    transition: transform .3s;
}

.nav-link[aria-expanded="true"] .dropdown-toggle-icon {
    transform: rotate(90deg);
}

.logout {
    background: #f1edff;
    padding: 12px;
    border-radius: 14px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* ===== TOP BAR ===== */
.topbar {
    background: #ffffff;
    border-radius: 40px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.topbar-left h5 {
    margin: 0;
    font-weight: 600;
    color: #111;
    font-size: 15px;
}

/* ===== SEARCH BOX ===== */
.search-box {
    display: flex;
    align-items: center;
    background: #f6f7fb;
    border-radius: 30px;
    padding: 6px 8px 6px 14px;
    width: 320px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
}

.search-box button {
    width: 25px;
    height: 23px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-box button i {
    font-size: 14px;
}

/* ===== WELCOME CARD ===== */
.welcome-card {
    background: var(--primary);
    border-radius: 18px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

/* LEFT SIDE */
.welcome-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-icon {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f3bbf;
    font-size: 24px;
}

.welcome-text h5 {
    margin: 0;
    font-weight: 600;
}

.welcome-text span {
    font-size: 14px;
    opacity: 0.9;
}

.welcome-text i {
    color: #ff4d4f;
    margin-right: 4px;
}

/* RIGHT SIDE IMAGE */
.welcome-right img {
    height: 90px;
}

/* ===== MAIN CONTENT ===== */
main {
    margin-left: 260px;
    padding: 25px;
}

.header {
    background: var(--primary);
    color: #fff;
    border-radius: 16px;
    padding: 20px;
}

.stat-card {
    border: none;
    border-radius: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f1edff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
}

.card {
    border-radius: 16px;
    border: none;
}

/* ================= RESPONSIVE ================= */

/* TABLET & MOBILE */
@media (max-width: 991px) {

    /* Sidebar hide by default */
    .sidebar {
        left: -260px;
        transition: all 0.3s ease;
        z-index: 1050;
        height: 100%;
    }

    .sidebar.show {
        left: 0;
    }

    /* Main full width */
    main {
        margin-left: 0;
        padding: 15px;
    }

    /* Topbar stack */
    .topbar {
        flex-direction: column;
        gap: 12px;
        border-radius: 20px;
    }

    .search-box {
        width: 100%;
    }

    /* Welcome card stack */
    .welcome-card {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .welcome-left {
        flex-direction: column;
    }

    .welcome-right img {
        height: 70px;
    }

    /* Stats cards full width */
    .stat-card {
        text-align: center;
    }
}

/* MOBILE ONLY */
@media (max-width: 576px) {

    .topbar-left h5 {
        font-size: 16px;
    }

    .search-box input {
        font-size: 13px;
    }

    .welcome-text h5 {
        font-size: 16px;
    }

    .welcome-text span {
        font-size: 13px;
    }

    table {
        font-size: 13px;
    }

    .stat-card h4 {
        text-align: left;
        margin: 0;
        font-weight: bold;
    }


}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ===== form ==== */
.form-control,
.form-select {
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-select {
    cursor: pointer;
}

.form-select option {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    background-color: #ffffff;
    padding: 10px;
}

/* Optional: hover & focus for better UX */
.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91, 60, 196, 0.1);
    outline: none;
    border-radius: 10px;
}



/* Input-group ke icon aur text alignment */
.input-group-text {
    background-color: #f8f9fa;
    border-radius: 8px 0 0 8px;
    border: 1px solid #ced4da;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure input next to icon matches height */
.input-group .form-control {
    border-radius: 0 8px 8px 0;
}

/* ================= TABLE DESIGN ================= */
table {
    padding: 10px 0 0 0;
}

.table-container {
    background: #fff;
    border-radius: 16px;
    padding: 15px;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #aaa;
    border-radius: 3px;
    padding: 5px 10px;
    background-color: transparent;
    margin-left: 3px;
    border-radius: 60px;
}

[type=search] {
    /* -webkit-appearance: textfield; */
    outline-offset: -0px;
    padding: 0 10px;
}

.dataTables_wrapper .dataTables_filter input::-moz-focus-inner {
    border: 1px solid #aaa;
    border-radius: 3px;
}

.custom-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 0px !important;
}

.delivered_btn {
    background-color: var(--accent);
    color: white;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(240, 124, 41, 0.3);
}

.view-icon {
    width: 36px;
    height: 36px;
    background-color: #EEF0FF;
    color: var(--primary);
    border: none;
    transition: transform 0.2s;

}

/* Header */
.custom-table thead tr {
    background: #eef0ff !important;
}

.custom-table thead th {
    border: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.7) !important;
    padding: 16px 20px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.custom-table thead th:last-child {
    border-right: none !important;
}

.custom-table thead th:first-child {
    border-radius: 12px 0 0 12px;
}

.custom-table thead th:last-child {
    border-radius: 0 12px 12px 0;
}

/* Body rows */
.custom-table tbody tr {
    box-shadow: 0 4px 12px rgba(42, 27, 112, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

tbody,
td,
tfoot,
th,
thead,
tr {
    border-style: none;
}

.custom-table tbody tr:hover td {
    background-color: #ffffff !important;
}

.custom-table tbody tr:nth-child(even) td {
    background-color: #f8faff !important;
}

.custom-table tbody tr:nth-child(odd) td {
    background-color: #ffffff !important;
}

.custom-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(240, 124, 41, 0.15);
}

.custom-table tbody td {
    border: none !important;
    border-top: 1.5px solid rgba(42, 27, 112, 0.05) !important;
    border-bottom: 1.5px solid rgba(42, 27, 112, 0.05) !important;
    border-right: 1.5px solid rgba(42, 27, 112, 0.05) !important;
    padding: 18px 20px;
    vertical-align: middle;
    font-size: 14.5px;
    color: #334155;
    /* background: #ffffff; Removed to allow row/zebra styling */
}

.custom-table tbody td:last-child {
    border-right: none !important;
}

.custom-table tbody td:first-child {
    border-left: 1px solid rgba(42, 27, 112, 0.05) !important;
    border-radius: 12px 0 0 12px;
}

.custom-table tbody td:last-child {
    border-right: 1px solid rgba(42, 27, 112, 0.05) !important;
    border-radius: 0 12px 12px 0;
}

/* ================= MODAL TABLE DESIGN ================= */
.modal-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.modal-table thead {
    background: #f8f9fa;
}

.modal-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    color: #475569;
    padding: 14px 20px;
    border: none;
    border-bottom: 1px solid #e2e8f0;
}

.modal-table tbody td {
    padding: 14px 20px;
    vertical-align: middle;
    color: #334155;
    font-size: 14px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
}

.modal-table tbody tr:last-child td {
    border-bottom: none;
}

.modal-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Badge */
.parent-badge {
    background: #eef0ff;
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Description */
.text-muted-custom {
    color: #6b7280;
    font-size: 13px;
}

/* Action Buttons */
.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
    text-decoration: none;
}

.btn-edit {
    background: #e8f5e9;
    color: #2e7d32;
}

.btn-edit:hover {
    background: #2e7d32;
    color: #fff;
}

.btn-del {
    background: #ffebee;
    color: #c62828;
}

.btn-del:hover {
    background: #c62828;
    color: #fff;
}

/* DataTables UI */
.dataTables_wrapper table {
    border: none !important;
}

.dataTables_filter input {
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 6px 12px;
}

.dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: var(--primary) !important;
    margin: 0 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(42, 27, 112, 0.05);
    /* very soft primary */
    transition: all 0.2s;
}

.dataTables_paginate .paginate_button:hover {
    background: #f8fafc !important;
    color: var(--accent) !important;
    border-color: rgba(240, 124, 41, 0.3) !important;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 10px rgba(42, 27, 112, 0.2);
}


/* ======= Add product ======== */
.image-upload-box {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    height: 220px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f6ff;
    transition: all 0.3s ease;
}

.image-upload-box:hover {
    background: #efeaff;
}

.upload-placeholder {
    text-align: center;
    color: var(--primary);
}

.preview-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.product_list_img {
    background: #e2def1;
    text-align: center;
    width: 40px;
    height: 40px;
    border-radius: 30px;
    vertical-align: middle;
    padding: 5px;
}

.product_list_img img {
    vertical-align: -webkit-baseline-middle;
    margin: 0px auto;
}

.btn-min {
    background: var(--primary);
    color: #fff;
    border: none;
}

.btn-min:hover {
    background: var(--primary);
    color: #fff;
    border: none;
}

.excel-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.excel-upload .btn {
    border-style: dashed;
}

/*  ========= Delivery Details ======== */
.delivery_img {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    height: 50px;
    width: 80px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f6ff;
    transition: all 0.3s ease;
    padding: 29px 7px;
    margin: 10px;
}

.delivery_img img {
    width: 80px;
}


.form-select {
    padding-right: 1.8rem;
    width: auto;
}

.chart-select {
    padding-right: 2.8rem;
    background-position: right 0.75rem center;
}

.topbar {
    position: fixed;
    top: 0px;
    left: 285px;
    right: 0;
    height: 60px;
    background: #fff;
    z-index: 1000;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

/* Sidebar width */
.sidebar {
    width: 250px;
    position: fixed;
    height: 97vh;
    top: 8px;
    left: 8px;
    bottom: 8px;
}

main {
    margin-left: 265px;
    margin-top: 80px;
    padding: 20px;
}

@media (max-width: 991px) {

    .topbar {
        left: 20px;
        height: 60px;
    }

    main {
        margin-left: 0;
    }

    .sidebar {
        left: -250px;
    }

    .sidebar.active {
        left: 0;
    }
}

table.dataTable tbody th,
table.dataTable tbody td {
    padding: 10px 18px !important;
}

.update_button{
        background: var(--accent) !important;
        border: none;
}
