* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

a {
    color: #0f4c81;
}

.app-shell header {
    background: #0f172a;
    padding: 0.75rem 1rem;
}

.app-shell nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-shell nav a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 0.35rem;
}

.app-shell nav a:hover {
    background: #1e293b;
}

main {
    padding: 1rem;
}

.lab-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    gap: 1rem;
}

.endpoint-panel {
    background: #e8eef8;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.endpoint-panel h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.endpoint-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 140px;
}

input, button {
    font: inherit;
}

input {
    padding: 0.35rem 0.45rem;
    border: 1px solid #94a3b8;
    border-radius: 0.35rem;
}

button {
    border: 1px solid #1d4ed8;
    background: #2563eb;
    color: #fff;
    border-radius: 0.35rem;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.list-box {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    max-height: 220px;
    overflow: auto;
    background: #fff;
}

.list-box li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem;
    border-bottom: 1px solid #e2e8f0;
}

.map {
    height: 640px;
    border: 1px solid #94a3b8;
    border-radius: 0.5rem;
    background: #dbeafe;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
    background: white;
}

.table-scroll {
    max-height: 260px;
    overflow: auto;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

.table-scroll table {
    margin-bottom: 0;
    border: 0;
}

th, td {
    border: 1px solid #cbd5e1;
    padding: 0.3rem;
    text-align: left;
    vertical-align: top;
}

pre {
    margin: 0.3rem 0 0.75rem 0;
    padding: 0.5rem;
    border-radius: 0.35rem;
    border: 1px solid #cbd5e1;
    background: #0f172a;
    color: #d1fae5;
    overflow: auto;
    max-height: 220px;
}

.error {
    color: #b91c1c;
    font-weight: 600;
}

.totals {
    margin: 0.6rem 0;
}

@media (max-width: 900px) {
    .lab-grid {
        grid-template-columns: 1fr;
    }

    .map {
        height: 420px;
    }
}
