:root {
    color-scheme: light;
    --bg: #f7f8fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #d9dee8;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --danger: #b42318;
    --warn: #b54708;
    --ok: #067647;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--brand-dark);
}

.shell {
    min-height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.content {
    width: min(1120px, calc(100vw - 32px));
    margin: 24px auto 48px;
}

.auth-card {
    width: min(420px, calc(100vw - 32px));
    margin: 12vh auto;
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.metric {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

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

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

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.alert.error {
    border-color: #fecdca;
    color: var(--danger);
    background: #fffbfa;
}

.alert.ok {
    border-color: #abefc6;
    color: var(--ok);
    background: #f6fef9;
}

label {
    display: block;
    font-weight: 600;
    margin: 14px 0 6px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--brand);
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
}

button.secondary,
.button.secondary {
    background: #fff;
    color: var(--brand-dark);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
}

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

th {
    font-size: 13px;
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
    font-size: 13px;
    font-weight: 650;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}
