body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    box-sizing: border-box;
}

p {
    margin: 0;
    padding: 0;
}

#app-container {
    display: flex;
    flex-direction: column;
    /* Full viewport height */
    overflow-y: auto;
    /* Enable scrolling when content overflows */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #006A4E;
    color: white;
}

.logo {
    font-size: 18px;
    font-weight: bold;
}

#login-username {
    margin-right: 10px;
}

.site-title {
    padding: 10px 0px 10px 10px;
    padding-left: 5px;
    font-size: 18px;
    font-weight: bold;
}

.login-form-title {
    padding: 0;
    padding-left: 5px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.bag_table_container {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
}

.bag_table {
    /* overflow-x: scroll; */
}

.table-controls {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-bottom: 1px solid #ddd;
}

#filters {
    display: none;
    background: white;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

#filters input,
#filters select {
    margin: 5px;
    padding: 5px;
    width: 100%;
}

#scan_btn {
    margin: 0px;
    margin-right: 8px;
}

#bag_id {
    margin: 0px;
    margin-right: 8px;
    margin-left: 8px;
}

.bag-item-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0px;
    padding: 0px 10px 0px 10px;
}

.bag-item-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bag-item-title-text {
    padding: 10px;
    font-weight: bold;
}

.bag-item-title-value {
    padding: 10px;
    font-weight: bold;
}

.bag-item-article-value {
    padding: 10px;
    font-weight: bold;
}

.controls-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 8px 8px;
}

@media (min-width: 300px) {
    .pos-select {
        font-size: 11px;
    }

    .pos-date-input,
    .pos-datetime-input {
        padding: 8px 6px;
        font-size: 11px;
    }

    #phone:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    #password:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    /* .avatar {
        display: none;
    } */

    .logo-container img {
        display: none;
    }

    .pm_table_style {
        font-size: 13px !important;
    }

    .pm_table_style th,
    .pm_table_style td {
        padding: 6px 0px;
    }




    .pos-date-time-range {
        display: flex;
        align-items: center;
    }


    #filters input,
    #filters select {
        width: 48%;
    }
}

@media (min-width: 400px) {
    .pos-select {
        font-size: 12px;
    }

    .pos-date-input,
    .pos-datetime-input {
        padding: 8px 8px;
        font-size: 12px;
    }

    #phone:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    #password:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    .pos-date-time-range {
        display: flex;
        align-items: center;
    }

    .pm_table_style {
        font-size: 16px !important;
    }

    #filters input,
    #filters select {
        width: 48%;
    }
}

@media (min-width: 500px) {
    .pos-select {
        font-size: 13px;
    }

    .pos-date-input,
    .pos-datetime-input {
        padding: 8px 10px;
        font-size: 14px;
    }

    #phone:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    #password:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    #filters input,
    #filters select {
        width: 48%;
    }

    .pm_table_style {
        font-size: 18px !important;
    }
}

@media (min-width: 600px) {
    .pos-select {
        font-size: 14px;
    }

    .pos-date-input,
    .pos-datetime-input {
        padding: 8px 12px;
        font-size: 14px;
    }

    #phone:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    #password:focus {
        scroll-margin-top: 100px;
        position: relative;
        z-index: 10;
    }

    #filters input,
    #filters select {
        width: 48%;
    }

    .pm_table_style {
        font-size: 18px !important;
    }
}

@media (min-width: 700px) {

    #filters input,
    #filters select {
        width: 48%;
    }

    .pm_table_style {
        font-size: 18px !important;
    }
}

@media (min-width: 900px) {

    #filters input,
    #filters select {
        width: 32%;
    }

    .pm_table_style {
        font-size: 18px !important;
    }
}


.pm_table_style {
    border-collapse: collapse;
    /* margin: 10px 10px; */
    font-size: 0.9em;
    border-radius: 5px 5px 0 0;
    overflow-x: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    min-width: 100%;
}

