/* ===========================================
   ROBUST PMS STYLES
   =========================================== */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    color: white;
    font-size: 18px;
}

.loading-overlay .spinner-border {
    width: 4rem;
    height: 4rem;
}

/* Toast Notifications */
.custom_toast {
    position: fixed;
    top: 25px;
    right: 30px;
    border-radius: 12px;
    background: #fff;
    padding: 20px 35px 20px 25px;
    box-shadow: 0 6px 20px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: translateX(calc(100% + 30px));
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.35);
    z-index: 10000;
}

.custom_toast.active {
    transform: translateX(0%);
}

.custom_toast-content {
    display: flex;
    align-items: center;
}

.custom_toast-content .check {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    min-width: 35px;
    background-color: #4070f4;
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
}

.custom_toast-content.bg-success .check {
    background-color: #28a745;
}

.custom_toast-content.bg-danger .check {
    background-color: #dc3545;
}

.custom_toast-content.bg-warning .check {
    background-color: #ffc107;
    color: #000;
}

.custom_toast-content.bg-info .check {
    background-color: #17a2b8;
}

.custom_toast-content .message {
    display: flex;
    flex-direction: column;
    margin: 0 20px;
}

.message .text {
    font-size: 16px;
    font-weight: 400;
    color: #666666;
}

.message .text.text-1 {
    font-weight: 600;
    color: #333;
}

.custom_toast-close {
    position: absolute;
    top: 10px;
    right: 15px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
}

.custom_toast-close:hover {
    opacity: 1;
}

.custom_toast .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #ddd;
}

.custom_toast .progress:before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background-color: #4070f4;
}

.custom_toast .progress.active:before {
    animation: progress 5s linear forwards;
}

@keyframes progress {
    100% {
        right: 100%;
    }
}

/* Priority Badges */
.badge.bg-low {
    background-color: #28a745 !important;
}

.badge.bg-medium {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-high {
    background-color: #fd7e14 !important;
}

.badge.bg-critical {
    background-color: #dc3545 !important;
}

/* Status Badges */
.badge.status-planning {
    background-color: #6c757d !important;
}

.badge.status-ontrack {
    background-color: #0d6efd !important;
}

.badge.status-atrisk {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.status-delayed {
    background-color: #dc3545 !important;
}

.badge.status-completed {
    background-color: #28a745 !important;
}

.badge.status-onhold {
    background-color: #17a2b8 !important;
}

/* Divisi Cards in Modal */
.divisi-card {
    border-left: 4px solid #0d6efd;
    transition: all 0.3s ease;
}

.divisi-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Modal Enhancements */
.custom-modal-1 {
    display: none;
    position: fixed;
    z-index: 9998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-opens .custom-modal-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal-1-dialog {
    background-color: #fefefe;
    margin: auto;
    border-radius: 12px;
    width: 90%;
    max-width: 90%;
    height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    color: white;
    margin: 0;
}

.close-custom-modal,
.zoom-custom-modal,
.save-custom-modal {
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: white;
    font-size: 18px;
}

.close-custom-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.zoom-custom-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.save-custom-modal {
    background-color: #28a745;
    font-weight: 600;
    font-size: 16px;
}

.save-custom-modal:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* Form Styling */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
}

/* DataTable Enhancements */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 6px 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9fa !important;
    border: 1px solid #667eea !important;
    color: #667eea !important;
}

table.dataTable thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #495057;
}

table.dataTable tbody tr:hover {
    background-color: #f8f9fa !important;
}

/* Action Buttons */
.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-modal-1-dialog {
        width: 95%;
        height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .custom_toast {
        right: 10px;
        padding: 15px 25px 15px 20px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    .modal-header h3 {
        font-size: 18px;
    }
    
    .save-custom-modal {
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* Swiper Card Enhancements */
.swiper-slide .card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.swiper-slide .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Calendar Elements */
.calendar {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    min-width: 80px;
}

/* Avatar Group */
.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
}

.avatar-group img:first-child {
    margin-left: 0;
}

/* Progress Bar */
progress {
    appearance: none;
    border: none;
    border-radius: 10px;
    height: 10px;
}

progress::-webkit-progress-bar {
    background-color: #e9ecef;
    border-radius: 10px;
}

progress::-webkit-progress-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

progress::-moz-progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* Select2 Enhancements */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: 8px;
    border: 1px solid #ced4da;
    min-height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #667eea;
}

/* Utility Classes */
.fw-600 {
    font-weight: 600;
}

.text-darkpurple {
    color: #764ba2;
}

.text-purple {
    color: #667eea;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .btn,
    .custom_toast,
    .loading-overlay {
        display: none !important;
    }
    
    .main-container {
        margin: 0 !important;
        padding: 0 !important;
    }
}
