/* Doctor workspace only. Clinical zone colors and patient-page styles are retained. */
.doctorPage {
  --bg: #f4f6f8;
  --ink: #213b50;
  --muted: #627888;
  --line: #dfe7eb;
  --soft: #f7f9fa;
  --blue: #215978;
  --teal: #2e777d;
  --shadow: 0 8px 28px rgb(28 57 73 / 4%);
  --workspace-width: 1560px;
  font-size: 14px;
  line-height: 1.5;
  background: radial-gradient(ellipse at 92% 18%, #eaf2f2, transparent 45%), var(--bg);
}

.doctorPage .institutionMasthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  background: #102e4a;
  color: #fff;
}
.doctorPage .institutionMasthead::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -65% -15%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 75%, rgb(58 145 153 / 68%), transparent 43%),
    radial-gradient(ellipse at 36% 15%, rgb(62 99 162 / 65%), transparent 51%),
    radial-gradient(ellipse at 100% 10%, rgb(100 117 156 / 48%), transparent 45%),
    linear-gradient(115deg, #102c49 12%, #174660 60%, #215d6b);
  animation: cabinetAurora 18s ease-in-out infinite alternate;
}
.doctorPage .institutionMasthead::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c5d5c9 35%, #81b9bd 70%, transparent);
  opacity: .65;
}
@keyframes cabinetAurora {
  from { transform: translate3d(-3%, -5%, 0) scale(1); }
  to { transform: translate3d(4%, 9%, 0) scale(1.08); }
}
.doctorPage .mastheadInner { max-width: var(--workspace-width); gap: 36px; min-height: 148px; padding: 25px 28px; }
.doctorPage .institutionBrand { gap: 24px; }
.doctorPage .hospitalEmblem {
  flex: 0 0 112px;
  height: 88px;
  padding: 12px 10px;
  border: 1px solid rgb(255 255 255 / 85%);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 22px rgb(0 15 34 / 12%), 0 0 0 5px rgb(255 255 255 / 5%);
}
.doctorPage .institutionType { margin-bottom: 7px; color: #c7dce6; font-size: 11px; font-weight: 400; letter-spacing: .065em; }
.doctorPage .institutionName { color: #fff; font-size: clamp(20px, 1.95vw, 27px); line-height: 1.25; font-weight: 500; letter-spacing: -.025em; }
.doctorPage .cabinetProgramBrand { flex: 0 0 auto; padding: 14px 20px; border: 1px solid rgb(255 255 255 / 78%); border-radius: 14px; background: #f5faf9; box-shadow: 0 5px 20px rgb(0 22 38 / 8%); }
.doctorPage .cabinetProgramLogo { display: block; width: 248px; height: auto; }
.doctorPage .brandNavigation { border-bottom-color: #dde6e9; background: rgb(255 255 255 / 85%); }
.doctorPage .brandNavigationInner { max-width: var(--workspace-width); min-height: 50px; padding: 6px 28px; gap: 20px; }
.doctorPage .departmentName { color: #446577; font-size: 12px; font-weight: 500; letter-spacing: .01em; }
.cabinetNavigationActions { display: flex; align-items: center; flex: 0 0 auto; gap: 14px; }
.doctorPage .cabinetLink { min-height: 34px; gap: 16px; padding: 6px 12px; border-color: #dce6e9; background: transparent; font-size: 12px; border-radius: 7px; }
.doctorPage .cabinetLogout { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 2px; border: 0; background: transparent; font-size: 12px; color: var(--muted); }
.cabinetLogout svg { width: 18px; height: 18px; }
.doctorPage .cabinetLogout:hover { color: var(--blue); background: transparent; }
.doctorPage .cabinetContextHeader { max-width: var(--workspace-width); margin: 0 auto; padding: 24px 28px 22px; align-items: center; flex-direction: row; gap: 32px; border: 0; background: transparent; box-shadow: none; }
.doctorPage .cabinetContextHeader .eyebrow { margin: 0 0 5px; color: #40797e; font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.doctorPage .cabinetContextHeader h1 { margin: 0; color: #1c3b51; font-family: Georgia, "Times New Roman", serif; font-size: 33px; font-weight: 400; line-height: 1.15; letter-spacing: -.035em; }
.doctorPage .cabinetContextHeader .subtitle { margin: 7px 0 0; color: #617989; font-size: 12px; line-height: 1.5; }
.doctorPage .doctorAccountIdentity { display: flex; flex-direction: column; position: relative; flex: 0 1 350px; min-width: 0; max-width: 40%; gap: 5px; margin: 0; padding: 3px 0 3px 21px; border: 0; border-radius: 0; background: transparent; color: var(--ink); overflow-wrap: anywhere; }
.doctorPage .doctorAccountIdentity::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 0; width: 2px; border-radius: 2px; background: linear-gradient(#b8cccf, #6d9a9a 50%, #d2dfdc); }
.doctorPage .doctorAccountIdentity span { max-width: 290px; color: #58717d; font-size: 11px; line-height: 1.45; }
.doctorPage .doctorAccountIdentity strong { font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 400; line-height: 1.35; letter-spacing: -.02em; }
.doctorPage .doctorAccountIdentity small { color: #687e89; font-size: 11px; }
.doctorPage .doctorLayout { max-width: var(--workspace-width); padding: 0 28px 48px; }
.doctorPage .doctorCabinet { grid-template-columns: 344px minmax(0, 1fr); gap: 24px; align-items: start; }
.doctorPage .doctorCabinet .panel { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.doctorPage .doctorSidebar { display: grid; gap: 16px; position: sticky; top: 20px; max-height: calc(100vh - 40px); padding: 0 3px 3px 0; scrollbar-color: #c3ced9 transparent; }
.doctorPage .doctorSidebar::-webkit-scrollbar-thumb { background: #c3ced9; }
.doctorPage .doctorSidebar > * { min-width: 0; }
.doctorPage .doctorDocumentsButton { gap: 11px; min-height: 46px; padding: 10px 14px; border: 1px solid #d5e3e5; border-radius: 10px; color: #315c70; background: linear-gradient(110deg, #fff, #eef6f5); font-size: 12px; font-weight: 600; box-shadow: 0 3px 12px rgb(28 57 73 / 3%); }
.doctorPage .doctorDocumentsButton svg { width: 20px; height: 20px; flex-basis: 20px; }
.doctorPage .doctorDocumentsButton span:last-child { color: #748a9f; }
.doctorPage .doctorDocumentsButton:hover { border-color: #b3c9dd; background: #f9fbfe; }
.doctorPage .recordsPanel { padding: 20px 16px 12px; }
.doctorPage .recordsPanel .sectionHead { display: flex; justify-content: space-between; margin-bottom: 18px; }
.doctorPage .sectionKicker { margin-bottom: 4px; color: var(--teal); font-size: 10px; font-weight: 600; letter-spacing: .09em; }
.doctorPage .recordsPanel .sectionHead h2 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.recordsCount { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 9px; border: 1px solid #e0e7ee; border-radius: 6px; color: #536c85; background: #f6f8fb; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.doctorPage .searchBox { gap: 7px; font-size: 12px; font-weight: 500; }
.patientSearchControl { display: block; position: relative; min-width: 0; }
.patientSearchControl > svg { position: absolute; left: 12px; top: 13px; width: 17px; height: 17px; color: #7c8fa1; pointer-events: none; }
.doctorPage .searchBox input { width: 100%; min-height: 43px; padding: 10px 10px 10px 37px; border: 1px solid #d7e1eb; border-radius: 6px; color: var(--ink); background: #fafbfd; box-shadow: none; font: inherit; font-size: 13px; }
.doctorPage input::placeholder, .doctorPage textarea::placeholder { color: #5f7285; opacity: 1; }
.searchHint { margin: 6px 0 14px; color: #5f7285; font-size: 11px; }
.doctorPage .recordFilters { gap: 6px; margin: 0 0 14px; padding-bottom: 16px; border-bottom: 1px solid #e8edf2; }
.doctorPage .recordFilter { min-height: 32px; padding: 5px 9px; border: 1px solid #dfe7eb; border-radius: 8px; background: #fff; color: #52667b; font-size: 12px; font-weight: 500; line-height: 1.3; transform: none; box-shadow: none; transition: background .15s, border-color .15s; }
.doctorPage .recordFilter:hover { border-color: #a8bfd5; color: var(--blue); background: #f0f5fa; transform: none; box-shadow: none; }
.doctorPage .recordFilter.active { border-color: #285b72; background: #285b72; color: #fff; transform: none; box-shadow: 0 2px 5px rgb(28 57 73 / 8%); }
.doctorPage .recordsList { max-height: clamp(300px, 49vh, 620px); gap: 8px; padding: 2px 3px 5px; scrollbar-color: #c5d2df #f4f7fa; }
.doctorPage .recordsList::-webkit-scrollbar { width: 5px; }
.doctorPage .recordsList::-webkit-scrollbar-track { background: #f4f7fa; }
.doctorPage .recordsList::-webkit-scrollbar-thumb { background: #c5d2df; }
.doctorPage .recordItem { gap: 5px; padding: 13px 12px; border: 1px solid #e1e7ee; border-left-width: 3px; border-radius: 9px; background: #fff; box-shadow: none; font-family: inherit; transform: none; overflow-wrap: anywhere; transition: border-color .15s, background .15s; }
.doctorPage .recordItem.zoneMarker-green { border-left-color: var(--green); }
.doctorPage .recordItem.zoneMarker-orange { border-left-color: var(--orange); }
.doctorPage .recordItem.zoneMarker-red { border-left-color: var(--red); background: #fff; }
.doctorPage .recordItem strong::after { content: none; }
.doctorPage .recordItem .recordPatientName { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4; }
.doctorPage .recordItem span { font-size: 12px; line-height: 1.5; }
.doctorPage .recordItem .recordIdentity { color: #4e657d; font-variant-numeric: tabular-nums; }
.doctorPage .recordItem .recordCreatedAt { color: #5f7285; font-size: 11px; }
.doctorPage .recordItem .recordZone { color: #4f6274; font-weight: 500; }
.doctorPage .recordItem .recordZone span { font-weight: 400; }
.doctorPage .recordItem:hover { border-top-color: #a9bfd5; border-right-color: #a9bfd5; border-bottom-color: #a9bfd5; background: #f7fafd; transform: none; box-shadow: none; }
.doctorPage .recordItem.active { border-color: #406d99; border-left-color: #406d99; background: #edf4fb; box-shadow: inset 0 0 0 1px #406d99; transform: none; }
.doctorPage .recordBadges { margin-top: 3px; gap: 4px; }
.doctorPage .recordBadge { min-height: 23px; padding: 4px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1.25; }
.recordsEmpty { padding: 24px 8px 30px; text-align: center; }
.recordsEmpty strong { color: #405a73; font-size: 13px; font-weight: 600; }
.recordsEmpty p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.doctorPage .detailPanel { min-width: 0; min-height: 560px; padding: 24px; container: doctor-detail / inline-size; }
.doctorPage .detailPanel:has(#emptyDetail:not([hidden])) { padding: 0; }
.doctorPage .emptyDetail { display: flex; flex-direction: column; min-height: 455px; padding: 0; border: 0; border-radius: 14px; background: radial-gradient(ellipse at 50% 45%, #f1f7f6, transparent 65%), #fff; }
.emptyDetailHeading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 24px; border-bottom: 1px solid #e9eef3; color: #566e85; text-align: left; font-size: 12px; }
.emptyDetailHeading span:last-child { color: #5f7285; font-size: 11px; }
.emptyDetailContent { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 35px 28px 48px; }
.emptyDetailIcon { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 20px; border: 1px solid #d9e7e6; border-radius: 20px; background: linear-gradient(145deg, #fff, #e9f3f1); color: #567c89; box-shadow: 0 8px 20px rgb(54 92 96 / 5%); }
.emptyDetailIcon svg { width: 42px; height: 42px; }
.doctorPage .emptyDetail h2 { margin: 4px 0 12px; color: #234560; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 400; letter-spacing: -.025em; }
.doctorPage .emptyDetail .muted { max-width: 420px; margin: 0; font-size: 14px; line-height: 1.7; }
.doctorPage .feedbackInbox, .doctorPage .statsPanel { margin: 0; padding: 18px 16px; }
.doctorPage .feedbackInboxHead, .doctorPage .statsHead { gap: 10px; }
.doctorPage .feedbackInboxHead h3, .doctorPage .statsHead h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.doctorPage .statsHead { flex-wrap: wrap; }
.doctorPage .statsHeadActions { gap: 8px; flex-wrap: wrap; }
.doctorPage .statsDateLabel { font-size: 10px; }
.doctorPage .statHero { padding: 16px; border: 1px solid #e0e8ef; border-radius: 7px; background: #f5f8fc; box-shadow: none; }
.doctorPage .statHero::before { display: none; }
.doctorPage .statHero strong { font-size: 34px; font-weight: 600; }
.doctorPage .statTile { border-radius: 6px; box-shadow: none; }
.doctorPage .statTile strong { font-size: 22px; font-weight: 600; }
.doctorPage .statMetric:hover, .doctorPage .statMetric:focus-visible { transform: none; box-shadow: none; }
.doctorPage .feedbackItem { border-radius: 6px; box-shadow: none; background: #fff; }
.doctorPage .feedbackItem strong { font-weight: 600; }
.doctorPage .feedbackItem.active { background: #eef4fa; border-color: #9bb6d0; }
.doctorPage .demoModeBanner { gap: 3px; padding: 11px 16px; border: 1px solid #e3d5b4; border-left: 3px solid #b08a40; border-radius: 7px; background: #fffbf2; box-shadow: none; font-size: 12px; }
.doctorPage .demoModeBanner strong { font-size: 13px; font-weight: 600; }
.doctorPage #recordDetail { min-width: 0; }
.doctorPage .doctorPatientHero { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px 16px; margin: -1px 0 16px; padding: 0 0 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.doctorPage .doctorPatientHero::before { display: none; }
.doctorPage .doctorPatientHero h2 { margin: 7px 0 0; font-size: clamp(22px, 1.8vw, 27px); font-weight: 600; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.doctorPage .doctorPatientHero .sectionKicker { margin: 0; color: #427b82; font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: .11em; }
.patientCardIdentity { min-width: 0; }
.patientCardMetadata { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.doctorPage .doctorPatientHero .internalNumberLine { min-height: 0; margin: 0; padding: 2px 7px; border: 1px solid #e1e9ed; border-radius: 5px; background: #f7f9fb; color: #4d677b; font-size: 11px; font-weight: 600; line-height: 1.5; letter-spacing: .025em; }
.patientCardCreatedAt { display: inline-flex; align-items: center; gap: 6px; color: #6a7f8e; font-size: 11px; line-height: 1.5; }
.patientCardCreatedAt svg { width: 14px; height: 14px; flex: 0 0 auto; color: #7a929f; }
.doctorPage .doctorPatientHero .patientCardDelete { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 34px; min-height: 34px; margin: 0; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; box-shadow: none; color: #8a6468; font: inherit; font-size: 11px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.patientCardDelete svg { width: 15px; height: 15px; flex: 0 0 auto; }
.doctorPage .doctorPatientHero .patientCardDelete:hover:not(:disabled) { border-color: #e5c8cc; background: #fcf3f4; color: #a13e49; transform: none; }
.doctorPage .doctorPatientHero .patientCardDelete:disabled { opacity: .48; }
.doctorPage .doctorPatientHero .patientDocumentActions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 7px; min-width: 0; padding: 7px; border: 1px solid #e2e9ed; border-radius: 10px; background: linear-gradient(115deg, #f4f8fa, #f8fbfb); }
.doctorPage .patientDocumentActions .patientDocumentButton { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 0; min-height: 36px; margin: 0; padding: 7px 11px; border: 1px solid #d6e1e6; border-radius: 7px; background: #fff; color: #355b70; box-shadow: 0 1px 2px rgb(30 60 77 / 3%); font: inherit; font-size: 12px; font-weight: 500; line-height: 20px; text-align: center; text-decoration: none; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.patientDocumentButton > svg { width: 16px; height: 16px; flex: 0 0 auto; color: #6c8b9a; }
.patientDocumentLabel { min-width: 0; }
.patientDocumentFormat { flex: 0 0 auto; padding: 0 5px; border: 1px solid #e1e8ec; border-radius: 4px; background: #f5f8fa; color: #69808f; font-size: 9px; font-weight: 600; line-height: 17px; letter-spacing: .025em; }
.doctorPage .patientDocumentActions .patientDocumentPrimary { border-color: #285d73; background: linear-gradient(115deg, #234c69, #2c7179); color: #fff; box-shadow: 0 2px 5px rgb(31 79 94 / 12%), inset 0 1px 0 rgb(255 255 255 / 11%); }
.patientDocumentPrimary > svg { color: #d7eaed; }
.patientDocumentPrimary .patientDocumentFormat { border-color: rgb(255 255 255 / 18%); background: rgb(255 255 255 / 10%); color: #edf6f8; }
.doctorPage .patientDocumentActions .patientDocumentButton:hover { border-color: #9ebcc8; background: #f1f7f9; box-shadow: 0 2px 5px rgb(30 60 77 / 7%); transform: none; }
.doctorPage .patientDocumentActions .patientDocumentPrimary:hover { border-color: #214f66; background: linear-gradient(115deg, #1b405c, #25636c); color: #fff; }
.patientTemplateActions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-width: 0; margin-left: 3px; padding-left: 10px; border-left: 1px solid #dce6eb; }
.patientTemplateCaption { margin-right: 2px; color: #7a8c98; font-size: 10px; font-weight: 500; }
.doctorPage .patientDocumentActions .patientTemplateButton { gap: 6px; padding-right: 9px; padding-left: 9px; background: transparent; box-shadow: none; color: #536c7d; }
.doctorPage .smallDownload, .doctorPage .dangerButton, .doctorPage .ghostButton, .doctorPage .miniGhostButton { min-height: 36px; border-radius: 6px; box-shadow: none; font-family: inherit; font-weight: 600; line-height: 1.4; transition: background .15s, border-color .15s; }
.doctorPage .smallDownload { padding: 8px 10px; border: 1px solid #cbdbe9; background: #f5f8fc; color: var(--blue); font-size: 12px; }
.doctorPage .passportDownload { border-color: var(--blue); background: var(--blue); color: #fff; }
.doctorPage .emiasDownload { border-color: #d8e1e9; color: #486179; background: #fff; }
.doctorPage .dangerButton { border: 1px solid #ecd5d5; background: #fff8f8; color: #9d3333; padding: 8px 10px; font-size: 12px; }
.doctorPage .smallDownload:hover, .doctorPage .ghostButton:hover, .doctorPage .miniGhostButton:hover { transform: none; box-shadow: none; filter: none; background: #eaf1f8; }
.doctorPage .passportDownload:hover { background: #123c68; }
.doctorPage .dangerButton:hover { background: #fcecec; transform: none; }
.doctorPage .patientStatusStrip { grid-column: 1 / -1; gap: 5px; padding-top: 0; }
.doctorPage .statusChip { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 4px 8px; font-size: 11px; font-weight: 500; line-height: 17px; border-radius: 6px; text-align: left; }
.doctorPage .statusChip::before { content: ""; flex: 0 0 auto; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.doctorPage .statusChip:hover { transform: none; box-shadow: none; border-color: currentColor; }
.doctorPage .doctorSectionMap { top: 10px; z-index: 9; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 3px 8px rgb(26 48 72 / 4%); backdrop-filter: none; }
.doctorPage .mapChip { min-height: 34px; padding: 7px 10px; border: 1px solid var(--chip-line, #d8e3ed); border-radius: 7px; background: var(--chip-bg, #f5f8fb); color: var(--chip-color, #48647e); font-size: 12px; font-weight: 600; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.doctorPage .mapChip.chip-form { --chip-color: #166c67; }
.doctorPage .mapChip.chip-bioage { --chip-color: #327044; }
.doctorPage .mapChip.chip-stage2 { --chip-color: #a33f49; }
.doctorPage .mapChip.chip-conclusion { --chip-bg: #f3f0fa; --chip-line: #ded5ed; --chip-color: #66507e; }
.doctorPage .mapChip:hover, .doctorPage .mapChip[aria-current="location"] { border-color: var(--chip-color, #194c80); background: var(--chip-bg, #edf3f9); background: color-mix(in srgb, var(--chip-color, #194c80) 9%, var(--chip-bg, #edf3f9)); color: var(--chip-color, #194c80); transform: none; box-shadow: none; }
.doctorPage .mapChip[aria-current="location"] { box-shadow: inset 0 0 0 1px var(--chip-line, #d8e3ed); }
.doctorPage .doctorSection { margin-top: 20px; padding: 20px; border: 1px solid var(--section-line); border-left-width: 3px; border-radius: 8px; background: #fff; box-shadow: none; scroll-margin-top: 130px; }
.doctorPage .doctorSectionTitle { gap: 13px; margin-bottom: 18px; }
.doctorPage .doctorSectionTitle > span { width: 34px; height: 34px; border: 1px solid var(--section-line); border-radius: 7px; background: var(--section-soft); color: var(--section-accent); box-shadow: none; font-size: 12px; font-weight: 600; }
.doctorPage .doctorSectionTitle h3 { color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.4; }
.doctorPage .doctorSectionTitle p { font-size: 12px; line-height: 1.5; }
.doctorPage .doctorActionPanel { padding: 16px; border: 1px solid var(--line); border-left: 3px solid #54849a; border-radius: 7px; background: #f8fafc; box-shadow: none; }
.doctorPage .doctorActionHead strong { font-size: 16px; font-weight: 600; }
.doctorPage .doctorActionHead span { font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.doctorPage .doctorActionItem { min-height: 68px; border-left-width: 3px; border-radius: 6px; font-family: inherit; box-shadow: none; }
.doctorPage .doctorActionItem:hover, .doctorPage .doctorActionItem:focus-visible { transform: none; box-shadow: none; }
.doctorPage .doctorActionItem strong { font-size: 13px; font-weight: 600; }
.doctorPage .doctorActionItem span { font-size: 12px; }
.doctorPage .visitQuickPanel { margin-top: 0; padding: 15px 16px; background: #f8fafc; border-color: var(--line); }
.doctorPage .clinicalForm { gap: 16px; }
.doctorPage .clinicalForm .baseGroup { padding: 18px; border: 1px solid #e2e8ef; border-radius: 7px; background: #fff; }
.doctorPage .clinicalForm .baseGroup h3 { min-height: 0; padding: 0; margin: 0 0 18px; border-radius: 0; background: transparent; color: #37566e; font-size: 15px; font-weight: 600; }
.doctorPage .clinicalForm .clinicalCollapsedGroup { padding: 0; }
.doctorPage .clinicalForm .clinicalCollapsedGroup .baseGrid { padding: 0 18px 18px; }
.doctorPage .baseGrid { gap: 18px 20px; }
.doctorPage .clinicalFieldLabel, .doctorPage .baseGrid label { color: #4c6377; font-size: 13px; font-weight: 500; line-height: 1.5; }
.doctorPage :is(.clinicalForm, .rawAssessmentForm, .visitQuickPanel) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { min-width: 0; min-height: 42px; border: 1px solid #d4dfe9; border-radius: 6px; background: #fff; color: var(--ink); padding: 10px 12px; font-family: inherit; font-size: 14px; box-shadow: none; }
.doctorPage .calculatedClinicalField input[readonly] { background: #f0f6f7; color: #2a6169; font-weight: 600; }

/* Keep the Mini-Cog score and document actions together without a tall card. */
.doctorPage .miniCogCard { display: block; min-width: 0; padding: 14px 16px; border: 1px solid #d4e4e8; border-radius: 12px; background: linear-gradient(120deg, #f3f9fa, #fff 78%); box-shadow: 0 2px 6px rgb(37 76 91 / 3%); container: mini-cog / inline-size; }
.doctorPage .miniCogHeading { align-items: center; gap: 8px; font-size: 15px; line-height: 1.4; }
.doctorPage .miniCogHeading strong { font-weight: 600; }
.doctorPage .miniCogHeading .normTooltip { margin-top: 0; }
.doctorPage .miniCogDescription { margin: 3px 0 12px; font-size: 12px; line-height: 1.5; }
.doctorPage .miniCogControls { align-items: center; gap: 10px 16px; }
.doctorPage .miniCogScore { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; min-width: 0; }
.doctorPage .miniCogScore label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; white-space: nowrap; }
.doctorPage .miniCogScore label span { font-size: 11px; white-space: nowrap; }
.doctorPage .clinicalForm .miniCogCard .miniCogScore select { width: 124px; height: 36px; min-height: 36px; padding: 6px 10px; border-color: #cbdde3; border-radius: 8px; font-size: 13px; line-height: 20px; }
.doctorPage .miniCogActions { flex: 0 1 auto; gap: 8px; margin-left: auto; padding: 0; }
.doctorPage .miniCogDocumentLink { flex: 0 0 auto; gap: 7px; min-height: 36px; padding: 7px 11px; border-color: #d0e0e5; border-radius: 8px; font-size: 12px; line-height: 20px; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.doctorPage .miniCogDocumentLink:first-child { background: #e8f3f4; border-color: #c8dfe2; color: #245c68; }
.doctorPage .miniCogDocumentLink:hover { background: #e8f2f4; border-color: #9abfc8; box-shadow: 0 2px 5px rgb(31 79 95 / 7%); }
.doctorPage .miniCogDocumentLink:first-child:hover { background: #dceef0; }
.doctorPage .miniCogDocumentNote { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2ecef; font-size: 11px; line-height: 1.5; }

@container mini-cog (max-width: 560px) {
  .doctorPage .miniCogScore { display: grid; grid-template-columns: minmax(0, 1fr) 124px; flex: 1 1 100%; }
  .doctorPage .miniCogScore label { white-space: normal; }
  .doctorPage .miniCogActions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1 1 100%; margin-left: 0; }
  .doctorPage .miniCogDocumentLink { min-width: 0; text-align: center; }
}

@container mini-cog (max-width: 230px) {
  .doctorPage .miniCogScore, .doctorPage .miniCogActions { grid-template-columns: minmax(0, 1fr); }
  .doctorPage .miniCogScore label { justify-content: space-between; }
  .doctorPage .clinicalForm .miniCogCard .miniCogScore select { width: 100%; }
}

@media (max-width: 760px) {
  .doctorPage .miniCogCard { padding: 12px; }
  .doctorPage .miniCogHeading { align-items: flex-start; font-size: 14px; }
  .doctorPage .miniCogDescription { margin-bottom: 10px; }
  .doctorPage .clinicalForm .miniCogCard .miniCogScore select { height: 44px; min-height: 44px; padding-top: 10px; padding-bottom: 10px; font-size: 16px; }
  .doctorPage .miniCogDocumentLink { min-height: 44px; padding: 7px 8px; line-height: 18px; }
}

.doctorPage .primary { min-height: 42px; padding: 11px 18px; border-radius: 6px; font-family: inherit; font-size: 14px; font-weight: 600; box-shadow: none; }
.doctorPage .curtainSection { padding: 0; }
.doctorPage .curtainSection summary { padding: 17px 18px; font-weight: 600; }
.doctorPage .curtainSection summary:hover, .doctorPage .curtainSection summary:focus-visible { background: #f6f9fc; }
.doctorPage .curtainBody { padding: 18px; }
.doctorPage .bioCard { border-radius: 7px; box-shadow: none; }
.doctorPage .bioCard strong { font-weight: 600; }
.doctorPage .doctorScale { box-shadow: none; }
.doctorPage .miniGhostButton { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.doctorPage .doctorLayout.loginOnly { min-height: calc(100svh - 198px); padding: 30px 20px 44px; }
.doctorPage .doctorLayout.loginOnly .doctorLogin { position: relative; overflow: hidden; width: min(440px, 100%); padding: 30px 36px; border: 1px solid #dce6e8; border-radius: 18px; box-shadow: 0 14px 48px rgb(27 52 81 / 7%); }
.doctorPage .doctorLogin::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #315b7c, #69a5a7, #c4d3bc); }
.doctorPage .loginIdentity { margin-bottom: 22px; padding-bottom: 22px; border-bottom-color: #e7edef; }
.doctorPage .loginIdentity img { width: 230px; }
.doctorPage .doctorLogin h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 400; letter-spacing: -.035em; }
.doctorPage .loginDescription { margin: 10px 0 24px; color: #627a87; font-size: 12px; line-height: 1.6; text-align: center; }
.doctorPage .loginForm label { font-size: 13px; font-weight: 500; }
.doctorPage .loginForm input { min-height: 46px; border-color: #d7e2e6; border-radius: 8px; font-family: inherit; font-size: 15px; background: #fbfcfd; }
.doctorPage .loginForm .primary { border: 1px solid #285670; border-radius: 8px; background: linear-gradient(110deg, #234e70, #2d747a); box-shadow: 0 4px 12px rgb(30 80 98 / 12%); }
.doctorPage .loginForm .primary:hover { background: linear-gradient(110deg, #1b415e, #25636a); }
.doctorPage .loginHelpButton { display: block; margin: 18px auto 0; }
.doctorPage .loginHelpContacts { margin-top: 14px; background: #f5f8fc; font-size: 13px; }
.doctorPage:has(.doctorLayout.loginOnly) .cabinetProgramBrand { display: none; }
.doctorPage .scrollTopButton { width: 44px; height: 44px; right: 20px; bottom: 20px; border: 1px solid #28547b; background: #28547b; color: #fff; box-shadow: 0 3px 12px rgb(24 48 75 / 12%); }
.doctorPage :is(button, a, summary):focus-visible { outline: 3px solid #608fb8; outline-offset: 3px; transform: none; box-shadow: none; }
.doctorPage :is(input, select, textarea):focus { outline: 3px solid rgb(45 113 171 / 16%); outline-offset: 0; border-color: #507da6; }
.doctorPage :is(button, input, select, textarea):disabled { cursor: not-allowed; opacity: .6; }
.mobileBackButton { display: none; }

/* Keep longitudinal history available behind a compact, keyboard-accessible curtain. */
.doctorPage .visitHistory.visitHistoryCurtain { margin: 16px 0; padding: 0; border: 1px solid #dce7e9; border-radius: 12px; background: linear-gradient(115deg, #fbfdfd, #f6fafb); }
.visitHistorySummary { display: block; padding: 14px 16px; border-radius: 11px; cursor: pointer; list-style: none; user-select: none; }
.visitHistorySummary::-webkit-details-marker { display: none; }
.visitHistorySummary::marker { content: ""; }
.visitHistorySummary h3 { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; color: #2c5062; font-size: 16px; font-weight: 600; line-height: 1.4; }
.visitHistorySummaryLabel { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.visitHistorySummaryLabel > svg { width: 20px; height: 20px; flex: 0 0 auto; color: #678e98; }
.visitHistorySummaryMeta { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.doctorPage .visitHistorySummary .visitCount { padding: 3px 9px; border: 1px solid #dce8e9; border-radius: 6px; background: #edf5f5; color: #50747e; font-size: 11px; font-weight: 500; line-height: 1.6; }
.visitHistoryChevron { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #edf4f5; color: #60828f; }
.visitHistoryChevron svg { width: 16px; height: 16px; transition: transform .18s ease; }
.visitHistorySummary:hover { background: #eff6f7; }
.visitHistoryCurtain[open] > .visitHistorySummary { border-bottom: 1px solid #e1eaed; border-bottom-right-radius: 0; border-bottom-left-radius: 0; background: #f5f9fa; }
.visitHistoryCurtain[open] .visitHistoryChevron svg { transform: rotate(180deg); }
.visitHistoryBody { padding: 18px; border-bottom-right-radius: 11px; border-bottom-left-radius: 11px; background: #fff; }

/* Adapt medical grids to the space left by the patient list, including tablets. */
@container doctor-detail (max-width: 800px) {
  .doctorPage .smartSupportGrid, .doctorPage .stage2LabRow { grid-template-columns: minmax(0, 1fr); }
  .doctorPage .smartSupportGrid > *, .doctorPage .stage2SelectedPackage { min-width: 0; }
  .doctorPage .carePlanGrid, .doctorPage .mechanismGrid, .doctorPage .stage2Criteria, .doctorPage .stage2PackagePicker { grid-template-columns: minmax(0, 1fr); }
}

@container doctor-detail (max-width: 540px) {
  .visitHistorySummary { padding: 12px; }
  .visitHistorySummary h3 { gap: 10px; font-size: 15px; }
  .visitHistorySummaryLabel { gap: 8px; }
  .visitHistorySummaryMeta { gap: 7px; }
  .visitHistoryBody { padding: 14px 12px; }
  .doctorPage .visitQuickControls { grid-template-columns: minmax(0, 1fr); }
  .doctorPage .doctorPatientHero .patientDocumentActions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 6px; }
  .doctorPage .patientDocumentActions .patientDocumentButton { min-height: 42px; padding: 7px 8px; gap: 6px; line-height: 17px; }
  .patientDocumentActions > .patientDocumentButton > svg { display: none; }
  .patientTemplateActions { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
  .patientTemplateCaption { display: none; }
  .doctorPage .patientDocumentActions .patientTemplateButton { flex: 1 1 0; min-height: 34px; }
  .doctorPage .doctorPatientHero .patientCardDelete { width: 34px; padding: 7px; }
  .patientCardDelete > span { display: none; }
  .doctorPage .clinicalForm .baseGrid, .doctorPage .clinicalForm .baseGrid:has(.gripMetricField) { grid-template-columns: minmax(0, 1fr); }
  .doctorPage .clinicalForm .baseGrid:has(.gripMetricField) .dominantHandField { max-width: none; }
}

@media (min-width: 1600px) {
  .doctorPage .doctorCabinet { grid-template-columns: 360px minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 1240px) {
  .doctorPage .doctorCabinet { grid-template-columns: 320px minmax(0, 1fr); gap: 18px; }
  .doctorPage .detailPanel { padding: 20px; }
  .doctorPage .doctorActionList { grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .doctorPage .doctorSidebar { position: sticky; max-height: calc(100vh - 40px); overflow: auto; }
  .doctorPage .clinicalForm .baseGrid:has(.gripMetricField) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doctorPage .clinicalForm .baseGrid:has(.gripMetricField) .dominantHandField { max-width: none; }
  .doctorPage .baseGrid, .doctorPage .kvGrid, .doctorPage .bioCard, .doctorPage .careGrid, .doctorPage .qrGrid { grid-template-columns: 1fr; }
  .doctorPage .wideField { grid-column: 1 / -1; }
}

@media (max-width: 960px) and (min-width: 761px) {
  .doctorPage .mastheadInner { gap: 24px; }
  .doctorPage .institutionBrand { gap: 16px; }
  .doctorPage .hospitalEmblem { flex-basis: 90px; height: 76px; }
  .doctorPage .cabinetProgramBrand { padding: 12px 14px; }
  .doctorPage .cabinetProgramLogo { width: 190px; }
  .doctorPage .doctorAccountIdentity { flex-basis: 285px; }
  .doctorPage .doctorAccountIdentity strong { font-size: 17px; }
  .doctorPage .doctorLayout { padding-right: 20px; padding-left: 20px; }
  .doctorPage .doctorCabinet { grid-template-columns: 292px minmax(0, 1fr); gap: 16px; }
  .doctorPage .doctorSection { padding: 15px; }
  .doctorPage .curtainSection { padding: 0; }
  .doctorPage .clinicalForm .baseGrid:has(.gripMetricField) { grid-template-columns: 1fr; }
  .doctorPage .doctorSectionTitle { align-items: flex-start; }
  .doctorPage .doctorSectionTitle h3 { font-size: 16px; }
}

@media (max-width: 760px) {
  .doctorPage .mastheadInner { gap: 16px; min-height: 116px; padding: 20px 18px; }
  .doctorPage .institutionBrand { gap: 16px; }
  .doctorPage .hospitalEmblem { flex-basis: 78px; height: 64px; padding: 9px 7px; border-radius: 12px; }
  .doctorPage .institutionType { font-size: 9px; letter-spacing: .025em; }
  .doctorPage .institutionName { font-size: 16px; }
  .doctorPage .cabinetProgramBrand { display: none; }
  .doctorPage .brandNavigationInner { padding: 8px 18px; gap: 12px; }
  .doctorPage .departmentName { max-width: 240px; font-size: 11px; }
  .cabinetNavigationActions { gap: 10px; }
  .doctorPage .cabinetLink { min-height: 34px; padding: 6px 9px; font-size: 11px; gap: 7px; }
  .doctorPage .cabinetLogout { min-height: 34px; font-size: 11px; }
  .cabinetLogout svg { display: none; }
  .doctorPage .cabinetContextHeader { flex-wrap: wrap; align-items: flex-start; gap: 17px; padding: 22px 18px 20px; }
  .doctorPage .cabinetContextHeader h1 { font-size: 29px; }
  .doctorPage .cabinetContextHeader .subtitle { max-width: 440px; font-size: 12px; }
  .doctorPage .doctorAccountIdentity { flex: 1 1 100%; max-width: none; gap: 3px; padding: 0 0 0 13px; }
  .doctorPage .doctorAccountIdentity span { max-width: none; font-size: 10px; }
  .doctorPage .doctorAccountIdentity strong { font-size: 17px; }
  .doctorPage .doctorLayout { padding: 0 16px 28px; }
  .doctorPage .doctorCabinet { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .doctorPage .doctorSidebar { position: static; max-height: none; overflow: visible; padding: 0; }
  .doctorPage .recordsPanel { padding: 20px 18px 12px; }
  .doctorPage .recordItem .recordPatientName { font-size: 15px; }
  .doctorPage .recordItem span { font-size: 12px; }
  .doctorPage .recordFilter { min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .doctorPage .searchBox input { min-height: 44px; font-size: 13px; }
  .doctorPage .recordsList { max-height: 56vh; }
  .doctorPage .feedbackInboxHead h3, .doctorPage .statsHead h3 { font-size: 18px; }
  .doctorPage .detailPanel { min-height: 0; padding: 16px; }
  .doctorPage:not(.hasSelectedPatient) .detailPanel { display: none; }
  .doctorPage.hasSelectedPatient .doctorSidebar { display: none; }
  .doctorPage.hasSelectedPatient .mobileBackButton { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; margin: 0 0 20px; padding: 8px 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .mobileBackButton svg { width: 18px; height: 18px; }
  .doctorPage .doctorPatientHero { margin-top: 0; padding-bottom: 14px; gap: 12px; }
  .doctorPage .doctorPatientHero h2 { font-size: 23px; }
  .doctorPage .doctorSectionMap { position: static; padding: 6px; gap: 4px; box-shadow: none; }
  .doctorPage .mapChip { min-height: 38px; padding: 8px; font-size: 12px; }
  .doctorPage .doctorSection { margin-top: 16px; padding: 16px; scroll-margin-top: 16px; }
  .doctorPage .doctorSectionTitle { align-items: flex-start; gap: 10px; }
  .doctorPage .doctorSectionTitle h3 { font-size: 17px; }
  .doctorPage .doctorSectionTitle > span { flex: 0 0 30px; width: 30px; height: 30px; }
  .doctorPage .clinicalForm .baseGroup { padding: 14px; }
  .doctorPage .clinicalForm .clinicalCollapsedGroup, .doctorPage .curtainSection { padding: 0; }
  .doctorPage .baseGrid, .doctorPage .clinicalForm .baseGrid:has(.gripMetricField) { grid-template-columns: 1fr; }
  .doctorPage .clinicalForm .baseGrid:has(.gripMetricField) .dominantHandField { max-width: none; }
  .doctorPage :is(.clinicalForm, .rawAssessmentForm, .visitQuickPanel) :is(input, select, textarea), .doctorPage .loginForm input { font-size: 16px; }
  .doctorPage .curtainBody { padding: 14px; }
  .doctorPage .doctorLayout.loginOnly { padding: 28px 16px 40px; }
  .doctorPage .doctorLayout.loginOnly .doctorLogin { padding: 28px 24px; }
}

@media (max-width: 420px) {
  .doctorPage .mastheadInner { min-height: 108px; padding: 18px 16px; }
  .doctorPage .institutionBrand { gap: 13px; }
  .doctorPage .hospitalEmblem { flex-basis: 65px; height: 57px; padding: 8px 5px; }
  .doctorPage .institutionName { font-size: 14px; }
  .doctorPage .institutionType { margin-bottom: 5px; font-size: 8px; }
  .doctorPage .brandNavigationInner { padding: 8px 16px; flex-wrap: wrap; gap: 6px; }
  .doctorPage .departmentName { max-width: none; flex: 1 1 100%; }
  .cabinetNavigationActions { width: 100%; justify-content: space-between; }
  .doctorPage .cabinetContextHeader h1 { font-size: 28px; }
  .doctorPage .doctorLayout { padding-left: 12px; padding-right: 12px; }
  .doctorPage .detailPanel { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .doctorPage *, .doctorPage *::before, .doctorPage *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Patient-card density: match the reviewed Mini-Cog surface and spacing. */
.doctorPage #recordDetail { --card-surface: linear-gradient(120deg, #f3f9fa, #fff 78%); --card-border: #d4e4e8; --card-radius: 12px; }
.doctorPage #recordDetail .doctorSection { margin-top: 14px; padding: 14px 16px; border-radius: var(--card-radius); box-shadow: 0 2px 6px rgb(37 76 91 / 3%); }
.doctorPage #recordDetail .doctorSectionTitle { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
.doctorPage #recordDetail .doctorSectionTitle > span { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.doctorPage #recordDetail .doctorSectionTitle h3 { font-size: 16px; line-height: 1.4; }
.doctorPage #recordDetail .doctorSectionTitle p { margin-top: 2px; }
.doctorPage #recordDetail .curtainSection { padding: 0; }
.doctorPage #recordDetail .curtainSection > summary { min-height: 44px; padding: 10px 14px; gap: 10px; background: var(--card-surface); }
.doctorPage #recordDetail .curtainSection > summary > span { font-size: 14px; font-weight: 600; }
.doctorPage #recordDetail .curtainSection > summary > small { font-size: 11px; font-weight: 500; text-transform: none; }
.doctorPage #recordDetail .curtainSection > summary::after { width: 24px; height: 24px; border-radius: 7px; font-size: 16px; }
.doctorPage #recordDetail .curtainBody { padding: 12px 14px; }
.doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm) { gap: 12px; }
.doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm) > .baseGroup { margin-top: 0; padding: 14px 16px; border: 1px solid var(--card-border); border-radius: var(--card-radius); background: var(--card-surface); }
.doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm) .baseGroup h3 { min-height: 0; margin: 0 0 12px; padding: 0; background: transparent; border-radius: 0; font-size: 14px; font-weight: 600; color: #2e5c6c; }
.doctorPage #recordDetail .clinicalForm > .clinicalCollapsedGroup { padding: 0; }
.doctorPage #recordDetail .clinicalCollapsedGroup > summary { min-height: 44px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.doctorPage #recordDetail .clinicalForm .clinicalCollapsedGroup .baseGrid { padding: 12px 14px; }
.doctorPage #recordDetail .baseGrid { gap: 12px 14px; align-items: start; }
.doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm) .baseGrid:not(:has(.gripMetricField)) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.doctorPage #recordDetail .clinicalField:not(.miniCogCard) { align-content: start; gap: 6px; }
.doctorPage #recordDetail .fieldLabelRow { min-width: 0; }
.doctorPage #recordDetail .clinicalSubheading { margin-top: 4px; padding-top: 8px; font-size: 13px; }
.doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm, .visitQuickPanel, .stage2LabRow) :is(input:not([type="checkbox"]):not([type="radio"]), select) { height: 38px; min-height: 38px; padding: 7px 10px; border-radius: 8px; font-size: 14px; }
.doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm) textarea { min-height: 76px; padding: 9px 10px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.doctorPage #recordDetail .clinicalForm .miniCogCard .miniCogScore select { height: 36px; min-height: 36px; padding: 6px 10px; font-size: 13px; }
.doctorPage #recordDetail .autoSourceNote { padding: 5px 7px; border-radius: 7px; font-size: 11px; line-height: 1.4; }
.doctorPage #recordDetail .functionalFeedbackLegend { margin: -2px 0 0; }
.doctorPage #recordDetail .functionalTestControl[data-functional-state="normal"] { background: #f0f8f3; border-color: #b4d3be; box-shadow: inset 3px 0 0 #85b297; }
.doctorPage #recordDetail .functionalTestControl:is([data-functional-state="abnormal"], [data-functional-state="invalid"]) { background: #fff3f2; border-color: #e2bcb7; box-shadow: inset 3px 0 0 #cd938c; }
.doctorPage #recordDetail .functionalTestControl[readonly]:is([data-functional-state="neutral"], [data-functional-state=""]) { background: #f5f7f9; }
.doctorPage #recordDetail .bmiCard { --bmi-ink: #5f7280; --bmi-soft: #f4f8f9; --bmi-line: #d8e4e7; padding: 9px 11px; border: 1px solid var(--bmi-line); border-left: 3px solid var(--bmi-line); border-radius: 9px; background: var(--bmi-soft); }
.doctorPage #recordDetail .bmiCard :is(span, strong, small, em) { color: var(--bmi-ink); }
.doctorPage #recordDetail .bmi-underweight { --bmi-ink: #626e25; --bmi-soft: #f3f6e8; --bmi-line: #d3ddb2; }
.doctorPage #recordDetail .bmi-normal { --bmi-ink: #2d6540; --bmi-soft: #eef8f1; --bmi-line: #bbd8c5; }
.doctorPage #recordDetail .bmi-overweight { --bmi-ink: #875d1d; --bmi-soft: #fff6e8; --bmi-line: #ead3a9; }
.doctorPage #recordDetail .bmi-obesity1 { --bmi-ink: #965227; --bmi-soft: #fff2e8; --bmi-line: #edc9ae; }
.doctorPage #recordDetail .bmi-obesity2 { --bmi-ink: #a44730; --bmi-soft: #fff0eb; --bmi-line: #e9beb2; }
.doctorPage #recordDetail .bmi-obesity3 { --bmi-ink: #a03945; --bmi-soft: #fdf0f2; --bmi-line: #e5bac1; }
.doctorPage #recordDetail .clinicalForm > .primary, .doctorPage #recordDetail .rawAssessmentForm > .primary { justify-self: start; }
.doctorPage #recordDetail :is(.primary, .secondary, .primaryButton, .secondaryButton, .ghostButton, .smallDownload, .smallAction) { min-height: 36px; padding: 7px 12px; border-radius: 8px; font-size: 12px; line-height: 20px; box-shadow: none; }
.doctorPage #recordDetail :is(.primary, .primaryButton) { border: 1px solid #285d73; background: linear-gradient(115deg, #234c69, #2c7179); color: #fff; }
.doctorPage #recordDetail :is(.primary, .primaryButton):hover:not(:disabled) { background: linear-gradient(115deg, #1b405c, #25636c); }
.doctorPage #recordDetail :is(.secondary, .secondaryButton, .ghostButton):not(.passportDownload) { border-color: #cbdfe3; background: #edf5f6; color: #285e6c; }
.doctorPage #recordDetail :is(.secondary, .secondaryButton, .ghostButton):hover:not(:disabled) { background: #deedf0; }
.doctorPage #recordDetail :is(.savedDoctorSignature, .currentDoctorSignature) { gap: 2px; margin: 8px 0; padding: 9px 12px; border-radius: 8px; }
.doctorPage #recordDetail :is(.savedDoctorSignature, .currentDoctorSignature) strong { font-size: 14px; }
.doctorPage #recordDetail :is(.savedDoctorSignature, .currentDoctorSignature) span { font-size: 11px; }
.doctorPage #recordDetail .visitQuickPanel { margin-top: 0; background: var(--card-surface); }
.doctorPage #recordDetail .visitQuickText h3 { margin: 2px 0; font-size: 15px; }
.doctorPage #recordDetail .visitQuickText p:not(.sectionKicker) { margin: 3px 0 0; font-size: 12px; }
.doctorPage #recordDetail .visitQuickControls { gap: 8px; }
.doctorPage #recordDetail .visitHistoryBody { padding: 12px 14px; }
.doctorPage #recordDetail .currentVisitSummary { gap: 12px; padding: 12px 14px; border-radius: var(--card-radius); }
.doctorPage #recordDetail .visitTimeline > li { padding: 12px 14px; border-radius: var(--card-radius); }
.doctorPage #recordDetail .visitTimelineDate { font-size: 15px; }
.doctorPage #recordDetail .visitTabs { margin: 0 0 12px; padding: 4px; }
.doctorPage #recordDetail .visitTabs button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.doctorPage #recordDetail .smartSupportGrid { gap: 10px; margin: 12px 0; padding: 10px; border-radius: var(--card-radius); }
.doctorPage #recordDetail .smartCard { gap: 6px; padding: 11px 12px; border-radius: 10px; border-left-width: 3px; }
.doctorPage #recordDetail .smartCardHead > span { font-size: 11px; font-weight: 600; text-transform: none; }
.doctorPage #recordDetail .eligibilityCheck { min-height: 32px; padding: 5px 6px; }
.doctorPage #recordDetail .eligibilityCheck input[type="checkbox"] { min-height: 16px; }
.doctorPage #recordDetail .missingTableRow { padding-top: 7px; padding-bottom: 7px; }
.doctorPage #recordDetail .doctorActionPanel { margin-top: 12px; padding: 12px 14px; border-radius: var(--card-radius); }
.doctorPage #recordDetail .doctorActionItem { min-height: 56px; padding: 9px 10px; border-radius: 8px; }
.doctorPage #recordDetail .section-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doctorPage #recordDetail .section-results > :not(.doctorScale) { grid-column: 1 / -1; }
.doctorPage #recordDetail .section-results .doctorSectionTitle { margin-bottom: 2px; }
.doctorPage #recordDetail .doctorScale { min-width: 0; margin: 0; padding: 10px 12px; border-color: var(--card-border); border-radius: 10px; background: var(--card-surface); }
.doctorPage #recordDetail .scaleHeader { align-items: start; gap: 10px; font-size: 13px; line-height: 1.4; }
.doctorPage #recordDetail .scaleHeader > span:first-child { min-width: 0; }
.doctorPage #recordDetail .scaleHeader > span:last-child { flex: 0 0 auto; white-space: nowrap; }
.doctorPage #recordDetail .doctorScale > p { margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.doctorPage #recordDetail :is(.rawEditorNotice, .functionalRecommendationPanel, .bioAgeConclusionPanel) { padding: 12px 14px; gap: 8px; border-radius: var(--card-radius); border-left-width: 3px; }
.doctorPage #recordDetail :is(.rawEditorNotice, .bioAgeConclusionPanel) { background: var(--card-surface); }
.doctorPage #recordDetail :is(.rawTestEditor, .rawQuestionGroup) { border-radius: 10px; border-color: var(--card-border); }
.doctorPage #recordDetail :is(.rawTestEditor, .rawQuestionGroup) > summary { padding: 10px 12px; font-size: 13px; font-weight: 600; background: var(--card-surface); }
.doctorPage #recordDetail .rawTestBody { gap: 8px; padding: 10px 12px; }
.doctorPage #recordDetail .doctorRawQuestion { gap: 8px; padding: 10px 12px; border-radius: 8px; }
.doctorPage #recordDetail .doctorRawQuestion .questionText { font-size: 13px; font-weight: 500; }
.doctorPage #recordDetail :is(.carePlanGrid, .mechanismGrid, .stage2Criteria, .stage2PackagePicker) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.doctorPage #recordDetail .stage2PackagePicker { padding: 12px; }
.doctorPage #recordDetail .bioCard { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 8px; padding: 10px; border-radius: var(--card-radius); }
.doctorPage #recordDetail .bioCard > div { min-width: 0; padding: 9px 10px; border-radius: 8px; }
.doctorPage #recordDetail .bioCard strong { font-size: 19px; line-height: 1.4; }
.doctorPage #recordDetail .bioCard p { font-size: 12px; }
.doctorPage #recordDetail .bioAgeConclusionPanel { margin-top: 12px; }
.doctorPage #recordDetail .inlinePanelTitle h4 { font-size: 15px; font-weight: 600; }
.doctorPage #recordDetail .inlinePanelTitle p { font-size: 12px; }
.doctorPage #recordDetail .functionalRecommendationCard { padding: 10px 12px; gap: 6px; border-radius: 10px; }
.doctorPage #recordDetail .functionalRecommendationCard strong { font-size: 14px; }
.doctorPage #recordDetail .stage2Panel { gap: 10px; }
.doctorPage #recordDetail .stage2Banner { padding: 11px 13px; border-left-width: 3px; border-radius: 10px; }
.doctorPage #recordDetail .stage2Banner strong { font-size: 17px; }
.doctorPage #recordDetail :is(.stage2Criterion, .mechanismCard) { align-content: start; padding: 10px 12px; border-left-width: 3px; border-radius: 10px; }
.doctorPage #recordDetail :is(.stage2PackageDrawer, .stage2LabEvalDrawer, .stage2SelectedPackage) { border-color: var(--card-border); border-radius: var(--card-radius); }
.doctorPage #recordDetail :is(.stage2PackageDrawer, .stage2LabEvalDrawer) > summary { padding: 10px 12px; font-size: 14px; font-weight: 600; background: var(--card-surface); }
.doctorPage #recordDetail .stage2Choice { min-height: 62px; gap: 8px; padding: 8px 10px; border-radius: 9px; }
.doctorPage #recordDetail .stage2SelectedPackage { padding: 12px; }
.doctorPage #recordDetail .stage2LabRow { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; padding: 8px; }
.doctorPage #recordDetail .stage2LabRow > :is(.stage2LabName, [data-field="comment"]) { grid-column: 1 / -1; }
.doctorPage #recordDetail .stage2LabIndicator { flex-wrap: wrap; gap: 4px 7px; min-height: 0; padding: 5px 7px; font-size: 11px; }
.doctorPage #recordDetail :is(.carePlanCard, .draftConclusionBox) { align-content: start; padding: 11px 13px; gap: 6px; border-color: var(--card-border); border-radius: 10px; background: var(--card-surface); }
.doctorPage #recordDetail .carePlanCard > span { font-size: 11px; font-weight: 600; text-transform: none; }
.doctorPage #recordDetail .carePlanCard > strong, .doctorPage #recordDetail .routeAssistantBox strong { font-size: 17px; }
.doctorPage #recordDetail .carePlanCard ul { margin: 0; }
.doctorPage #recordDetail .routeAssistantBox { gap: 5px; padding: 11px 13px; border-left-width: 3px; border-radius: 10px; }
.doctorPage #recordDetail .careTasks { margin: 10px 0; font-size: 13px; }
.doctorPage #recordDetail .kvGrid > div { padding: 8px 10px; border-radius: 8px; }
.doctorPage #recordDetail .auditEvent { padding: 8px 10px; border-radius: 9px; }

@container doctor-detail (min-width: 720px) {
  .doctorPage #recordDetail .clinicalField:not(.miniCogCard):not(.wideField) > .fieldLabelRow { min-height: 39px; align-items: flex-end; }
  .doctorPage #recordDetail .stage2LabRow { grid-template-columns: minmax(160px, 1.5fr) minmax(88px, .7fr) minmax(105px, .8fr) minmax(100px, 1fr); align-items: center; }
  .doctorPage #recordDetail .stage2LabRow > :is(.stage2LabName, [data-field="comment"]) { grid-column: auto; }
}

@container doctor-detail (max-width: 600px) {
  .doctorPage #recordDetail .section-results { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .doctorPage #recordDetail .doctorSection { margin-top: 12px; padding: 12px; }
  .doctorPage #recordDetail .curtainSection { padding: 0; }
  .doctorPage #recordDetail .doctorSectionTitle h3 { font-size: 15px; }
  .doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm) > .baseGroup { padding: 12px; }
  .doctorPage #recordDetail .clinicalForm > .clinicalCollapsedGroup { padding: 0; }
  .doctorPage #recordDetail .curtainBody, .doctorPage #recordDetail .clinicalForm .clinicalCollapsedGroup .baseGrid { padding: 12px; }
  .doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm, .visitQuickPanel, .stage2LabRow) :is(input:not([type="checkbox"]):not([type="radio"]), select) { height: 44px; min-height: 44px; font-size: 16px; }
  .doctorPage #recordDetail :is(.clinicalForm, .rawAssessmentForm) textarea { font-size: 16px; }
  .doctorPage #recordDetail .clinicalForm .miniCogCard .miniCogScore select { height: 44px; min-height: 44px; font-size: 16px; }
  .doctorPage #recordDetail :is(.primary, .secondary, .primaryButton, .secondaryButton, .ghostButton, .smallDownload, .smallAction) { min-height: 44px; padding: 9px 11px; font-size: 12px; white-space: normal; }
  .doctorPage #recordDetail .clinicalForm > .primary, .doctorPage #recordDetail .rawAssessmentForm > .primary { justify-self: stretch; }
  .doctorPage #recordDetail .eligibilityCheck { min-height: 44px; }
  .doctorPage #recordDetail .curtainSection > summary { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 3px 8px; }
  .doctorPage #recordDetail .curtainSection > summary > span { grid-column: 1; }
  .doctorPage #recordDetail .curtainSection > summary > small { grid-column: 1; margin-left: 0; }
  .doctorPage #recordDetail .curtainSection > summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .doctorPage #recordDetail .stage2LabRow { grid-template-columns: minmax(0, 1fr); }
  .doctorPage #recordDetail .stage2LabRow > * { grid-column: 1; }
}
