/* Recreation.gov Automation Hub - Main Styles */

/* Base Styles */
body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

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

.header h1 {
    margin: 0;
    font-size: 2.5em;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Statistics Grid */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

.stat h3 {
    margin: 0;
    font-size: 2.5em;
    color: #667eea;
    font-weight: bold;
}

.stat p {
    margin: 10px 0 0 0;
    color: #666;
    font-weight: 500;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-info {
    background: #cce7ff;
    color: #004085;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #117a8b;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Refresh Button */
.refresh-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 85%;
    max-width: 800px;
    overflow-x: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.large-modal {
    max-width: 1000px;
    width: 92%;
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px 40px 25px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modal-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 0.95em;
    margin-top: 8px;
    font-weight: 400;
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    background: #f5f7fa;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Specific textarea fixes to prevent scrollbars */
.form-group textarea {
    overflow-x: hidden;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 20px;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s ease;
}

/* Pulse animation for auto-reservation indicator */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#progressText {
    font-weight: 500;
    color: #333;
    margin: 10px 0;
}

#progressStep {
    color: #666;
    font-size: 14px;
}

/* Enhanced Progress System */
.progress-section {
    margin-bottom: 20px;
}

.progress-bar {
    height: 24px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

#progressPercent {
    font-weight: bold;
    color: #28a745;
}

/* Status Section */
.status-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.status-message {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.status-icon {
    font-size: 18px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.status-subtext {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Activity Log */
.activity-section h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.1em;
}

.activity-log {
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 15px;
    border-radius: 4px;
    height: 150px;
    overflow-y: auto;
    border: 1px solid #333;
}

.activity-log .log-entry {
    margin-bottom: 4px;
    white-space: nowrap;
}

.activity-log .log-timestamp {
    color: #888;
    margin-right: 8px;
}

.activity-log .log-info { color: #00ff00; }
.activity-log .log-success { color: #00ff00; font-weight: bold; }
.activity-log .log-error { color: #ff4444; font-weight: bold; }
.activity-log .log-warning { color: #ffaa00; }

/* Progress Modal Specific Styles */
#progressModal .modal-content {
    max-width: 800px;
    width: 90%;
    padding: 0;
    max-height: 85vh;
    overflow: hidden;
}

#progressModal #tripInfoHeader {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #e3f2fd;
    margin: 0 !important;
    padding: 16px 24px !important;
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 2px solid #1976d2;
}

#progressModal > .modal-content > div:not(#tripInfoHeader) {
    padding: 0 30px;
}

#progressModal h2 {
    margin-top: 20px;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.5em;
}

#progressModal .modal-content > div:last-child {
    padding-bottom: 30px;
}

/* Create scrollable content area */
#progressModal .modal-content {
    display: flex;
    flex-direction: column;
}

#progressModal .modal-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 30px 30px 30px;
}

#progressContainer {
    overflow-x: hidden;
    word-wrap: break-word;
    margin-bottom: 20px;
}

#progressModal .progress-bar {
    height: 30px;
    margin: 15px 0;
}

#progressModal .progress-fill {
    height: 30px;
}

#progressText {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    font-size: 1.1em;
    line-height: 1.4;
    margin: 15px 0;
}

#matchesContainer {
    overflow-x: hidden;
    word-wrap: break-word;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#matchesContainer h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #28a745;
}

#progressModal .form-buttons {
    margin-top: 25px;
    text-align: center;
}

#matchesList {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Scheduler Configuration Modal - Professional Form Design */
#schedulerConfigModal .modal-content {
    max-width: 400px;
    padding: 24px;
}

#schedulerConfigModal h2 {
    margin-bottom: 20px;
    font-size: 1.4em;
    color: #333;
}

#schedulerConfigModal .form-group {
    margin-bottom: 16px;
}

/* Number input styling - sized for content */
#schedulerConfigModal .form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

#schedulerConfigModal .form-group input[type="number"] {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    text-align: center;
}

