* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

h1 {
    margin: 0 0 12px;
}

.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.controls input,
.controls select,
.controls button {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.controls input {
    min-width: 280px;
    flex: 1;
}

.controls button {
    background: #1d4ed8;
    color: white;
    cursor: pointer;
}

.status-line {
    background: #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

#map {
    height: 62vh;
    min-height: 420px;
    border-radius: 8px;
    overflow: hidden;
}

.map-panel {
    padding-bottom: 8px;
}

.panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}

.panel h2 {
    margin-top: 0;
    font-size: 18px;
}

.item {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 0;
}

.item:last-child {
    border-bottom: none;
}

.event-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
}

.event-icon i {
    font-size: 18px;
}

.event-detail-btn {
    margin-top: 8px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    cursor: pointer;
}

.snowplows-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.snowplow-card {
    min-width: 230px;
    flex: 1 1 230px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #f9fafb;
}

.event-marker-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.event-marker-icon i {
    font-size: 18px;
}

.popup-detail-btn {
    margin-top: 6px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    cursor: pointer;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.modal.hidden {
    display: none;
}

.modal-card {
    width: min(900px, 100%);
    background: white;
    border-radius: 10px;
    padding: 18px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.badge {
    display: inline-block;
    font-size: 12px;
    border-radius: 999px;
    padding: 2px 8px;
    color: white;
}

.badge.low {
    background: #15803d;
}

.badge.medium {
    background: #b45309;
}

.badge.high {
    background: #b91c1c;
}

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 1fr;
    }

    #map {
        height: 55vh;
    }
}
