:root {
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #20243a;
    background: #f3f5f9;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #3148a5; text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { background: #20243a; color: white; padding: 22px 16px; display: flex; flex-direction: column; gap: 8px; }
.brand { display: block; padding: 0 4px 16px; }
.brand img { display: block; width: 100%; height: auto; max-height: 54px; object-fit: contain; object-position: left center; }
.page-logo { display: block; width: min(100%, 360px); max-height: 90px; object-fit: contain; object-position: left center; margin: 0 auto 18px; }
.login-logo { width: min(100%, 420px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.signed-in { color: #c8cbe0; padding: 0 8px 18px; overflow-wrap: anywhere; }
.nav-link { display: block; color: #eef0fb; padding: 11px 12px; border-radius: 7px; }
.nav-link:hover, .nav-link.active { background: #343b5d; text-decoration: none; }
.nav-bottom { margin-top: auto; }
.content { padding: 28px clamp(16px, 3vw, 42px); overflow: hidden; }
h1 { font-size: 29px; margin: 0 0 7px; }
h2 { font-size: 19px; margin: 22px 0 12px; }
.muted { color: #6b7280; }
.section { background: white; border-radius: 10px; padding: 18px; margin: 14px 0; box-shadow: 0 1px 2px #1b284014; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 18px 0; }
.card { background: white; border-radius: 10px; padding: 20px; min-width: 0; box-shadow: 0 1px 2px #1b284014; }
.card-value { display: block; font-size: 25px; font-weight: 700; margin-top: 8px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #e8eaf0; vertical-align: top; }
th { font-size: 13px; color: #5c6475; background: #fafbfc; }
form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
label { display: block; font-size: 13px; font-weight: 600; margin: 8px 0; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #cbd0da; border-radius: 6px; background: white; color: #20243a; font: inherit; }
input[type=checkbox] { width: auto; }
textarea { min-height: 72px; }
button, .button-link { border: 0; border-radius: 6px; padding: 10px 14px; color: white; background: #3449a1; cursor: pointer; font: inherit; font-weight: 600; }
button:hover, .button-link:hover { background: #283a87; text-decoration: none; }
.button-secondary { background: #5f6879; }
.button-danger { background: #a8323d; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form select { min-width: 120px; }
.notice { padding: 12px 14px; border-radius: 7px; margin: 14px 0; }
.notice.success { color: #14532d; background: #dcfce7; }
.notice.error { color: #7f1d1d; background: #fee2e2; }
.setup-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.setup-card { width: min(650px, 100%); background: white; padding: clamp(20px, 4vw, 40px); border-radius: 12px; box-shadow: 0 8px 32px #1b28401c; }
.setup-card h2 { border-top: 1px solid #e8eaf0; padding-top: 16px; }
.setup-card button { width: 100%; margin-top: 14px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-menu { display: none; }
@media (max-width: 780px) {
    .layout { display: block; }
    .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand, .signed-in, .nav-bottom { grid-column: 1 / -1; }
    .brand img { max-width: 280px; max-height: 48px; }
    .nav-bottom { margin-top: 8px; }
    .nav-link { padding: 9px; }
    .content { padding: 20px 14px; }
}
