:root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #f4f6f8;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
.muted { color: #6b7280; font-size: .9rem; }
.brand { font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; }
.auth-page { display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); background: #fff; padding: 28px; border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.08); }
label { display: block; margin-top: 16px; margin-bottom: 6px; font-weight: 600; }
input[type="text"], input[type="password"] { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 9px; font-size: 1rem; }
button { font: inherit; }
.auth-card button[type="submit"] { width: 100%; margin-top: 18px; padding: 12px; border: 0; border-radius: 9px; background: #111827; color: #fff; cursor: pointer; }
.check-row { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.alert { padding: 10px 12px; border-radius: 8px; }
.alert.error { background: #fef2f2; color: #991b1b; }
.topbar { height: 58px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; gap: 12px; }
.userbox { display: flex; align-items: center; gap: 12px; }
.app-shell { display: grid; grid-template-columns: 1fr 320px; height: calc(100vh - 58px); }
.map-panel, #crowdsense-map { min-height: 0; height: 100%; }
.side-panel { background: #fff; border-left: 1px solid #e5e7eb; padding: 18px; overflow-y: auto; }
.side-panel h1 { margin-top: 0; }
.spot-list { display: grid; gap: 10px; margin-top: 18px; }
.spot-card { width: 100%; text-align: left; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; cursor: pointer; }
.spot-card:hover { background: #f9fafb; }
.spot-card strong, .spot-card span { display: block; }
.spot-card span { margin-top: 4px; color: #6b7280; font-size: .88rem; }
@media (max-width: 760px) {
    .app-shell { grid-template-columns: 1fr; grid-template-rows: minmax(380px, 62vh) auto; height: auto; }
    .side-panel { border-left: 0; border-top: 1px solid #e5e7eb; }
    .userbox span { display: none; }
}
