@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --orange: #f0781e;
  --orange-d: #d9670f;
  --ink: #0f1722;
  --ink-soft: #1d2735;
  --muted: #6b7686;
  --line: #e6eaef;
  --bg: #f4f6f8;
  --card: #ffffff;
  --up: #16895a;
  --down: #d23b30;
  --shadow: 0 1px 2px rgba(16,23,34,.04), 0 4px 16px rgba(16,23,34,.06);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01"; letter-spacing: -0.003em;
  color: var(--ink); background: var(--bg); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--orange-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; letter-spacing: -0.01em; margin: 0 0 0.25rem; }
h2 { font-size: 1.02rem; margin: 0 0 0.8rem; letter-spacing: -0.005em; }
h3 { font-size: 0.85rem; margin: 0.7rem 0 0.35rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sub, .lede { color: var(--muted); margin-top: 0; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; color: var(--ink); padding: 0 1.5rem; height: 60px;
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(16,23,34,.04);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; }
.brand-divider { width: 1px; height: 24px; background: var(--line); }
.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: 1.02rem; }
.topbar nav { display: flex; align-items: center; gap: 1.4rem; font-size: .92rem; }
.topbar nav a { color: var(--ink-soft); font-weight: 600; padding: .25rem 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover { color: var(--orange-d); text-decoration: none; border-bottom-color: var(--orange); }
.topbar nav a.logout { color: var(--muted); font-weight: 500; border: 0; }
.topbar nav a.logout:hover { color: var(--down); }
.userchip { display: flex; align-items: center; gap: .5rem; padding-left: .8rem; margin-left: .2rem; border-left: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.usermeta { display: flex; flex-direction: column; line-height: 1.15; }
.usermeta b { font-size: .88rem; }
.usermeta small { color: var(--muted); font-size: .72rem; text-transform: capitalize; }

main { max-width: 1060px; margin: 1.8rem auto; padding: 0 1.4rem; }

/* Cards and layout */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); }
.card.big { text-align: center; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .3rem; }
.card-head h2 { margin-bottom: 0; }
.chartcard { display: flex; flex-direction: column; }
.radar-wrap { position: relative; width: 100%; height: 320px; }
.notice { border-left: 3px solid var(--orange); }
.notice p { margin: .3rem 0 0; color: var(--ink-soft); }
.metric { font-size: 2.8rem; font-weight: 800; color: var(--orange); letter-spacing: -0.02em; line-height: 1; }
.metric-label { color: var(--muted); font-size: .9rem; margin-top: .35rem; }
.metric-sub { margin-top: .35rem; font-size: .85rem; color: var(--ink-soft); }

