:root {
    color-scheme: light;
    --background: #f4f6fb;
    --surface: #ffffff;
    --text: #202534;
    --muted: #697386;
    --primary: #5b4bdb;
    --danger: #b42318;
    --success: #067647;
    --border: #dfe3eb;
}

* {
    box-sizing: border-box;
}

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

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

.shell {
    width: min(720px, calc(100% - 32px));
    margin: 48px auto;
}

.brand {
    margin-bottom: 24px;
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

.card {
    margin-top: 20px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 12px 36px rgb(32 37 52 / 8%);
}

.field {
    margin: 16px 0;
}

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

input,
select,
button {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}

input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

button {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 700;
}

button.secondary {
    border-color: var(--border);
    background: white;
    color: var(--text);
}

.inline-form {
    display: inline;
}

.inline-form button {
    width: auto;
}

.flash {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 8px;
}

.flash-error {
    background: #fef3f2;
    color: var(--danger);
}

.flash-success {
    background: #ecfdf3;
    color: var(--success);
}

.flash-warning {
    background: #fffaeb;
}

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

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

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

