body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
    color: #333;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 10px;
}
h2 {
    color: #555;
    margin-top: 30px;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 30px;
}
th {
    background-color: #4CAF50;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}
td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}
tr:hover {
    background-color: #f5f5f5;
}
tr.past-event {
    opacity: 0.4;
}

.country {
    font-weight: bold;
    color: #FF9800;
}
.level {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
}
.available {
    color: #4CAF50;
    font-weight: bold;
}
.full {
    color: #f44336;
    font-weight: bold;
}

/* Utilization coloring (applied to Utilization column cells) */
.util-ok { color: #2e7d32; font-weight: bold; }
.util-low { color: #ef6c00; font-weight: bold; }
.util-full { color: #c62828; font-weight: bold; }
.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #777;
    font-size: 14px;
}
a {
    color: #2196F3;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 50px;
}
th:hover {
    background-color: #45a049;
}
th.sortable::after {
    content: ' ↕';
    position: absolute;
    right: 30px;
    opacity: 0.5;
}
th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}
th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}
.filter-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    padding: 2px 5px;
    border-radius: 3px;
}
.filter-icon:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}
.filter-icon.active {
    opacity: 1;
    color: #FFD700;
}
.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 2px;
}
.filter-dropdown.show {
    display: block;
}
.filter-dropdown-header {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background-color: #f9f9f9;
    font-weight: bold;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.filter-dropdown-content {
    padding: 5px;
}
.filter-option {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    color: #333;
}
.filter-option:hover {
    background-color: #f5f5f5;
}
.filter-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}
.filter-option label {
    cursor: pointer;
    user-select: none;
    flex: 1;
}
.filter-only-link {
    margin-left: 8px;
    font-size: 11px;
    color: #2196F3;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}
.filter-only-link:hover {
    background-color: #e3f2fd;
    text-decoration: none;
}
.filter-actions {
    padding: 8px 10px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.filter-btn {
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    color: #2196F3;
    display: inline-block;
}
.filter-btn:hover {
    text-decoration: underline;
}
.filter-text-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 14px;
}
.filter-text-input:focus {
    outline: none;
    border-color: #4CAF50;
}
.filter-date-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 14px;
}
.filter-date-input:focus {
    outline: none;
    border-color: #4CAF50;
}
h2.collapsible {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 30px;
}
h2.collapsible:hover {
    color: #2196F3;
}
h2.collapsible::after {
    content: ' ▼';
    position: absolute;
    left: 0;
    font-size: 0.8em;
}
h2.collapsible.collapsed::after {
    content: ' ▶';
}
.table-container {
    display: block;
}
.table-container.collapsed {
    display: none;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
        border-radius: 4px;
    }
    
    h1 {
        font-size: 24px;
        padding-bottom: 8px;
    }
    
    h2 {
        font-size: 20px;
        margin-top: 20px;
        padding-bottom: 6px;
    }
    
    /* Make tables horizontally scrollable on mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 800px;
        font-size: 14px;
    }
    
    th, td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    th {
        padding-right: 45px;
        font-size: 13px;
    }
    
    th.sortable::after {
        right: 25px;
        font-size: 12px;
    }
    
    .filter-icon {
        right: 6px;
        font-size: 12px;
    }
    
    .filter-dropdown {
        min-width: 180px;
        max-height: 250px;
        font-size: 14px;
    }
    
    .filter-option {
        padding: 8px;
    }
    
    .filter-btn {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .filter-text-input,
    .filter-date-input {
        font-size: 14px;
        padding: 8px;
    }
    
    /* Increase touch target sizes */
    h2.collapsible {
        padding: 10px 0 10px 30px;
        font-size: 18px;
    }
    
    .footer {
        font-size: 12px;
        margin-top: 20px;
        padding-top: 15px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    th {
        padding-right: 40px;
        font-size: 12px;
    }
    
    .filter-dropdown {
        min-width: 160px;
        max-height: 200px;
        font-size: 13px;
    }
}

/* Landscape orientation on mobile devices */
@media screen and (max-width: 896px) and (orientation: landscape) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 20px;
        padding-bottom: 5px;
        margin: 0 0 10px 0;
    }
    
    h2 {
        font-size: 16px;
        margin-top: 15px;
        padding-bottom: 5px;
    }
    
    h2.collapsible {
        padding: 8px 0 8px 25px;
        font-size: 16px;
    }
    
    h2.collapsible::after {
        font-size: 0.7em;
    }
    
    /* Optimize table display for landscape */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    table {
        min-width: 100%;
        font-size: 11px;
    }
    
    th, td {
        padding: 5px 4px;
        white-space: nowrap;
    }
    
    th {
        padding-right: 35px;
        font-size: 11px;
        position: sticky;
        top: 0;
        background-color: #4CAF50;
        z-index: 10;
    }
    
    th.sortable::after {
        right: 20px;
        font-size: 10px;
    }
    
    .filter-icon {
        right: 4px;
        font-size: 10px;
        padding: 1px 3px;
    }
    
    .filter-dropdown {
        min-width: 150px;
        max-height: 40vh;
        font-size: 12px;
    }
    
    .filter-dropdown-header {
        padding: 6px;
        font-size: 11px;
    }
    
    .filter-option {
        padding: 5px 6px;
        font-size: 11px;
    }
    
    .filter-option input[type="checkbox"] {
        margin-right: 5px;
    }
    
    .filter-only-link {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .filter-actions {
        padding: 5px 6px;
    }
    
    .filter-btn {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .filter-text-input,
    .filter-date-input {
        font-size: 12px;
        padding: 5px;
    }
    
    .level {
        padding: 2px 5px;
        font-size: 10px;
    }
    
    .footer {
        font-size: 10px;
        margin-top: 10px;
        padding-top: 10px;
    }
}

/* Inline event card styles */
tr.event-row { cursor: pointer; }
tr.event-row.expanded { background-color: #eef7ff; }
tr.detail-row td { background: #fafafa; padding: 16px 20px; border-bottom: 1px solid #ddd; }
.inline-card h3 { margin: 0 0 8px; }
.inline-card .meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; margin-bottom: 10px; }
