/* ============================================
   SIMLAB - Modern UI Enhancements
   ============================================ */

/* Modern Pagination Styles */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: 0.4rem;
    margin-bottom: 0;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    color: #475569;
    text-decoration: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
}

.pagination .page-link:hover {
    z-index: 2;
    color: #2563eb;
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pagination .page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8;
    pointer-events: none;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.6;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border-radius: 0.6rem;
}

/* Pagination info text */
.pagination-info {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-right: 1rem;
}

/* Modern Button Consistency */
.btn {
    font-weight: 600;
    border-radius: 0.6rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    padding: 0.65rem 1.2rem;
    font-size: 0.875rem;
}

.btn i {
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

/* Primary Button - Blue */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* Success Button - Green */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

/* Danger Button - Red */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
}

/* Warning Button - Yellow */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #78350f;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3);
    color: #78350f;
}

/* Info Button - Cyan */
.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(6, 182, 212, 0.2);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.3);
}

/* Secondary Button - Gray */
.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(100, 116, 139, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    box-shadow: 0 10px 15px -3px rgba(100, 116, 139, 0.3);
}

/* Outline Buttons */
.btn-outline-primary {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid #64748b;
    color: #64748b;
    box-shadow: none;
}

.btn-outline-secondary:hover {
    background: #64748b;
    border-color: #64748b;
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
    box-shadow: none;
}

.btn-outline-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* Small Buttons */
.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

.btn-sm i {
    font-size: 0.875rem;
}

/* Large Buttons */
.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.75rem;
}

/* Button Groups */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.6rem;
    border-bottom-left-radius: 0.6rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.6rem;
    border-bottom-right-radius: 0.6rem;
}

/* Modern Form Controls */
.form-control,
.form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 0.6rem;
    padding: 0.7rem 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    font-size: 0.9375rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.1);
    outline: 0;
}

.form-control::placeholder {
    color: #94a3b8;
}

/* Date Input with Icon */
.input-group-date {
    position: relative;
}

.input-group-date .form-control {
    padding-left: 2.75rem;
}

.input-group-date .input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 4;
    pointer-events: none;
}

/* Flatpickr Custom Styles */
.flatpickr-calendar {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    font-family: inherit;
}

.flatpickr-months {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.75rem;
}

.flatpickr-current-month {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: white;
    padding: 0.5rem;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    fill: rgba(255, 255, 255, 0.8);
}

.flatpickr-weekdays {
    background: #f8fafc;
    font-weight: 600;
    color: #64748b;
}

.flatpickr-day {
    border-radius: 0.5rem;
    color: #1e293b;
    font-weight: 500;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: transparent;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.flatpickr-day.today {
    border-color: #2563eb;
    color: #2563eb;
    font-weight: 600;
}

.flatpickr-day:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

/* Modern Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-success i {
    color: #059669;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-danger i {
    color: #dc2626;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-warning i {
    color: #d97706;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.alert-info i {
    color: #2563eb;
}

.alert .btn-close {
    padding: 0.5rem;
    opacity: 0.6;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* SweetAlert2 Custom Theme */
.swal2-popup {
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
}

.swal2-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1e293b;
}

.swal2-content {
    font-size: 1rem;
    color: #64748b;
}

.swal2-icon {
    border-width: 3px;
}

.swal2-confirm {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 0.6rem;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.swal2-confirm:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.swal2-cancel {
    background: #e2e8f0;
    color: #475569;
    border-radius: 0.6rem;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
}

.swal2-cancel:hover {
    background: #cbd5e1;
}

/* Table Action Buttons Consistency */
.table-actions .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
    min-width: auto;
}

.table-actions .btn i {
    font-size: 0.875rem;
}

/* Badge Improvements */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

/* Card Improvements */
.card {
    border-radius: 0.95rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0.95rem 0.95rem 0 0;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Modal Improvements */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 0 0 1rem 1rem;
}

/* Loading Spinner */
.spinner-border-modern {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2rem;
    border-color: currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

/* Dropdown Improvements */
.dropdown-menu {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top-color: #e2e8f0;
}

/* Toast Notifications */
.toast {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.toast-header {
    border-radius: 0.75rem 0.75rem 0 0;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border-bottom: none;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.8125rem;
    }
    
    .pagination .page-link {
        min-width: 2.25rem;
        height: 2.25rem;
        font-size: 0.8125rem;
    }
    
    .table-actions {
        gap: 0.25rem;
    }
    
    .table-actions .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Focus States */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background-color: rgba(37, 99, 235, 0.2);
    color: #1e293b;
}
