:root {
    --ink: #1c2430;
    --muted: #667085;
    --line: #d9e0ea;
    --soft: #f5f7fb;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --danger: #b42318;
    --warning: #b54708;
    --ok: #067647;
    --white: #fff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #eef2f7;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.sidebar {
    background: #18202b;
    color: #f8fafc;
    padding: 24px 18px;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 28px;
}

.nav a {
    display: block;
    padding: 11px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    color: #d7dee9;
}

.nav a.active,
.nav a:hover {
    background: #273244;
    color: #fff;
}

.main {
    min-width: 0;
}

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

.content {
    padding: 28px;
}

.page-title {
    margin: 0 0 4px;
    font-size: 28px;
}

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

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

.card,
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.card {
    padding: 18px;
}

.metric {
    font-size: 28px;
    font-weight: 700;
    margin-top: 8px;
}

.panel {
    margin-top: 18px;
    overflow: hidden;
}

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

.table-wrap {
    overflow-x: auto;
}

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

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

th {
    color: #344054;
    background: #f8fafc;
    font-size: 13px;
    text-transform: uppercase;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn,
button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 9px 13px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn.secondary,
button.secondary {
    background: #e6eef5;
    color: var(--ink);
}

.btn.danger {
    background: var(--danger);
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #e6eef5;
}

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

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

.badge.danger {
    color: var(--danger);
    background: #fee4e2;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 10px;
    color: var(--ink);
    background: #fff;
}

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

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.login-card {
    width: min(440px, 100%);
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--brand-dark);
    background: #ccfbf1;
}

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

    .sidebar {
        position: static;
    }

    .grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