/* Tables */
table.grid { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.grid th, table.grid td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--line); }
table.grid th { color: var(--muted); font-weight: 600; font-size: .73rem; text-transform: uppercase; letter-spacing: .05em; }
table.grid tbody tr:last-child td { border-bottom: 0; }
tr.me { background: #fff6ee; font-weight: 600; }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }

.scrollx { overflow-x: auto; }
table.heat .cell { text-align: center; font-weight: 700; min-width: 2.5rem; border-radius: 4px; }
table.heat th.rot { font-size: .7rem; white-space: nowrap; color: var(--muted); }
.cell.empty { color: var(--muted); font-weight: 400; background: transparent; }

/* Pills and flags */
.flags { white-space: nowrap; }
.flag { display: inline-block; border-radius: 20px; padding: .1rem .55rem; font-size: .72rem; font-weight: 600; margin: 0 .25rem .2rem 0; background: #eef0f3; color: var(--muted); }
.flag.sev-high { background: #fdecea; color: var(--down); }
.flag.sev-warn { background: #fff1e0; color: #b3650f; }
.flag.sev-info { background: #eaf1fb; color: #2a6094; }

.decision { display: inline-block; padding: .1rem .55rem; border-radius: 20px; font-size: .76rem; font-weight: 700; text-transform: capitalize; }
.decision.pass { background: #e6f5ec; color: var(--up); }
.decision.conditional { background: #fff1e0; color: #b3650f; }
.decision.fail { background: #fdecea; color: var(--down); }
.decision.pending { background: #eef0f3; color: var(--muted); }

/* Lists and helpers */
.stats { list-style: none; padding: 0; margin: 0; }
.stats li { padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.stats li:last-child { border-bottom: 0; }
.empty { color: var(--muted); font-style: italic; }
.fineprint { color: var(--muted); font-size: .82rem; margin: .4rem 0 0; }
.prose { line-height: 1.65; margin-top: .6rem; }
.coach { border-left: 3px solid var(--orange); }

/* Program funnel */
.funnel .stat .metric { font-size: 2.1rem; }
.stat.exceptional .metric { color: var(--up); }
.stat.ontrack .metric { color: var(--orange); }
.stat.atrisk .metric { color: var(--down); }
.stat.nodata .metric { color: var(--muted); }

/* Early-warning */
.warnbox { border-left: 3px solid var(--down); }
.warn-row { padding: .5rem .7rem; border-radius: 8px; margin-bottom: .4rem; background: #fff6f5; font-size: .92rem; }
.warn-row.sev-high { background: #fdecea; }
.warn-row.sev-warn { background: #fff6ec; }
.warn-row.sev-info { background: #eef4fb; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.05rem; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: .92rem; font-weight: 600; transition: all .12s ease; }
.btn:hover { text-decoration: none; box-shadow: var(--shadow); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-d); border-color: var(--orange-d); }
.btn.small { padding: .35rem .75rem; font-size: .82rem; }

/* Forms */
.noteform textarea, .weights input, .noteform input, .noteform select {
  font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: .5rem; background: #fff;
}
.noteform textarea { width: 100%; resize: vertical; }
.noteform .dims { display: flex; gap: 1rem; flex-wrap: wrap; margin: .6rem 0; }
.noteform select, .noteform input { padding: .3rem .4rem; }
.formrow { margin-bottom: .55rem; }
.weights { display: flex; gap: 1.3rem; flex-wrap: wrap; align-items: flex-end; }
.weights label { display: flex; flex-direction: column; font-size: .82rem; gap: .25rem; color: var(--muted); }
.note { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.note:last-child { border-bottom: 0; }
.note-meta { color: var(--muted); font-size: .8rem; }
.note-body { margin-top: .2rem; }

/* Login */
.login-wrap { max-width: 440px; margin: 5vh auto 0; text-align: center; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 2.4rem 2.2rem; box-shadow: var(--shadow); }
.login-logo { display: block; margin: 0 auto 1.2rem; height: 46px; width: auto; }
.login-card h1 { font-size: 1.55rem; }
.login-card .lede { margin: .4rem 0 1.4rem; font-size: .96rem; }
.providers { display: flex; flex-direction: column; gap: .7rem; }
.btn.provider { justify-content: center; padding: .7rem 1rem; font-size: .98rem; }
.btn.provider.gitlab { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.provider.gitlab:hover { background: var(--ink-soft); }
.btn.provider.google { background: #fff; color: var(--ink); border-color: #d7dce2; }
.btn.provider.google:hover { background: #f7f9fb; }
.login-card .fineprint { margin-top: 1.3rem; line-height: 1.5; }
.login-foot { color: var(--muted); font-size: .82rem; margin-top: 1.2rem; }
.error { background: #fdecea; color: var(--down); padding: .65rem .85rem; border-radius: 9px; margin: 0 0 1.1rem; font-size: .9rem; text-align: left; }

/* Leave */
.leaveform { display: flex; gap: .9rem; flex-wrap: wrap; align-items: flex-end; }
.leaveform label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: .25rem; }
.leaveform .grow { flex: 1; min-width: 200px; }
.leaveform input, .leaveform select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .5rem; background: #fff; }
.balcard { text-align: center; }
.balcard .metric { font-size: 2.1rem; }
.decide { display: flex; gap: .4rem; }
.decide form { margin: 0; }

/* People and roles */
.addform { display: flex; gap: .9rem; flex-wrap: wrap; align-items: flex-end; }
.addform label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: .25rem; }
.addform input, .addform select, .peoplelist input, .peoplelist select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .5rem; background: #fff; }
.peoplelist { display: flex; flex-direction: column; }
.prow { display: grid; grid-template-columns: 1.3fr 1.4fr .9fr .8fr .9fr .6fr .9fr .4fr .6fr; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.prow.phead { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.prow input { width: 100%; }
.prow.inactive { opacity: .5; }
.pactive { text-align: center; }
.bound { display: inline-block; background: #e6f5ec; color: var(--up); border-radius: 20px; padding: .05rem .5rem; font-size: .7rem; font-weight: 600; margin-left: .3rem; }
.notice-ok { background: #e6f5ec; color: var(--up); padding: .6rem .85rem; border-radius: 9px; font-size: .9rem; }

.foot { display: flex; align-items: center; justify-content: center; gap: .45rem; text-align: center; color: var(--muted); font-size: .8rem; padding: 2.5rem 1rem; }
.foot img { opacity: .85; }