#schedulerConfigModal .form-group input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.3);
}

/* Professional checkbox layout */
#schedulerConfigModal .checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0;
}

#schedulerConfigModal .checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

#schedulerConfigModal .checkbox-group label {
    margin: 0;
    cursor: pointer;
    user-select: none;
    font-weight: normal;
    font-size: 14px;
    color: #555;
}

/* Form buttons */
#schedulerConfigModal .form-buttons {
    margin-top: 24px;
    text-align: right;
}

#schedulerConfigModal .form-buttons .btn {
    margin-left: 8px;
}

/* Matches Section */
.matches-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.match-item {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    animation: slideInMatch 0.5s ease-out;
}

@keyframes slideInMatch {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.match-summary {
    text-align: center;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 6px;
    border: 1px solid #b3d9ff;
}


/* Campground Manager Modal Styling */
#campgroundModal .modal-content {
    max-height: 90vh;
    max-width: 1200px;
    width: 95%;
    margin: 2% auto;
    background: #f5f7fa;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

#campgroundModal .modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px 40px 25px;
    position: relative;
}

#campgroundModal h2 {
    color: white;
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#campgroundModal .modal-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 0.95em;
    margin-top: 8px;
    font-weight: 400;
}

#campgroundModal .modal-body {
    padding: 30px 40px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

/* Search Section Card */
.search-section-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.search-section-card h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 1.3em;
    font-weight: 600;
}

.search-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
    outline: none;
}

.state-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    background: white;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.state-select:hover {
    border-color: #cbd5e1;
}

.state-select:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
    outline: none;
}

/* Search Results */
.search-results-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.search-result {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f8fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.search-result:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Favorites Section */
.favorites-section-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.favorites-section-card h3 {
    margin: 0 0 10px 0;
    color: #1e293b;
    font-size: 1.3em;
    font-weight: 600;
}

.section-description {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.favorites-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.favorite-item {
    padding: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.favorite-item:hover {
    border-color: #1e3c72;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,60,114,0.1);
}

/* Campground Manager Buttons */
#campgroundModal .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}

#campgroundModal .btn-primary {
    background: #1e3c72;
    color: white;
}

#campgroundModal .btn-primary:hover {
    background: #2a5298;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,60,114,0.25);
}

#campgroundModal .btn-secondary {
    background: white;
    color: #475569;
    border: 2px solid #e5e7eb;
}

#campgroundModal .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

#campgroundModal .btn-danger {
    background: #dc2626;
    color: white;
}

#campgroundModal .btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,0.25);
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Campground Item Details */
.campground-info {
    flex: 1;
}

.campground-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
    margin-bottom: 4px;
}

.campground-details {
    color: #64748b;
    font-size: 14px;
}

.campground-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Result item icons */
.search-result .campground-icon,
.favorite-item .campground-icon {
    font-size: 24px;
    margin-right: 12px;
}

