:root {
    --bg: #f4f7ff;
    --text: #111c3a;
    --muted: #5b6070;
    --card: #ffffff;
    --stroke: #dfe4f3;
    --accent: #0f6fff;
    --accent-2: #00c6ae;
    --shadow: 0 18px 60px rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] {
    --bg: #0b1020;
    --text: #e8edfa;
    --muted: #9da8c2;
    --card: #141a2a;
    --stroke: #1f2937;
    --accent: #6aa7ff;
    --accent-2: #48e0c2;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.content-wrapper main {
    flex: 1 1 auto;
    display: flex;
}

.top-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    flex-wrap: nowrap;
    min-height: calc(100vh - 110px);
    width: 100%;
}

.panel-left {
    flex: 0 0 60%;
    min-width: 320px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.info-card {
    flex: 1 1 40%;
    min-width: 280px;
    display: flex;
}

.info-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.metrics-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 14px;
}

.metric-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: var(--shadow);
    min-width: 120px;
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(31,122,236,0.04), rgba(0,198,174,0.04));
    pointer-events: none;
}

.metric-label {
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.2;
}

.metric-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
}

.navbar {
    background: linear-gradient(90deg, rgba(15,111,255,0.18), rgba(0,198,174,0.12));
    border-bottom: 1px solid var(--stroke);
}

.navbar-brand {
    color: var(--text) !important;
}

.nav-link {
    color: var(--text) !important;
    font-weight: 700;
    font-size: 1.05rem;
}

.nav-link.active {
    text-decoration: underline;
}

.nav-actions .btn {
    font-size: 1.05rem;
    padding: 10px 18px;
    color: var(--text);
    border-color: var(--stroke);
    background: var(--card);
}

.eyebrow {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15,111,255,0.12);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tablet-layout {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 16px;
}

.tablet-left,
.tablet-right {
    min-width: 0;
}

.info-card {
    border: 1px solid var(--stroke);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
}

.info-content {
    font-size: 1.25rem;
    line-height: 1.5;
}

.placeholder {
    color: var(--muted);
    font-size: 1.1rem;
}

.big-table {
    font-size: 1.2rem;
}

.big-table thead th {
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid var(--stroke);
}

.big-table tbody td {
    padding: 14px 12px;
    font-weight: 700;
    background: var(--card);
    color: var(--text);
}

.big-table tbody tr {
    cursor: pointer;
}

.big-table tbody tr:hover td {
    background: rgba(15,111,255,0.08);
}

.big-table tbody tr.selected,
.big-table tbody tr.selected td {
    background: #c9f7db;
    color: #0b3d1d;
}

.big-table tbody tr.selected:hover td {
    background: #b6f1ce;
}

.big-table .badge {
    font-size: 1rem;
}

.map-area {
    flex: 1 1 auto;
    width: 100%;
    min-height: 200px;
    background: rgba(15,111,255,0.06);
    border-radius: 12px;
    padding: 2px;
    border: 1px dashed var(--stroke);
    overflow: auto;
    text-align: center;
}

.map-area img {
    max-width: 70%;
    max-height: 70%;
    height: auto;
    width: auto;
    display: block;
    margin: 0 auto;
}

[data-theme="dark"] .big-table thead th {
    color: var(--text);
    background: #111827;
    border-bottom: 2px solid #1f2937;
}

[data-theme="dark"] .big-table tbody td {
    background: #111827;
    color: var(--text);
}

[data-theme="dark"] .big-table tbody tr:nth-child(even) td {
    background: #0f1522;
}

[data-theme="dark"] .big-table tbody tr:hover td {
    background: #1a2336;
}

[data-theme="dark"] .big-table tbody tr.selected,
[data-theme="dark"] .big-table tbody tr.selected td {
    background: #1f3b2e;
    color: #d6ffe5;
}

[data-theme="dark"] .big-table tbody tr.selected:hover td {
    background: #1b3227;
}

[data-theme="dark"] .map-area {
    background: #111827;
    border-color: #1f2937;
}

.footer {
    border-top: 1px solid var(--stroke);
    background: var(--card);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .top-row {
        flex-direction: column;
        flex-wrap: wrap;
    }
}
