:root {
  color-scheme: light;
  --navy: #182c44;
  --ink: #182637;
  --muted: #526179;
  --line: #dce3eb;
  --canvas: #f4f7fb;
  --blue: #1d51b0;
  --pale: #eaf1ff;
  font: 16px/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.14; letter-spacing: -.035em; overflow-wrap: anywhere; }
h2 { font-size: 1.18rem; letter-spacing: -.015em; }
a { color: var(--blue); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #4f83eb; outline-offset: 3px; }
svg { width: 20px; height: 20px; flex: none; }
.skip { position: fixed; top: .5rem; left: .5rem; padding: .75rem; background: white; transform: translateY(-160%); z-index: 1; }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.shell { display: grid; min-height: 100dvh; grid-template-columns: 15rem minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; padding: 1.5rem 1rem; gap: 2rem; background: var(--navy); color: white; }
.brand { display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap; font-weight: 700; text-decoration: none; color: inherit; }
.brand svg { width: 26px; height: 26px; color: #91bdff; }
.sidebar nav { display: grid; gap: .2rem; }
.sidebar nav a { display: flex; align-items: center; gap: .75rem; padding: .63rem .75rem; min-height: 44px; border-radius: .5rem; color: #d3deed; text-decoration: none; font-size: .95rem; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #2d496a; color: white; }
.identity { margin-top: auto; border-top: 1px solid #46607a; padding: 1rem .25rem 0; display: grid; overflow-wrap: anywhere; }
.identity span { color: #c5d4e8; font-size: .9rem; }
.identity .quiet { color: white; padding-inline: 0; }
.shell main { padding: clamp(1rem, 4vw, 3.6rem); max-width: 92rem; width: 100%; margin: 0 auto; }
.page-head, .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head { margin-bottom: 1.75rem; }
.page-head p, .auth-form > p { margin-top: .5rem; color: var(--muted); }
.page-head .back { display: inline-block; margin-bottom: .75rem; }
.panel { background: white; border: 1px solid var(--line); border-radius: .85rem; margin: 0 0 1.25rem; min-width: 0; }
.panel-head, .padded { padding: 1.25rem; }
.panel-head a { display: inline-flex; align-items: center; gap: .35rem; }
.panel-head .button { text-decoration: none; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric { padding: 1.2rem; background: white; border: 1px solid var(--line); border-radius: .85rem; display: grid; justify-items: start; gap: .2rem; text-decoration: none; color: var(--muted); }
.metric:hover { border-color: #93b0da; }
.metric strong { color: var(--ink); line-height: 1.2; font-size: 2rem; font-variant-numeric: tabular-nums; margin-top: .45rem; }
.tile, .heading-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: .66rem; background: var(--pale); color: var(--blue); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .52rem .85rem; border: 1px solid var(--line); border-radius: .5rem; background: white; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 650; white-space: nowrap; }
.button:hover { background: #f1f5fa; }
.button.primary { background: var(--blue); border-color: var(--blue); color: white; }
.button.primary:hover { background: #173e86; }
.button.quiet { background: transparent; border-color: transparent; color: var(--blue); }
.button.quiet:hover { text-decoration: underline; }
.sidebar .quiet { color: #d3deed; }
.button svg { width: 17px; height: 17px; }
.empty { padding: 2.4rem 1.25rem; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .8rem 1.15rem; border-top: 1px solid var(--line); min-width: 7rem; overflow-wrap: anywhere; }
th { color: var(--muted); background: #f8fafc; font-size: .85rem; }
td { font-size: .93rem; }
td small { display: block; margin-top: .2rem; color: var(--muted); }
td a { font-weight: 650; }
.badge { display: inline-block; padding: .18rem .5rem; border-radius: .3rem; font-size: .83rem; font-weight: 650; white-space: nowrap; }
.badge.neutral { color: #46566a; background: #eaf0f5; }
.badge.good { color: #165b46; background: #dff5ec; }
.badge.progress { color: #164c9b; background: #e5efff; }
.badge.danger { color: #8c2231; background: #fde9ec; }
.stack { display: grid; gap: 1rem; }
.fields { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 55rem; }
.padded h2 + .fields { margin-top: 1rem; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: .3rem; font-weight: 600; min-width: 0; }
input, select, textarea { border: 1px solid #aab8c9; border-radius: .5rem; padding: .58rem .66rem; min-height: 44px; background: white; color: var(--ink); width: 100%; }
textarea { resize: vertical; }
.filters { display: grid; grid-template-columns: minmax(10rem, 2fr) minmax(8rem, 1fr) auto; gap: .6rem; padding: 1rem; max-width: 48rem; }
.pagination { display: flex; justify-content: flex-end; padding: 1rem; gap: .5rem; }
.hint { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.alert, .success { padding: .7rem 1rem; border-radius: .45rem; margin-bottom: 1rem; }
.alert { background: #fdecef; color: #832632; }
.success { background: #e4f5ec; color: #185b47; }
.facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(8rem,1fr)); gap: 1rem; margin: 0 0 1.2rem; }
dt { color: var(--muted); font-size: .87rem; }
dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .55rem; }
.linked { list-style: none; margin: 0; padding: 0; }
.linked li { display: flex; align-items: center; justify-content: space-between; gap: .55rem; flex-wrap: wrap; padding: .8rem 1.25rem; border-top: 1px solid var(--line); }
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.auth-aside { background: var(--navy); color: white; padding: clamp(1.4rem, 5vw, 4.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; position: relative; isolation: isolate; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 20% 90%, #284f77 0, transparent 74%); }
.auth-message span { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: #a9cbfb; }
.auth-message h1 { font-size: clamp(2rem, 5.8vw, 5rem); max-width: 10ch; margin: .65rem 0 1rem; }
.auth-message p { max-width: 26rem; color: #d2e1f5; }
.auth-foot { color: #b9cde4; font-size: .86rem; }
.auth-main { display: grid; align-items: center; justify-items: center; padding: clamp(1.1rem, 5vw, 4rem); }
.auth-form { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.35rem, 3.2vw, 2.6rem); width: min(100%, 31rem); }
.auth-form h2 { font-size: 1.7rem; line-height: 1.2; margin-top: 1rem; }
.auth-form form { margin-top: 1.25rem; }
.auth-form .alert { margin-top: 1rem; }
.auth-form .primary { justify-content: space-between; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 12rem minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .shell, .auth, .fields { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { gap: 1rem; padding: 1.5rem; }
  .auth-message h1 { max-width: none; margin: .35rem 0; }
  .auth-foot { display: none; }
  .sidebar { gap: .6rem; padding: 1rem; }
  .sidebar nav { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sidebar nav a { padding: .45rem .35rem; gap: .35rem; font-size: .8rem; }
  .sidebar nav svg { width: 16px; height: 16px; }
  .identity { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .25rem; }
  .identity form { margin-left: auto; }
  .filters { grid-template-columns: 1fr auto; }
  .filters input { grid-column: 1 / -1; }
}
