.page-header-custom {
    background: #23376d;
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(35, 55, 109, 0.2);
    color: white;
}

.page-header-custom h4 {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 18px;
}

.page-header-custom p {
    color: rgba(255, 255, 255, 0.9);
    margin: 3px 0 0 0;
    font-size: 12px;
}

.filter-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: none;
    transition: all 0.3s ease;
}

    .filter-card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

    .filter-header h5 {
        margin: 0;
        color: #333;
        font-weight: 600;
        font-size: 18px;
        display: flex;
        align-items: center;
    }

        .filter-header h5 i {
            margin-right: 10px;
            color: #23376d;
        }

.btn-filter-toggle {
    background: #23376d;
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.3s ease;
}

    .btn-filter-toggle:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(35, 55, 109, 0.4);
        background: #1e2d5a;
        color: white;
    }

.search-box-wrapper {
    position: relative;
    margin-bottom: 20px;
}

    .search-box-wrapper input {
        border-radius: 12px;
        border: 2px solid #e0e0e0;
        padding: 12px 45px 12px 20px;
        font-size: 14px;
        transition: all 0.3s ease;
    }

        .search-box-wrapper input:focus {
            border-color: #23376d;
            box-shadow: 0 0 0 0.2rem rgba(35, 55, 109, 0.25);
        }

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #23376d;
    font-size: 18px;
}

.filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 0;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 12px;
    display: block;
    white-space: nowrap;
}

.filter-group .form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
    transition: all 0.3s ease;
    height: auto;
    font-size: 14px;
}

.filter-group .select2-container {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.filter-group .select2-container .select2-selection--single {
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    height: auto !important;
    min-height: 42px;
    padding: 0;
    background-color: #fff;
}

.filter-group .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 15px;
    padding-right: 30px;
    color: #495057;
    font-size: 14px;
}

.filter-group .select2-container .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 10px;
    top: 1px;
}

.filter-group .select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: #666 transparent transparent transparent;
    border-width: 6px 6px 0 6px;
    margin-top: -3px;
}

.filter-group .select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #666 transparent !important;
    border-width: 0 6px 6px 6px !important;
    margin-top: -3px;
}

    .filter-group .form-control:focus {
        border-color: #23376d;
        box-shadow: 0 0 0 0.2rem rgba(35, 55, 109, 0.25);
        outline: none;
    }

    .filter-group .select2-container--default.select2-container--focus .select2-selection--single,
    .filter-group .select2-container--default.select2-container--open .select2-selection--single {
        border-color: #23376d !important;
        box-shadow: 0 0 0 0.2rem rgba(35, 55, 109, 0.25) !important;
    }

.btn-action-group {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-search {
    background: #23376d;
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(35, 55, 109, 0.3);
}

    .btn-search:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(35, 55, 109, 0.4);
        background: #1e2d5a;
        color: white;
    }

.btn-reset {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-reset:hover {
        background: #e9ecef;
        border-color: #d0d0d0;
        color: #333;
    }

.data-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

.table-wrapper {
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

    .table thead th {
        background: #23376d;
        color: white;
        font-weight: 500;
        font-size: 14px;
        padding: 12px 15px;
        border: none;
    }

    .table tbody tr {
        transition: all 0.3s ease;
        border-bottom: 1px solid #f0f0f0;
    }

        .table tbody tr:hover {
            background-color: #f0f2f7;
            transform: scale(1.01);
            box-shadow: 0 2px 8px rgba(35, 55, 109, 0.1);
        }

    .table tbody td {
        padding: 15px;
        vertical-align: middle;
        color: #555;
    }

.badge-custom {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 11px;
}

.badge-success-custom {
    background: #23376d;
    color: white;
}

.badge-warning-custom {
    background: linear-gradient(-135deg, #f1b44c 0%, #f46a6a 100%);
    color: white;
}

.badge-info-custom {
    background: #23376d;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-edit {
    background: #23376d;
    color: white;
}

    .btn-edit:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(35, 55, 109, 0.4);
        background: #1e2d5a;
        color: white;
    }

.btn-delete {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

    .btn-delete:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
        color: white;
    }

.btn-view {
    background: #23376d;
    color: white;
}

    .btn-view:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(35, 55, 109, 0.4);
        background: #1e2d5a;
        color: white;
    }

.dataTables_wrapper .dataTables_filter input {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 8px 15px;
    margin-left: 10px;
}

    .dataTables_wrapper .dataTables_filter input:focus {
        border-color: #23376d;
        box-shadow: 0 0 0 0.2rem rgba(35, 55, 109, 0.25);
    }

.dataTables_wrapper .dataTables_length select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 6px 15px;
    margin: 0 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 10px;
    margin: 0 3px;
    padding: 8px 14px;
    transition: all 0.2s ease;
    border: none !important;
    background: #f8f9fa !important;
    color: #555 !important;
    font-weight: 500;
    font-size: 14px;
    min-width: 38px;
    text-align: center;
    box-shadow: none;
}

    .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
        background: #e9ecef !important;
        color: #23376d !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.current {
        background: #23376d !important;
        color: white !important;
        font-weight: 600;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
        background: #1e2d5a !important;
        color: white !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
    .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
        background: #f8f9fa !important;
        color: #ced4da !important;
        cursor: not-allowed;
        opacity: 0.6;
    }

.dataTables_wrapper .dataTables_paginate .ellipsis {
    padding: 8px 4px;
    margin: 0 3px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    min-width: 38px;
    text-align: center;
}

/* Pagination Wrapper Styling */
.pagination-wrapper {
    margin-top: 20px;
}

.pagination-wrapper .row {
    display: flex;
    align-items: center;
}

.pagination-wrapper .col-md-6:first-child {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
}

.pagination-wrapper .col-md-6:first-child > div:first-child {
    order: 1;
    margin-right: 15px;
}

.pagination-wrapper .pagination-info {
    order: 2;
    white-space: nowrap;
}

.pagination-wrapper #pageSizeSelect {
    width: auto !important;
    min-width: 70px;
    display: inline-block;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

    .stats-card .stats-number {
        font-size: 32px;
        font-weight: 700;
        margin: 10px 0;
    }

    .stats-card .stats-label {
        font-size: 14px;
        opacity: 0.9;
    }

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

/* Rule Preview Styling */
#rule_preview {
    background-color: #f8f9fa !important;
    border: 2px solid #e0e0e0 !important;
    font-family: 'Courier New', monospace !important;
    font-size: 13px !important;
    color: #23376d !important;
    transition: all 0.3s ease;
}

#rule_preview:focus {
    border-color: #23376d !important;
    box-shadow: 0 0 0 0.2rem rgba(35, 55, 109, 0.25) !important;
    background-color: #fff !important;
    outline: none;
}

@media (max-width: 1200px) {
    .filter-row {
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: 1 1 calc(50% - 7.5px);
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        flex: 1 1 100%;
    }

    .btn-action-group {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }
}