* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #f3f4f6;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 58px;
    background: #1f2937;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.header h1 {
    font-size: 18px;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.btn-light {
    background: #fff;
    color: #111827;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.map-page #map {
    position: fixed;
    top: 58px;
    left: 0;
    right: 360px;
    bottom: 0;
}

.side-panel {
    position: fixed;
    top: 58px;
    right: 0;
    bottom: 0;
    width: 360px;
    background: #ffffff;
    overflow: auto;
    border-left: 1px solid #e5e7eb;
    padding: 12px;
}

.card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.row {
    display: flex;
    gap: 8px;
}

.row > * {
    flex: 1;
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

input, select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
}

.stat strong {
    display: block;
    font-size: 16px;
}

.stop-item {
    border-bottom: 1px solid #f3f4f6;
    padding: 8px 0;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.badge-long {
    background: #fef3c7;
    color: #92400e;
}

.badge-park {
    background: #dbeafe;
    color: #1e40af;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
}

.login-box {
    width: min(92vw, 420px);
    background: #fff;
    border-radius: 12px;
    padding: 20px;
}

.login-subtitle {
    color: #6b7280;
    margin-top: 0;
}

.login-form label {
    margin-bottom: 10px;
}

.login-form button {
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: 8px;
    padding: 10px;
    background: #1f2937;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.login-error {
    color: #dc2626;
}

@media (max-width: 920px) {
    .map-page #map {
        right: 0;
        bottom: 300px;
    }

    .side-panel {
        width: 100%;
        top: auto;
        height: 300px;
    }
}