/* Action buttons in results */
.search-result button,
.favorite-item button {
    white-space: nowrap;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    /* Campsite modal specific responsive adjustments */
    #campsiteModal .modal-content {
        width: 98%;
        margin: 1% auto;
        max-width: none;
    }
    
    #campsiteModal .tab-button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Campground modal responsive adjustments */
    #campgroundModal .modal-content {
        width: 98%;
        margin: 1% auto;
        max-width: none;
    }
    
    .search-controls {
        flex-direction: column;
    }
    
    .search-input,
    .state-select {
        width: 100%;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
    
    /* Check window responsive adjustments */
    .check-window-row {
        grid-template-columns: 40px 1fr 80px 80px;
        gap: 8px;
    }
    
    .check-window-item .remove-window-btn {
        grid-column: 1 / -1;
        margin: 8px 0 0 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .stat h3 {
        font-size: 2em;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
        margin: 1px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 6px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Styles */
.tab-button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #e9ecef;
}

.tab-button.active {
    background: white;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Section-specific colors for Campsite Manager */
#primeCampsiteTabContent .form-group {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}

#favoriteCampsiteTabContent .form-group {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}

#excludedCampsiteTabContent .form-group {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

/* Visual hierarchy for input instructions */
#campsiteModal .instruction-box {
    background: #f0f9ff;
    border-left: 4px solid #1e3c72;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
}

#campsiteModal .example-text {
    font-family: monospace;
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* Campsite Modal Specific Styles */
#campsiteModal {
    background-color: rgba(0,0,0,0.6);
}

#campsiteModal .modal-content {
    max-height: 95vh;
    max-width: 1400px;
    width: 96%;
    margin: 1.5% auto;
    padding: 0;
    background: #f5f7fa;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

#campsiteModal .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 40px;
    background: #f5f7fa;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

/* Campground Selection Card */
#campsiteModal .campground-select-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

/* Campsite Manager Header Enhancement */
#campsiteModal .modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px 40px 25px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

#campsiteModal h2 {
    color: white;
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#campsiteModal .modal-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 0.95em;
    margin-top: 8px;
    font-weight: 400;
}

/* Tab Navigation Redesign */
#campsiteModal .tab-navigation {
    background: white;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

#campsiteModal .tab-button {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

#campsiteModal .tab-button:hover {
    background: #f1f5f9;
    color: #334155;
}

#campsiteModal .tab-button.active {
    background: #1e3c72;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30,60,114,0.25);
}

#campsiteModal .tab-button .tab-icon {
    font-size: 18px;
}

#campsiteModal .tab-button.active .tab-icon {
    animation: tabActivate 0.3s ease;
}

@keyframes tabActivate {
    0% { transform: scale(0.8) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Campsite form enhancements */
#campsiteModal .form-group {
    margin-bottom: 0;
}

#campsiteModal .tab-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    animation: fadeInTab 0.3s ease;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#campsiteModal .tab-content .form-group {
    background: #f8fafb;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

#campsiteModal .tab-content .form-group:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#campsiteModal select {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    border-radius: 8px;
    transition: all 0.2s ease;
    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='currentColor' 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;
    padding-right: 40px;
}

#campsiteModal select:hover {
    border-color: #cbd5e1;
}

#campsiteModal select:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
    outline: none;
}

#campsiteModal textarea {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 8px;
    transition: all 0.2s ease;
    resize: vertical;
}

#campsiteModal textarea:hover {
    border-color: #cbd5e1;
}

#campsiteModal textarea:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
    outline: none;
}

/* Enhanced Labels */
#campsiteModal label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    display: block;
    font-size: 15px;
}

#campsiteModal small {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    display: block;
    margin-bottom: 12px;
}

/* Enhanced Button Styling */
#campsiteModal .button-group {
    display: flex !important;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

#campsiteModal .button-group button {
    display: inline-block !important;
    visibility: visible !important;
}

#campsiteModal .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}

#campsiteModal .btn-primary {
    background: #1e3c72;
    color: white;
}

#campsiteModal .btn-primary:hover:not(:disabled) {
    background: #2a5298;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,60,114,0.25);
}

#campsiteModal .btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

#campsiteModal .btn-secondary {
    background: white;
    color: #475569;
    border: 2px solid #e5e7eb;
}

#campsiteModal .btn-secondary:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

#campsiteModal .btn-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

#campsiteModal .btn-warning:hover {
    background: #fde68a;
    border-color: #f59e0b;
}

/* Webkit browsers (Chrome, Safari) - hide scrollbar unless needed */
#campsiteModal .modal-content > div:first-child::-webkit-scrollbar {
    width: 8px;
}

#campsiteModal .modal-content > div:first-child::-webkit-scrollbar-track {
    background: transparent;
}

#campsiteModal .modal-content > div:first-child::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
}

#campsiteModal .modal-content > div:first-child::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0,0,0,0.3);
}

