:root {
  --blue: #0b82e6;
  --blue-2: #1f9bf0;
  --blue-deep: #082b63;
  --blue-muted: #4e6f9d;
  --line: #cfe0f3;
  --surface: rgba(255, 255, 255, 0.93);
  --bg: #eef8fc;
  --red: #e63228;
  --orange: #ef8a00;
  --green: #0c9f58;
  --shadow: 0 14px 34px rgba(23, 92, 151, 0.17);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--blue-deep);
  background:
    radial-gradient(circle at 80% 10%, rgba(31, 155, 240, 0.18), transparent 28%),
    linear-gradient(135deg, #d9f0fa 0%, #f6fbff 45%, #d9edf5 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(260px, 380px);
  gap: 44px;
  justify-content: center;
  align-items: center;
  padding: 28px;
}

.device {
  width: min(390px, 100vw - 32px);
  height: min(844px, 100vh - 42px);
  min-height: 640px;
  overflow: hidden;
  border-radius: 32px;
  background: #eaf7fc;
  box-shadow:
    0 34px 80px rgba(0, 40, 92, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

#app,
.screen {
  height: 100%;
}

.screen {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(239, 249, 254, 0.74), rgba(239, 249, 254, 0.98)),
    var(--ref-bg, none) center top / cover no-repeat,
    #eff9fe;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

.screen.no-photo {
  background:
    radial-gradient(circle at 90% 9%, rgba(55, 184, 232, 0.16), transparent 30%),
    linear-gradient(180deg, #effbff 0%, #f9fdff 46%, #eaf6fc 100%);
}

.screen.login-screen {
  background:
    linear-gradient(rgba(239, 249, 254, 0.68), rgba(239, 249, 254, 0.94) 58%, rgba(239, 249, 254, 0.98)),
    var(--ref-bg, none) 38% top / auto 42% no-repeat,
    #eff9fe;
}

.screen.medical-top {
  background:
    linear-gradient(180deg, rgba(236, 249, 254, 0.64) 0%, rgba(239, 250, 255, 0.9) 28%, #f6fcff 56%, #eaf6fc 100%),
    var(--ref-bg, none) 32% top / auto 245px no-repeat,
    #eff9fe;
}

.screen.medical-top::before {
  height: 255px;
  background: linear-gradient(90deg, rgba(239, 250, 255, 0.1), rgba(239, 250, 255, 0.68) 56%, rgba(239, 250, 255, 0.94));
}

.screen-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  padding: 22px 18px 118px;
  scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar {
  width: 0;
}

.top-row,
.nav-row,
.section-row,
.inline-row {
  display: flex;
  align-items: center;
}

.top-row,
.section-row {
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
}

.brand img {
  width: 132px;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand.small img {
  width: 98px;
}

.app-header {
  gap: 8px;
  align-items: flex-start;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 112px;
  height: 30px;
  padding: 3px;
  border: 1px solid #cfe0f3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 14px rgba(50, 99, 145, 0.1);
}

.role-switch button {
  min-width: 0;
  border-radius: 999px;
  color: #345c8b;
  background: transparent;
  font-size: 10px;
  font-weight: 850;
}

.role-switch button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-2), var(--blue));
}

.fhir-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  min-width: 112px;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #075bb9;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(50, 99, 145, 0.16);
  white-space: nowrap;
}

.fhir-pill img {
  width: 46px;
  height: auto;
  display: block;
}

.fhir-pill span {
  line-height: 1;
}

.login-fhir-status {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px;
  width: 112px;
  min-height: 31px;
  padding: 4px 8px;
  border: 1px solid rgba(201, 224, 244, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: #0c61b8;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 11px rgba(29, 93, 146, 0.07);
  backdrop-filter: blur(14px);
}

.login-fhir-status img {
  width: 34px;
  height: auto;
  display: block;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 16px rgba(9, 58, 104, 0.12);
}

.hero-copy {
  text-align: center;
  margin: 132px 0 22px;
}

.hero-copy h1,
.page-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  color: #092756;
}

.hero-copy h1 span,
.page-title .accent {
  color: var(--blue);
}

.hero-copy p {
  margin: 8px 0 0;
  color: #4973a8;
  font-size: 16px;
  line-height: 1.45;
}

.login-card,
.card,
.patient-card {
  background: var(--surface);
  border: 1px solid rgba(194, 218, 241, 0.86);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.login-card {
  padding: 16px;
}

.segment {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #eef3f7;
}

.segment-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 10px;
  background: #cce5fc;
  box-shadow: 0 2px 5px rgba(24, 44, 64, 0.07);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.segment[data-role="Doctor"] .segment-slider {
  transform: translateX(calc(100% + 4px));
}

.segment button {
  position: relative;
  z-index: 1;
  height: 48px;
  border-radius: 10px;
  color: #64758a;
  background: transparent;
  font-weight: 500;
  transition: color 240ms ease, transform 120ms ease;
}

.segment button.active {
  color: #164f87;
}

.segment button:active {
  transform: scale(0.98);
}

.segment button:focus-visible {
  outline: 2px solid #1766b5;
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .segment-slider,
  .segment button {
    transition: none;
  }
}

.login-input-group {
  margin-top: 18px;
}

.login-input-group > label {
  display: block;
  margin-bottom: 7px;
  color: #64758a;
  font-size: 12px;
  font-weight: 500;
}

.login-input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 12px;
  border: 1px solid #d5e0eb;
  border-radius: 12px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.login-input-shell:focus-within {
  border-color: #1766b5;
  box-shadow: 0 0 0 3px #ddecfa;
}

.login-input-shell > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: #64758a;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-input-shell input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: none;
  color: #18354c;
  background: transparent;
  font-size: 16px;
  line-height: 1.5;
}

.login-input-shell input::placeholder {
  color: #64758a;
  opacity: 0.85;
}

.primary.login-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border-radius: 12px;
  background: #1766b5;
  color: #fff;
  box-shadow: none;
  overflow: hidden;
  font-size: 16px;
  font-weight: 500;
  transition: transform 140ms ease, filter 180ms ease;
}

