.form-control {
    padding: .7rem 1rem;
}

select.form-control {
    padding: .75rem 1rem;
}

/* Small Modal (sm) */
.modal-sm {
    max-width: 450px !important;
}

/* Large Modal (lg) */
.modal-lg {
    width: 80%;
    max-width: 900px;
}

/* Extra-Large Modal (xl) */
.modal-xl {
    width: 90%;
    max-width: 1200px;
}

/* Full-Width Modal */
.modal-full {
    width: 100%;
    max-width: 100%;
    margin: 5px;
    padding: 5px;
}

/* Make sure modals are responsive */
@media(max-width: 576px) {
    .modal-sm,
    .modal-lg,
    .modal-xl,
    .modal-full {
        width: 95%;
    }

    .btn-sm-block {
        display:block;
        width:100%;
    }
}

.pagination {
    justify-content: flex-end;
}

.page-item.active .page-link {
    background-color: #1a2035;
    border: none;
}

.table td,
.table th {
    height: 50px;
}

.colored-toast.swal2-icon-success {
    background-color: #18bb9c !important;
}

.colored-toast.swal2-icon-error {
    background-color: #e84c3d !important;
}

.colored-toast.swal2-icon-warning {
    background-color: #f39c11 !important;
}

.colored-toast.swal2-icon-info {
    background-color: #3598db !important;
}

.colored-toast.swal2-icon-question {
    background-color: #6b8a97 !important;
}

.colored-toast .swal2-title {
    color: white;
}

.colored-toast .swal2-close {
    color: white;
}

.colored-toast .swal2-html-container {
    color: white;
}

table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date, table.dataTable td.dt-type-numeric, table.dataTable td.dt-type-date {
    text-align: start;
}

.table td, .table th {
    letter-spacing: 0.05rem;
    font-size: 12px;
    padding: 5px 10px !important;
}

.selectgroup-button {
    padding: .40rem 1.5rem !important;
}

.form-check-label, .form-radio-label {
    margin-right: 50% !important;
    margin-left: 70% !important;
}

.daterange-picker, .form-control[readonly] {
    background: rgba(21, 27, 59, 0.6) !important;
    color: #ffffff !important;
    opacity: initial !important;
    border-color: rgba(0, 212, 255, 0.2) !important;
}

div:where(.swal2-container) div:where(.swal2-popup) {
    font-size: 0.85rem !important;
}

.bootstrap-select .btn-light {
    border-color: rgba(0, 212, 255, 0.2) !important;
    background: rgba(21, 27, 59, 0.6) !important;
    color: #ffffff !important;
}

div#table_loading_processing {
    z-index: 99999;
}

div.dt-processing {
    padding: 1em 0 !important;
}

.overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    position: absolute;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
    justify-content: center;
    align-items: center;
    z-index: 999; /* Pastikan overlay berada di atas elemen lain */
}

.overlay-message {
    background: rgba(21, 27, 59, 0.95);
    color: #ffffff;
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 212, 255, 0.3);
    text-align: center;
}

.gutters-xs {
    margin-right: -.25rem;
    margin-left: 0 !important;
}

.colorinput {
    display: flex !important;
    margin-top: .6rem !important;
    margin-bottom: .5rem !important;
}

.colorinput-color:before {
    content: '✔';
    font-size: 14px;
    color: #00d4ff;
    display: inline-block;
    text-align: center;
}

/* === IoT Theme Enhancements for Existing Components === */

/* Bootstrap Select Dropdown */
.bootstrap-select .dropdown-menu {
    background: rgba(21, 27, 59, 0.98) !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    backdrop-filter: blur(10px);
}

.bootstrap-select .dropdown-menu li a {
    color: #a0aec0 !important;
}

.bootstrap-select .dropdown-menu li a:hover,
.bootstrap-select .dropdown-menu li.active a {
    background: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
}

/* DataTables Processing */
div.dt-processing {
    background: rgba(21, 27, 59, 0.95) !important;
    color: #00d4ff !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3) !important;
}

/* Select2 if used */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: rgba(21, 27, 59, 0.6) !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    color: #ffffff !important;
}

.select2-container--default .select2-results__option {
    background: rgba(21, 27, 59, 0.98) !important;
    color: #a0aec0 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
}

/* Ensure labels are visible */
label {
    color: #a0aec0 !important;
}

/* Input groups */
.input-group-text {
    background: rgba(21, 27, 59, 0.8) !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    color: #00d4ff !important;
}

/* Nav tabs if used */
.nav-tabs {
    border-bottom: 2px solid rgba(0, 212, 255, 0.2) !important;
}

.nav-tabs .nav-link {
    color: #a0aec0 !important;
    border: none !important;
}

.nav-tabs .nav-link.active {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.1) !important;
    border-bottom: 2px solid #00d4ff !important;
}

.nav-tabs .nav-link:hover {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.05) !important;
}

/* Badge enhancements */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.badge-primary {
    background: linear-gradient(135deg, #00d4ff, #0066ff) !important;
    color: #0a0e27 !important;
}

.badge-success {
    background: linear-gradient(135deg, #00ff88, #00cc6a) !important;
    color: #0a0e27 !important;
}

.badge-warning {
    background: linear-gradient(135deg, #ff6b35, #ff8c42) !important;
    color: #0a0e27 !important;
}

.badge-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f) !important;
}

.badge-info {
    background: linear-gradient(135deg, #6c63ff, #7c3aed) !important;
}
