:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #647086;
    --line: #d9dee8;
    --panel: #ffffff;
    --soft: #f5f7fb;
    --accent: #1f5f8b;
    --accent-2: #2b7a62;
    --danger: #b42318;
    --warn: #a15c07;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--soft);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 56px;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}
.brand {
    color: var(--accent);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}
nav { display: flex; gap: 16px; flex-wrap: wrap; }
nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
}
nav a:hover { color: var(--accent); }

.page {
    max-width: 1220px;
    margin: 0 auto;
    padding: 24px;
}
h1 { margin: 0 0 18px; font-size: 26px; }
h2 { margin: 0 0 14px; font-size: 18px; }
p { line-height: 1.5; color: var(--muted); }

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}
.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}
.metric strong { display: block; font-size: 22px; margin-top: 6px; }

form {
    display: grid;
    gap: 14px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input, select, textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
button.secondary, .button.secondary { background: var(--muted); }
button.danger { background: var(--danger); }

.table-wrap {
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}
th {
    background: #edf4fb;
    color: #17324d;
    font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e8eef8;
    font-size: 12px;
    font-weight: 700;
}
.status.approved { background: #dff3ea; color: var(--accent-2); }
.status.rejected { background: #fde7e7; color: var(--danger); }
.status.pending { background: #fff1d6; color: var(--warn); }
.flash {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #eaf7ef;
}
.flash.error { background: #fde7e7; }
.note {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 820px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
    .page { padding: 18px; }
    .grid, .form-grid { grid-template-columns: 1fr; }
}
