/* ============================================
   LAYANAN LIST PAGES - GLOBAL CSS
   Light Theme, Compact, Bootstrap 5 Compatible
   Responsive Mobile & Desktop
   ============================================ */

/* ============================================
   1. BASE LAYOUT
   ============================================ */
.layanan-list-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 1rem;
}

/* ============================================
   2. PAGE HEADER
   ============================================ */
.layanan-page-header {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
}

.layanan-page-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.layanan-page-header p {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
}

.layanan-page-header .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    min-height: 38px;
    white-space: nowrap;
}

.layanan-page-header .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.layanan-page-header .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Header buttons card */
.layanan-header-buttons {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.layanan-header-buttons .d-flex {
    gap: 0.625rem;
}

.layanan-header-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    min-height: 36px;
    white-space: nowrap;
}

/* ============================================
   3. FILTER CARD
   ============================================ */
.layanan-filter-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.layanan-filter-card .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.375rem;
}

.layanan-filter-card .form-control,
.layanan-filter-card .form-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-height: 38px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background-color: white;
}

.layanan-filter-card .form-control:focus,
.layanan-filter-card .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.layanan-filter-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 38px;
    font-weight: 600;
    border-radius: 6px;
}

.layanan-filter-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.layanan-filter-card .btn-outline-secondary {
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.layanan-filter-card .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* ============================================
   4. TABLE CARD
   ============================================ */
.layanan-table-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.25rem;
}

.layanan-table-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.layanan-table-card .card-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.layanan-table-card .card-body {
    padding: 0;
}

/* ============================================
   5. TABLE STYLES
   ============================================ */
.layanan-table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.layanan-table thead th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #dee2e6;
    padding: 0.875rem 0.75rem;
    white-space: nowrap;
    vertical-align: middle;
}

.layanan-table tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
}

.layanan-table tbody tr {
    transition: background-color 0.2s ease;
}

.layanan-table tbody tr:hover {
    background-color: #f8f9fa;
}

.layanan-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   6. TABLE TEXT STYLING (NO BADGES)
   ============================================ */
.layanan-table td strong {
    color: #212529;
    font-weight: 600;
    font-size: 0.875rem;
}

.layanan-table td small {
    display: inline-block;
    line-height: 1.6;
    font-size: 0.8125rem;
    color: #495057;
}

.layanan-table td small.text-muted {
    color: #6c757d !important;
}

.layanan-table td .d-block {
    display: block !important;
    margin-top: 0.125rem;
}

/* ============================================
   7. MOBILE CARD LAYOUT
   ============================================ */
.layanan-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.layanan-mobile-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.layanan-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.layanan-mobile-header strong {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    word-break: break-word;
}

.layanan-mobile-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

.layanan-mobile-actions .btn {
    padding: 0.4375rem 0.5625rem;
    font-size: 0.8125rem;
    min-width: 36px;
    min-height: 34px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-width: 1.5px;
}

.layanan-mobile-actions .btn i {
    font-size: 0.875rem;
}

.layanan-mobile-info {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    flex-wrap: wrap;
}