.login-submit:hover:not(:disabled) { filter: brightness(1.06); }
.login-submit:active:not(:disabled) { transform: scale(0.98); }
.login-submit:disabled { cursor: wait; }
.login-submit .login-button-fill {
  position: absolute;
  inset: 0;
  background: #104d8d;
  transform: scaleX(0);
  transform-origin: left;
}
.login-submit.is-loading .login-button-fill {
  transform: scaleX(1);
  transition: transform 650ms ease;
}
.login-submit > svg, .login-submit .login-button-label {
  position: relative;
  z-index: 1;
}
.login-submit > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (prefers-reduced-motion: reduce) {
  .primary.login-submit, .login-submit.is-loading .login-button-fill { transition: none; }
}

.login-password-toggle svg {
  display: block;
  margin: auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-password-toggle {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 8px;
  color: #1766b5;
  background: transparent;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .login-input-shell { transition: none; }
}

.field {
  height: 48px;
  display: grid;
  grid-template-columns: 28px 1fr 30px;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #7ea0cb;
  background: rgba(255, 255, 255, 0.72);
}

.field input,
.field select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #416795;
  background: transparent;
}

.field select {
  width: 100%;
  font-size: 16px;
  padding-right: 26px;
  appearance: none;
  -webkit-appearance: none;
}

.select-field {
  position: relative;
  grid-template-columns: 28px 1fr;
}

.select-field::after {
  content: "⌄";
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-54%);
  color: #7da0c9;
  font-size: 18px;
  font-weight: 800;
  pointer-events: none;
}

.field input::placeholder {
  color: #8eb0d8;
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px 0 12px;
  color: #52677b;
  font-size: 13px;
}
.login-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  cursor: pointer;
}
.login-remember input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid #adc2d5;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}
.login-remember input:checked {
  background: #1766b5;
  border-color: #1766b5;
}
.login-remember input::after {
  content: '';
  width: 7px;
  height: 4px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 180ms ease;
}
.login-remember input:checked::after { transform: rotate(-45deg) scale(1); }
.login-remember input:focus-visible { outline: 2px solid #1766b5; outline-offset: 3px; }
.login-forgot {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1766b5;
  font-size: 13px;
  transition: background 180ms ease, transform 180ms ease;
}
.login-forgot:hover { background: #eef5fc; }
.login-forgot:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .login-remember input, .login-remember input::after, .login-forgot { transition: none; }
}

.login-signup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  color: #64758a;
  font-size: 14px;
}
.login-signup-row button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1766b5;
  font-size: 14px;
  font-weight: 500;
  transition: background 180ms ease, transform 180ms ease;
}
.login-signup-row button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}
.login-signup-row button:hover { background: #edf5fd; }
.login-signup-row button:hover svg { transform: translateX(3px); }
.login-signup-row button:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .login-signup-row button, .login-signup-row button svg { transition: none; }
}

.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
  color: #376498;
  font-size: 13px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.box {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
}

.primary {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(135deg, var(--blue-2), #0072de);
  box-shadow: 0 10px 18px rgba(0, 114, 222, 0.24);
}

.secondary {
  height: 44px;
  border: 1px solid #0b7fe6;
  border-radius: 13px;
  color: #075fc2;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin: 16px 0;
  color: #426b9c;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: #d8e7f6;
}

.signup {
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid #d7e8f7;
  color: #294f82;
  background: rgba(245, 250, 255, 0.75);
  font-size: 13px;
}

.signup span,
.link {
  color: #0075dc;
  font-weight: 850;
}

.security-note {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 270px;
  margin: 16px auto 0;
  color: #4772a8;
  font-size: 12px;
  line-height: 1.35;
}

.badge-icon,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: linear-gradient(135deg, #4fa7fa, #126fe3);
}

.badge-icon {
  width: 30px;
  height: 30px;
  border-radius: 15px;
}

.page-head {
  margin-top: 22px;
}

.page-head h1,
.page-title {
  font-size: 27px;
}

.page-head p {
  margin: 7px 0 0;
  color: #5576a0;
  font-size: 15px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
  margin: 20px 0 12px;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--blue-deep);
  background: transparent;
}