.pm_table_style thead tr {
    background-color: #009879;
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.bag-checkbox {
    width: 18px;
    /* Adjust width */
    height: 18px;
    margin-left: 10px;
    /* Adjust height */
    cursor: pointer;
    accent-color: #007bff;
    /* Change checkbox color (for modern browsers) */
    vertical-align: middle;
    /* Align properly within the table */
}

.pm_table_style th,
.pm_table_style td {
    padding: 8px 0px;
}

.pm_table_style tbody tr {
    border-bottom: 1px solid #dddddd;
}

.pm_table_style tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.pm_table_style tbody tr:last-of-type {
    border-bottom: 2px solid #009879;
}

.pm_table_style tbody tr.active-row {
    /* font-weight: bold; */
    /* color: #009879; */
    background-color: rgba(0, 112, 243, 0.4) !important;
}

.bag-id-cell {
    width: 100%;
    border-bottom: 1px solid #007bff;
    color: #007bff;
    cursor: pointer;
}

/* .pm_table_style .bag-row:hover {
    cursor: pointer;
    background-color: rgba(0, 112, 243, 0.4) !important;
} */

.pm_table_style .bag-article-row:hover {
    cursor: pointer;
    background-color: rgba(0, 112, 243, 0.4) !important;
}

/* 
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
}

th,
td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.pagination {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
    margin-top: 10px;
} */

.backdrop {
    position: fixed;
    color: #000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.loader {}

.login-inputs {
    max-width: 500px;
}

.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    padding-bottom: 10px;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.avatar-modal-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-form {
    display: none;
    width: 68%;
}

.login-form-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0px;
}

.user-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.scan-bag-container {
    background: white;
    /* text-align: center; */
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 100vh;
}

.bag-items-container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 
.bag_item_table_container {
    display: flex;
    flex-direction: column;
    overflow: auto;
} */

.bag-items-container {
    background: white;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 100vh;
}


.article-details-title-header {
    font-size: 20px;
    font-weight: bold;
    margin: 0px;
    padding: 10px 0px 10px 0px;
}

/* Article Details Modal */
.article-details-container {
    background: white;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    /* text-align: center; */
    max-height: 100vh;
}

/* Article Details Modal */
.article-details-container-header {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* text-align: center; */
}

.article-info .article-info-detail {
    padding: 8px;
    display: flex;
    justify-content: space-between;
}

.optional-article-details {
    padding: 8px;
    display: flex;
    justify-content: space-between;
}

.article-details-value {
    text-align: right;
}

#tracking-stepper {
    margin-top: 20px;
    padding-left: 20px;
    position: relative;
}

/* Stepper styles */
.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
}

.step::before {
    content: "";
    position: absolute;
    width: 2px;
    height: 100%;
    background-color: #007bff;
    left: 10px;
    top: 10px;
}

.step:last-child::before {
    display: none;
}

.step-circle {
    width: 20px;
    height: 20px;
    background-color: #007bff;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.step-content {
    margin-left: 15px;
}

.step-content p {
    margin: 2px 0;
    font-size: 14px;
}

.step-content small {
    color: gray;
    font-size: 12px;
}

/* 
#bag-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#bag-items-table th,
#bag-items-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#bag-items-table th {
    background-color: #f4f4f4;
} */

/* .backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
} */





#created_at_from,
#inventory_created_at_from {
    flex: 1;
    margin-right: 4px;
}

#created_at_to,
#inventory_created_at_to {
    flex: 1;
    margin-left: 4px;
}

.pos-select:focus {
    border-color: #0070f3;
    box-shadow: 0 0 5px rgba(0, 112, 243, 0.3);
}

/* Date Range Inputs */
.pos-date-input,
.pos-datetime-input {
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.pos-date-input:focus,
.pos-datetime-input:focus {
    border-color: #0070f3;
    box-shadow: 0 0 5px rgba(0, 112, 243, 0.3);
}

.pos-date-time-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 8px;
    margin-right: 8px;
}

.avatar {
    margin-right: 5px;
}

.pos-apply-filter {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Pagination Styles */
.pos-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;

    /* margin-bottom: .5rem; */
    /* width: 100%; */
}

.pos-btn {
    padding: 12px 12px;
    font-size: 14px;
    border: 1px solid #d1d1d1;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.pos-btn:hover {
    background-color: #0070f3;
    color: white;
    border-color: #0070f3;
}

.pos-btn:active {
    transform: scale(0.95);
}







.pos-input-wrapper {
    width: 100%;
}

/* Custom Input */
.pos-input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pos-input:focus {
    border-color: #0070f3;
    box-shadow: 0 0 5px rgba(0, 112, 243, 0.3);
}


