:root {
    font: 16px/1.5 system-ui, sans-serif;
    color: #24213b;
    background: #f5f4fa;
    --primary: #542dc3;
    --ink-muted: #615a76;
    --line: #ded8eb;
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell { max-width: 1152px; margin: auto; padding: 0 24px; }
.header { background: #251a40; color: white; }
.topbar, .heading, nav, .pagination { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar { justify-content: space-between; min-height: 66px; padding-block: 10px; }
.brand { color: white; font-weight: 850; font-size: 1.6rem; text-decoration: none; }
.brand span { color: #b69bff; margin-left: .35em; font-size: .5em; vertical-align: middle; }
.topbar nav { flex: 1; }
.topbar nav a { color: #efebff; padding: 5px 8px; text-decoration: none; }
.topbar nav a[aria-current] { background: #483667; border-radius: 6px; }
main { padding-block: 32px 64px !important; }
.heading { justify-content: space-between; margin-bottom: 20px; }
.heading p { margin: 4px 0 0; }
h1 { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -.05em; }
.heading h1 { margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 0 0 20px; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; align-items: start; }
.stack { display: grid; align-content: start; gap: 12px; }
.stack > * { margin-block: 0; }
.auth-panel { width: min(100%, 440px); margin: 30px auto; }
label { display: grid; gap: 5px; font-weight: 580; }
.check { display: flex; align-items: center; gap: 8px; }
input, select, textarea { font: inherit; color: inherit; padding: 8px 10px; width: 100%; border: 1px solid #b7aecb; border-radius: 7px; background: white; }
textarea { resize: vertical; }
input[type=checkbox] { width: auto; }
a { color: var(--primary); }
button, .button { display: inline-block; justify-self: start; font: inherit; font-weight: 650; color: white; background: var(--primary); text-decoration: none; padding: 8px 13px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; }
.secondary { background: #ede6ff; color: #462599; }
.subtle { background: transparent; border-color: #9c8ac2; color: white; }
.danger { background: #a22845; }
:focus-visible { outline: 3px solid #9467ed; outline-offset: 3px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: .9rem; color: var(--ink-muted); background: #f8f6fc; }
tbody tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; border-radius: 20px; background: #eee8ff; color: #482d91; font-size: .86rem; padding: 3px 9px; }
small, .muted { color: var(--ink-muted); }
small { display: block; }
.pagination { margin-top: 12px; }
.notice, .alert { padding: 10px 15px; border-radius: 8px; margin: 0 0 16px; }
.notice { background: #e4f5ea; color: #165c38; }
.alert { background: #fbe9ee; color: #881c40; }
.alert p { margin: 4px 0; }
