:root {
    color-scheme: light;
    --bg: #f6f7f3;
    --panel: #ffffff;
    --ink: #1d2522;
    --muted: #63706a;
    --line: #dfe5df;
    --primary: #176d5b;
    --primary-dark: #105143;
    --warn: #8c3d19;
    --ok: #16633e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--primary);
}

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

.brand {
    color: var(--ink);
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

nav a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.page {
    margin: 0 auto;
    max-width: 1120px;
    padding: 28px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

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

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 18px;
}

h1, h2 {
    line-height: 1.15;
    margin: 0 0 16px;
}

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

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

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

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

button, .button {
    background: var(--primary);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 10px 14px;
    text-decoration: none;
}

button:hover, .button:hover {
    background: var(--primary-dark);
}

.button.danger, button.danger {
    background: #9d2f2f;
}

.button.danger:hover, button.danger:hover {
    background: #742222;
}

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

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

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

th {
    background: #eef3ef;
    font-size: 14px;
}

.status {
    border-radius: 999px;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 8px;
}

.status.submitted {
    background: #fff0d7;
    color: var(--warn);
}

.status.approved {
    background: #dff4e7;
    color: var(--ok);
}

.status.rejected {
    background: #f9dddd;
    color: #8b1e24;
}

.flash {
    background: #dff4e7;
    border: 1px solid #b9dec9;
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.error {
    background: #f9dddd;
    border: 1px solid #e6b6b9;
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.qr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 260px;
    padding: 8px;
    width: 260px;
}

.secret {
    background: #eef3ef;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: Consolas, Monaco, monospace;
    overflow-wrap: anywhere;
    padding: 10px 12px;
}

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

    .page {
        padding: 18px;
    }

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