/* width */
::-webkit-scrollbar {
    width: 5px;
}

/* Scrollbar แนวตั้ง */
::-webkit-scrollbar:vertical {
    width: 5px;
}
  
/* Scrollbar แนวนอน */
::-webkit-scrollbar:horizontal {
    height: 5px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #ffffff;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #0e1726;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #0e1726;
}

body {
    background-color: #f5f7fa;
}

body, div {
    font-family: "Chakra Petch", sans-serif !important;
}

.datetime-divider {
    width: 1px;
    height: 30px;
    margin: 0 16px;
    background: #e5ebf4;
}

@media (max-width: 640px) {
    .datetime-divider {
        margin: 0 9px;
    }
}

.navbar-floating header,.navbar-sticky header {
    position: sticky;
    top: 0;
    z-index: 20
}

.form-input, .form-textarea, .form-select, .form-multiselect {
 font-weight: normal !important;
}

.border-danger .multiselect__tags {
    --tw-border-opacity: 1 !important;
    border-color: rgb(231 81 90 / var(--tw-border-opacity, 1)) !important;
}

.quill-error .ql-toolbar.ql-snow, .quill-error .ql-container.ql-snow {
    border-color: #e7515a !important;
}

.toast-title-small {
    font-size: 16px !important;
    font-weight: 400 !important;
}

.swal2-popup .swal2-title {
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* Folder Colors */
.badge-folder-color-blue { background-color: #EFF6FF !important; color: #3B82F6 !important; }
.badge-folder-color-indigo { background-color: #EEF2FF !important; color: #4F46E5 !important; }
.badge-folder-color-sky { background-color: #F0F9FF !important; color: #0EA5E9 !important; }
.badge-folder-color-cyan { background-color: #ECFEFF !important; color: #06B6D4 !important; }
.badge-folder-color-teal { background-color: #F0FDFA !important; color: #14B8A6 !important; }
.badge-folder-color-emerald { background-color: #ECFDF5 !important; color: #10B981 !important; }
.badge-folder-color-green { background-color: #F0FDF4 !important; color: #22C55E !important; }
.badge-folder-color-lime { background-color: #F7FEE7 !important; color: #65A30D !important; }
.badge-folder-color-amber { background-color: #FFFBEB !important; color: #F59E0B !important; }
.badge-folder-color-orange { background-color: #FFF7ED !important; color: #F97316 !important; }
.badge-folder-color-red { background-color: #FEF2F2 !important; color: #EF4444 !important; }
.badge-folder-color-rose { background-color: #FFF1F2 !important; color: #F43F5E !important; }
.badge-folder-color-violet { background-color: #F5F3FF !important; color: #7C3AED !important; }
.badge-folder-color-yellow { background-color: #FEFCE8 !important; color: #EAB308 !important; }
.badge-folder-color-slate { background-color: #F1F5F9 !important; color: #64748B !important; }

.badge-option {
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
}

.badge-option:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary, #4361ee);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.badge-option:active {
    transform: scale(0.94);
}

.badge-option.is-active {
    border-width: 2px;
    transform: translateY(-1px);
}

.badge-folder {
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent) !important;
    border-radius: 5px !important;
}

.badge-report-status-1  { color: #1d4ed8 !important; background: #eff6ff !important; border: 1px solid #2563eb !important; }
.badge-report-status-2  { color: #7e22ce !important; background: #faf5ff !important; border: 1px solid #9333ea !important; }
.badge-report-status-3  { color: #0e7490 !important; background: #ecfeff !important; border: 1px solid #0891b2 !important; }
.badge-report-status-4  { color: #c2410c !important; background: #fff7ed !important; border: 1px solid #ea580c !important; }
.badge-report-status-5  { color: #854d0e !important; background: #fefce8 !important; border: 1px solid #ca8a04 !important; }
.badge-report-status-6  { color: #15803d !important; background: #f0fdf4 !important; border: 1px solid #16a34a !important; }
.badge-report-status-7  { color: #be185d !important; background: #fdf2f8 !important; border: 1px solid #db2777 !important; }
.badge-report-status-8  { color: #b91c1c !important; background: #fef2f2 !important; border: 1px solid #dc2626 !important; }
.badge-report-status-9  { color: #334155 !important; background: #f8fafc !important; border: 1px solid #475569 !important; }
.badge-report-status-10 { color: #78350f !important; background: #fffbeb !important; border: 1px solid #92400e !important; }

.sidebar ul.sub-menu li button, .sidebar ul.sub-menu li a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.multiselect--disabled {
    background: none !important;
}

.multiselect--disabled .multiselect__current, .multiselect--disabled .multiselect__select {
    background: none !important;
    color: none !important;
}

.bh-table-responsive {
    min-height: 250px;
}

.spare-detail {
    text-align: left;
    padding: 5px 8px;
}

.spare-detail-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 32px;
}

.spare-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.spare-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    margin: 0 0 4px;
}

.spare-detail-code {
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.spare-detail-status {
    width: fit-content;
    margin: 12px auto 20px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.spare-detail-status.in-stock {
    background: #dcfce7;
    color: #15803d;
}

.spare-detail-status.low-stock {
    background: #fef3c7;
    color: #b45309;
}

.spare-detail-status.out-stock {
    background: #fee2e2;
    color: #dc2626;
}

.spare-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.spare-detail-item {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-width: 0;
}

.spare-detail-item small,
.spare-detail-description small {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 5px;
}

.spare-detail-item strong {
    display: block;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.spare-detail-description {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.spare-detail-description p {
    color: #475569;
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
}

.spare-detail-close {
    background: #4361ee;
    color: white;
    border: 0;
    border-radius: 8px;
    padding: 9px 28px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.spare-detail-close:hover {
    background: #3046c5;
}

.dark .spare-detail-title,
.dark .spare-detail-item strong {
    color: #e2e8f0;
}

.dark .spare-detail-item,
.dark .spare-detail-description {
    background: #1b2e4b;
    border-color: #253b5c;
}

.dark .spare-detail-description p {
    color: #cbd5e1;
}