* {
   box-sizing: border-box;
}

html, body {
   margin: 0;
   font-family: Arial, sans-serif;
}

.main-nav {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   z-index: 1000;
   display: flex;
   gap: 8px;
   padding: 10px 16px;
   background: rgba(15, 23, 42, 0.92);
   backdrop-filter: blur(6px);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.main-nav a {
   color: #e2e8f0;
   text-decoration: none;
   padding: 8px 14px;
   border-radius: 8px;
   font-weight: 600;
   font-size: 14px;
   transition: background 0.15s;
}

.main-nav a:hover {
   background: #334155;
}

.main-nav a.active {
   background: #2563eb;
   color: white;
}

body.has-nav {
   padding-top: 60px;
}

body.dashboard {
   background: #0f172a;
   color: #e2e8f0;
   padding: 30px;
}

body.dashboard.has-nav {
   padding-top: 90px;
}

.dashboard h1 {
   margin: 0 0 10px 0;
}

.dashboard .subtitle {
   color: #94a3b8;
   margin-bottom: 20px;
}

.toolbar {
   display: flex;
   flex-wrap: wrap;
   gap: 12px;
   align-items: end;
   margin-bottom: 20px;
   padding: 16px;
   background: #1e293b;
   border-radius: 12px;
}

.toolbar label {
   font-weight: bold;
   margin-bottom: 6px;
}

.toolbar select,
.toolbar input,
.toolbar button {
   padding: 10px 12px;
   border-radius: 8px;
   border: 1px solid #334155;
   background: #0f172a;
   color: #e2e8f0;
   font-size: 14px;
}

.toolbar button {
   cursor: pointer;
   background: #2563eb;
   border: none;
}

.toolbar button:hover {
   background: #1d4ed8;
}

.card {
   background: #1e293b;
   border-radius: 14px;
   padding: 20px;
   box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
   border: none;
}

.card h2 {
   margin-top: 0;
   font-size: 20px;
   border-bottom: 1px solid #334155;
   padding-bottom: 10px;
   margin-bottom: 15px;
}

.stat {
   display: flex;
   justify-content: space-between;
   gap: 10px;
   padding: 8px 0;
   border-bottom: 1px solid #334155;
}

.stat:last-child {
   border-bottom: none;
}

.label {
   color: #94a3b8;
}

.value {
   font-weight: bold;
   color: #f8fafc;
   text-align: right;
}

.error {
   display: none;
   margin-top: 15px;
   padding: 12px;
   border-radius: 8px;
   background: #7f1d1d;
   color: #fecaca;
}

.updated {
   margin-top: 10px;
   color: #94a3b8;
   font-size: 14px;
}

#map {
   width: 100%;
   height: 700px;
   border-radius: 14px;
   overflow: hidden;
}

.stats-table {
   width: 100%;
   border-collapse: collapse;
   font-size: 14px;
}

.stats-table th,
.stats-table td {
   padding: 8px 12px;
   text-align: right;
   white-space: nowrap;
   border-bottom: 1px solid #334155;
}

.stats-table th:first-child,
.stats-table td:first-child {
   text-align: left;
}

.stats-table thead th {
   color: #94a3b8;
   font-weight: 600;
   border-bottom: 2px solid #334155;
}

.stats-table tbody tr:first-child td {
   font-weight: 700;
   background: rgba(37, 99, 235, 0.08);
}

.stats-table tbody tr:hover td {
   background: rgba(148, 163, 184, 0.05);
}
