:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: #172234;
    background: #f4f6f8;
    font-synthesis: none;
    --ink: #172234;
    --muted: #526179;
    --line: #dfe5eb;
    --navy: #121e2f;
    --accent: #b84321;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: #a43c21; text-underline-offset: .18em; font-weight: 650; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ba4b2b; outline-offset: 3px; }
[hidden] { display: none !important; }
p, h1, h2 { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.018em; }
small { display: block; color: var(--muted); font-size: .83rem; }
.signed-in { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    background: var(--navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    padding: 1.7rem 1.05rem 1.3rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: inherit;
    text-decoration: none;
    line-height: 1.2;
    font-size: 1.2rem;
    font-weight: 720;
    letter-spacing: -.015em;
}
.sidebar .brand { margin-left: .35rem; font-size: 1.06rem; }

.brand small { margin-top: .23rem; font-size: .8rem; font-weight: 500; letter-spacing: 0; }
.brand-mark { flex: 0 0 2.65rem; background: #f39b77; color: #28190f; display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .7rem; font-size: 1.4rem; font-weight: 900; }
.sidebar small { color: #b9c6d7; }
.sidebar nav { display: grid; gap: .3rem; }
.sidebar nav a { display: flex; align-items: center; gap: .8rem; padding: .65rem .7rem; color: #dfe7f3; text-decoration: none; font-size: .94rem; font-weight: 600; border-radius: .55rem; }
.sidebar nav a span { width: 1.25rem; text-align: center; font-size: 1.12rem; color: #bac8db; }
.sidebar nav a:hover { background: #24334a; }
.sidebar nav a[aria-current="page"] { background: #29394f; color: #fff; box-shadow: inset 3px 0 #f39b77; }
.sidebar nav a[aria-current="page"] span { color: #f8a88a; }
.nav-label { font-size: .78rem; color: #aebdd1; margin: 1.1rem .7rem .15rem; font-weight: 700; }
.account { margin-top: auto; display: grid; gap: .75rem; padding: .9rem .4rem 0; border-top: 1px solid #34445a; overflow-wrap: anywhere; }
.account strong { font-size: .93rem; }
.account button { color: #e8eef7; background: #25354a; border: 1px solid #4a5b72; padding: .38rem .72rem; border-radius: .45rem; font-size: .88rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; background: #fff; border-bottom: 1px solid var(--line); padding: .9rem clamp(1rem, 3.5vw, 3.2rem); font-size: .9rem; color: var(--muted); }
.topbar-actions, .language-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.topbar-actions { gap: .8rem; }
.language-switcher .button { padding: .3rem .55rem; font-size: .85rem; }
.language-switcher .button[aria-pressed="true"] { background: #e8eef5; border-color: #9aacc1; }
.arrival-link { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.signal { width: .55rem; height: .55rem; border-radius: 50%; background: #b84321; }
.content { padding: clamp(1rem, 3.5vw, 3.2rem); max-width: 92rem; margin: 0 auto; }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; margin: 0 0 1.6rem; }
.page-heading p, .panel-heading p { margin-top: .36rem; color: var(--muted); }
.panel-heading p { font-size: .9rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.metric, .panel { background: #fff; border: 1px solid var(--line); border-radius: .8rem; box-shadow: 0 2px 8px #24374c07; min-width: 0; }
.metric { display: flex; flex-direction: column; padding: 1.05rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.metric > span { font-size: .93rem; }
.metric > strong { font-size: 2.3rem; line-height: 1.25; letter-spacing: -.04em; margin-top: .45rem; }
.metric small { font-weight: 500; }
.metric.attention { background: #fff4ec; border-color: #f0c9b6; }
.metric.attention:hover { border-color: #b84321; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.review-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.65fr); }
.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.panel-heading { padding: 1rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.secondary-panel { margin-top: 1rem; }
.integration-body { border-top: 1px solid var(--line); padding: 1rem 1.15rem; overflow-wrap: anywhere; }
.integration-body p, .integration-body form { margin-top: .75rem; }
.integration-settings { padding: 0 1.15rem 1rem; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: .78rem 1.05rem; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .84rem; color: #44536b; background: #f7f9fb; }
td strong { display: block; }
td .badge { margin-top: .18rem; }
.nowrap { white-space: nowrap; }
.badge { display: inline-block; font-size: .85rem; font-weight: 700; padding: .13rem .55rem; border-radius: 1rem; white-space: nowrap; }
.badge.positive { color: #0e6247; background: #e3f5ec; }
.badge.caution { color: #843b13; background: #fbead8; }
.badge.neutral { color: #445772; background: #ecf0f5; }
.muted, .empty { color: var(--muted); }
.empty { padding: 1.2rem; }
.error-text { color: #9c341e; }
.activity { margin: 0; padding: 0; list-style: none; }
.activity li { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .8rem 1.15rem; overflow-wrap: anywhere; }
.activity li > div { flex: 1 1 9rem; min-width: 0; }
.activity-icon { flex: 0 0 auto; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; color: #0e6247; background: #e3f5ec; }
.activity .badge { margin-top: .25rem; }
.toolbar { padding: 1rem 1.15rem; display: flex; gap: .65rem; flex-wrap: wrap; align-items: end; }
.toolbar label:first-child { flex: 1 1 14rem; max-width: 28rem; }
.compact-toolbar { padding-top: 0; }
.club-assignment { display: flex; gap: .5rem; align-items: center; }
.club-assignment select { max-width: 18rem; }
.toolbar .check-control { display: flex; align-items: center; gap: .5rem; }
input[type="checkbox"] { accent-color: var(--accent); }
.check-control input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; padding: 0; flex: none; }
label { display: grid; gap: .35rem; font-weight: 650; font-size: .89rem; }
input:not([type="hidden"]), select { display: block; width: 100%; min-width: 0; padding: .53rem .65rem; border: 1px solid #bac5d1; border-radius: .45rem; background: #fff; color: var(--ink); font-size: 1rem; font-weight: 450; }
.button { display: inline-block; text-decoration: none; padding: .51rem .78rem; border-radius: .48rem; border: 1px solid #bdc8d5; color: var(--ink); background: #fff; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.button:hover { background: #edf1f5; }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: #94351c; }
.notice-bar { margin: 0 0 1rem; padding: .68rem .85rem; background: #e7f5ee; color: #135239; border: 1px solid #add8c0; border-radius: .55rem; }
.notice-bar a { margin-left: .4rem; }
.notice-bar.warning { color: #8c321d; background: #fff0e7; border-color: #edc4b3; }
.pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .65rem; border-top: 1px solid var(--line); padding: .7rem 1rem; font-size: .88rem; color: var(--muted); }
.breadcrumb { margin-bottom: .5rem; font-size: .9rem; }
.profile { display: grid; grid-template-columns: minmax(5rem, 1fr) minmax(0, 2fr); gap: .55rem .7rem; padding: 0 1.15rem 1rem; }
.profile dt { color: var(--muted); font-weight: 650; }
.profile dd { margin: 0; overflow-wrap: anywhere; }
.separated { border-top: 1px solid var(--line); }
.signed-out { min-height: 100vh; background: radial-gradient(ellipse at 70% 0, #33425a, var(--navy) 65%); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(100%, 27rem); background: #fff; border-radius: 1rem; padding: clamp(1.25rem, 6vw, 2.3rem); box-shadow: 0 18px 40px #0004; }
.login-card h1 { margin: 1.65rem 0 1.1rem; font-size: 2rem; }
.login-card .language-switcher { justify-content: flex-end; margin-top: 1rem; }
.stack { display: grid; gap: .95rem; }
.staff-form { max-width: 34rem; padding: 1.15rem; }
@media (max-width: 1080px) {
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid, .integration-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 670px) {
    .signed-in { display: block; }
    .sidebar { position: static; height: auto; gap: .75rem; padding: .85rem 1rem; }
    .sidebar nav { display: flex; flex-wrap: wrap; gap: .35rem; }
    .sidebar nav a { padding: .42rem .52rem; font-size: .87rem; }
    .nav-label { display: none; }
    .account { display: flex; justify-content: space-between; align-items: center; padding-top: .65rem; }
    .topbar { flex-wrap: wrap; }
    .metric { padding: .85rem; }
    td, th { padding: .65rem .75rem; }
}