.search input::placeholder {
  color: #6c88aa;
}

.filter.active {
  color: #fff;
  background: var(--blue);
}

.search {
  height: 48px;
  border: 1px solid #d3e4f4;
  border-radius: 14px;
  background: white;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  padding: 0 14px;
  color: #647fa3;
  box-shadow: 0 7px 16px rgba(18, 80, 134, 0.1);
}

.filter {
  height: 48px;
  border-radius: 14px;
  background: white;
  color: #092756;
  box-shadow: 0 7px 16px rgba(18, 80, 134, 0.12);
  font-size: 20px;
}

.patient-list {
  display: grid;
  gap: 10px;
}

.patient-card {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
}

.patient-card-main {
  width: 100%;
  display: grid;
  grid-template-columns: 50px 1fr 70px;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 11px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.patient-card-main:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -3px;
}

.patient-card.expanded {
  border-color: #9fcdfa;
}

.patient-card.expanded .patient-card-main {
  background: rgba(239, 248, 255, 0.58);
}

.patient-card-details {
  padding: 0 14px 14px;
  border-top: 1px solid #dbeaf7;
}

.patient-card-details .lab-file-card {
  margin-top: 14px;
}

.patient-lab-heading {
  margin-top: 14px;
}

.patient-card-copy {
  min-width: 0;
}

.patient-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--risk-color);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  font-size: 17px;
  font-weight: 800;
}

.patient-card h3,
.card h3 {
  margin: 0;
  color: #092756;
  font-size: 17px;
}

.meta {
  margin-top: 5px;
  color: #456b98;
  font-size: 11px;
  line-height: 1.5;
}

.risk-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 64px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.risk-high {
  color: var(--red);
  background: #ffe8e8;
}

.risk-medium {
  color: var(--orange);
  background: #fff1dd;
}

.risk-low {
  color: var(--green);
  background: #e5f8ec;
}

.score {
  text-align: right;
}

.score strong {
  display: block;
  margin-top: 6px;
  color: #092756;
  font-size: 22px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.lab-file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d7e8f7;
  border-radius: 14px;
  background: rgba(239, 248, 255, 0.78);
  color: #0a376f;
}

.lab-file-card div {
  min-width: 0;
}

.lab-file-card strong,
.lab-file-card span {
  display: block;
}

.lab-file-card strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-file-card span {
  margin-top: 4px;
  color: #5277a2;
  font-size: 11px;
}

.lab-file-card > .risk-tag {
  flex: 0 0 auto;
  margin-top: 0;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric {
  min-height: 76px;
  padding: 10px 7px;
  border: 1px solid #d9e8f6;
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.75);
}

.metric label {
  display: block;
  color: #466b99;
  font-size: 10px;
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin: 7px 0 4px;
  color: #092756;
  font-size: 17px;
}

.metric .risk-tag {
  height: 20px;
  min-width: 42px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.doctor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.doctor-stats div {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 10px 6px;
  border: 1px solid #d9e8f6;
  border-radius: 14px;
  background: rgba(245, 251, 255, 0.8);
  text-align: center;
}

.doctor-stats strong {
  color: #082b63;
  font-size: 24px;
  line-height: 1;
}

.doctor-stats span {
  color: #5576a0;
  font-size: 11px;
  font-weight: 800;
}

.compact-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.compact-patient {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d9e8f6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  text-align: left;
}

.compact-patient .avatar {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.compact-patient strong,
.compact-patient small {
  display: block;
}

.compact-patient strong {
  color: #092756;
  font-size: 14px;
}

.compact-patient small {
  margin-top: 3px;
  color: #5576a0;
  font-size: 11px;
}

.card {
  padding: 16px;
  margin-top: 14px;
}

.card-title {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.card-title p {
  margin: 4px 0 0;
  color: #5b7aa2;
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.label {
  display: block;
  margin-bottom: 6px;
  color: #092756;
  font-size: 12px;
  font-weight: 800;
}

.upload-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #9fcdfa;
  border-radius: 12px;
  color: #0967c4;
  background: #eff8ff;
  font-size: 12px;
}

.lab-upload {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 14px;
  border: 1.5px dashed #86bdff;
  border-radius: 16px;
  background: rgba(239, 248, 255, 0.78);
  color: #075fc2;
}

.native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.app-toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 76px));
  max-width: calc(100vw - 40px);
  transform: translateX(-50%);
  padding: 11px 18px;
  border-radius: 10px;
  color: #fff;
  background: rgba(8, 43, 99, 0.92);
  box-shadow: 0 10px 28px rgba(8, 43, 99, 0.24);
  font-size: 14px;
  text-align: center;
}

