.btn-fixed {
    width: 60px;
}

.form-check,
.form-label,
.form-control,
.form-select,
.form-check-input,
.form-check-label {
    font-size: 13px;
}

.form-control-plaintext {
    font-weight: 500;
    font-size: 1rem;
}

.form-check {
    margin-bottom: 0;
    padding-left: 0;
}

.form-switch {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.form-switch .form-check-input {
    width: 2.4em;
    height: 1.2em;
    margin-top: 0;
    margin-left: 0;
    cursor: pointer;
}

.form-switch .form-check-label {
    margin-left: .5rem;
    margin-bottom: 0;
    white-space: nowrap;
    line-height: 1.2;
}

/* Default (OFF) */
.form-switch .form-check-input {
    width: 2.8em;
    height: 1.4em;
    background-color: #fff;
    border: 1px solid #adb5bd;
    cursor: pointer;
}

/* Completed = ON */
#CompleteY:checked {
    background-color: #198754;
    border-color: #198754;
}

/* Cancelled = ON */
#CancellY:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.readonly-switch,
.readonly-switch + .form-check-label {
    pointer-events: none;
    cursor: default;
    opacity: 1 !important;
}

.req-ord-switch:checked,
.req-stk-switch:checked {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.readonly-select {
    pointer-events: none;
    background-color: #fff !important;
    color: #212529 !important;
    opacity: 1 !important;
}

.readonly-select:focus {
    box-shadow: none;
}

/* To type automatic uppercase */
.uppercase-input {
    text-transform: uppercase;
}

input[type="text"]:not(#password),
input[type="email"],
select {
    text-transform: uppercase;
}

table td,
table th {
    vertical-align: middle !important;
}

table thead th {
    color: white !important;
}

table thead th a {
    color: white !important;
    text-decoration: none;
}

table thead th a:hover {
    color: #7aeb1e !important;
    /* optional: subtle hover effect */
}

/* .table-responsive {
    overflow-x: auto;
}

.table-responsive table {
    min-width: 2200px;
    white-space: nowrap;
} */

#toast-container.toast-top-right {
    top: 70px !important;
    right: 12px;
}

#toast-container>.toast {
    width: 450px;
    box-sizing: border-box;
}

.card {
    border-radius: 1rem;
}

.card-header {
    border-bottom: none;
}

body {
    margin: 0;
    padding-top: 40px;
}

.navbar {
    background-color: #212529 !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: #fff !important;
}

.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    width: 220px;
    background-color: #343a40;
    padding-top: 1rem;
    transition: width 0.3s ease;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar a {
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    height: 30px;
    padding: 0 1rem;
}

.sidebar a:hover {
    background-color: #495057;
}

.sidebar a .icon {
    font-size: 1rem;
    min-width: 20px;
    margin-right: 8px;
}

.sidebar a .text {
    font-size: 0.8rem;
}

#librarySubmenu a .icon {
    font-size: 1rem;
    min-width: 20px;
    margin-right: 8px;
}

#librarySubmenu a .text {
    font-size: 0.8rem;
}

.sidebar.collapsed .text,
.sidebar.collapsed a span.text {
    display: none;
}

.sidebar.collapsed .chevron-toggle {
    display: none;
}

.sidebar.collapsed a#libraryToggle > span.d-flex {
    justify-content: center;
    width: 100%;
    padding-left: 0 !important;
}

.sidebar.collapsed a#libraryToggle .icon {
    margin-right: 0 !important;
}

.main-content {
    margin-left: 0;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.main-content.authenticated {
    margin-left: 220px;
}

.main-content.collapsed {
    margin-left: 60px !important;
}

#sidebarToggleBtn {
    position: fixed;
    top: 50%;
    left: 220px;
    transform: translateY(-50%);
    width: 25px;
    height: 30px;
    background-color: #343a40;
    border: 1px solid #495057;
    border-left: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
    z-index: 1031;
    border-radius: 0 4px 4px 0;
    user-select: none;
}

.sidebar.collapsed + #sidebarToggleBtn {
    left: 60px;
}

.chevron-toggle {
    transition: transform 0.3s ease;
}

.chevron-toggle.rotate {
    transform: rotate(180deg);
}

/* Reduce extra space from the "×" clear button */
.select2-container--default .select2-selection--single .select2-selection__clear {
    left: 1px;          /* move "×" closer to the edge */
    right: auto;        /* remove extra right spacing */
    padding: auto;       /* shrink padding */
    font-size: 13x;    /* optional: make "×" smaller */
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 6px;  /* align text closer to left */
    padding-right: 4px; /* reduce right padding */
}

/* ===== Fix Select2 height to match Bootstrap form-control ===== */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 38px !important; /* exact Bootstrap 5 input height */
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    padding: 6px 12px !important;
    background-color: #fff !important;
    display: flex !important;
    align-items: center !important;
}

.select2-selection__rendered {
    line-height: normal !important;
    color: #212529 !important;
}

.select2-selection__arrow {
    height: 38px !important;
    right: 8px !important;
}

/* ===== Ensure dropdown appears above modals ===== */
.select2-container--open {
    z-index: 99999 !important;
}

/* Dropdown list items */
.select2-results__option {
    font-size: 13px !important; /* change to 10px, 12px, 13px, etc. */
}

/* Selected value in the combo box */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 13px !important;
}

/* ===== Dark mode compatibility ===== */
body.bg-dark .select2-container .select2-selection--single {
    background-color: #2c3034 !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

body.bg-dark .select2-selection__rendered {
    color: #f8f9fa !important;
}

body.bg-dark .select2-dropdown {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
}

/* ===== EDIT STAFF TIMER STYLES ===== */
#edit-timer {
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

#countdown {
    font-size: 1.2em;
    font-weight: bold;
    color: #d63384;
}

.btn {
    min-width: 100px;
    margin-right: 10px;
}

.toggle-detail {
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    user-select: none;
    color: #495057;
    display: inline-block;
}

.toggle-detail:hover {
    color: #0d6efd;
}

.table th,
.table td {
    vertical-align: middle;
    font-size: 14px;
}

.table-sm th,
.table-sm td {
    padding: .3rem .4rem;
}

.table tbody td {
    font-size: 13px;
}

.detail-header th {
    background-color: rgb(148, 156, 238) !important;
    color: white !important;
}

.details-table {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

.details-table table {
    table-layout: fixed;
    min-width: 3000px;
}

/* Keep header visible */
.details-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #212529;
    color: #fff;
}

.action-btn {
    padding: 1px 2px !important;
    margin: 0 !important;
    min-width: auto !important;
    line-height: 1;
}

.action-btn i {
    font-size: 14px;
}

.text-end {
    text-align: right !important;
}