.layanan-mobile-info small {
    font-size: 0.8125rem;
    padding: 0.25rem 0.625rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.layanan-mobile-info small.text-muted {
    color: #6c757d !important;
    background: #e9ecef;
}

/* ============================================
   8. ACTION BUTTONS (DESKTOP)
   ============================================ */
.layanan-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.375rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.layanan-action-buttons .btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    min-width: 32px;
    min-height: 32px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.layanan-action-buttons .btn i {
    font-size: 0.875rem;
}

.layanan-action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ============================================
   8. PAGINATION
   ============================================ */
.layanan-pagination {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.layanan-pagination .pagination {
    margin: 0;
}

.layanan-pagination .page-link {
    color: #667eea;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.layanan-pagination .page-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #764ba2;
}

.layanan-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.layanan-pagination .page-item.disabled .page-link {
    color: #6c757d;
}

/* ============================================
   9. EMPTY STATE
   ============================================ */
.layanan-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.layanan-empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.layanan-empty-state h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.layanan-empty-state p {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   10. STATS CARDS (Mini Summary)
   ============================================ */
.layanan-stats-container {
    margin-bottom: 1.25rem;
}

.layanan-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.layanan-stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.layanan-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.layanan-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
}

.layanan-stat-card .stat-label {
    font-size: 0.8125rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
}

.layanan-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.layanan-stat-card .stat-change {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   11. RESPONSIVE - MOBILE (< 576px)
   ============================================ */
@media (max-width: 575.98px) {
    /* Ultra minimal padding for mobile */
    .layanan-list-wrapper {
        padding: 0.375rem;
    }
    
    /* Compact back button */
    .mb-3 {
        margin-bottom: 0.625rem !important;
    }
    
    /* Minimal page header */
    .layanan-page-header {
        padding: 0.625rem;
        margin-bottom: 0.625rem;
        border-radius: 6px;
    }
    
    .layanan-page-header h4 {
        font-size: 0.9375rem;
        margin-bottom: 0.125rem;
        font-weight: 600;
    }
    
    .layanan-page-header p {
        font-size: 0.6875rem;
        margin-bottom: 0.375rem;
    }
    
    /* Stack header buttons */
    .layanan-page-header .d-flex {
        flex-direction: column !important;
        gap: 0.375rem;
    }
    
    .layanan-page-header .btn {
        width: 100%;
        padding: 0.4375rem 0.75rem;
        font-size: 0.8125rem;
        min-height: 36px;
        justify-content: center;
    }
    
    /* Ultra compact filter card */
    .layanan-filter-card {
        padding: 0.5rem;
        margin-bottom: 0.625rem;
        border-radius: 6px;
    }
    
    .layanan-filter-card form {
        gap: 0.5rem !important;
    }
    
    .layanan-filter-card .form-label {
        font-size: 0.6875rem;
        margin-bottom: 0.1875rem;
        font-weight: 600;
    }
    
    .layanan-filter-card .form-control,
    .layanan-filter-card .form-select {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.625rem;
        min-height: 36px;
        border-radius: 6px;
    }
    
    .layanan-filter-card .btn {
        padding: 0.4375rem 0.75rem;
        font-size: 0.8125rem;
        min-height: 36px;
        font-weight: 600;
    }
    
    .layanan-filter-card .btn-primary {
        flex: 1;
    }
    
    /* Minimal table card */
    .layanan-table-card {
        margin-bottom: 0.625rem;
        border-radius: 6px;
        overflow: visible; /* Allow scroll wrapper to overflow */
    }
    
    .layanan-table-card .card-header {
        padding: 0.5rem 0.625rem;
    }
    
    .layanan-table-card .card-header h5 {
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    /* HORIZONTAL SCROLL TABLE WRAPPER */
    /* Mobile uses card layout - hide table */
    .layanan-table-card {
        display: none !important;
    }
    
    /* Mobile card becomes more compact */
    .layanan-mobile-list {
        display: flex !important;
    }
    
    .layanan-mobile-card {
        padding: 0.875rem;
    }
    
    .layanan-mobile-header {
        margin-bottom: 0.5rem;
    }
    
    .layanan-mobile-header strong {
        font-size: 0.875rem;
    }
    
    .layanan-mobile-actions .btn {
        padding: 0.375rem 0.5rem;
        min-width: 32px;
        min-height: 30px;
        font-size: 0.75rem;
    }
    
    .layanan-mobile-actions .btn i {
        font-size: 0.8125rem;
    }
    
    .layanan-mobile-info small {
        font-size: 0.75rem;
        padding: 0.1875rem 0.5rem;
    }
    
    /* Minimal pagination */
    .layanan-pagination {
        padding: 0.5rem 0.625rem;
        margin-top: 0.625rem;
        border-radius: 6px;
    }
    
    .layanan-pagination .page-link {
        padding: 0.25rem 0.4375rem;
        font-size: 0.6875rem;
    }
    
    /* Compact empty state */
    .layanan-empty-state {
        padding: 1.25rem 0.5rem;
    }
    
    .layanan-empty-state i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .layanan-empty-state h5 {
        font-size: 0.875rem;
    }
    
    .layanan-empty-state p {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Stats grid */
    .layanan-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .layanan-stat-card {
        padding: 0.75rem;
        border-radius: 6px;
    }
    
    .layanan-stat-card .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .layanan-stat-card .stat-label {
        font-size: 0.6875rem;
        margin-bottom: 0.3125rem;
    }
    
    .layanan-stat-card .stat-value {
        font-size: 1.25rem;
    }
    
    .layanan-stat-card .stat-change {
        font-size: 0.625rem;
    }
}

/* ============================================
   12. RESPONSIVE - TABLET (576px - 767px)
   ============================================ */
@media (min-width: 576px) and (max-width: 767.98px) {
    .layanan-list-wrapper {
        padding: 0.875rem;
    }
    
    .layanan-action-buttons .btn {
        padding: 0.375rem 0.625rem;
    }
    
    .layanan-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
}

/* ============================================
   13. RESPONSIVE - DESKTOP (≥ 768px)
   ============================================ */
@media (min-width: 768px) {
    .layanan-list-wrapper {
        padding: 1.5rem;
    }
    
    .layanan-page-header {
        padding: 1.5rem 2rem;
        margin-bottom: 1.5rem;
    }
    
    .layanan-page-header h4 {
        font-size: 1.375rem;
    }
    
    .layanan-header-buttons {
        padding: 0.875rem 1rem;
    }
    
    .layanan-filter-card {
        padding: 1.25rem 1.5rem;
    }
    
    .layanan-table-card .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .layanan-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

/* ============================================
   14. LARGE DESKTOP (≥ 1200px)
   ============================================ */
@media (min-width: 1200px) {
    .layanan-page-header {
        padding: 1.75rem 2.25rem;
    }
    
    .layanan-page-header h4 {
        font-size: 1.5rem;
    }
    
    .layanan-filter-card {
        padding: 1.5rem 1.75rem;
    }
    
    .layanan-table-card .card-header {
        padding: 1.5rem 1.75rem;
    }
}

/* ============================================
   15. UTILITIES
   ============================================ */
.layanan-list-wrapper .text-muted {
    color: #6c757d !important;
}

.layanan-list-wrapper .text-danger {
    color: #dc3545 !important;
}

.layanan-list-wrapper .text-success {
    color: #28a745 !important;
}

.layanan-list-wrapper .text-warning {
    color: #ffc107 !important;
}

.layanan-list-wrapper .text-info {
    color: #17a2b8 !important;
}

.layanan-list-wrapper .fw-bold {
    font-weight: 600 !important;
}

/* Table responsive wrapper */
.layanan-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

