:root {
    --bg: #f4f7f9;
    --panel: #ffffff;
    --ink: #13242f;
    --muted: #637381;
    --line: #dbe4ea;
    --brand: #1f7a8c;
    --accent: #d97706;
    --ok: #047857;
    --warn: #b45309;
    --danger: #b91c1c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: inherit;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-card,
.panel,
.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(19, 36, 47, 0.06);
}

.auth-card {
    width: min(440px, 100%);
    padding: 28px;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.muted {
    color: var(--muted);
}

.field {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

label {
    font-weight: 700;
    font-size: 14px;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    font: inherit;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    padding: 11px 14px;
    background: var(--brand);
    color: white;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #102a33;
    color: #eff8fb;
    padding: 24px 18px;
}

.brand {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 22px;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav a,
.logout-button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    color: #d9eef3;
    text-decoration: none;
    background: transparent;
    text-align: left;
}

.nav a.active,
.nav a:hover,
.logout-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.main {
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.topbar h1 {
    margin: 0;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric {
    padding: 18px;
}

.metric strong {
    display: block;
    font-size: 28px;
    margin-top: 6px;
}

.grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 18px;
}

.panel {
    padding: 18px;
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 12px 8px;
    vertical-align: top;
}

th {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: #e6f3f6;
    color: #0f5d6c;
    font-weight: 800;
    font-size: 12px;
}

.badge.ok {
    background: #dcfce7;
    color: var(--ok);
}

.badge.warn {
    background: #fef3c7;
    color: var(--warn);
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfdfe;
}

.error {
    color: var(--danger);
    font-weight: 700;
}

.language-switcher {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.language-switcher a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--panel);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.language-switcher a.active {
    border-color: var(--brand);
    color: var(--brand);
    background: #e6f3f6;
}

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

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        position: static;
    }
}

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

    .main {
        padding: 18px;
    }
}