/* Search Input & Button */
.pos-search-container {
    display: flex;
    flex-direction: column;
}

.pos-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.pos-search-input {
    flex: 1;
    padding: 12px 12px;
    margin: 0px 8px;
    font-size: 14px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pos-search-input:focus {
    border-color: #777777;
    box-shadow: 0 0 5px rgba(0, 112, 243, 0.3);
}

.bag-error-message {
    margin: 0px auto;
    padding: 0px;
}

.bag-query {
    margin: 0px;
    padding: 10px 0px 0px 10px;
    font-size: 14px;
    margin-bottom: 8px;
}

.pos-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #888888;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid #d1d1d1;
    margin-right: 8px;
}

.pos-search-btn:hover {
    background-color: #005bb5;
    color: white;
}

.bag_item_table_container {
    margin: 10px 8px;
    display: flex;
    justify-content: space-between;

}

/* Custom Select Container */
.pos-select-wrapper {
    position: relative;
    display: flex;
    margin-bottom: 8px;
}

/* Hide Default Select Arrow */
.pos-select {
    flex: 1;
    margin: 0px 8px;
    padding: 12px 12px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    background: white;
    outline: none;
    appearance: none;
    /* Hides default dropdown arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    cursor: pointer;
}

/* Custom Stroked Down Arrow */
.pos-select-wrapper::after {
    content: "";
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23555'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    pointer-events: none;
    transition: stroke 0.2s;
}

/* Focus & Hover Effects */
.pos-select:focus,
.pos-select:hover {
    border-color: #0070f3;
    box-shadow: 0 0 5px rgba(0, 112, 243, 0.3);
}

/* Change Arrow Color on Focus/Hover */
.pos-select:focus+.pos-select-wrapper::after,
.pos-select:hover+.pos-select-wrapper::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%230070f3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat center;
}



/* Pagination Container */
.pos-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
    /* Light background */
    padding: 8px;
    border-radius: 16px;
    /* Fully rounded outer edges */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Pagination Buttons */
.pos-pagination-btn {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #dddddd7e;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, border-color 0.2s;
}

/* Active Page Button */
.page-active {
    background: #0070f3;
    color: white;
    border-color: #0070f3;
    /* border-radius: 8px; */
}

/* Leftmost & Rightmost Buttons (Rounded Corners) */
/* .pos-pagination-btn:first-child {
    border-radius: 16px 0 0 16px;
}

.pos-pagination-btn:last-child {
    border-radius: 0 16px 16px 0;
} */

/* Pagination Buttons Hover & Active */
.pos-pagination-btn.active {
    background: rgb(3, 74, 155);
    color: white;
    border-color: #0070f3;
}

.pos-pagination-btn:hover {
    background: rgb(3, 74, 155);
    color: white;
    border-color: #0070f3;
}

/* 
.pos-pagination-btn:active {
    transform: scale(0.95);
} */

/* Dots */
.pos-pagination-dots {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #dddddd7e;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, border-color 0.2s;
}

/* Stroked Arrow Buttons */
.pos-pagination-arrow {
    width: 34px;
    height: 34px;
    background: none;
    border: 1px solid #dddddd7e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pos-pagination-arrow svg {
    width: 16px;
    height: 16px;
    stroke: #555;
    stroke-width: 2;
}

.pos-pagination-arrow-prev {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.pos-pagination-arrow-next {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.pos-pagination-arrow:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.pos-pagination-arrow:hover svg {
    stroke: #0070f3;
}

.pos-pagination-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ddd;
}

/* 
.pos-pagination-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 2px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.pos-pagination-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    transform: scale(1.1);
}

.pos-pagination-btn:hover {
    background: #0056b3;
    color: white;
    transform: scale(1.05);
}

.pos-pagination-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.3s ease-in-out;
}

.pos-pagination-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pos-pagination-dots {
    padding: 8px 12px;
    color: #777;
} */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}


/* Table Container */
.pos-table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Custom Table */
.pos-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

/* Table Header */
.pos-table thead {
    background: #f0f0f0;
    font-weight: bold;
}

/* Striped Rows */
.pos-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

.pos-table tbody tr:nth-child(even) {
    background: #ffffff;
}