.lab-upload-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-2), var(--blue));
  font-weight: 900;
}

.lab-upload strong {
  display: block;
  color: #075fc2;
  font-size: 16px;
}

.lab-upload p {
  margin: 5px 0 0;
  color: #4d73a2;
  font-size: 12px;
  line-height: 1.45;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  color: white;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d5e6f5;
  border-radius: 10px;
  color: #092756;
  background: white;
  font-size: 11px;
  font-weight: 800;
}

.toggle .toggle-label {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.05;
}

.toggle span:last-child {
  color: var(--blue);
  flex: 0 0 auto;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.model-params-card {
  overflow: hidden;
}

.model-param-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}

.model-param-sliders {
  min-width: 0;
}

.model-param-tags {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.parameter-tag {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d9e8f6;
  border-radius: 12px;
  background: rgba(245, 251, 255, 0.82);
}

.parameter-tag span {
  min-width: 0;
  overflow: hidden;
  color: #456b98;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parameter-tag strong {
  color: #092756;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.slider-line {
  position: relative;
  height: 5px;
  margin: 16px 0 7px;
  border-radius: 999px;
  background: #d4e1ef;
}

.slider-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--value, 70%);
  border-radius: inherit;
  background: var(--blue);
}

.slider-line::after {
  content: "";
  position: absolute;
  left: var(--value, 70%);
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--blue);
}

.chart-card {
  overflow: hidden;
}

.chart-svg,
.gauge-svg {
  width: 100%;
  display: block;
}

.gauge-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.big-risk {
  color: #063b82;
  font-size: 44px;
  line-height: 0.95;
  font-weight: 900;
}

.alert {
  padding: 12px;
  border: 1px solid #ffd1d1;
  border-radius: 12px;
  color: #24527f;
  background: #fff4f4;
  font-size: 12px;
  line-height: 1.45;
}

.alert strong {
  display: block;
  margin-bottom: 4px;
  color: var(--red);
}

.textarea {
  width: 100%;
  min-height: 106px;
  resize: vertical;
  border: 1px solid #d3e4f4;
  border-radius: 14px;
  padding: 14px;
  color: #264f80;
  background: rgba(255, 255, 255, 0.72);
  outline: 0;
  line-height: 1.45;
}

.editor-screen .page-head {
  margin: 34px 0 18px;
}

.editor-screen .page-head h1 {
  font-size: 30px;
}

.editor-screen .card {
  padding: 15px;
}

.factor-card {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #d9e8f6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.factor-card strong {
  display: block;
  color: #092756;
  font-size: 14px;
  line-height: 1.25;
}

.factor-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.factor-list span {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: #456b98;
  font-size: 12px;
}

