html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: #222;
}

#main-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

#map {
    flex: 2 1 0;
    height: 100vh;
    margin: 0;
    padding: 0;
    z-index: 1;
}

#info-panel {
    flex: 1 1 320px;
    max-width: 400px;
    min-width: 320px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 2;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    border-left: 1px solid #ddd;
}

#info-panel h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    position: sticky;
    top: 0;
    background: white;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

#aircraft-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.aircraft-item {
    background: #f8f9fa;
    border-radius: 0;
    padding: 6px 10px;
    border-left: 4px solid #007bff;
    font-size: 12px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 28px;
    display: flex;
    flex-direction: column;
}

.aircraft-item.expanded {
    background: #e9f5ff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 2;
    padding: 16px 16px 16px 18px;
    font-size: 13px;
    min-height: 90px;
    border: 1px solid #b3d8ff;
}

.aircraft-item .aircraft-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.aircraft-item .aircraft-callsign {
    font-weight: bold;
    color: #333;
    font-size: 13px;
    margin-right: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aircraft-item .aircraft-alt {
    color: #007bff;
    font-size: 12px;
    margin-right: 8px;
}

.aircraft-item .aircraft-speed {
    color: #888;
    font-size: 12px;
}

.aircraft-item .aircraft-status {
    font-size: 11px;
    margin-left: 6px;
    color: #dc3545;
    font-weight: bold;
}

.aircraft-item .aircraft-status.monitored {
    color: #007bff;
    font-weight: normal;
}

.aircraft-item .aircraft-details {
    margin-top: 10px;
    font-size: 12px;
    color: #444;
    display: none;
}

.aircraft-item.expanded .aircraft-details {
    display: block;
}

.aircraft-item .aircraft-details p {
    margin: 2px 0;
}

.aircraft-item:hover {
    background: #f3f6fa;
}

.aircraft-item.interesting {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.aircraft-item h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aircraft-item p {
    margin: 4px 0;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.aircraft-item .highlight {
    color: #dc3545;
    font-weight: bold;
}

/* Custom popup styles */
.leaflet-popup-content {
    margin: 10px;
}

.leaflet-popup-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.leaflet-popup-content p {
    margin: 4px 0;
    font-size: 14px;
}

.leaflet-popup-content .highlight {
    color: #dc3545;
    font-weight: bold;
}

/* Scrollbar styles */
#info-panel::-webkit-scrollbar {
    width: 8px;
}

#info-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

#loitering-events {
    background: #fff;
    border-radius: 0;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#loitering-events h3 {
    margin: 0 0 15px 0;
    color: #333;
}

#events-summary {
    margin-bottom: 15px;
}

.recent-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-item {
    padding: 10px;
    background: #f5f5f5;
    border-radius: 0;
    border-left: 4px solid #0078d7;
}

.event-item strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.event-item p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.events-link {
    display: inline-block;
    padding: 8px 16px;
    background: #0078d7;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.events-link:hover {
    background: #005fa3;
}

.loading {
    color: #666;
    font-style: italic;
}

.error {
    color: #d32f2f;
    font-style: italic;
}

.events-table.compact {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
    table-layout: fixed;
}
.events-table.compact th, .events-table.compact td {
    padding: 3px 6px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #eee;
}
.events-table.compact th {
    background: #f5f5f5;
    font-weight: bold;
}
#events-table-container {
    flex-shrink: 0;
    max-width: 100%;
    max-height: 50%;
    overflow-x: auto;
    margin-bottom: 12px;
}

/* Remove border-radius from all panel-like elements */
.aircraft-item,
#loitering-events,
.event-item,
.intersection-point {
    border-radius: 0 !important;
}

#info-panel, .info-section {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: #222;
}

#info-panel h2, .info-section h3 {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 20px;
    color: #222;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
}

#info-panel p, .info-section p, .info-label, .info-value, .aircraft-item, .aircraft-item p, .aircraft-item span {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: #222;
}