/* Hover Effect */
.pos-table tbody tr:hover {
    background: #e9f3ff;
    /* Light blue on hover */
    transition: background 0.2s;
    cursor: pointer;
}

/* Active (Selected) Row */
.pos-table tbody tr.active {
    background: #0070f3 !important;
    /* NextUI Blue */
    color: white;
}

/* Table Cells */
.pos-table th,
.pos-table td {
    padding: 12px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
}

/* Remove Border from Last Row */
.pos-table tbody tr:last-child td {
    border-bottom: none;
}



/* Password Input Wrapper */
.pos-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Password Input */
.pos-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pos-input:focus {
    border-color: #0070f3;
    box-shadow: 0 0 5px rgba(0, 112, 243, 0.3);
}

/* Password Toggle Button */
.pos-password-toggle {
    position: absolute;
    right: 4px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group {
    margin-top: .5rem;
    margin-bottom: .5rem;
}

/* Eye Icon */
.eye-icon {
    width: 20px;
    height: 20px;
    stroke: #555;
    transition: stroke 0.2s;
}

/* Eye Icon Hover Effect */
.pos-password-toggle:hover .eye-icon {
    stroke: #0070f3;
}

/* Highlight selected rows */
.selected-row {
    background-color: rgba(0, 112, 243, 0.2) !important;
    /* Light blue */
}

/* Ensure buttons are enabled/disabled properly */
.pos-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}



.tab-div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
}

.tab-div .pos-btn-container {
    flex: 1;
    margin: 0 2px;
}

.tab-button {
    background-color: #f0f0f0;
    color: #000000;
    width: 100%;
}

.active-tab {
    background-color: #0070f3;
    color: aliceblue;
}

/* Inventory Table Styles */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inventory-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.inventory-stats {
    display: flex;
    gap: 15px;
}

.inventory-stats span {
    background-color: #f0f8ff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #0070f3;
    border: 1px solid #e0e8ff;
}

.table-container {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.inventory-table thead {
    background-color: #0070f3;
    color: white;
}

.inventory-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inventory-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.inventory-table tbody tr:hover {
    background-color: #f8f9fa;
}

.inventory-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-item-added {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.inventory-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inventory-pagination button {
    background-color: #0070f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.inventory-pagination button:hover {
    background-color: #0056b3;
}

.inventory-pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.inventory-pagination span {
    font-size: 14px;
    color: #666;
}

/* Responsive design for inventory table */
@media (max-width: 768px) {
    .inventory-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .inventory-stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .inventory-table {
        font-size: 12px;
    }

    .inventory-table th,
    .inventory-table td {
        padding: 8px 4px;
    }

    .inventory-pagination {
        flex-direction: column;
        gap: 10px;
    }
}

/* Action Button Base Styles */
.action-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 70px;
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
    background-color: #6c757d !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Receive Button - Blue */
.receive-btn {
    background-color: #007bff;
}

.receive-btn:hover {
    background-color: #0056b3;
}

/* Deliver Button - Green */
.deliver-btn {
    background-color: #28a745;
}

.deliver-btn:hover {
    background-color: #218838;
}

/* View Button - Secondary/Gray */
.view-btn {
    background-color: #6c757d;
}

.view-btn:hover {
    background-color: #545b62;
}

.status-delivered {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #99d1ff;
}

/* Action column specific styling */
.inventory-table th:last-child,
.inventory-table td:last-child {
    text-align: center;
    width: 100px;
}

/* Additional responsive styling for action column */
@media (max-width: 768px) {
    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 60px;
    }

    .inventory-table th:last-child,
    .inventory-table td:last-child {
        width: 80px;
    }
}

/* Delivery Process Styling */
.delivery-step {
    display: none;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 15px 0;
    background-color: #f8f9fa;
}

.delivery-step.active {
    display: block;
}

.delivery-step h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.delivery-step p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.delivery-form-group {
    margin-bottom: 15px;
}

.delivery-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.delivery-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.delivery-form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.delivery-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.delivery-checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.delivery-btn {
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.delivery-btn:hover {
    background-color: #0056b3;
}

.delivery-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.delivery-btn.success {
    background-color: #28a745;
}

.delivery-btn.success:hover {
    background-color: #1e7e34;
}

.delivery-btn.warning {
    background-color: #ffc107;
    color: #333;
}

.delivery-btn.warning:hover {
    background-color: #e0a800;
}

#delivery-message {
    display: none;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
    font-weight: bold;
    text-align: center;
}

#delivery-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#delivery-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#delivery-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

#delivery-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.delivery-info {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.delivery-info h5 {
    color: #1976d2;
    margin: 0 0 10px 0;
}