/* Ensure the Close button is always visible */
#campsiteModal .form-buttons:last-child {
    flex-shrink: 0;
    background: #fff;
    position: sticky;
    bottom: -20px;
    margin: 0 -20px -20px -20px;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

/* Scheduler Styles */
.scheduler-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

/* Campground Selection Styles */
#campgroundsList {
    background: #f8f9fa;
}

#campgroundsContent label {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#campgroundsContent label:hover {
    background-color: #e9ecef;
}

#campgroundsContent input[type="checkbox"]:checked + span {
    color: #007bff;
    font-weight: 500;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.scheduler-status {
    margin-bottom: 15px;
    font-size: 16px;
}

.scheduler-stats {
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.scheduler-controls {
    margin-top: 15px;
}

.scheduler-controls .btn {
    margin-right: 10px;
}

/* Status Indicators - Moved to dashboard.css to avoid conflicts */
/* Scheduler-specific status classes are defined in dashboard.css */

/* Keep only non-scheduler status classes here */
.status-paused {
    color: #ffc107;
    font-weight: bold;
}

.status-error {
    color: #dc3545;
    font-weight: bold;
}

/* Enhanced Status Indicators */
#campsiteModal .status-indicator {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

#campsiteModal .status-indicator.unsaved {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

#campsiteModal .status-indicator.unsaved::before {
    content: "⚠️ ";
}

#campsiteModal .status-indicator.saved {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

#campsiteModal .status-indicator.saved::before {
    content: "✅ ";
}

#campsiteModal .status-indicator.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

#campsiteModal .status-indicator.error::before {
    content: "❌ ";
}

/* Campsite Info Tab Styles */
#campsiteInfoTable {
    border: 1px solid #dee2e6;
}

#campsiteInfoTable th {
    background: #f8f9fa;
    font-weight: 600;
    position: relative;
    white-space: nowrap;
}

#campsiteInfoTable th:hover {
    background: #e9ecef;
}

#campsiteInfoTable td {
    padding: 10px;
    border-top: 1px solid #dee2e6;
}

#campsiteInfoTable tbody tr:hover {
    background: #f8f9fa;
}

#campsiteInfoTable tbody tr:nth-child(even) {
    background: #fafafa;
}

#campsiteInfoTable tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

/* Sort Indicators */
.sort-indicator {
    position: absolute;
    right: 5px;
    opacity: 0.3;
}

.sort-indicator::after {
    content: "↕";
}

.sort-indicator.asc::after {
    content: "↑";
    opacity: 1;
}

.sort-indicator.desc::after {
    content: "↓";
    opacity: 1;
}

/* Campsite Type Icons */
.campsite-type-icon {
    font-size: 18px;
    vertical-align: middle;
}

/* Campsite Status Styles */
.campsite-status {
    font-weight: bold;
    white-space: nowrap;
}

.campsite-status.available {
    color: #28a745;
}

.campsite-status.closed {
    color: #dc3545;
    cursor: help;
}

/* Excluded site styling */
.excluded-site {
    opacity: 0.6;
    background-color: #ffeef0 !important;
}

.excluded-site:hover {
    background-color: #ffe5e8 !important;
}

/* Accessible Icon */
.accessible-icon {
    font-size: 20px;
    color: #007bff;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button state styles */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover:not(:disabled) {
    background-color: #e0a800;
}

