* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f4f5f7; color: #1c1f26; }

.topbar {
    display: flex; align-items: center; gap: 24px;
    padding: 10px 20px; background: #fff; border-bottom: 1px solid #e2e4e9;
    flex-wrap: wrap;
}
.topbar h1 { font-size: 18px; margin: 0; }
.tabs { display: flex; gap: 4px; }
.tab-btn {
    padding: 8px 16px; border: none; background: transparent; cursor: pointer;
    border-radius: 6px; font-size: 14px; color: #555;
}
.tab-btn.active { background: #e8effe; color: #2b5fd9; font-weight: 600; }
.controls { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.logout { color: #888; text-decoration: none; font-size: 13px; }
select { padding: 6px 10px; border-radius: 6px; border: 1px solid #d3d6dc; }

.tab-content { display: none; }
.tab-content.active { display: block; }

#tab-now { display: none; grid-template-columns: 1fr 340px; height: calc(100vh - 60px); }
#tab-now.active { display: grid; }
#map { height: 100%; }
.side-list { overflow-y: auto; padding: 12px; background: #fff; border-left: 1px solid #e2e4e9; }
.now-item { display: flex; gap: 10px; padding: 10px 6px; border-bottom: 1px solid #eee; cursor: pointer; }
.now-item:hover { background: #f7f8fa; }
.now-title { font-size: 13px; font-weight: 600; }
.now-sub { font-size: 12px; color: #888; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: none; }
.empty { color: #888; padding: 20px; text-align: center; }

#tab-stats { padding: 20px; }
.stats-controls { display: flex; gap: 12px; margin-bottom: 16px; }
#statsChart { max-width: 100%; margin-bottom: 30px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #fafafa; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box { background: #fff; padding: 32px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 12px; width: 280px; }
.login-box h1 { margin: 0 0 8px; font-size: 20px; text-align: center; }
.login-box input { padding: 10px; border-radius: 6px; border: 1px solid #d3d6dc; }
.login-box button { padding: 10px; border: none; border-radius: 6px; background: #2b5fd9; color: #fff; cursor: pointer; font-weight: 600; }
.error { color: #d9362b; font-size: 13px; text-align: center; }