.delivery-info p {
    margin: 5px 0;
    color: #333;
}

.delivery-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.delivery-status.received {
    background-color: #fff3cd;
    color: #856404;
}

.delivery-status.otp-sent {
    background-color: #d1ecf1;
    color: #0c5460;
}

.delivery-status.otp-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.delivery-status.otp-verification-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.delivery-status.otp-verified {
    background-color: #d4edda;
    color: #155724;
}

.delivery-status.nid-verified {
    background-color: #d4edda;
    color: #155724;
}

.delivery-status.biometric-verified {
    background-color: #d4edda;
    color: #155724;
}

.delivery-status.delivered {
    background-color: #28a745;
    color: white;
}

/* Modern Modal Styling */
#inventory-events-backdrop,
#inventory-view-backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Changed from center to flex-start for top positioning */
    padding: 20px;
    padding-top: 0;
    /* Remove top padding to position modal at top */
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modern Modal Container */
#inventory-events-backdrop .bag-items-container,
#inventory-view-backdrop .bag-items-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

/* Modern Header */
#inventory-events-backdrop .bag-items-container-header,
#inventory-view-backdrop .bag-items-container-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

#inventory-events-backdrop .bag-item-title,
#inventory-view-backdrop .bag-item-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Modern Close Button */
#inventory-events-backdrop .bag-items-container-header .pos-btn,
#inventory-view-backdrop .bag-items-container-header .pos-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0;
    backdrop-filter: blur(10px);
}

#inventory-events-backdrop .bag-items-container-header .pos-btn:hover,
#inventory-view-backdrop .bag-items-container-header .pos-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Content Area with Scroll */
#inventory-events-backdrop .bag-items-container>div:not(.bag-items-container-header):not(.loading-div),
#inventory-view-backdrop .bag-items-container>div:not(.bag-items-container-header):not(.loading-div) {
    padding: 0 20px;
}

/* Compact Item Details */
.bag-item-title-container {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bag-item-title-text {
    font-weight: 600;
    color: #374151;
    min-width: 100px;
    margin: 0;
    font-size: 13px;
}

.bag-item-title-value {
    color: #111827;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

/* Compact Delivery Steps */
#otp-send-step,
#otp-verify-step,
#nid-verify-step,
#biometric-verify-step,
#final-delivery-step {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    /* Reduced from 16px */
    margin: 8px 0;
    /* Reduced from 12px */
    border: 1px solid #e5e7eb;
}

/* Compact delivery process container */
#delivery-process-container {
    margin-top: 8px !important;
    /* Reduced from 20px */
}

/* Compact bag-item-title-container in delivery steps */
#otp-send-step .bag-item-title-container,
#otp-verify-step .bag-item-title-container,
#nid-verify-step .bag-item-title-container,
#biometric-verify-step .bag-item-title-container,
#final-delivery-step .bag-item-title-container {
    padding: 4px 0;
    /* Reduced from 8px */
    margin-bottom: 8px;
    /* Add small margin */
    border-bottom: none;
    /* Remove border for cleaner look */
}

/* Compact button containers in delivery steps */
#otp-send-step .pos-btn-container,
#otp-verify-step .pos-btn-container,
#nid-verify-step .pos-btn-container,
#biometric-verify-step .pos-btn-container,
#final-delivery-step .pos-btn-container {
    margin: 8px 0 4px 0;
    /* Reduced margins */
}

/* Compact resend container */
#otp-resend-container {
    margin-top: 6px !important;
    /* Reduced from 10px */
}

/* Compact status message */
#delivery-status-message {
    margin: 6px 0 !important;
    /* Reduced from 10px */
    padding: 8px !important;
    /* Reduced from 10px */
}

/* Compact modal content padding - excluding scrollable container */
#inventory-events-backdrop .bag-items-container>div:not(.bag-items-container-header):not(.loading-div):not(.inventory-modal-scrollable) {
    padding: 0 16px;
    /* Reduced from 20px */
}