/* Improved Trip Modal Styles */
.large-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Form Sections */
.form-section {
    margin: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.form-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.section-header {
    background: linear-gradient(to bottom, #fafbfc 0%, #f8fafc 100%);
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.section-header.clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.section-header.clickable:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.section-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-header small {
    color: #64748b;
    font-style: normal;
    margin-top: 6px;
    display: block;
    font-size: 0.875em;
    font-weight: 400;
}

/* Section Icons */
.section-header h3 .section-icon {
    font-size: 1.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e0f2fe;
    border-radius: 8px;
}

.form-section .form-group,
.form-section .form-row {
    margin: 0;
    padding: 0 24px;
}

.form-section .form-group:first-child {
    padding-top: 24px;
}

.form-section .form-group:last-child {
    padding-bottom: 24px;
}

/* Trip Form Specific Styling */
#tripForm label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

#tripForm input,
#tripForm select,
#tripForm textarea {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

#tripForm input:hover,
#tripForm select:hover,
#tripForm textarea:hover {
    border-color: #cbd5e1;
}

#tripForm input:focus,
#tripForm select:focus,
#tripForm textarea:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
    outline: none;
}

/* Required field indicator */
.required {
    color: #dc3545;
    font-weight: normal;
}

/* Form validation styles */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
    border-color: #28a745;
    background-color: #f5fff5;
}

.form-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.form-group.has-error .form-error {
    display: block;
}

/* Enhanced form inputs */
.form-group input,
.form-group select,
.form-group textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Priority select styling */
#priority {
    font-weight: 500;
}

/* Campgrounds Selector */
.campgrounds-selector {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    min-height: 120px;
    background: #f8f9fa;
    transition: border-color 0.2s ease;
}

.campgrounds-selector:hover {
    border-color: #adb5bd;
}

/* Campground checkboxes - standard styling */
.campgrounds-selector label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    margin-bottom: 8px !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
}

.campgrounds-selector label:hover {
    background-color: #e9ecef !important;
}

.campgrounds-selector input[type="checkbox"] {
    margin-right: 8px !important;
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
}

.campgrounds-selector input[type="checkbox"]:checked + span {
    color: #007bff !important;
    font-weight: 500 !important;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6c757d;
    font-style: italic;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6c757d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    color: #6c757d;
}

.empty-state p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

@media (min-width: 600px) {
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.setting-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.setting-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.setting-item.selected {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-color: #1e3c72;
    box-shadow: 0 2px 8px rgba(30,60,114,0.15);
}

/* Native Radio Button Styling - For automation settings */
.setting-item .radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.setting-item .radio-label input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    background: white;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.setting-item .radio-label input[type="radio"]:checked {
    background: #1e3c72;
    border-color: #1e3c72;
}

.setting-item .radio-label input[type="radio"]:checked::after {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    margin: 4px auto;
}

.setting-item .radio-label input[type="radio"]:hover {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.setting-item .radio-label input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
}

.setting-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 600;
}

.setting-info small {
    color: #64748b;
    line-height: 1.3;
    font-size: 14px;
}

/* NOTE: Collapsible and Advanced sections removed - date settings migrated to Campsite Manager > Booking Windows */

.help-text {
    color: #6c757d;
    font-size: 0.9em;
    margin: 8px 0 15px 0;
    line-height: 1.4;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

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

.form-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
    margin: 20px -30px -30px -30px;
    border-radius: 0 0 12px 12px;
}

/* Enhanced button styles for the form */
.form-buttons .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 24px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.form-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b4199 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.form-buttons .btn-secondary {
    background: white;
    color: #6c757d;
    border: 2px solid #e0e0e0;
    padding: 12px 24px;
    font-weight: 500;
}

.form-buttons .btn-secondary:hover {
    background: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .large-modal .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .form-buttons {
        flex-direction: column-reverse;
    }
    
    .form-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Check Windows Styles */
#checkWindowsContainer {
    border: 2px dashed #e5e7eb !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-radius: 10px !important;
    padding: 16px !important;
    transition: all 0.2s ease;
    margin-top: 12px;
}

#checkWindowsContainer:hover {
    border-color: #cbd5e1 !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

#checkWindowsContainer {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

#checkWindowsList {
    margin-bottom: 15px;
}

