:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f1f5f9;
  --card: #ffffff;
  --navy: #0f172a;
  --blue: #2563eb;
  --green: #1d4ed8;
  --green-soft: #ecfdf5;
  --clay: #be123c;
  --clay-soft: #fff1f2;
  --gold: #b45309;
  --gold-soft: #fffbeb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.45 "Avenir Next", "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: var(--navy);
  color: #f8fafc;
}
.brand { color: inherit; text-decoration: none; min-width: 180px; }
.brand strong { display: block; font-size: 16px; }
.brand em { display: block; margin-top: 2px; font-style: normal; color: #94a3b8; font-size: 12px; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 6px; }
.topbar nav a {
  color: #e2e8f0;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}
.topbar nav a.on, .topbar nav a:hover { background: rgba(255,255,255,.1); }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-action, .topbar button.top-action {
  background: var(--blue);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
}
.top-action.alt, .topbar button.top-action.alt { background: #1e293b; border: 1px solid #334155; }
.top-action.quiet, .topbar button.top-action.quiet { background: transparent; border: 1px solid #475569; }
.badge { background: #fde68a; color: #78350f; border-radius: 99px; padding: 0 6px; font-size: 12px; }

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 64px; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
h1 { margin: 0; font-size: 28px; }
h2 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
h3 { margin: 18px 0 8px; font-size: 18px; }
.lede, .panel-head p { margin: 0 0 14px; color: var(--muted); }
.panel-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
.breakdown-head { flex-direction: row; justify-content: space-between; align-items: flex-start; width: 100%; }
.breakdown-panel.graphed .breakdown-body { display: none; }
.breakdown-panel .column-chart { display: none; }
.breakdown-panel.graphed .column-chart { display: flex; height: auto; min-height: 240px; align-items: stretch; }
.breakdown-panel .column { min-width: 0; align-self: stretch; }
.breakdown-panel .column-plot { width: 100%; min-height: 180px; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.breakdown-panel .column-bar { width: 100%; height: auto; flex: var(--n) 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 10px 8px; box-sizing: border-box; }
.breakdown-panel .bar-case { color: #fff; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; }
.breakdown-panel .bar-case b { display: block; font-size: 16px; }
.panel-head p { margin: 0; }

.panel, table, .stat, .kpi, .level, .person { background: var(--card); border: 1px solid var(--line); }
.panel { padding: 16px 18px; margin: 0 0 16px; border-radius: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

.level-grid, .kpis, .roster { display: grid; gap: 10px; }
.level-grid { grid-template-columns: repeat(4, 1fr); }
.kpis { grid-template-columns: 1.4fr repeat(3, 1fr); margin-bottom: 16px; }
.roster { grid-template-columns: repeat(auto-fill, minmax(180px, 220px)); overflow: visible; padding-top: 16px; }
.roster-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 0 0 16px; }
.roster-top .tabs { margin: 0; flex: 1; }
.resident-duty { display: flex; justify-content: flex-end; margin: 0 0 16px; }
.day-wrap { display: flex; align-items: flex-start; gap: 8px; width: auto; flex: none; overflow: visible; }
.day-surgeon { display: block; height: 72px; width: auto; flex: none; pointer-events: none; }
.day-board { width: 240px; border: 3px solid #7f1d1d; border-radius: 14px; padding: 12px 14px; background: #fff; }
.day-board strong { display: block; font-size: 16px; margin-bottom: 8px; }
.day-board p { margin: 0 0 8px; font-size: 13px; line-height: 1.35; }
.day-board em { display: block; font-style: normal; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.person.duty-nob { outline: 4px solid #7f1d1d; }
.person.duty-veri { outline: 3px solid #16a34a; }
.person.duty-kons { outline: 3px solid #eab308; }
.duty-line { display: block; margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.person.duty-nob .duty-line { color: #7f1d1d; }
.person.duty-veri .duty-line { color: #15803d; }
.person.duty-kons .duty-line { color: #a16207; }
.schedule-files { margin: 0 0 12px; padding-left: 18px; }
.level, .kpi { border-radius: 14px; padding: 14px; }
.level header { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.level strong { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.level em, .person em, .kpi em, .kpi span { font-style: normal; }
.level em { font-size: 11px; border-radius: 99px; padding: 2px 8px; }
.level p { margin: 0; font-size: 12px; }
.level-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); }
.level-meta b { color: var(--ink); }
.level.l1 { background: #ecfdf5; border-color: #a7f3d0; }
.level.l1 strong, .level.l1 em { color: #065f46; }
.level.l1 em { background: #d1fae5; }
.level.l2 { background: #eff6ff; border-color: #bfdbfe; }
.level.l2 strong, .level.l2 em { color: #1e3a8a; }
.level.l2 em { background: #dbeafe; }
.level.l3 { background: #fffbeb; border-color: #fde68a; }
.level.l3 strong, .level.l3 em { color: #92400e; }
.level.l3 em { background: #fef3c7; }
.level.l4 { background: #fff1f2; border-color: #fecdd3; }
.level.l4 strong, .level.l4 em { color: #9f1239; }
.level.l4 em { background: #ffe4e6; }
.level-label.l1 { color: #047857; }
.level-label.l2 { color: #1d4ed8; }
.level-label.l3 { color: #b45309; }
.level-label.l4 { color: #be123c; }
.bar { height: 8px; margin-top: 10px; background: rgba(255,255,255,.8); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; }
.bar .l1 { background: #10b981; }
.bar .l2 { background: #3b82f6; }
.bar .l3 { background: #f59e0b; }
.bar .l4 { background: #f43f5e; }

.summary-band {
  display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.summary-top { display: flex; gap: 16px; align-items: stretch; }
.summary-person { display: flex; gap: 14px; align-items: center; flex: 0.9; min-width: 240px; }
.summary-person h1 { margin: 0; font-size: 22px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.summary-person h1 em { font-style: normal; font-size: 12px; font-weight: 700; color: #1d4ed8; background: #dbeafe; border-radius: 99px; padding: 3px 8px; }
.summary-person p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.start-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 3px 0 0; }
.start-link, .start-save { font: inherit; cursor: pointer; }
.start-link { margin: 0; padding: 0; border: 0; background: none; color: var(--blue); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.start-field, .start-save { display: none; }
.start-form.open .start-link { display: none; }
.start-form.open .start-field { display: flex; }
.start-form.open .start-save { display: inline-flex; }
.start-field { align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; }
.start-field input { width: auto; }
.start-save { border: 0; border-radius: 8px; background: var(--navy); color: white; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.start-print { display: none; }
.summary-person .avatar { min-width: 56px; height: 56px; font-size: 16px; border-radius: 14px; }
.summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; flex: 2.2; }
.summary-metrics .kpi { background: #f8fafc; margin: 0; }
.summary-metrics .kpi strong { font-size: 22px; }
.person, .person-kpi { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; border-radius: 14px; padding: 10px; }
.person { cursor: pointer; }
.person-links { margin-left: auto; display: flex; gap: 6px; }
.page-actions { display: flex; gap: 8px; margin: 0 0 16px; }
.person:hover, .person.on { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
.avatar {
  min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center;
  background: #2563eb; color: white; font-weight: 700; font-size: 13px; letter-spacing: .02em; flex: none;
}
.person strong, .person-kpi h1 { display: block; font-size: 15px; }
.person em, .person-kpi p { display: block; color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.kpi em { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi strong { display: block; margin: 6px 0 2px; font-size: 32px; line-height: 1; }
.kpi span { color: var(--muted); font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { padding: 14px; border-radius: 14px; }
.stat strong { display: block; font-size: 28px; line-height: 1.1; }
.stat em { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; margin: 0 0 8px; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.empty { color: var(--muted); }

label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  background: white; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; width: 100%;
}
textarea { min-height: 72px; resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
button, .button {
  background: var(--blue); color: white; border: 0; border-radius: 8px; padding: 8px 12px;
  cursor: pointer; text-decoration: none; display: inline-block;
}
button.ghost, .button.ghost { background: white; color: var(--blue); border: 1px solid #bfdbfe; }
button.danger { background: white; color: var(--clay); border: 1px solid #fecdd3; }
form.inline { display: inline; }
form.inline button { padding: 4px 8px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.tabs a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: white; padding: 8px 12px; border-radius: 999px; }
.tabs a.on { background: var(--navy); color: white; border-color: var(--navy); }
.flash, .banner { padding: 10px 12px; margin: 0 0 16px; border-radius: 12px; }
.flash { background: #ecfdf5; border: 1px solid #a7f3d0; }
.flash.error, .banner { background: var(--gold-soft); border: 1px solid #fde68a; }
.mark { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.mark.pending { background: var(--gold-soft); color: #92400e; }
.mark.approved { background: var(--green-soft); color: #065f46; }
.mark.rejected { background: var(--clay-soft); color: #9f1239; }
.total { font-size: 28px; margin: 8px 0 0; }
dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.search-results { display: grid; gap: 6px; margin-top: 10px; }
.search-results a {
  display: grid; gap: 2px; text-decoration: none; color: inherit;
  background: white; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.search-results a:hover, .search-results a:focus, .search-results button:hover, .search-results button:focus { border-color: #93c5fd; }
.search-results button {
  display: grid; gap: 2px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: white; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.search-results small { color: var(--muted); }
.picked { margin: 8px 0 0; color: var(--muted); }
.picked.on { color: var(--ink); font-weight: 700; }
td.check { width: 52px; text-align: center; }
input.step-full { width: 18px; height: 18px; }
.roles { border: 1px solid var(--line); border-radius: 14px; margin: 14px 0; padding: 8px 12px 12px; }
.roles legend { font-weight: 700; padding: 0 4px; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: start; }
.role:nth-child(1) { grid-column: 1; grid-row: 1; }
.role:nth-child(2) { grid-column: 1; grid-row: 2; }
.role:nth-child(3) { grid-column: 2; grid-row: 1; }
.role:nth-child(4) { grid-column: 2; grid-row: 2; }
.role:nth-child(5) { grid-column: 2; grid-row: 3; }
.role {
  display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: center;
  margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.role strong, .role small { display: block; }
.role small { color: var(--muted); font-size: 13px; font-weight: 400; }
.role input { width: 18px; height: 18px; margin: 0; }
.role:has(input:checked) { background: #eff6ff; border-color: #93c5fd; }
#step-box { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
#step-box:disabled { opacity: 0.45; }
.fields.filled { margin-top: 14px; }
.search { display: flex; gap: 8px; margin: 0 0 16px; }
.search input { max-width: 320px; }
.clinic-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.clinic-list li { display: flex; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: #f8fafc; }
.clinic-list span { color: var(--muted); }

.skill { margin: 8px 0 0; font-size: 12px; }
.skill::before { content: ""; }
.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.split > .panel { margin: 0; }
.branch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.case-counts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.case-counts li { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12px; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.case-counts .quiet { color: var(--muted); }
.branch-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #f8fafc; }
.branch-card header, .pub { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.branch-card header em, .pub em {
  font-style: normal; font-size: 12px; font-weight: 700; color: #1d4ed8;
  background: #dbeafe; border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.branch-card p { margin: 6px 0; color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span, .pub span { font-size: 12px; }
.tags span { background: white; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; }
.tags .quiet { color: var(--muted); }
.titled { display: flex; align-items: center; gap: 8px; }
.titled.levels { color: #1d4ed8; }
.titled.branches { color: #0f766e; }
.titled.papers { color: #1d4ed8; }
.titled.cases { color: #b45309; }
.titled.meeting { color: #7c3aed; }
.titled.talk { color: #0369a1; }
.titled.abstract { color: #c2410c; }
.titled.mic { color: #be123c; }
.titled.thesis { color: #6d28d9; }
.titled.language { color: #0f766e; }
.kicker {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 8px;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; font-weight: 800;
}
.kicker.papers { color: #1d4ed8; }
.kicker.meeting { color: #7c3aed; }
.congress-total { margin: 0 0 8px; }
.congress-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.congress-sum span { background: #f5f3ff; color: #5b21b6; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.congress-sum b { font-weight: 800; }
.breakdown .num { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown-row { cursor: pointer; }
.breakdown-row strong { display: block; }
.case-sub { color: var(--muted); font-size: 11px; font-weight: 500; }
.lv { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 6px; }
.lv.l1 { background: #d1fae5; color: #065f46; }
.lv.l2 { background: #dbeafe; color: #1e3a8a; }
.lv.l3 { background: #fef3c7; color: #92400e; }
.lv.l4 { background: #ffe4e6; color: #9f1239; }
.breakdown-detail { display: none; }
.breakdown-detail.open { display: table-row; }
.breakdown-detail td { background: #f8fafc; }
.breakdown-detail p { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.step-line { display: grid; grid-template-columns: minmax(0, 1fr) 120px 64px; gap: 12px; align-items: center; margin: 6px 0; font-size: 13px; }
.step-line em { color: var(--muted); font-style: normal; font-size: 12px; }
.step-line i { display: block; height: 8px; border-radius: 99px; background: #e2e8f0; position: relative; }
.step-line i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: #2563eb; }
.step-line b { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown tr.extra { display: none; }
.breakdown.show-all tr.extra.breakdown-row,
.breakdown.show-all tr.extra.breakdown-detail.open { display: table-row; }
.more-cases { margin-top: 10px; padding: 0; border: 0; background: none; color: #1d4ed8; font-weight: 700; cursor: pointer; }
.kicker.thesis { color: #6d28d9; }
.kicker.language { color: #0f766e; }
.titled .mark, .kicker .mark {
  width: 15px; height: 15px; padding: 4px; box-sizing: content-box; flex: none;
  border-radius: 7px; background: currentColor; stroke: #fff; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pubs { display: grid; gap: 8px; }
.pub { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.pub strong, .academic-board p strong, .thesis-lines strong { display: block; }
.pub span, .academic-board p span { color: var(--muted); }
.thesis-lines { display: grid; gap: 2px; margin: 0 0 4px; }
.thesis-lines span { display: block; color: var(--muted); font-size: 13px; }
.academic-karne > .panel-head { flex-direction: row; justify-content: space-between; align-items: flex-start; }
.academic-karne .ak-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.academic-karne .ak-stats article { border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; text-align: center; background: #f8fafc; }
.academic-karne .ak-stats em { display: block; color: var(--muted); font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.academic-karne .ak-stats strong { display: block; font-size: 26px; margin-top: 4px; }
.ak-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.ak-grid > .panel { margin: 0; background: #f8fafc; }
.academic-end, .rotation-split { display: grid; grid-template-columns: 1.4fr .9fr .9fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.rotation-split { grid-template-columns: 1.6fr .8fr; }
.academic-end > .panel, .rotation-split > .panel { margin: 0; }
.record-list { display: grid; gap: 8px; }
.record-card { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: white; }
.record-card.extra { display: none; }
.record-list.show-all .record-card.extra { display: flex; }
.record-card strong, .record-card span { display: block; }
.record-card span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.record-card em { font-style: normal; font-size: 12px; font-weight: 700; color: #0369a1; background: #e0f2fe; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.more-list { margin-top: 8px; padding: 0; border: 0; background: none; color: #1d4ed8; font-weight: 700; cursor: pointer; }
.thesis-card > strong { display: block; margin-bottom: 4px; }
.thesis-stage { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.thesis-card dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 6px; }
.thesis-card dl div, .exam-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.thesis-card dt { color: var(--muted); font-size: 13px; }
.thesis-card dd { margin: 0; font-weight: 700; text-align: right; }
.exam-line { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.exam-line b, .exam-line span { display: block; }
.exam-line span { color: var(--muted); font-size: 12px; }
.exam-line em { font-style: normal; font-weight: 700; white-space: nowrap; }
.rot-row { margin: 12px 0 0; }
.rot-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.rot-top em { font-style: normal; color: var(--muted); font-weight: 600; margin-left: 6px; }
.rot-top span { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.rot-top .done { color: #15803d; background: #dcfce7; }
.rot-top .wait { color: #b45309; background: #fef3c7; }
.rot-row i { display: block; height: 8px; margin: 6px 0; border-radius: 99px; background: #e2e8f0; position: relative; }
.rot-row i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: #16a34a; }
.rot-row small { color: var(--muted); }
.uro-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.uro-pair div { background: #eff6ff; border-radius: 14px; padding: 14px; text-align: center; }
.uro-pair em, .uro-pair span { display: block; color: #1e3a8a; font-style: normal; font-size: 12px; font-weight: 700; }
.uro-pair strong { display: block; font-size: 32px; color: #1d4ed8; line-height: 1.1; margin: 4px 0; }
.uro-card > p { color: var(--muted); font-size: 13px; }
.wide-button {
  display: block; margin-top: 16px; background: var(--navy); color: white; text-align: center;
  text-decoration: none; border-radius: 12px; padding: 12px;
}
.wide-button:hover { background: #1e293b; }
.avatar.mini { min-width: 28px; height: 28px; border-radius: 8px; font-size: 10px; padding: 0 4px; }
.compare-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.compare-pick label {
  display: flex; align-items: center; gap: 8px; margin: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; background: #f8fafc;
}
.compare-pick input { width: 16px; height: 16px; margin: 0 0 0 6px; }
.compare-group { margin: 8px 0 18px; }
.compare-group h2 { margin-bottom: 10px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-chart { margin: 0; }
.compare-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.compare-head h3 { margin: 0; font-size: 15px; }
.graph-toggle { white-space: nowrap; }
.level-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.level-switch button {
  border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 999px;
  padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.level-switch button.on { background: var(--navy); color: white; border-color: var(--navy); }
.compare-chart.graphed .bars { display: none; }
.column-chart { display: none; align-items: stretch; gap: 8px; height: 210px; overflow-x: auto; }
.compare-chart.graphed .column-chart { display: flex; }
.column { flex: 1 1 0; min-width: 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.column-value { font-size: 12px; font-weight: 700; }
.column-plot { flex: 1; width: 70%; display: flex; align-items: flex-end; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.column-bar { width: 100%; border-radius: 6px 6px 0 0; }
.column-name { font-size: 11px; font-weight: 700; text-align: center; }
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(108px, 168px) 1fr auto; gap: 8px; align-items: center; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; font-size: 13px; }
.bar-track { display: block; height: 12px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; }
.bar-row strong { min-width: 3.4em; text-align: right; font-size: 13px; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--navy); }
.login-card { width: min(440px, 100%); background: white; border-radius: 18px; padding: 28px; }
.login-card .eyebrow { margin: 0; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: var(--blue); }
.login-card form { display: grid; gap: 12px; margin-top: 18px; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .top-tools { margin-left: 0; }
  .level-grid, .kpis, .split, .branch-grid, .compare-grid, .academic-end, .rotation-split, .ak-grid { grid-template-columns: 1fr; }
  .academic-karne .ak-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .academic-karne > .panel-head { flex-direction: column; }
  .summary-band, .summary-top { display: grid; grid-template-columns: 1fr; }
  .summary-metrics { grid-template-columns: 1fr 1fr; }
  .roster-top { flex-direction: column; }
  .day-wrap { width: 100%; }
  h1 { font-size: 24px; }
  dl { grid-template-columns: 1fr; }
  main { width: min(100% - 20px, 1120px); }
}
@media (max-width: 640px) {
  .level-grid, .kpis, .role-grid { grid-template-columns: 1fr; }
  .role:nth-child(n) { grid-column: auto; grid-row: auto; }
}

@media print {
  .topbar, .noprint, form.entry, .tabs, .search, .graph-toggle, .level-switch { display: none !important; }
  .start-print { display: block !important; }
  .record-list .record-card.extra { display: flex !important; }
  .more-list { display: none !important; }
  .compare-chart.graphed .bars { display: none !important; }
  .compare-chart.graphed .column-chart, .breakdown-panel.graphed .column-chart { display: flex !important; }
  .breakdown-panel.graphed .breakdown-body { display: none !important; }
  body, .panel, table, .stat, .kpi, .level { background: white; }
  main { width: auto; padding: 0; }
  a { color: inherit; text-decoration: none; }
}