/* Compact table container */
#inventory-events-backdrop .pm_table_style {
    margin: 8px 0;
    /* Reduced margin around table */
}

/* Scrollable container for inventory modal content */
.inventory-modal-scrollable {
    max-height: 70vh;
    /* Limit height to 70% of viewport */
    overflow-y: auto;
    /* Enable vertical scrolling */
    overflow-x: hidden;
    /* Hide horizontal scroll */
    padding: 0 16px;
    /* Add padding for content */
    margin: 0 -16px;
    /* Negative margin to compensate for padding */
}

/* Custom scrollbar styling for inventory modal */
.inventory-modal-scrollable::-webkit-scrollbar {
    width: 6px;
}

.inventory-modal-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.inventory-modal-scrollable::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.inventory-modal-scrollable::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}



/* Modern Input Fields */
#otp-input,
#nid-input {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    /* Reduced from 12px 16px */
    font-size: 14px;
    /* Reduced from 16px */
    transition: all 0.2s ease;
    width: 200px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 4px 0;
    /* Add small margin */
}

#otp-input:focus,
#nid-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Modern Buttons */
#send-otp-btn,
#verify-otp-btn,
#resend-otp-btn,
#verify-nid-btn,
#verify-biometric-btn,
#final-deliver-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    /* Reduced from 12px 24px */
    font-weight: 600;
    font-size: 14px;
    /* Reduced font size */
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
    margin: 4px 6px;
    /* Reduced margin */
}

#send-otp-btn:hover,
#verify-otp-btn:hover,
#resend-otp-btn:hover,
#verify-nid-btn:hover,
#verify-biometric-btn:hover,
#final-deliver-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

#send-otp-btn:active,
#verify-otp-btn:active,
#resend-otp-btn:active,
#verify-nid-btn:active,
#verify-biometric-btn:active,
#final-deliver-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Disabled Button State */
#resend-otp-btn:disabled,
#verify-biometric-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modern Status Messages */
#delivery-status-message {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid transparent;
}

#delivery-status-message.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

#delivery-status-message.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

#delivery-status-message.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

#delivery-status-message.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* Compact Table Styling */
#inventory-events-table,
#inventory-view-events-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

#inventory-events-table thead,
#inventory-view-events-table thead {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

#inventory-events-table th,
#inventory-view-events-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    border-bottom: 2px solid #e5e7eb;
}

#inventory-events-table td,
#inventory-view-events-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
    font-size: 12px;
}

#inventory-events-table tbody tr:last-child td,
#inventory-view-events-table tbody tr:last-child td {
    border-bottom: none;
}

/* Compact Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-received {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-otpsent {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.status-otpverificationsuccess,
.status-badge.status-otpverified {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-otpverificationfailed {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-nidverificationsuccess,
.status-badge.status-nidverified {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-nidverificationfailed {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-biometricverified {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-delivered {
    background: #10b981;
    color: white;
}

/* Modern Checkbox */
#biometric-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    margin-right: 8px;
}

/* Compact OTP Resend Container */
#otp-resend-container {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    border-left: 3px solid #667eea;
}

/* Loading State */
.loading-div {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: #f9fafb;
    margin: 20px 0;
    border-radius: 8px;
}

.loading-container {
    text-align: center;
    color: #6b7280;
}

.loading-container p {
    margin-top: 8px;
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    #inventory-events-backdrop,
    #inventory-view-backdrop {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    #inventory-events-backdrop .bag-items-container,
    #inventory-view-backdrop .bag-items-container {
        max-height: 90vh;
        border-radius: 12px;
        max-width: 500px;
    }

    #inventory-events-backdrop .bag-items-container-header,
    #inventory-view-backdrop .bag-items-container-header {
        padding: 14px 16px;
    }

    #inventory-events-backdrop .bag-item-title,
    #inventory-view-backdrop .bag-item-title {
        font-size: 16px;
    }

    .bag-item-title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 6px 0;
    }

    .bag-item-title-text {
        min-width: auto;
        font-size: 12px;
    }

    .bag-item-title-value {
        font-size: 12px;
    }

    #otp-input,
    #nid-input {
        width: 100%;
        max-width: 250px;
    }

    #inventory-events-table th,
    #inventory-view-events-table th,
    #inventory-events-table td,
    #inventory-view-events-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
}