/* Table Structure */
.check-windows-table {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

/* Header Row */
.check-windows-header {
    display: table-row;
    background: #f5f7fa;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.header-cell {
    display: table-cell;
    padding: 12px 10px;
    text-align: center;
    border-bottom: 2px solid #1e3c72;
    vertical-align: middle;
}

.header-cell.header-number {
    width: 40px;
}

.header-cell.header-date {
    width: auto;
}

.header-cell.header-nights {
    width: 110px;
}

.header-cell.header-status {
    width: 150px;
}

.header-cell.header-action {
    width: 90px;
}

/* Table Body */
.check-windows-body {
    display: table-row-group;
}

/* Data Rows */
.check-window-row {
    display: table-row;
    transition: background-color 0.2s ease;
}

.check-window-row:hover {
    background-color: #f8f9fb;
}

.check-window-row:nth-child(even) {
    background-color: #fafbfc;
}

/* Table Cells */
.cell-number,
.cell-date,
.cell-nights,
.cell-status,
.cell-action {
    display: table-cell;
    padding: 8px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
}

/* Cell-specific styles */
.cell-number {
    text-align: center;
    width: 50px;
}

.window-number {
    background: #1e3c72;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.cell-date {
    padding-right: 20px;
}

.cell-date input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.cell-nights {
    text-align: center;
    width: 130px;
}

.cell-nights input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.cell-date input:focus,
.cell-nights input:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
    outline: none;
}

.cell-action {
    text-align: center;
    width: 90px;
}

.cell-status {
    text-align: center;
    width: 150px;
}

