/*
 * Utilities CSS - Admin Panel
 * Responsive design with Bootstrap 5 integration
 * Mobile-first approach with 2-grid filter layout on mobile
 */

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb-utility {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.breadcrumb-utility .breadcrumb-item {
    font-weight: 500;
}

.breadcrumb-utility .breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-utility .breadcrumb-item a:hover {
    color: #764ba2;
}

.breadcrumb-utility .breadcrumb-item.active {
    color: #6c757d;
}

/* ========================================
   UTILITY HEADER
   ======================================== */
.utility-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin: -1.5rem -1.5rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.utility-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.utility-header p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-utility {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-utility:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ========================================
   ALERTS
   ======================================== */
.alert-utility {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.alert-utility i {
    font-size: 1.1rem;
}

/* ========================================
   STAT CARDS
   ======================================== */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    background: rgba(102, 126, 234, 0.1);
}

.stat-icon.text-primary { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.stat-icon.text-success { background: rgba(25, 135, 84, 0.1); color: #198754; }
.stat-icon.text-danger { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
.stat-icon.text-warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.stat-icon.text-info { background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ========================================
   UTILITY CARDS
   ======================================== */
.utility-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.utility-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: none;
    color: #ffffff;
}

.utility-card-header i {
    color: #ffffff;
}

.utility-card-body {
    padding: 1.5rem;
    background: #ffffff;
}

/* ========================================
   FILTER CARD
   ======================================== */
.filter-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.filter-card .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.filter-card .form-select,
.filter-card .form-control {
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.filter-card .form-select:focus,
.filter-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* ========================================
   FORM UTILITY
   ======================================== */
.form-utility .form-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-utility .form-label.required::after {
    content: ' *';
    color: #dc3545;
}

.form-utility .form-control,
.form-utility .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
}

.form-utility .form-control:focus,
.form-utility .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-utility .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-utility .form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* ========================================
   TABLE UTILITY
   ======================================== */
.table-utility {
    font-size: 0.9rem;
    margin-bottom: 0;
    background: #ffffff;
}

.table-utility thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.table-utility thead th {
    font-weight: 600;
    font-size: 0.875rem;
    color: #ffffff;
    border-bottom: none;
    padding: 1rem 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025rem;
}

.table-utility tbody td {
    padding: 1rem 0.875rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    background: #ffffff;
}

.table-utility tbody tr {
    transition: background-color 0.2s;
}

.table-utility tbody tr:hover {
    background-color: #f8f9fa !important;
}

.table-utility .action-buttons {
    display: flex;
    gap: 0.375rem;
    justify-content: flex-start;
}

.table-utility .action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

/* ========================================
   PAGINATION UTILITY
   ======================================== */
.pagination-utility {
    margin-top: 1.5rem;
}

.pagination-utility .page-link {
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: #667eea;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
}

.pagination-utility .page-link:hover {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.pagination-utility .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.pagination-utility .page-item.disabled .page-link {
    color: #6c757d;
    opacity: 0.5;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 0.75rem;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.4;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #212529;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #6c757d;
}

/* ========================================
   BADGES
   ======================================== */
/* Priority Badges */
.badge-priority-urgent {
    background-color: #dc3545;
    color: white;
}

.badge-priority-high {
    background-color: #fd7e14;
    color: white;
}

.badge-priority-medium {
    background-color: #ffc107;
    color: #212529;
}

.badge-priority-low {
    background-color: #6c757d;
    color: white;
}

/* Type Badges */
.badge-type-info {
    background-color: #0dcaf0;
    color: #212529;
}

.badge-type-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-type-success {
    background-color: #198754;
    color: white;
}

.badge-type-danger {
    background-color: #dc3545;
    color: white;
}

.badge-type-reminder {
    background-color: #0d6efd;
    color: white;
}

/* ========================================
   MOBILE RESPONSIVE CARDS
   ======================================== */
.mobile-card {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

/* Tablet and Below */
@media (max-width: 768px) {
    /* Header Adjustments */
    .utility-header {
        padding: 1.5rem 1rem;
        margin: -1rem -1rem 1.5rem;
    }

    .utility-header h1 {
        font-size: 1.5rem;
    }

    .utility-header p {
        font-size: 0.875rem;
    }

    /* Breadcrumb */
    .breadcrumb-utility {
        font-size: 0.8125rem;
        padding: 0.625rem 0.875rem;
        margin-bottom: 1rem;
    }

    /* Stat Cards - 2 Columns */
    .stat-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8125rem;
    }

    /* Filter Card - 2 Grid Layout WAJIB */
    .filter-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .filter-card .row > div {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .filter-card .form-label {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }

    .filter-card .form-select,
    .filter-card .form-control {
        font-size: 0.8125rem;
        padding: 0.375rem 0.625rem;
        height: auto;
    }

    .filter-card .btn {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }

    /* Utility Cards */
    .utility-card {
        margin-bottom: 1rem;
    }

    .utility-card-header {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .utility-card-body {
        padding: 1rem;
    }

    /* Buttons */
    .btn-utility {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    /* Alerts */
    .alert-utility {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    /* Table - Hidden on Mobile, Show Cards */
    .table-responsive {
        overflow-x: auto;
    }

    .table-utility thead th {
        font-size: 0.8125rem;
        padding: 0.625rem 0.5rem;
    }

    .table-utility tbody td {
        font-size: 0.8125rem;
        padding: 0.625rem 0.5rem;
    }

    /* Mobile Cards */
    .mobile-card {
        padding: 0.875rem;
        margin-bottom: 0.625rem;
    }

    /* Pagination */
    .pagination-utility .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.8125rem;
        margin: 0 0.125rem;
    }

    /* Empty State */
    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

    .empty-state p {
        font-size: 0.95rem;
    }

    /* Form Utility */
    .form-utility .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .form-utility .form-control,
    .form-utility .form-select {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Mobile Only */
@media (max-width: 480px) {
    /* Extreme Mobile Optimization */
    .utility-header {
        padding: 1.25rem 0.875rem;
        margin: -0.875rem -0.875rem 1rem;
    }

    .utility-header h1 {
        font-size: 1.25rem;
    }

    .utility-header p {
        font-size: 0.8125rem;
    }

    /* Stat Cards - More Compact */
    .stat-card {
        padding: 0.875rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }

    .stat-value {
        font-size: 1.375rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Filter Card - 2 Grid Layout SUPER COMPACT */
    .filter-card {
        padding: 0.875rem;
    }

    .filter-card .row > div {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    .filter-card .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .filter-card .form-select,
    .filter-card .form-control {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    .filter-card .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    /* Utility Cards */
    .utility-card-header {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

    .utility-card-body {
        padding: 0.875rem;
    }

    /* Buttons */
    .btn-utility {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Alerts */
    .alert-utility {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* Breadcrumb */
    .breadcrumb-utility {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    /* Mobile Cards */
    .mobile-card {
        padding: 0.75rem;
    }

    /* Pagination */
    .pagination-utility .page-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Empty State */
    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 2.5rem;
    }

    .empty-state h3 {
        font-size: 1.125rem;
    }

    .empty-state p {
        font-size: 0.875rem;
    }
}

/* ========================================
   UTILITY SPECIFIC STYLES
   ======================================== */

/* Activity Logs */
.activity-log-item {
    border-left: 4px solid;
    transition: all 0.2s;
}

.activity-log-item:hover {
    background-color: #f8f9fa;
    transform: translateX(4px);
}

/* Notifications */
.notification-item.unread {
    background-color: #fff8e1;
    font-weight: 500;
}

/* Quick Access */
.quick-link-icon {
    transition: transform 0.3s;
}

.quick-link-item:hover .quick-link-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Dashboard Widgets */
.widget-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

/* Export History */
.format-badge {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.utility-card,
.stat-card,
.filter-card {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .utility-header,
    .btn-utility,
    .filter-card,
    .pagination-utility,
    .action-buttons {
        display: none !important;
    }

    .utility-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }
}

/* ========================================
   FORCE LIGHT MODE - NO DARK MODE
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Force light mode even if system is dark */
    .utility-card,
    .stat-card,
    .filter-card {
        background-color: #ffffff !important;
        color: #212529 !important;
    }

    .utility-card-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: #ffffff !important;
    }

    .table-utility thead {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }

    .table-utility thead th {
        color: #ffffff !important;
    }

    .table-utility tbody td {
        background-color: #ffffff !important;
        color: #212529 !important;
    }

    .table-utility tbody tr:hover {
        background-color: #f8f9fa !important;
    }

    .filter-card {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        color: #212529 !important;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.utility-card:focus-within,
.stat-card:focus-within,
.filter-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

