:root {
    --maroon: #800000;
    --maroon-light: #a03030;
    --pup-light: #fdf7f7;
    --gray-border: #ddd;
}

body {
    font-family: Arial, sans-serif;
    background: #fafafa;
    color: #333;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--maroon);
    border-bottom: 2px solid var(--maroon);
    padding-bottom: 6px;
    margin-bottom: 20px;
    margin-top: 20px;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    margin-top: 10px;
}

.step-navigation a {
    background-color: white !important;
    color: var(--maroon) !important;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: 2px solid var(--maroon);
    text-decoration: none !important;
    transition: background-color 0.2s;
}

.step-navigation a.active {
    background-color: var(--maroon) !important;
    color: white !important;
    font-weight: bold;
    border: none;
}

.step-navigation a:hover {
    background-color: var(--maroon-light) !important;
    color: white !important;
}

.step-navigation a.disabled-step {
    cursor: not-allowed;
    pointer-events: none;
}

/* Search Section */
.search-section {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
}

.search-button {
    background: var(--maroon);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-button:hover {
    background: var(--maroon-light);
}

/* Filter Section */
.filter-section {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, var(--maroon) 0%, #9b1b1b 100%);
    color: white;
}

.data-table thead th {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-bottom: 3px solid #660000;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.data-table th {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th:last-child {
    border-right: none;
}

.data-table td {
    border-right: 1px solid #f0f0f0;
}

.data-table td:last-child {
    border-right: none;
}

.data-table th:first-child,
.data-table td:first-child {
    width: 50px;
    text-align: center;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 12%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 12%;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 18%;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: auto;
    word-break: break-word;
}

.data-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.data-table tbody tr:hover {
    background-color: #fff8f8;
    box-shadow: inset 0 0 0 1px var(--maroon);
    transform: scale(1.002);
}

.data-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.data-table tbody tr:nth-child(even):hover {
    background-color: #fff8f8;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Button Styles */
.btn-export {
    background: var(--maroon);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-export:hover:not(:disabled) {
    background: var(--maroon-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(128, 0, 0, 0.4);
}

.btn-export:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Sticky Continue Button */
#continue-btn-container {
    position: sticky;
    bottom: 20px;
    z-index: 999;
    animation: slideUp 0.3s ease-out;
    background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
    backdrop-filter: blur(5px);
    padding: 15px 0;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Pulse animation for enabled continue button */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(128, 0, 0, 0.5);
    }
}

#continue-btn:not(:disabled) {
    animation: pulse 2s ease-in-out infinite;
}

#continue-btn:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(128, 0, 0, 0.3) !important;
}

/* Filter Dropdown Styles */
.filter-dropdown-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.filter-dropdown {
    font-size: 1.08rem;
    padding: 10px 40px 10px 18px;
    min-width: 180px;
    width: auto;
    max-width: 260px;
    border-radius: 8px;
    border: 2px solid #ddd;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23800000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.filter-dropdown:hover {
    border-color: #800000;
    box-shadow: 0 4px 12px rgba(128,0,0,0.15);
    transform: translateY(-1px);
}

.filter-dropdown:focus {
    border-color: #800000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(128,0,0,0.1);
}

.filter-dropdown.has-selection {
    border-color: #800000;
    background-color: #fdf7f7;
    font-weight: 600;
}

.filter-label {
    font-size: 1.05rem;
    color: #800000;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Loading States */
.filter-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.filter-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--maroon);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    background: white;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination Styling */
#pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(250, 250, 250, 0) 0%, rgba(250, 250, 250, 0.8) 100%);
}

/* Hide default Laravel pagination text */
#pagination-container p,
#pagination-container .pagination-info,
#pagination-container > div > p {
    display: none !important;
}

#pagination-container nav {
    display: flex;
    justify-content: center;
}

#pagination-container .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#pagination-container .pagination .page-item:first-child .page-link,
#pagination-container .pagination .page-item:last-child .page-link {
    background: var(--maroon) !important;
    color: white !important;
    border-color: var(--maroon) !important;
}

#pagination-container .pagination .page-item:first-child .page-link:hover,
#pagination-container .pagination .page-item:last-child .page-link:hover {
    background: var(--maroon-light) !important;
    transform: scale(1.05);
}

#pagination-container .pagination .page-item.disabled:first-child .page-link,
#pagination-container .pagination .page-item.disabled:last-child .page-link {
    background: #e0e0e0 !important;
    color: #bbb !important;
}

#pagination-container .page-item {
    display: inline-block;
}

#pagination-container .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    color: var(--maroon);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

#pagination-container .page-link:hover {
    background-color: #fff0f0;
    color: var(--maroon);
    border-color: var(--maroon);
    transform: scale(1.05);
}

#pagination-container .page-item.active .page-link {
    background: linear-gradient(135deg, var(--maroon) 0%, #9b1b1b 100%) !important;
    color: white !important;
    border-color: var(--maroon) !important;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(128, 0, 0, 0.3);
}

#pagination-container .page-item.disabled .page-link {
    color: #bbb !important;
    pointer-events: none;
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .filter-dropdown {
        min-width: 140px;
        padding: 8px 35px 8px 12px;
        font-size: 0.95rem;
    }
    
    .filter-label {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .step-navigation {
        flex-direction: column;
    }
}