/* Booking Status Styles */
.booking-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.booking-status.reservable {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.booking-status.upcoming {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.booking-status.past {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.booking-status.unknown {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    font-style: italic;
}

/* Remove button styling */
.remove-window-btn {
    background: #fff;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.remove-window-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Remove last row border */
.check-window-row:last-child .cell-number,
.check-window-row:last-child .cell-date,
.check-window-row:last-child .cell-nights,
.check-window-row:last-child .cell-status,
.check-window-row:last-child .cell-action {
    border-bottom: none;
}

.nights-display {
    background: #f0f0f0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    display: inline-block;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design for check windows */
@media (max-width: 768px) {
    .check-windows-table {
        display: block;
        border: none;
    }
    
    .check-windows-header {
        display: none;
    }
    
    .check-windows-body {
        display: block;
    }
    
    .check-window-row {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 15px;
        background: white;
        position: relative;
    }
    
    .cell-number,
    .cell-date,
    .cell-nights,
    .cell-status,
    .cell-action {
        display: block;
        width: 100%;
        padding: 5px 0;
        border: none;
    }
    
    .cell-number {
        position: absolute;
        top: 10px;
        right: 10px;
        width: auto;
    }
    
    .cell-date::before {
        content: "Start Date:";
        display: block;
        font-size: 12px;
        color: #666;
        margin-bottom: 4px;
        font-weight: 600;
    }
    
    .cell-nights:nth-of-type(3)::before {
        content: "Preferred Nights:";
        display: block;
        font-size: 12px;
        color: #666;
        margin-bottom: 4px;
        font-weight: 600;
    }
    
    .cell-nights:nth-of-type(4)::before {
        content: "Minimum Nights:";
        display: block;
        font-size: 12px;
        color: #666;
        margin-bottom: 4px;
        font-weight: 600;
    }
    
    .cell-date input,
    .cell-nights input {
        width: 100%;
    }
    
    .remove-window-btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* Stat Badges */
.stat-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-badges .badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid #e0e0e0;
}

.badge-trips {
    color: #2563eb;
    border-color: #dbeafe !important;
    background: #eff6ff !important;
}

.badge-campgrounds {
    color: #059669;
    border-color: #d1fae5 !important;
    background: #ecfdf5 !important;
}

.badge-success {
    color: #16a34a;
    border-color: #bbf7d0 !important;
    background: #dcfce7 !important;
}

.badge-neutral {
    color: #6b7280;
    border-color: #e5e7eb !important;
    background: #f9fafb !important;
}

/* Card Body */

/* Match Cards */
.match-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.match-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.match-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.match-info h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.match-info small {
    font-size: 13px;
    color: #64748b;
}

/* Window Cards */
.match-windows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.window-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
}

.window-card.available {
    background: #f0fdf4;
    border-color: #86efac;
}

.window-card.unavailable {
    background: #fafafa;
}

.window-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.date-range {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.nights-badge {
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.site-info {
    font-size: 13px;
    color: #64748b;
}

.site-info strong {
    color: #16a34a;
    font-size: 16px;
    margin-right: 4px;
}

/* Sites List */
.sites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.site-chip {
    background: #dbeafe;
    color: #1e40af;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.more-sites {
    background: #f3f4f6;
    color: #6b7280;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-style: italic;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* SSE Event Monitor Styles */
.sse-monitor-modal-content {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.sse-monitor-modal-content.light-theme {
    background: #ffffff;
    color: #333333;
}

/* Header */
.sse-monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #2a2a2a;
    border-bottom: 1px solid #444;
}

.light-theme .sse-monitor-header {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

.sse-monitor-header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sse-monitor-header-left h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.light-theme .sse-monitor-header-left h2 {
    color: #333333;
}

.sse-connection-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.sse-connection-status {
    font-size: 10px;
    transition: color 0.3s ease;
}

.sse-connection-status.connected {
    color: #4ade80;
}

.sse-connection-status.connecting {
    color: #fbbf24;
    animation: pulse 1s infinite;
}

.sse-connection-status.disconnected {
    color: #ef4444;
}

.sse-connection-text {
    color: #9ca3af;
}

.sse-event-rate {
    color: #60a5fa;
    font-weight: 500;
}

.sse-monitor-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sse-theme-toggle {
    background: none;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.sse-theme-toggle:hover {
    background: #333;
    border-color: #666;
}

.light-theme .sse-theme-toggle {
    border-color: #dee2e6;
    color: #333;
}

.light-theme .sse-theme-toggle:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* Controls Bar */
.sse-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #262626;
    border-bottom: 1px solid #404040;
}

.light-theme .sse-controls-bar {
    background: #f1f3f5;
    border-bottom-color: #dee2e6;
}

.sse-controls-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sse-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sse-control-btn {
    background: #333;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sse-control-btn:hover {
    background: #444;
    border-color: #666;
    transform: translateY(-1px);
}

.light-theme .sse-control-btn {
    background: #ffffff;
    border-color: #dee2e6;
    color: #495057;
}

.light-theme .sse-control-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.sse-filter-select,
.sse-time-filter {
    background: #333;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.light-theme .sse-filter-select,
.light-theme .sse-time-filter {
    background: #ffffff;
    border-color: #dee2e6;
    color: #495057;
}

.sse-search-input {
    background: #333;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    width: 200px;
}

.light-theme .sse-search-input {
    background: #ffffff;
    border-color: #dee2e6;
    color: #495057;
}

.sse-event-counter {
    color: #9ca3af;
    font-size: 13px;
}

/* Statistics Bar */
.sse-stats-bar {
    display: flex;
    gap: 15px;
    padding: 10px 24px;
    background: #1f1f1f;
    border-bottom: 1px solid #333;
    overflow-x: auto;
}

.light-theme .sse-stats-bar {
    background: #f8f9fa;
    border-bottom-color: #e9ecef;
}

.sse-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sse-stat-type {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.sse-stat-count {
    font-size: 12px;
    color: #9ca3af;
}

.sse-stat-empty {
    color: #6b7280;
    font-style: italic;
    font-size: 13px;
}

/* Event Log */
.sse-event-log {
    flex: 1;
    overflow-y: auto;
    background: #0d0d0d;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.light-theme .sse-event-log {
    background: #ffffff;
}

.sse-event-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6b7280;
}

.sse-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.sse-empty-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.sse-empty-subtext {
    font-size: 14px;
    opacity: 0.7;
}

.sse-event-item {
    padding: 10px 24px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: background 0.2s ease;
}

.light-theme .sse-event-item {
    border-bottom-color: #f1f3f5;
}

.sse-event-item:hover {
    background: #1a1a1a;
}

.light-theme .sse-event-item:hover {
    background: #f8f9fa;
}

.sse-event-item.selected {
    background: #262626;
    border-left: 3px solid #3b82f6;
}

.light-theme .sse-event-item.selected {
    background: #e7f5ff;
    border-left-color: #1c7ed6;
}

.sse-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sse-event-time {
    color: #9ca3af;
    font-size: 12px;
}

.sse-event-type {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
}

/* Event type colors */
.sse-event-type.automation_update {
    background: #1e40af;
    color: #dbeafe;
}

.sse-event-type.automation_progress {
    background: #7c3aed;
    color: #ede9fe;
}

.sse-event-type.automation_complete {
    background: #059669;
    color: #d1fae5;
}

.sse-event-type.auto_reservation_status {
    background: #ea580c;
    color: #fed7aa;
}

.sse-event-type.auto_reservation_started {
    background: #dc2626;
    color: #fee2e2;
}

.sse-event-type.auto_reservation_complete {
    background: #16a34a;
    color: #dcfce7;
}

.sse-event-type.availability_check_complete {
    background: #0891b2;
    color: #cffafe;
}

.sse-event-type.scheduler_status {
    background: #6366f1;
    color: #e0e7ff;
}

.sse-event-type.error {
    background: #dc2626;
    color: #fee2e2;
}

.sse-event-type.connection {
    background: #0ea5e9;
    color: #e0f2fe;
}

.sse-event-type.system,
.sse-event-type.control {
    background: #8b5cf6;
    color: #f3e8ff;
}

.sse-event-type.message {
    background: #6b7280;
    color: #f3f4f6;
}

.sse-event-preview {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.light-theme .sse-event-preview {
    color: #64748b;
}

/* Event Details Panel */
.sse-event-details {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: #262626;
    border-left: 1px solid #444;
    overflow-y: auto;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.2);
}

.light-theme .sse-event-details {
    background: #ffffff;
    border-left-color: #dee2e6;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
}

.sse-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #333;
    border-bottom: 1px solid #444;
}

.light-theme .sse-details-header {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

.sse-details-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sse-details-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sse-details-close:hover {
    background: #444;
    color: #e0e0e0;
}

.light-theme .sse-details-close:hover {
    background: #e9ecef;
    color: #495057;
}

.sse-details-content {
    padding: 20px;
}

.sse-detail-item {
    margin-bottom: 16px;
}

.sse-detail-item strong {
    display: block;
    margin-bottom: 4px;
    color: #9ca3af;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sse-detail-data {
    background: #1a1a1a;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.light-theme .sse-detail-data {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* Scrollbar styling */
.sse-event-log::-webkit-scrollbar,
.sse-event-details::-webkit-scrollbar {
    width: 8px;
}

.sse-event-log::-webkit-scrollbar-track,
.sse-event-details::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.sse-event-log::-webkit-scrollbar-thumb,
.sse-event-details::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.sse-event-log::-webkit-scrollbar-thumb:hover,
.sse-event-details::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.light-theme .sse-event-log::-webkit-scrollbar-track,
.light-theme .sse-event-details::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.light-theme .sse-event-log::-webkit-scrollbar-thumb,
.light-theme .sse-event-details::-webkit-scrollbar-thumb {
    background: #ced4da;
}

.light-theme .sse-event-log::-webkit-scrollbar-thumb:hover,
.light-theme .sse-event-details::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive adjustments for SSE Monitor */
@media (max-width: 768px) {
    .sse-monitor-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .sse-controls-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .sse-controls-left,
    .sse-controls-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .sse-search-input {
        width: 100%;
    }
    
    .sse-event-details {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