.factor-list .risk-tag {
  min-width: 44px;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.report-page {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.report-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d7e5f3;
}

.report-section h2 {
  margin: 0 0 12px;
  color: #005fc1;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.bottom-nav {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 7px 6px;
  border: 1px solid #d7e8f7;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -7px 22px rgba(21, 84, 138, 0.1);
}

.bottom-nav button {
  display: grid;
  gap: 2px;
  place-items: center;
  min-width: 0;
  height: 48px;
  color: #587394;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav button.active {
  color: var(--blue);
}

.bottom-actions {
  position: static;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 0;
}

.report-page .bottom-actions {
  position: static;
  margin-top: 16px;
}

.report-page .big-risk {
  white-space: nowrap;
}

.preview-notes {
  color: #163c68;
}

.preview-notes .eyebrow {
  margin: 0 0 8px;
  color: #0073d8;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-notes h1 {
  margin: 0 0 12px;
  font-size: 38px;
  line-height: 1;
}

.preview-notes p {
  max-width: 330px;
  margin: 0;
  color: #4c6f98;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .stage {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
  }

  .preview-notes {
    display: none;
  }

  .device {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Scoped report instruments: retain all page backgrounds and login styling. */
.risk-instrument { color:var(--risk-accent,#1766b5); text-align:center; padding:10px 2px; }
.risk-instrument .instrument-number { fill:currentColor; font-size:32px; font-weight:750; font-variant-numeric:tabular-nums; letter-spacing:-1px; }
.risk-instrument .instrument-caption { fill:#60788e; font-size:10px; font-weight:500; }
.risk-arc { animation:risk-reveal .65s ease-out both; }
@keyframes risk-reveal { from { stroke-dasharray:0 100; } }
.risk-distribution { margin:14px 0 0; color:var(--risk-accent,#1766b5); padding:14px; border:1px solid #dde7f0; border-radius:16px; background:linear-gradient(150deg,#fff,#f5f9fd); }
.distribution-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#536d85; font-size:12px; }
.distribution-heading strong { color:var(--risk-accent,#1766b5); font-size:24px; font-variant-numeric:tabular-nums; }
.distribution-heading small { font-size:11px; font-weight:500; color:#60788e; }
.risk-distribution figcaption { color:#657c93; font-size:11px; line-height:1.6; }
.chart-explainer { border-top:1px solid #e1eaf2; margin-top:10px; padding-top:4px; color:#536d85; font-size:12px; }
.chart-explainer summary { cursor:pointer; padding:12px 0; color:#1766b5; }
.chart-explainer p { margin:0 0 8px; line-height:1.7; }
.chart-explainer summary:focus-visible { outline:2px solid #1766b5; outline-offset:3px; border-radius:4px; }
.summary-grid .metric { border:1px solid #e0e9f1; box-shadow:0 3px 12px #164f8706; transition:transform .16s ease,box-shadow .16s ease; }
.summary-grid .metric strong,.patient-card .score strong,.big-risk { font-variant-numeric:tabular-nums; letter-spacing:-.025em; }
@media(hover:hover) { .summary-grid .metric:hover { transform:translateY(-2px); box-shadow:0 6px 16px #164f8710; } }
@media(prefers-reduced-motion:reduce) { .risk-arc { animation:none; } .summary-grid .metric { transition:none; } }

/* Focused upload + clinical editor density and feedback pass. */
.compact-screen .screen-scroll { height:calc(100% - 72px); padding:16px 16px 24px; scroll-padding:16px; }
.compact-screen .bottom-nav { bottom:0; left:0; right:0; border-radius:0; box-shadow:0 -2px 12px #164f8708; }
.compact-screen .page-head { margin:18px 0 16px; text-align:left; }
.compact-screen .page-head h1 { font-size:23px; line-height:1.25; letter-spacing:-.03em; }
.compact-screen .page-head p { font-size:13px; line-height:1.5; margin-top:6px; }
.compact-screen .card { padding:16px; border-radius:18px; margin-bottom:12px; box-shadow:0 4px 18px #164f8708; }
.compact-screen h3 { font-size:15px; line-height:1.4; }
.compact-screen .section-row { gap:8px; }
.compact-identity { display:flex; align-items:center; gap:10px; margin-bottom:14px; padding:10px 0; }
.compact-identity .avatar { width:36px; height:36px; font-size:12px; flex-shrink:0; }
.compact-identity strong { display:block; font-size:14px; }
.compact-identity div>span { display:block; font-size:11px; color:#60788e; margin-top:3px; }
.identity-label { margin-left:auto; font-size:10px; color:#60788e; }
.demo-label { color:#60788e; font-size:10px; font-weight:500; }
.compact-screen .lab-upload { padding:14px 10px; margin-top:12px; gap:10px; border-radius:12px; }
.compact-screen .lab-upload-icon { width:34px; height:34px; border-radius:10px; font-size:20px; flex-shrink:0; }
.compact-screen .lab-upload strong { font-size:14px; }
.compact-screen .lab-upload p { font-size:10px; line-height:1.5; margin-top:4px; }
.selected-file { overflow-wrap:anywhere; font-size:11px; color:#60788e; background:#f2f7fb; padding:9px 10px; border-radius:8px; margin:10px 0 0; }
.selected-file.file-ready { color:#16715c; background:#edf8f3; }
.compact-details summary { cursor:pointer; padding:12px 0; font-size:12px; color:#1766b5; }
.compact-details p { font-size:12px; line-height:1.65; color:#60788e; margin:0 0 8px; }
.compact-details .factor-list { padding:0 0 8px; }
.compact-screen .form-grid { gap:12px; margin-top:14px; }
.compact-screen .label { font-size:11px; margin-bottom:6px; }
.compact-screen .field { grid-template-columns:minmax(0,1fr); min-height:44px; height:44px; padding:0 10px; border-radius:10px; gap:6px; }
.compact-screen .field input,.compact-screen .field select { font-size:14px; min-width:0; }
.compact-screen .field>span { display:none; }
.compact-screen .field:focus-within,.compact-screen .textarea:focus { border-color:#1766b5; box-shadow:0 0 0 3px #ddecfa; }
.compact-screen .primary,.compact-screen .secondary { min-height:44px; padding:10px 12px; font-size:13px; border-radius:11px; transition:transform .15s,background .15s; }
.compact-screen button:active { transform:scale(.98); }
.compact-screen button:focus-visible,.compact-screen summary:focus-visible,.compact-screen .lab-upload:focus-within { outline:2px solid #1766b5; outline-offset:3px; }
.edit-feedback,.editor-meta { font-size:10px; line-height:1.5; color:#60788e; }
.compact-result { display:grid; grid-template-columns:132px 1fr; align-items:center; gap:14px; }
.compact-result>p { font-size:13px; line-height:1.65; color:#244768; margin:0; }
.compact-result>p span { color:#60788e; font-size:11px; }
.compact-result .risk-instrument { padding:10px 0; }
.compact-result .risk-tag { font-size:10px; }
.result-summary .compact-details { border-top:1px solid #e5edf3; }
.compact-screen .textarea { min-height:140px; height:160px; font-size:14px; line-height:1.75; padding:12px; margin-top:12px; border-radius:12px; }
.editor-meta { display:flex; justify-content:space-between; gap:8px; margin-top:6px; }
.saved-status { color:#16715c; }
.compact-screen .model-details { padding:4px 16px; }
@media(max-width:340px){.compact-result{grid-template-columns:110px 1fr;gap:10px}.compact-screen .screen-scroll{padding-left:12px;padding-right:12px}}
@media(prefers-reduced-motion:reduce){.compact-screen button{transition:none;transform:none}}

/* Shared medical UI scale: typography, spacing and restrained feedback. */
.screen.medical-top { --type-title:24px; --type-section:16px; --type-body:14px; --type-caption:12px; font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; font-size:var(--type-body); line-height:1.55; }
.medical-top .page-head h1 { font-size:var(--type-title); line-height:1.3; font-weight:650; letter-spacing:-.025em; }
.medical-top .page-head p { font-size:13px; line-height:1.65; font-weight:400; color:#62788d; }
.medical-top h3 { font-size:var(--type-section); font-weight:650; letter-spacing:-.015em; }
.medical-top .meta,.medical-top .card-title p { font-size:var(--type-caption); line-height:1.65; font-weight:400; color:#62788d; }
.medical-top .score strong,.medical-top .metric strong,.medical-top .big-risk { font-variant-numeric:tabular-nums lining-nums; font-weight:650; line-height:1.15; letter-spacing:-.025em; }
.medical-top .risk-tag { font-size:11px; line-height:1.4; font-weight:600; border-radius:6px; padding:4px 8px; white-space:nowrap; }
.medical-top .field input,.medical-top .field select { font-weight:500; font-variant-numeric:tabular-nums; color:#294966; }
.compact-screen .card { padding:18px; margin-bottom:16px; border:1px solid #dfE8f0; box-shadow:0 4px 20px #24486c06; }
.compact-screen .page-head { margin:20px 0; }
.compact-screen .form-grid { gap:16px 12px; }
.compact-screen .label { font-size:12px; font-weight:500; color:#62788d; }
.compact-screen .field { height:46px; min-height:46px; background:#fbfdff; transition:border-color .18s,box-shadow .18s,background .18s; }
.compact-screen .field:focus-within { background:white; }
.compact-screen .demo-label { font-size:11px; }
.compact-screen .edit-feedback,.compact-screen .editor-meta { font-size:11px; line-height:1.6; }
.compact-screen .edit-feedback { margin:14px 0; }
.compact-screen .primary { background:#1766b5; box-shadow:0 3px 8px #1766b518; font-weight:600; }
.compact-screen .secondary { background:#f4f8fc; border:1px solid #dce6ef; color:#315875; font-weight:500; }
.compact-screen .bottom-actions { margin-top:18px; gap:12px; }
.compact-result { grid-template-columns:minmax(118px,.9fr) minmax(0,1fr); gap:18px; padding:8px 0 12px; }
.compact-result>p { font-size:14px; font-weight:500; }
.compact-result>p span { display:inline-block; margin-top:8px; font-size:12px; font-weight:400; }
.risk-instrument .instrument-number { font-weight:650; }
.instrument-help { display:block; font-size:10px; line-height:1.5; color:#62788d; margin-top:8px; }
.compact-details summary,.chart-explainer summary { list-style:none; display:flex; align-items:center; justify-content:space-between; min-height:44px; gap:12px; font-size:12px; font-weight:500; }
.compact-details summary::-webkit-details-marker,.chart-explainer summary::-webkit-details-marker { display:none; }
.compact-details summary:after,.chart-explainer summary:after { content:'＋'; font-size:16px; color:#7c91a4; }
.compact-details[open]>summary:after,.chart-explainer[open]>summary:after { content:'−'; }
.compact-details[open]>:not(summary),.chart-explainer[open]>:not(summary) { animation:detail-reveal .22s ease-out; }
@keyframes detail-reveal { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }
.chart-reading { padding-top:10px; border-top:1px solid #e2eaf1; }
.chart-reading>strong { font-size:12px; color:#294966; font-weight:600; }
.chart-key { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; font-size:11px; }
.chart-key span { display:inline-flex; align-items:center; gap:6px; }
.key-marker { height:12px; border-left:2px dashed var(--risk-accent); width:6px; }
.key-curve { width:16px; height:7px; border-top:2px solid #6e8ba6; border-radius:50%; }
.chart-reading p { margin:8px 0 0; font-size:11px; line-height:1.6; color:#62788d; }
.medical-top .factor-list>span { min-height:38px; align-items:center; border-bottom:1px solid #eef2f6; font-size:12px; }
.medical-top .factor-list>span:last-child { border-bottom:0; }
@media(hover:hover){.compact-screen .primary:hover{background:#125898}.compact-screen .secondary:hover{background:#eaf2fa}.compact-details summary:hover,.chart-explainer summary:hover{color:#104d8d}}
@media(prefers-reduced-motion:reduce){.compact-details[open]>:not(summary),.chart-explainer[open]>:not(summary){animation:none}.compact-screen .field{transition:none}}

/* Clinician palette: quiet surfaces, semantic status colors only. */
.clinician-ui { --blue:#345c7b; --blue-deep:#243746; --blue-muted:#637582; --red:#a94442; --orange:#906c30; --green:#36745f; --line:#dce3e8; --shadow:0 3px 12px #24374606; }
.clinician-ui .screen-scroll { height:calc(100% - 72px); padding:18px 16px 26px; }
.clinician-ui .card,.clinician-ui .patient-card { border:1px solid #dce3e8; border-radius:14px; background:rgba(255,255,255,.96); box-shadow:0 3px 12px #24374605; }
.clinician-ui .page-head { margin:20px 0; }
.clinician-ui .avatar,.clinician-ui .badge-icon,.clinician-ui .step { background:#edf1f4; color:#496477; box-shadow:none; font-weight:600; }
.clinician-ui .avatar { border-radius:10px; width:38px; height:38px; font-size:13px; }
.clinician-ui .primary { background:#345c7b; box-shadow:none; border-radius:9px; font-size:13px; font-weight:600; min-height:44px; }
.clinician-ui .secondary { background:#f7f9fa; color:#425a6b; border:1px solid #dce3e8; border-radius:9px; box-shadow:none; font-size:13px; min-height:44px; }
.clinician-ui .link { background:transparent; color:#345c7b; padding:8px 0; font-size:12px; }
.clinician-ui .risk-high { background:#f8eeee; color:#a94442; }
.clinician-ui .risk-medium { background:#f7f3e9; color:#906c30; }
.clinician-ui .risk-low { background:#edf5f1; color:#36745f; }
.clinician-ui .risk-instrument,.clinician-ui .risk-distribution { color:var(--clinical-accent,#447b96); }
.clinician-ui .distribution-heading strong { color:var(--clinical-accent,#447b96); }
.clinician-ui .risk-distribution { background:#fbfcfd; border-color:#e4e9ed; border-radius:10px; }
 .clinician-ui .chart-svg path[fill="#51c3a7"] { fill:#77a99b; opacity:.38; }
.clinician-ui .chart-svg path[fill="#ffd970"] { fill:#c4aa74; opacity:.36; }
.clinician-ui .chart-svg path[fill="#f36a6f"] { fill:#bc8580; opacity:.38; }
.clinician-ui .risk-tag { min-width:48px; font-weight:500; }
.clinician-ui .bottom-nav { bottom:0; left:0; right:0; background:#fff; border-radius:0; box-shadow:0 -1px 8px #24374605; }
.clinician-ui .bottom-nav button.active { background:#f0f4f7; border-radius:8px; color:#345c7b; }
.clinician-ui .search { border-color:#dce3e8; border-radius:10px; background:#fff; }
.clinician-ui .search input { font-size:13px; }
.clinician-ui .filter { width:auto; padding:0 12px; font-size:12px; background:#fff; border:1px solid #dce3e8; border-radius:10px; color:#496477; }
.clinician-ui .filter.active { background:#e9eff4; border-color:#90a6b7; }
.patient-list-status { display:flex; justify-content:space-between; align-items:center; min-height:40px; color:#637582; font-size:12px; }
.clinician-ui .patient-card h3 { font-size:15px; font-weight:600; color:#243746; }
.clinician-ui .patient-card.expanded { border-color:#8fa6b7; box-shadow:0 0 0 2px #345c7b08; }
.clinician-ui .score strong { font-size:23px; color:#243746; }
.clinician-ui .lab-file-card,.clinician-ui .upload-banner { background:#f5f7f9; border-color:#e2e7eb; }
.clinician-ui .doctor-stats strong { color:#243746; font-weight:600; font-variant-numeric:tabular-nums; }
.clinician-ui .doctor-stats>div { background:transparent; border-radius:0; border-right:1px solid #e2e7eb; }
.clinician-ui .doctor-stats>div:last-child { border-right:0; }
.clinical-data { margin:12px 0 0; }
.clinical-data>div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:12px 0; border-bottom:1px solid #edf0f3; }
.clinical-data>div:last-child { border-bottom:0; }
.clinical-data dt { font-size:13px; color:#637582; }
.clinical-data dd { margin:0; font-size:16px; font-weight:600; color:#243746; font-variant-numeric:tabular-nums; }
.clinical-data small { display:inline-block; min-width:44px; text-align:right; margin-left:10px; font-size:11px; font-weight:400; color:#788893; }
.source-file { overflow-wrap:anywhere; }
@media(hover:hover){.clinician-ui .primary:hover{background:#125898}.clinician-ui .secondary:hover{background:#edf1f4}}

/* Muted clinical data accents; neutral chrome, meaningful focal points. */
.clinician-ui [data-risk="risk-high"] { --clinical-accent:#ac6661; }
.clinician-ui [data-risk="risk-medium"] { --clinical-accent:#9a7a3e; }
.clinician-ui [data-risk="risk-low"] { --clinical-accent:#478778; }
.clinician-ui .risk-instrument .instrument-number { fill:#294c62; }
.clinician-ui .key-marker { border-color:var(--clinical-accent,#447b96); }
.clinician-ui .risk-distribution { background:linear-gradient(155deg,#f4f9fc 0%,#fff 70%); border-color:#d9e6ec; }
.clinician-ui .result-summary { border-top:3px solid #8fb7c6; }
.clinician-ui .clinical-data dd { color:#316d83; }
.clinician-ui .clinical-data small { color:#73858e; }
.clinician-ui .clinical-data>div:nth-child(odd) { background:#f4f8fa; }
.clinician-ui .clinical-data>div { padding:12px 8px; border-radius:5px; }
.clinician-ui .model-details>summary { color:#38788a; }
.clinician-ui .factor-list .risk-high { background:#f7ece9; color:#9f5954; }
.clinician-ui .factor-list .risk-medium { background:#f7f1e5; color:#8a6b35; }
.clinician-ui .factor-list .risk-low { background:#ebf4f0; color:#397565; }

/* Restore the medical blue palette; retain the refined layout. */
.clinician-ui { --blue:#0b82e6; --blue-deep:#082b63; --red:#e63228; --orange:#ef8a00; --green:#0c9f58; }
.clinician-ui .primary,.compact-screen .primary { background:#1766b5; }
.clinician-ui .avatar,.clinician-ui .badge-icon,.clinician-ui .step { background:#e6f2fc; color:#1766b5; }
.clinician-ui .risk-high,.clinician-ui .factor-list .risk-high { background:#ffe8e8; color:#e63228; }
.clinician-ui .risk-medium,.clinician-ui .factor-list .risk-medium { background:#fff1dd; color:#bd7200; }
.clinician-ui .risk-low,.clinician-ui .factor-list .risk-low { background:#e5f8ec; color:#0c8050; }
.clinician-ui [data-risk="risk-high"] { --clinical-accent:#e63228; }
.clinician-ui [data-risk="risk-medium"] { --clinical-accent:#d28a18; }
.clinician-ui [data-risk="risk-low"] { --clinical-accent:#29a77f; }
.clinician-ui .risk-instrument .instrument-number { fill:currentColor; }
.clinician-ui .chart-svg path[fill="#51c3a7"] { fill:#51c3a7; opacity:.4; }
.clinician-ui .chart-svg path[fill="#ffd970"] { fill:#ffd970; opacity:.55; }
.clinician-ui .chart-svg path[fill="#f36a6f"] { fill:#f36a6f; opacity:.4; }
.clinician-ui .clinical-data dd { color:#1766b5; }
.clinician-ui .bottom-nav button.active { color:#0b82e6; background:#edf6ff; }
.clinician-ui .filter { width:44px; height:44px; padding:10px; display:grid; place-items:center; }
.ui-action-icon { display:inline-block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.report-document-label { font-size:12px; color:#62788d; }
.medical-top button { transition:background .18s,box-shadow .18s,transform .15s; }
.medical-top button:active { transform:scale(.97); }
.medical-top button[aria-busy="true"] { display:flex; align-items:center; justify-content:center; gap:8px; opacity:.8; cursor:wait; }
.action-spinner { width:14px; height:14px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:action-spin .7s linear infinite; }
@keyframes action-spin { to{transform:rotate(360deg)} }
.medical-top .patient-expanded,.medical-top .patient-detail { animation:detail-reveal .22s ease-out; }
@media(prefers-reduced-motion:reduce){.medical-top button{transition:none}.medical-top button:active{transform:none}.action-spinner{animation:none}}
.clinical-editor .bottom-actions { display:flex; gap:12px; }
.clinical-editor .bottom-actions .secondary { flex:0 0 48px; width:48px; padding:12px; }
.clinical-editor .bottom-actions .primary { flex:1; }
.clinical-editor .secondary[aria-busy="true"]>span:last-child { display:none; }
@media(hover:hover){.clinician-ui .primary:hover{background:#125898}}

/* Compact fields have no leading icon: give the control the full row. */
.compact-screen .field input,.compact-screen .field select { width:100%; box-sizing:border-box; }
.compact-screen .select-field select { padding-right:28px; height:100%; }
.compact-screen .form-grid>div { min-width:0; }
