:root {
  --ink: #20242b;
  --muted: #667284;
  --blue: #6488ad;
  --blue-soft: #dce8f3;
  --rose: #d78498;
  --green: #497e6c;
  --amber: #a97738;
  --surface: rgba(255, 255, 255, 0.82);
  --edge: rgba(255, 255, 255, 0.94);
  --hairline: rgba(94, 116, 142, 0.16);
  --shadow: 0 26px 70px -46px rgba(36, 50, 68, 0.62), 0 4px 16px rgba(36, 50, 68, 0.04);
  --bevel: inset 1px 1px 0 rgba(255, 255, 255, 0.98), inset -1px -1px 0 rgba(40, 56, 74, 0.03);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 12%, rgba(191, 211, 231, 0.58), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(234, 213, 232, 0.54), transparent 32%),
    linear-gradient(145deg, #f5f8fb 0%, #f7f6f9 100%);
  content: "";
}
button { cursor: pointer; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
textarea { resize: vertical; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-140%); padding: 10px 14px; border-radius: 12px; color: white; background: var(--ink); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; }
[hidden] { display: none !important; }

.app-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1260px, calc(100% - 32px));
  min-height: 72px;
  margin: 14px auto 0;
  padding: 9px 12px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--bevel), var(--shadow);
  backdrop-filter: blur(22px) saturate(155%);
}
.brand-block { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.brand-mark { display: grid; flex: 0 0 50px; width: 50px; height: 50px; place-items: center; border: 1px solid white; border-radius: 50%; background: linear-gradient(145deg,#f8fbfd,#dce8f2); box-shadow: var(--bevel), 0 10px 24px -17px rgba(43,66,91,.7); }
.brand-mark svg { width: 30px; fill: none; stroke: #536f8b; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { display: grid; min-width: 0; }
.brand-copy strong { color: var(--ink); font-size: 1.08rem; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: .69rem; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.session-person { max-width: 240px; overflow: hidden; color: var(--muted); font-size: .82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.session-button, .primary-action, .secondary-action {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.94);
  border-radius: 999px;
  box-shadow: var(--bevel), 0 14px 30px -24px rgba(31,43,59,.65);
  font-weight: 750;
}
.primary-action { color: white; background: var(--ink); }
.secondary-action, .session-button { color: #4d6279; background: rgba(255,255,255,.78); }
.primary-action:hover, .secondary-action:hover, .session-button:hover { transform: translateY(-1px); box-shadow: var(--bevel), 0 18px 34px -24px rgba(31,43,59,.78); }

.aether-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--bevel), var(--shadow);
  scrollbar-width: none;
  backdrop-filter: blur(22px) saturate(155%);
}
.aether-tabs::-webkit-scrollbar { display: none; }
.aether-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #657183;
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.aether-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.aether-tab:hover { color: #3e5268; background: rgba(222,232,241,.48); }
.aether-tab.is-active { color: white; background: var(--ink); box-shadow: inset 1px 1px 0 rgba(255,255,255,.16), 0 13px 26px -19px rgba(23,29,39,.9); }
.aether-tab .tab-count { display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 6px; border-radius: 999px; color: white; background: var(--rose); font-size: .72rem; }
.primary-tabs { position: sticky; top: 12px; z-index: 15; width: max-content; max-width: calc(100% - 32px); margin: 14px auto 0; }
.record-tabs-wrap { position: sticky; top: 12px; z-index: 35; width: 100%; margin: 16px auto 22px; }
.record-tabs { position: relative; width: 100%; margin: 0; padding-right: 52px; scroll-padding-inline: 12px 56px; }
.tab-order-trigger { position: absolute; top: 50%; z-index: 4; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: #536f89; background: rgba(241,246,250,.96); box-shadow: var(--bevel),0 14px 28px -20px rgba(38,55,72,.72); transform: translateY(-50%); }
.tab-order-trigger[hidden] { display: none; }
.tab-order-trigger { right: 8px; }
.tab-order-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.app-main { width: min(1260px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 76px; }
.view { display: none; animation: view-in 320ms cubic-bezier(.22,1,.36,1); }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.eyebrow { margin: 0 0 7px; color: #627f9d; font-size: .71rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.035em; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 18px 0 26px; }
.page-heading h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 760; }
.page-heading p:last-child { margin: 8px 0 0; color: var(--muted); }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-heading > p:last-child { color: var(--muted); }

.welcome-hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; min-height: min(690px, calc(100svh - 140px)); overflow: hidden; border: 1px solid var(--edge); border-radius: 38px; background: rgba(255,255,255,.56); box-shadow: var(--bevel), var(--shadow); }
.welcome-copy { position: relative; z-index: 2; padding: clamp(38px, 7vw, 90px); }
.welcome-copy h1 { margin: 0 0 26px; font-size: clamp(3.3rem, 6.4vw, 6.2rem); font-weight: 720; line-height: .92; }
.welcome-copy h1 span { color: #6e8eae; }
.hero-lead { max-width: 650px; margin: 0 0 32px; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.7; }
.welcome-copy .primary-action { min-height: 52px; padding: 0 27px; }
.hero-visual { position: relative; min-height: 100%; overflow: hidden; background: radial-gradient(circle at 50% 48%, rgba(176,199,222,.9), transparent 41%); }
.hero-visual::before { position: absolute; inset: 14% 8%; border-radius: 50%; background: linear-gradient(145deg,rgba(255,255,255,.6),rgba(194,211,228,.34)); filter: blur(2px); content: ""; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; transform: translate(-50%,-50%) rotate(-14deg); }
.orbit-one { width: 560px; height: 270px; }
.orbit-two { width: 430px; height: 430px; }
.clinical-card { position: absolute; z-index: 2; display: grid; padding: 24px; border: 1px solid rgba(255,255,255,.9); border-radius: 25px; background: rgba(255,255,255,.78); box-shadow: var(--bevel), 0 34px 70px -38px rgba(38,55,75,.7); backdrop-filter: blur(18px); }
.card-front { top: 35%; left: 20%; width: min(340px, 70%); transform: rotate(-3deg); }
.card-front strong { margin: 6px 0; font-size: 1.35rem; }
.card-front p { margin: 2px 0 20px; color: var(--muted); }
.card-back { top: 22%; right: 13%; width: 210px; transform: rotate(8deg); }
.card-back span, .mini-label { color: #74869b; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.card-back strong { margin-top: 8px; }
.progress-line { height: 6px; overflow: hidden; border-radius: 20px; background: #e5ebf0; }
.progress-line i { display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#728fad,#be90a1); }
.access-panel { margin-top: 24px; padding: clamp(26px,5vw,58px); border: 1px solid var(--edge); border-radius: 34px; background: rgba(255,255,255,.7); box-shadow: var(--bevel), var(--shadow); }
.role-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 28px; }
.role-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; min-height: 140px; padding: 20px; border: 1px solid white; border-radius: 25px; background: rgba(255,255,255,.74); box-shadow: var(--bevel), 0 20px 48px -38px rgba(36,50,68,.7); text-align: left; }
.role-card:hover { transform: translateY(-3px); box-shadow: var(--bevel), 0 26px 50px -34px rgba(36,50,68,.75); }
.role-card > span:nth-child(2) { display: grid; gap: 4px; }
.role-card small { color: var(--blue); font-weight: 800; text-transform: uppercase; }
.role-card strong { font-size: 1.15rem; }
.role-card em { color: var(--muted); font-size: .85rem; font-style: normal; }
.role-card b { font-size: 1.5rem; }
.role-icon { display: grid; width: 70px; height: 70px; place-items: center; border-radius: 22px; }
.role-icon svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.manager-icon { color: #537697; background: #e1ebf4; }
.patient-icon { color: #9c6475; background: #f4e4e9; }
.feature-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 50px 0 0; }
.feature-strip article { padding: 28px clamp(18px,4vw,48px); border-right: 1px solid var(--hairline); }
.feature-strip article:last-child { border-right: 0; }
.feature-strip span { color: #90a4b9; font-size: .75rem; font-weight: 800; }
.feature-strip h3 { margin: 10px 0 7px; font-size: 1.1rem; }
.feature-strip p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.surface-card { border: 1px solid var(--edge); border-radius: 25px; background: var(--surface); box-shadow: var(--bevel), var(--shadow); backdrop-filter: blur(20px) saturate(150%); }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { min-height: 150px; padding: 22px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: #e7eef5; color: #5d7894; }
.metric-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.metric-card strong { display: block; margin-top: 16px; font-size: 2rem; letter-spacing: -.05em; }
.metric-card p { margin: 4px 0 0; color: var(--muted); font-size: .83rem; }
.metric-badge { padding: 5px 9px; border-radius: 999px; color: var(--green); background: rgba(73,126,108,.11); font-size: .7rem; font-weight: 800; }
.metric-badge.attention { color: #a25d70; background: rgba(215,132,152,.13); }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.attention-panel, .appointments-panel, .latest-update-card, .next-step-card { padding: 25px; }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-heading h2 { margin: 0; font-size: 1.25rem; }
.text-button { padding: 5px 0; border: 0; color: #5d7895; background: transparent; font-weight: 800; }
.upload-row, .appointment-row { display: grid; align-items: center; gap: 13px; padding: 13px 0; border-top: 1px solid var(--hairline); }
.upload-row { grid-template-columns: auto 1fr auto; }
.appointment-row { grid-template-columns: 50px 1fr; }
.file-type { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; color: #9b6273; background: #f3e3e8; font-size: .66rem; font-weight: 900; }
.upload-row strong, .appointment-row strong { display: block; font-size: .9rem; }
.upload-row small, .appointment-row small { color: var(--muted); }
.status-chip { padding: 6px 9px; border-radius: 999px; color: #9b6273; background: #f7e8ec; font-size: .68rem; font-weight: 850; }
.appointment-time { color: #587592; font-weight: 850; }
.empty-state { padding: 28px 0; color: var(--muted); text-align: center; }

.patient-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px; }
.search-field { display: flex; flex: 1 1 360px; align-items: center; gap: 8px; max-width: 520px; padding: 0 8px; background: transparent; }
.search-field span { color: var(--muted); font-size: 1.45rem; }
.search-field input { width: 100%; height: 44px; border: 0; outline: 0; background: transparent; }
.patient-sort { position: relative; display: grid; grid-template-columns: auto minmax(150px,1fr); align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; color: #718195; background: transparent; font-size: .68rem; font-weight: 850; }
.patient-sort select { min-width: 0; padding: 0 28px 0 3px; border: 0; outline: 0; appearance: none; color: #526b84; background-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235b7187' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 3px center; background-size: 15px; font-size: .75rem; font-weight: 800; }
.segmented-filter { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(229,236,242,.72); }
.segmented-filter button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: .78rem; font-weight: 800; }
.segmented-filter button.is-active { color: white; background: var(--ink); }
.attention-filter { position: relative; min-width: 42px; }
.attention-filter > span { font-size: .9rem; font-weight: 950; }
.attention-filter b { position: absolute; top: -5px; right: -4px; display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border: 2px solid #eef3f7; border-radius: 999px; color: white; background: var(--rose); font-size: .58rem; }
.patient-list { display: grid; gap: 12px; }
.patient-row { position: relative; display: grid; grid-template-columns: 48px minmax(180px,1.4fr) minmax(220px,1fr) minmax(150px,.8fr) 110px; align-items: center; gap: 18px; padding: 17px 20px; border: 1px solid var(--edge); border-radius: 22px; background: rgba(255,255,255,.75); box-shadow: var(--bevel), 0 18px 44px -38px rgba(36,50,68,.65); cursor: pointer; }
.patient-row:hover { transform: translateY(-1px); box-shadow: var(--bevel), var(--shadow); }
.patient-row:focus-visible { outline: 3px solid rgba(83,120,158,.28); outline-offset: 3px; }
.patient-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 17px; color: #526f8b; background: linear-gradient(145deg,#edf3f8,#d9e5ef); font-weight: 850; }
.patient-main strong { display: block; }
.patient-main small, .patient-cell small { display: block; margin-top: 3px; color: var(--muted); }
.patient-cell b { display: block; font-size: .8rem; }
.open-record { width: 100%; min-height: 40px; padding: 0 15px; border: 1px solid white; border-radius: 999px; color: #536d87; background: rgba(255,255,255,.85); box-shadow: var(--bevel); font-weight: 800; white-space: nowrap; }
.patient-alert-badge { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; min-width: 23px; height: 23px; place-items: center; padding: 0 7px; border: 2px solid rgba(255,255,255,.92); border-radius: 999px; color: white; background: var(--rose); box-shadow: 0 9px 18px -12px rgba(145,66,87,.8); font-size: .66rem; font-weight: 950; }

.calendar-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.month-card, .agenda-card { padding: 25px; }
.month-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.month-heading h2 { margin: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.calendar-grid span { display: grid; min-height: 45px; place-items: center; border-radius: 13px; color: var(--muted); font-size: .83rem; }
.calendar-grid .weekday { min-height: 30px; color: #8090a2; font-size: .67rem; font-weight: 850; text-transform: uppercase; }
.calendar-grid .today { color: white; background: var(--ink); box-shadow: 0 12px 24px -17px rgba(30,37,48,.9); }
.calendar-grid .has-event:not(.today) { color: #51708f; background: #e5edf5; font-weight: 850; }

.patient-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 260px; margin: 16px 0 18px; padding: clamp(28px,6vw,70px); background: linear-gradient(115deg,rgba(255,255,255,.88),rgba(224,235,245,.62)); }
.patient-welcome h1 { margin: 0; font-size: clamp(2.3rem,5vw,4.2rem); }
.patient-welcome p:last-child { color: var(--muted); }
.patient-metrics { grid-template-columns: repeat(3,1fr); }
.latest-update-card h2, .next-step-card h2 { margin: 0 0 10px; }
.latest-update-card p, .next-step-card p { color: var(--muted); line-height: 1.6; }
.date-line { display: inline-flex; margin-top: 10px; padding: 7px 11px; border-radius: 999px; color: #577493; background: #e7eef5; font-size: .75rem; font-weight: 800; }

.back-link { margin: 4px 0 14px; padding: 8px 0; border: 0; color: #5d7590; background: transparent; font-weight: 800; }
.patient-banner { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; overflow: hidden; min-height: 150px; padding: 25px 30px; }
.patient-banner::after { position: absolute; top: -90px; right: -40px; width: 270px; height: 270px; border-radius: 50%; background: radial-gradient(circle,rgba(185,207,228,.65),transparent 68%); content: ""; }
.banner-avatar { display: grid; width: 78px; height: 78px; place-items: center; border-radius: 26px; color: #506e8b; background: linear-gradient(145deg,#f4f8fb,#d9e6f1); box-shadow: var(--bevel); font-size: 1.4rem; font-weight: 850; }
.banner-main { position: relative; z-index: 1; }
.banner-main h1 { margin: 0; font-size: clamp(1.8rem,4vw,2.7rem); }
.banner-meta { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 9px; color: var(--muted); font-size: .83rem; }
.banner-status { position: relative; z-index: 1; padding: 9px 13px; border-radius: 999px; color: var(--green); background: rgba(73,126,108,.11); font-size: .75rem; font-weight: 850; }
.record-content { min-height: 380px; }
.record-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.record-section-heading h2 { margin: 0; font-size: 1.75rem; }
.record-section-heading p { margin: 6px 0 0; color: var(--muted); }
.read-only-notice { padding: 8px 12px; border-radius: 999px; color: #627790; background: rgba(220,232,243,.7); font-size: .73rem; font-weight: 800; }
.content-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.record-card { padding: 23px; }
.record-card.full-width { grid-column: 1 / -1; }
.record-card h3 { margin: 0 0 16px; font-size: 1rem; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-row { display: grid; grid-template-columns: minmax(110px,.65fr) 1.35fr; gap: 16px; padding: 11px 0; border-top: 1px solid var(--hairline); }
.detail-row:first-child { border-top: 0; }
.detail-row dt { color: var(--muted); font-size: .78rem; }
.detail-row dd { margin: 0; font-size: .88rem; font-weight: 700; }
.field-label { display: grid; gap: 7px; color: #617083; font-size: .75rem; font-weight: 800; }
.field-label input, .field-label textarea, .field-label select, .record-editor { width: 100%; border: 1px solid rgba(118,139,162,.2); border-radius: 14px; outline: 0; color: var(--ink); background: rgba(248,250,252,.8); }
.field-label input, .field-label select { min-height: 44px; padding: 0 12px; }
.field-label textarea, .record-editor { padding: 12px; line-height: 1.6; }
.field-label input:focus, .field-label textarea:focus, .field-label select:focus, .record-editor:focus { border-color: rgba(83,120,158,.5); box-shadow: 0 0 0 3px rgba(100,136,173,.1); }
.field-with-unit { position: relative; display: block; }
.field-with-unit input { padding-right: 48px; }
.field-with-unit b { position: absolute; top: 50%; right: 12px; color: #7890a6; font-size: .7rem; transform: translateY(-50%); pointer-events: none; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.derived-demographic { margin: 15px 0 0; padding: 11px 13px; border-radius: 14px; color: #597087; background: rgba(226,235,243,.56); font-size: .77rem; }
.record-editor { min-height: 155px; }
.read-content { margin: 0; color: #3f4854; line-height: 1.75; white-space: pre-line; }
.subtabs { display: flex; width: max-content; max-width: 100%; gap: 5px; overflow-x: auto; margin: 0 0 18px; padding: 5px; border-radius: 999px; background: rgba(226,234,241,.7); scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { flex: 0 0 auto; min-height: 38px; padding: 0 15px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: .76rem; font-weight: 850; white-space: nowrap; }
.subtab.is-active { color: #4d657d; background: white; box-shadow: var(--bevel), 0 10px 24px -20px rgba(42,55,72,.7); }
.anamnesis-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.clinical-tool-picker { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; padding: 7px; border: 1px solid var(--edge); border-radius: 24px; background: rgba(255,255,255,.7); box-shadow: var(--bevel),0 18px 38px -32px rgba(40,55,73,.72); }
.clinical-tool-option { display: grid; min-height: 66px; align-content: center; gap: 4px; padding: 8px 14px; border: 0; border-radius: 18px; color: #68798b; background: transparent; text-align: left; }
.clinical-tool-option span { font-size: .9rem; font-weight: 900; }
.clinical-tool-option small { color: #8a98a6; font-size: .65rem; font-weight: 700; }
.clinical-tool-option.is-active { color: white; background: linear-gradient(145deg,#26313e,#151a22); box-shadow: inset 1px 1px 0 rgba(255,255,255,.16),0 16px 28px -20px rgba(15,21,30,.9); }
.clinical-tool-option.is-active small { color: rgba(255,255,255,.66); }
.clinical-tool-card { overflow: hidden; padding: 26px; background: linear-gradient(135deg,rgba(255,255,255,.94),rgba(231,239,247,.78) 58%,rgba(242,235,244,.7)); }
.tool-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.tool-card-heading h3 { margin: 0; font-size: 1.25rem; }
.tool-live-badge { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: #56728d; background: rgba(218,232,244,.8); font-size: .68rem; font-weight: 850; }
.tool-context-note { margin: -4px 0 18px; padding: 12px 14px; border: 1px solid rgba(102,130,157,.12); border-radius: 15px; color: #5e748a; background: rgba(247,250,252,.68); font-size: .74rem; line-height: 1.5; }
.qtc-input-mode { display: inline-grid; grid-template-columns: repeat(2,auto); gap: 4px; margin: -6px 0 18px; padding: 4px; border: 1px solid rgba(103,129,154,.12); border-radius: 999px; background: rgba(229,236,242,.72); }
.qtc-input-mode button { min-height: 37px; padding: 0 16px; border: 0; border-radius: 999px; color: #687b8e; background: transparent; font-size: .72rem; font-weight: 850; }
.qtc-input-mode button.is-active { color: white; background: linear-gradient(145deg,#2b3542,#171c24); box-shadow: inset 1px 1px 0 rgba(255,255,255,.16),0 12px 22px -17px rgba(15,21,30,.9); }
.tool-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.tool-form-grid-wide { grid-template-columns: repeat(4,minmax(0,1fr)); }
.tool-field { display: grid; align-content: start; gap: 7px; min-width: 0; color: #64798d; font-size: .7rem; font-weight: 850; }
.tool-field > span:first-child { min-height: 15px; }
.tool-field input, .tool-field select { width: 100%; min-width: 0; min-height: 48px; border: 1px solid rgba(102,128,153,.18); border-radius: 15px; outline: 0; color: var(--ink); background-color: rgba(251,252,253,.84); font-size: .84rem; font-weight: 750; }
.tool-field input { padding: 0 74px 0 13px; }
.tool-field select { appearance: none; padding: 0 48px 0 13px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235b7187' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 17px; }
.tool-field input:focus, .tool-field select:focus { border-color: rgba(83,120,158,.48); box-shadow: 0 0 0 3px rgba(100,136,173,.1); }
.tool-field small { min-height: 15px; color: #94a0ac; font-size: .61rem; font-weight: 700; line-height: 1.35; }
.tool-input { position: relative; display: block; }
.tool-input b { position: absolute; top: 50%; right: 12px; max-width: 64px; color: #71879d; font-size: .62rem; text-align: right; transform: translateY(-50%); pointer-events: none; }
.ldl-method-picker { width: min(360px,100%); margin-bottom: 14px; }
.tool-result { display: grid; min-height: 138px; align-content: center; margin-top: 22px; padding: 20px 22px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: linear-gradient(145deg,rgba(218,233,245,.88),rgba(249,250,251,.84)); box-shadow: var(--bevel),0 20px 42px -34px rgba(34,55,76,.72); }
.tool-result-empty { color: #78899a; font-size: .84rem; font-weight: 750; text-align: center; }
.tool-result-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 12px; }
.tool-result-value span { flex-basis: 100%; color: #647a90; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.tool-result-value strong { color: #24384b; font-size: 2.6rem; line-height: 1; letter-spacing: -.06em; }
.tool-result-value b { color: #5f7890; font-size: .78rem; }
.tool-result p { margin: 12px 0 0; color: #6f7e8c; font-size: .7rem; line-height: 1.5; }
.tool-result .tool-warning { color: #805b2d; }
.qtc-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.qtc-results article { display: grid; gap: 7px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.62); box-shadow: inset 1px 1px 0 rgba(255,255,255,.9); }
.qtc-results span { color: #718499; font-size: .67rem; font-weight: 850; }
.qtc-results strong { color: #2e465c; font-size: 1.35rem; }
.tool-footnote { margin: 14px 2px 0; color: #78899a; font-size: .68rem; line-height: 1.5; }
.clinical-tools-disclaimer { display: flex; gap: 10px 18px; margin-top: 13px; padding: 0 4px; color: #748596; font-size: .68rem; }
.clinical-tools-disclaimer strong { color: #586f86; }
.exam-list { display: grid; gap: 10px; }
.exam-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--edge); border-radius: 18px; background: rgba(255,255,255,.68); box-shadow: var(--bevel); }
.exam-row strong { display: block; }
.exam-row small { color: var(--muted); }
.exam-value { color: #526e89; font-weight: 850; }
.exam-copy { min-width: 0; }
.exam-copy small { overflow-wrap: anywhere; }
.exam-row-end { display: flex; max-width: min(560px,52vw); align-items: center; justify-content: flex-end; gap: 10px; }
.exam-row-end .exam-value { line-height: 1.45; text-align: right; white-space: pre-wrap; }
.exam-open-file { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; white-space: nowrap; }
.exam-open-file svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.document-exam-composer { margin-bottom: 17px; padding: 24px; background: linear-gradient(135deg,rgba(255,255,255,.91),rgba(226,236,245,.72)); }
.document-exam-fields { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 14px; }
.document-exam-summary { grid-column: 1 / -1; }
.document-exam-summary textarea { min-height: 118px; font-weight: 400; resize: vertical; }
.document-exam-file { grid-column: 1 / -1; }
.document-exam-file > small { color: #8b98a5; font-size: .65rem; font-weight: 700; }
.document-file-picker { position: relative; display: block; cursor: pointer; }
.document-file-picker input { position: absolute; width: 1px; height: 1px; min-height: 1px; padding: 0; opacity: 0; }
.document-file-picker > span { display: inline-flex; max-width: 100%; min-height: 42px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid rgba(103,129,154,.15); border-radius: 999px; color: #55718b; background: rgba(255,255,255,.76); box-shadow: var(--bevel); }
.document-file-picker svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.document-file-picker b { max-width: min(520px,65vw); overflow: hidden; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.document-file-picker:focus-within > span { outline: 3px solid rgba(83,120,158,.22); outline-offset: 2px; }
.document-exam-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 17px; }
.document-exam-footer p { max-width: 650px; margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.document-exam-footer > span { display: flex; flex: 0 0 auto; gap: 8px; }
.lab-import-card, .lab-review-card, .lab-grid-card, .lab-grid-empty { margin-bottom: 17px; padding: 24px; }
.lab-import-card { background: linear-gradient(135deg,rgba(255,255,255,.9),rgba(225,235,245,.7)); }
.exam-command-bar, .monitoring-command-bar { display: flex; justify-content: flex-end; margin: -3px 0 14px; }
.exam-command-bar .secondary-action.is-active, .monitoring-command-bar .secondary-action.is-active { color: #fff; background: var(--ink); }
.lab-import-grid { display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: start; gap: 14px; }
.lab-text-field textarea { min-height: 128px; line-height: 1.6; resize: vertical; }
.lab-import-footer, .lab-review-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; }
.lab-import-footer p { max-width: 680px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.lab-review-card { border-color: rgba(83,120,158,.22); background: linear-gradient(145deg,rgba(246,250,253,.95),rgba(233,241,247,.84)); }
.lab-review-head, .lab-review-row { display: grid; grid-template-columns: minmax(180px,2fr) minmax(105px,.8fr) minmax(105px,.8fr) 32px; align-items: end; gap: 9px; }
.lab-review-head { padding: 0 5px 7px; color: var(--muted); font-size: .67rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.lab-review-list { display: grid; gap: 7px; }
.lab-review-row { padding: 9px; border: 1px solid rgba(255,255,255,.92); border-radius: 15px; background: rgba(255,255,255,.7); box-shadow: var(--bevel); }
.lab-review-row label { display: grid; gap: 4px; }
.lab-review-row label > span { color: var(--muted); font-size: .66rem; font-weight: 800; }
.lab-review-row input { width: 100%; min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid rgba(99,123,147,.16); border-radius: 10px; outline: 0; color: var(--ink); background: rgba(249,251,253,.9); }
.lab-review-row input:focus { border-color: rgba(83,120,158,.42); box-shadow: 0 0 0 3px rgba(100,136,173,.08); }
.lab-review-remove { align-self: center; }
.lab-import-warning { display: grid; gap: 5px; margin-top: 13px; padding: 13px 15px; border-radius: 14px; color: #7b5b32; background: rgba(243,225,191,.48); font-size: .75rem; }
.lab-import-warning span { overflow-wrap: anywhere; }
.lab-grid-card { overflow: hidden; }
.clinical-chart-card, .monitoring-chart-card { margin-bottom: 18px; padding: 18px; border: 1px solid rgba(103,129,154,.13); border-radius: 19px; background: linear-gradient(145deg,rgba(246,250,252,.92),rgba(229,238,246,.72)); }
.chart-card-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.chart-card-heading h3, .chart-card-heading h4 { margin: 0; }
.chart-card-heading label { display: grid; gap: 5px; color: #708297; font-size: .64rem; font-weight: 850; }
.chart-card-heading select { min-width: 190px; min-height: 38px; padding: 0 36px 0 12px; border: 1px solid rgba(102,128,153,.17); border-radius: 12px; color: #455f77; background: rgba(255,255,255,.82); font-weight: 780; }
.chart-card-heading > span { color: #75879a; font-size: .68rem; font-weight: 800; }
.trend-chart { min-width: 0; }
.trend-chart svg { display: block; width: 100%; min-height: 190px; overflow: visible; }
.chart-grid line { stroke: rgba(105,126,147,.14); stroke-width: 1; }
.chart-grid text, .chart-x-label { fill: #8795a4; font-size: 10px; }
.chart-series path { fill: none; stroke: var(--series-color); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-series circle { fill: white; stroke: var(--series-color); stroke-width: 3; }
.chart-legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 3px; color: #687c90; font-size: .65rem; font-weight: 800; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 17px; height: 3px; border-radius: 999px; }
.chart-empty { display: grid; min-height: 130px; place-items: center; padding: 20px; color: #8190a0; font-size: .76rem; font-weight: 750; text-align: center; }
.lab-grid-scroll { overflow-x: auto; margin: 0 -24px; padding: 0 24px 5px; }
.lab-grid { width: max-content; min-width: 0; table-layout: fixed; border-spacing: 0; font-size: .79rem; }
.lab-grid th, .lab-grid td { width: 150px; min-width: 150px; max-width: 150px; padding: 12px 14px; border-bottom: 1px solid rgba(99,123,147,.12); text-align: center; white-space: nowrap; }
.lab-grid th:first-child { position: sticky; left: 0; z-index: 1; width: 220px; min-width: 220px; max-width: 220px; padding-left: 14px; text-align: left; background: rgba(250,252,253,.96); }
.lab-grid thead th { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .03em; }
.lab-grid tbody th { color: #344b60; font-weight: 850; }
.lab-grid tbody td { color: #526e89; font-weight: 780; }
.lab-grid tbody tr:last-child th, .lab-grid tbody tr:last-child td { border-bottom: 0; }
.lab-date-heading { display: grid; justify-items: center; gap: 5px; }
.lab-date-heading button { padding: 3px 8px; border: 0; border-radius: 999px; color: #59758e; background: rgba(222,233,242,.8); font-size: .62rem; font-weight: 850; }
.lab-cell-button { width: 100%; padding: 5px 7px; border: 0; border-radius: 9px; color: inherit; background: transparent; font-weight: inherit; white-space: nowrap; }
.lab-cell-button:hover { background: rgba(220,232,241,.65); }
.lab-value-normal, .lab-value-alert, .lab-value-unclassified { display: inline-flex; align-items: flex-start; gap: 2px; padding: 4px 7px; border-radius: 8px; }
.lab-value-alert { font-weight: 950; }
.lab-value-alert.is-abnormal { color: #725410; background: linear-gradient(135deg,rgba(255,231,105,.82),rgba(255,242,174,.72)); box-shadow: inset 0 0 0 1px rgba(193,145,19,.13); }
.lab-value-alert.is-critical { color: #fff; background: linear-gradient(135deg,#c44a50,#a9343f); box-shadow: 0 7px 16px -11px rgba(143,32,43,.8); }
.lab-value-unclassified { color: #738495; border-bottom: 1px dashed rgba(103,126,150,.38); }
.lab-value-alert sup, .lab-value-unclassified sup { font-size: .66em; line-height: 1; }
.lab-missing { color: #a5afb9; }
.lab-alert-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 13px; color: var(--muted); font-size: .68rem; }
.lab-alert-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lab-alert-legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend-yellow { background: #ffe269; }
.legend-red { background: #b93e48; }
.legend-gray { display: grid; place-items: center; color: #697b8c; background: #dfe6eb; font-style: normal; font-weight: 950; }
.lab-grid-note, .lab-grid-empty p { margin: 13px 0 0; color: var(--muted); font-size: .72rem; }
.lab-grid-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.lab-grid-empty h3 { margin: 0; }
.urine-grid-card { border-color: rgba(91,139,158,.2); background: linear-gradient(145deg,rgba(249,253,254,.96),rgba(229,241,243,.78)); }
.urine-grid-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.urine-grid-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid rgba(91,139,158,.15); border-radius: 999px; color: #4f7080; background: rgba(255,255,255,.74); font-size: .68rem; font-weight: 900; box-shadow: var(--bevel); }
.urine-grid-toggle svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
.urine-grid-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.urine-grid .urine-assessment-row th, .urine-grid .urine-assessment-row td { background: rgba(224,240,242,.72); }
.urine-grid .urine-assessment-row th { background: rgba(237,247,248,.97); }
.urine-status { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 29px; padding: 0 10px; border-radius: 999px; font-size: .68rem; font-weight: 950; white-space: nowrap; }
.urine-status.is-no { color: #2f705e; background: rgba(190,231,216,.72); }
.urine-status.is-yes { color: #fff; background: linear-gradient(135deg,#c44a50,#a9343f); }
.urine-status.is-unknown { color: #687888; background: rgba(220,228,235,.8); }
.urine-plain-value { color: #526e89; font-weight: 800; }
.urine-rule-note { margin: 13px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.lab-edit-heading-controls { display: flex; align-items: end; gap: 10px; }
.lab-edit-date { min-width: 168px; }
.lab-review-top-actions { display: flex; align-items: center; gap: 8px; }
.lab-review-top-actions button { min-height: 39px; padding: 0 14px; }
.lab-edit-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 17px; }
.lab-edit-actions > span { display: flex; gap: 9px; }
.danger-action { min-height: 42px; padding: 0 16px; border: 1px solid rgba(157,62,76,.16); border-radius: 999px; color: #914250; background: rgba(255,245,247,.8); font-weight: 850; }
.danger-action:hover { background: rgba(157,62,76,.1); }
.legacy-exam-list { margin-top: 22px; }
.pending-manager { margin-top: 20px; padding: 20px; border: 1px dashed rgba(215,132,152,.35); border-radius: 20px; background: rgba(249,235,239,.48); }
.pending-manager h3 { margin-top: 0; }
.pending-action-row { display: flex; align-items: center; gap: 8px; }
.pending-action-row select { min-height: 38px; border: 1px solid var(--hairline); border-radius: 999px; padding: 0 10px; background: white; }
.compact-button { min-height: 38px; padding: 0 13px; border: 1px solid white; border-radius: 999px; color: #536e89; background: rgba(255,255,255,.9); font-size: .72rem; font-weight: 850; }
.monitoring-tabs { margin-bottom: 14px; }
.monitoring-toolbar { display: grid; grid-template-columns: 40px minmax(210px,.8fr) 40px auto minmax(230px,1fr) auto; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px; }
.monitoring-toolbar > button { min-height: 40px; border: 1px solid rgba(255,255,255,.88); border-radius: 14px; color: #5b748d; background: rgba(234,241,247,.78); box-shadow: var(--bevel); font-weight: 850; }
.monitoring-toolbar > button:disabled { opacity: .42; }
.monitoring-selected-date { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 0 12px; text-align: left; }
.monitoring-selected-date svg { flex: 0 0 auto; width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.monitoring-selected-date span { display: grid; min-width: 0; gap: 1px; }
.monitoring-selected-date small { color: #8694a2; font-size: .57rem; font-weight: 800; text-transform: uppercase; }
.monitoring-selected-date strong { overflow: hidden; color: #405d78; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.monitoring-selected-date i { margin-left: auto; font-style: normal; }
.monitoring-all-days { padding: 0 13px; }
.monitoring-sort { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; min-width: 0; color: #74869a; font-size: .64rem; font-weight: 850; }
.monitoring-sort select { width: 100%; min-width: 0; min-height: 40px; padding: 0 34px 0 11px; border: 1px solid rgba(102,128,153,.15); border-radius: 13px; color: #4d657c; background: rgba(248,251,252,.78); font-size: .68rem; font-weight: 760; }
.monitoring-chart-toggle { display: inline-flex; min-height: 38px; align-items: center; gap: 6px; padding: 0 13px; border: 1px solid rgba(255,255,255,.88); border-radius: 13px; color: #5b748d; background: rgba(234,241,247,.78); box-shadow: var(--bevel); font-size: .7rem; font-weight: 850; white-space: nowrap; }
.monitoring-chart-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.monitoring-chart-toggle.is-active { color: white; background: var(--ink); }
.monitoring-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 0; margin-bottom: 14px; padding: 18px 22px; background: linear-gradient(135deg,rgba(255,255,255,.9),rgba(225,237,246,.72),rgba(242,234,244,.62)); }
.monitoring-summary-stat { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 22px; color: #5c748b; }
.monitoring-summary-stat + .monitoring-summary-stat { border-left: 1px solid rgba(102,126,149,.15); }
.monitoring-summary-stat > div { display: grid; min-width: 0; gap: 3px; }
.monitoring-summary-stat small { color: #82909e; font-size: .61rem; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.monitoring-summary-stat strong { color: #344f68; font-size: 1.45rem; line-height: 1; }
.monitoring-summary-stat span { color: #5c748b; font-size: .67rem; font-weight: 800; }
.monitoring-summary-stat > b { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: #5c748b; background: rgba(255,255,255,.68); font-size: .66rem; white-space: nowrap; }
.pressure-value { display: inline-flex; align-items: baseline; letter-spacing: -.05em; }
.pressure-value i { margin: 0 .12em; font-style: normal; font-weight: inherit; }
.monitoring-chart-card { padding: 22px; }
.monitoring-charts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.monitoring-charts > div { min-width: 0; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.54); }
.monitoring-charts h4 { margin: 0 0 6px; color: #526b83; font-size: .76rem; }
.monitor-count { padding: 8px 11px; border-radius: 999px; color: #5c748b; background: rgba(255,255,255,.68); font-size: .68rem; font-weight: 850; white-space: nowrap; }
.monitoring-form { margin-bottom: 20px; padding: 24px; background: linear-gradient(145deg,rgba(250,252,253,.94),rgba(231,240,247,.72)); }
.monitoring-form-heading, .monitoring-form-footer, .monitoring-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.monitoring-form-heading { margin-bottom: 17px; }
.monitoring-form-heading h3, .monitoring-history-heading h3 { margin: 2px 0 0; }
.monitor-edit-badge { padding: 7px 10px; border-radius: 999px; color: #755e35; background: rgba(241,224,180,.68); font-size: .68rem; font-weight: 900; }
.monitoring-fields { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.monitor-field { display: grid; align-content: start; gap: 6px; min-width: 0; color: #63798e; font-size: .68rem; font-weight: 850; }
.monitor-field input, .monitor-field select { width: 100%; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid rgba(102,128,153,.17); border-radius: 14px; outline: 0; color: #34485b; background: rgba(255,255,255,.78); font-size: .82rem; font-weight: 760; }
.aether-date-field { min-width: 0; }
.aether-date-field > span:first-child { display: block; }
.aether-date-trigger { display: grid; grid-template-columns: 22px minmax(0,1fr) 12px; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 5px 11px; border: 1px solid rgba(102,128,153,.17); border-radius: 14px; color: #71869a; background: rgba(255,255,255,.78); box-shadow: var(--bevel); text-align: left; }
.aether-date-trigger:focus-visible { outline: 3px solid rgba(83,120,158,.2); outline-offset: 2px; }
.aether-date-icon { display: grid; place-items: center; }
.aether-date-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.aether-date-trigger b { overflow: hidden; color: #63798e; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.aether-date-trigger.has-value b { color: #34485b; }
.aether-date-trigger i { font-style: normal; }
.monitor-field input:focus, .monitor-field select:focus, .monitor-note textarea:focus { border-color: rgba(83,120,158,.46); box-shadow: 0 0 0 3px rgba(100,136,173,.09); }
.monitor-context { grid-column: span 2; }
.monitor-input { position: relative; display: block; }
.monitor-input input { padding-right: 58px; }
.monitor-input b { position: absolute; top: 50%; right: 11px; color: #71869a; font-size: .61rem; transform: translateY(-50%); pointer-events: none; }
.monitor-note { display: grid; gap: 6px; margin-top: 12px; color: #63798e; font-size: .68rem; font-weight: 850; }
.monitor-note textarea { width: 100%; min-height: 66px; padding: 11px 13px; border: 1px solid rgba(102,128,153,.17); border-radius: 14px; outline: 0; color: #34485b; background: rgba(255,255,255,.74); line-height: 1.45; resize: vertical; }
.monitoring-form-footer { margin-top: 15px; }
.monitoring-form-footer p { max-width: 690px; margin: 0; color: #78899a; font-size: .7rem; line-height: 1.5; }
.monitoring-form-footer > span { display: flex; gap: 8px; }
.monitoring-history-heading { margin: 0 4px 12px; }
.monitoring-history-heading > span { color: #8493a1; font-size: .67rem; font-weight: 800; }
.monitoring-history { display: grid; gap: 10px; }
.monitoring-entry { display: grid; grid-template-columns: 96px minmax(0,1fr) auto; align-items: center; gap: 17px; padding: 16px 18px; }
.monitoring-entry.is-latest { border-color: rgba(92,130,162,.22); background: linear-gradient(120deg,rgba(236,244,250,.86),rgba(255,255,255,.76)); }
.monitoring-entry-time { display: grid; gap: 3px; padding-right: 16px; border-right: 1px solid rgba(100,125,149,.14); }
.monitoring-entry-time time { color: #37536d; font-size: 1.08rem; font-weight: 950; }
.monitoring-entry-time span { color: #7a8998; font-size: .67rem; font-weight: 750; }
.monitoring-entry-main { min-width: 0; }
.monitoring-values { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; color: #60778d; }
.monitoring-values strong { color: #2e465c; font-size: 1.08rem; }
.monitoring-values span { font-size: .66rem; font-weight: 820; }
.monitoring-values i { width: 1px; height: 17px; margin: 0 3px; background: rgba(93,117,141,.2); }
.monitoring-values b { color: #566f86; font-size: .72rem; }
.monitoring-entry-main > p { margin: 7px 0 0; color: #596979; font-size: .76rem; line-height: 1.45; }
.monitoring-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 11px; margin-top: 8px; }
.monitoring-meta small { color: #929ca7; font-size: .61rem; }
.monitor-status { padding: 5px 8px; border-radius: 999px; color: #64798d; background: rgba(224,232,239,.7); font-size: .6rem; font-weight: 850; }
.monitor-status.is-editable { color: #3f725f; background: rgba(208,232,220,.72); }
.monitor-status.is-locked { color: #7b6d5a; background: rgba(234,226,211,.72); }
.monitor-actions { display: flex; align-items: center; gap: 5px; }
.monitor-actions button { min-height: 34px; padding: 0 11px; border: 1px solid rgba(102,128,153,.12); border-radius: 999px; color: #5c758c; background: rgba(246,249,251,.78); font-size: .67rem; font-weight: 850; }
.monitor-actions .monitor-remove { width: 34px; padding: 0; color: #986171; font-size: 1rem; }
.diary-form { display: grid; gap: 12px; margin-bottom: 16px; padding: 20px; }
.diary-form textarea { min-height: 110px; }
.diary-timeline { position: relative; display: grid; gap: 13px; padding-left: 26px; }
.diary-timeline::before { position: absolute; top: 8px; bottom: 8px; left: 8px; width: 1px; background: rgba(103,126,150,.25); content: ""; }
.diary-entry { position: relative; padding: 22px; }
.diary-entry::before { position: absolute; top: 28px; left: -25px; width: 11px; height: 11px; border: 3px solid #f4f7fa; border-radius: 50%; background: #809ab4; box-shadow: 0 0 0 1px rgba(103,126,150,.25); content: ""; }
.diary-entry.latest::before { background: var(--rose); }
.entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.entry-head h3 { margin: 0; }
.entry-head time { color: var(--muted); font-size: .75rem; font-weight: 800; }
.diary-entry p { margin: 0; color: #414b57; line-height: 1.7; white-space: pre-line; }
.latest-label { display: inline-block; margin-bottom: 8px; color: #a45f72; font-size: .67rem; font-weight: 900; text-transform: uppercase; }
.program-stack { display: grid; gap: 15px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.card-title-row h3 { margin: 0; font-size: 1.15rem; }
.card-title-row .eyebrow { margin-bottom: 4px; }
.recommendations-card { padding-top: 20px; padding-bottom: 20px; }
.recommendations-editor { width: 100%; min-height: 92px; padding: 13px 15px; border: 1px solid rgba(118,139,162,.18); border-radius: 15px; outline: 0; color: var(--ink); background: rgba(248,250,252,.72); line-height: 1.65; resize: vertical; }
.recommendations-editor:focus { border-color: rgba(83,120,158,.5); box-shadow: 0 0 0 3px rgba(100,136,173,.1); }
.program-card { min-height: 330px; padding: 26px; background: linear-gradient(145deg,rgba(255,255,255,.88),rgba(231,239,247,.65)); }
.program-progress { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: #57738e; background: rgba(218,230,240,.82); font-size: .7rem; font-weight: 850; }
.program-list { display: grid; gap: 9px; }
.program-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: start; gap: 10px; min-height: 58px; padding: 12px 11px; border: 1px solid rgba(255,255,255,.92); border-radius: 17px; background: rgba(255,255,255,.72); box-shadow: var(--bevel), 0 13px 30px -27px rgba(38,54,72,.58); transition: background 180ms ease, opacity 180ms ease; }
.program-item.is-complete { background: linear-gradient(105deg,rgba(225,239,232,.84),rgba(255,255,255,.68)); }
.shared-check { position: relative; display: grid; width: 32px; height: 32px; place-items: center; cursor: pointer; }
.shared-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.shared-check > span[aria-hidden] { display: grid; width: 28px; height: 28px; place-items: center; border: 1.5px solid rgba(90,116,141,.34); border-radius: 10px; color: transparent; background: rgba(255,255,255,.8); box-shadow: var(--bevel); font-size: .78rem; font-weight: 900; transition: transform 160ms ease, background 160ms ease, color 160ms ease; }
.shared-check input:checked + span { border-color: transparent; color: white; background: linear-gradient(145deg,#5c8a78,#3f7463); box-shadow: inset 1px 1px 0 rgba(255,255,255,.22), 0 9px 18px -13px rgba(41,91,72,.8); }
.shared-check input:focus-visible + span { outline: 3px solid rgba(83,120,158,.26); outline-offset: 2px; }
.program-item-preview { position: relative; display: block; min-width: 0; max-height: 3.1em; overflow: hidden; padding: 5px 3px; color: #34404c; font-size: .91rem; line-height: 1.55; }
.program-item.is-long:not(.is-expanded) .program-item-preview { padding-right: 18px; mask-image: linear-gradient(to bottom,#000 0,#000 58%,transparent 100%); }
.program-more-cue { display: inline-flex; align-items: center; min-height: 25px; margin: 3px 3px 1px; padding: 0 9px; border: 1px solid rgba(91,119,145,.14); border-radius: 999px; color: #587590; background: rgba(229,238,246,.86); font-size: .65rem; font-weight: 900; letter-spacing: .01em; }
.program-item-body { min-width: 0; }
.program-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 5px 3px 0; }
.program-completion-date { color: #4d7567; font-size: .69rem; font-weight: 850; }
.program-upload-label { position: relative; cursor: pointer; }
.program-upload-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.program-upload-label > span, .program-file-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border: 1px solid rgba(104,129,152,.16); border-radius: 999px; color: #56728c; background: rgba(255,255,255,.72); box-shadow: var(--bevel); font-size: .66rem; font-weight: 850; }
.program-upload-label svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.program-file-chip { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.program-upload-label:focus-within > span { outline: 3px solid rgba(83,120,158,.23); outline-offset: 2px; }
.program-item-title { margin-right: 5px; color: #283643; font-weight: 850; }
.program-item-title, .program-item-details { display: inline; }
.program-item-details { white-space: pre-line; }
.program-item.is-expanded .program-item-preview { max-height: none; overflow: visible; }
.program-compose-input { width: 100%; min-height: 150px; padding: 12px 44px 12px 12px; border: 1px solid rgba(96,123,149,.18); border-radius: 13px; outline: 0; color: var(--ink); background: rgba(244,248,251,.86); font-weight: 400; line-height: 1.55; resize: vertical; }
.program-compose-input:focus { border-color: rgba(83,120,158,.45); box-shadow: 0 0 0 3px rgba(100,136,173,.09); }
.program-item.is-complete .program-item-preview { color: #718078; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.program-item-actions { display: flex; align-items: center; gap: 4px; }
.program-toggle { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid rgba(100,126,151,.12); border-radius: 50%; color: #607991; background: rgba(234,240,245,.84); box-shadow: var(--bevel); }
.program-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.program-remove, .therapy-remove { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; color: #86919e; background: transparent; font-size: 1.05rem; }
.program-remove:hover, .therapy-remove:hover { color: #9b5c6e; background: rgba(215,132,152,.12); }
.program-hint { margin: 17px 0 0; color: var(--muted); font-size: .75rem; }
.program-hint kbd { padding: 3px 7px; border: 1px solid rgba(101,122,145,.18); border-radius: 7px; color: #526b84; background: rgba(255,255,255,.84); box-shadow: 0 2px 0 rgba(82,107,132,.12); font-family: inherit; font-weight: 850; }
.program-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 17px; }
.program-footer .program-hint { margin: 0; }
.program-add { flex: 0 0 auto; }
.expandable-editor { position: relative; min-width: 0; }
.editor-expand { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(101,126,150,.13); border-radius: 50%; color: #607a93; background: rgba(237,243,247,.94); box-shadow: var(--bevel); }
.editor-expand svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.expandable-editor.is-fullscreen { position: fixed; inset: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); z-index: 120; padding: 18px; border: 1px solid rgba(255,255,255,.9); border-radius: 26px; background: linear-gradient(145deg,rgba(250,252,253,.98),rgba(228,237,245,.97)); box-shadow: 0 35px 100px -26px rgba(24,35,48,.7); backdrop-filter: blur(28px); }
.expandable-editor.is-fullscreen textarea { width: 100%; height: 100%; min-height: 100%; padding: 48px 20px 20px; border-radius: 18px; font-size: clamp(1rem,2vw,1.25rem); font-weight: 400; line-height: 1.65; resize: none; }
.expandable-editor.is-fullscreen .editor-expand { top: 26px; right: 26px; }
body.editor-fullscreen-open { overflow: hidden; }
body.editor-fullscreen-open .view.is-active { transform: none; animation: none; }
body.editor-fullscreen-open .surface-card:has(.expandable-editor.is-fullscreen) { transform: none; backdrop-filter: none; }
.diary-form { position: relative; display: grid; gap: 14px; margin-bottom: 20px; padding: 24px; }
.diary-form textarea { min-height: 220px; padding-right: 48px; font-weight: 400; resize: vertical; }
.diary-draft-status { display: flex; justify-content: flex-end; min-height: 20px; color: #788b9e; font-size: .67rem; font-weight: 750; }
.diary-form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.recommendations-editor { font-weight: 400; }

.therapy-composer { margin-bottom: 17px; padding: 23px; background: linear-gradient(120deg,rgba(255,255,255,.88),rgba(225,235,245,.72)); }
.therapy-date-toolbar { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px 0 17px; padding: 10px 12px; background: linear-gradient(120deg,rgba(255,255,255,.83),rgba(229,238,246,.7)); }
.therapy-date-toolbar > button:not(.therapy-selected-date) { display: grid; min-width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: #58738e; background: rgba(239,245,249,.9); box-shadow: var(--bevel); font-weight: 900; }
.therapy-selected-date { display: grid; grid-template-columns: 24px 1fr 16px; align-items: center; gap: 9px; min-width: 265px; min-height: 48px; padding: 5px 11px; border: 1px solid rgba(104,131,157,.16); border-radius: 16px; color: #4e6983; background: rgba(255,255,255,.82); box-shadow: var(--bevel); text-align: left; }
.therapy-selected-date svg, .therapy-date-trigger svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.therapy-selected-date span { display: grid; gap: 1px; }
.therapy-selected-date small { color: #7a8998; font-size: .61rem; font-weight: 850; text-transform: uppercase; }
.therapy-selected-date strong { color: #344d64; font-size: .8rem; }
.therapy-selected-date i, .therapy-date-trigger i { font-style: normal; }
.therapy-date-toolbar > button.therapy-today:not(.therapy-selected-date) {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 0;
  border-radius: 0;
  color: #58738e;
  background: transparent;
  box-shadow: none;
}
.therapy-date-toolbar > button.therapy-today:not(.therapy-selected-date):hover { color: #344f68; text-decoration: underline; text-underline-offset: 4px; }
.composer-heading, .composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.composer-heading { margin-bottom: 17px; }
.composer-heading h3 { margin: 0; font-size: 1.12rem; }
.auto-badge { padding: 7px 10px; border-radius: 999px; color: #557590; background: rgba(214,228,240,.88); font-size: .69rem; font-weight: 850; }
.prescription-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.prescription-field { display: grid; grid-template-columns: 34px 1fr; align-items: center; min-height: 52px; padding: 5px 8px; border: 1px solid rgba(113,137,160,.18); border-radius: 15px; background: rgba(255,255,255,.76); }
.prescription-field > span { color: #587590; font-weight: 900; text-align: center; }
.prescription-field input { width: 100%; min-height: 40px; padding: 0 9px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.prescription-field:focus-within { border-color: rgba(83,120,158,.45); box-shadow: 0 0 0 3px rgba(100,136,173,.09); }
.therapy-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) minmax(145px,.7fr) minmax(165px,.8fr); align-items: stretch; gap: 10px; margin-top: 11px; }
.therapy-date-field { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; min-height: 52px; padding: 5px 8px 5px 11px; border: 1px solid rgba(113,137,160,.18); border-radius: 15px; background: rgba(255,255,255,.7); }
.therapy-date-field span { color: #587590; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.therapy-date-trigger { display: grid; grid-template-columns: 19px minmax(0,1fr) 12px; align-items: center; gap: 7px; width: 100%; min-height: 40px; padding: 0 7px; border: 0; border-radius: 11px; color: #788a9c; background: rgba(244,248,251,.74); text-align: left; }
.therapy-date-trigger svg { width: 17px; height: 17px; }
.therapy-date-trigger b { overflow: hidden; color: #748394; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.therapy-date-trigger.has-value b { color: #3f5e78; }
.therapy-route-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; min-height: 52px; padding: 5px 9px 5px 11px; border: 1px solid rgba(113,137,160,.18); border-radius: 15px; background: rgba(255,255,255,.7); }
.therapy-route-field > span { color: #587590; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.therapy-route-field select { width: 100%; min-height: 39px; padding: 0 8px; border: 0; border-radius: 10px; outline: 0; color: #405971; background: rgba(244,248,251,.74); font-size: .73rem; font-weight: 750; }
.therapy-prn-option { position: relative; display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 9px; min-height: 52px; padding: 5px 12px; border: 1px solid rgba(113,137,160,.14); border-radius: 15px; color: #586f86; background: rgba(255,255,255,.68); cursor: pointer; }
.therapy-prn-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.therapy-prn-check { display: grid; width: 27px; height: 27px; place-items: center; border: 1.5px solid rgba(90,116,141,.3); border-radius: 9px; color: transparent; background: rgba(255,255,255,.85); box-shadow: var(--bevel); font-size: .72rem; font-weight: 900; }
.therapy-prn-option input:checked + .therapy-prn-check { border-color: transparent; color: white; background: linear-gradient(145deg,#6687a5,#4f708e); }
.therapy-prn-option input:focus-visible + .therapy-prn-check { outline: 3px solid rgba(83,120,158,.24); outline-offset: 2px; }
.therapy-prn-option > span:last-child { display: grid; gap: 1px; }
.therapy-prn-option b { font-size: .75rem; }
.therapy-prn-option small { color: #8593a1; font-size: .61rem; }
.composer-footer { margin-top: 14px; }
.composer-footer p { margin: 0; color: var(--muted); font-size: .75rem; }
.therapy-dayparts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.therapy-daypart { overflow: hidden; min-height: 210px; padding: 17px; border: 1px solid rgba(255,255,255,.88); border-radius: 22px; box-shadow: var(--bevel), 0 25px 55px -42px rgba(36,50,68,.6); }
.daypart-morning { background: linear-gradient(145deg,rgba(222,239,250,.92),rgba(249,252,254,.8)); }
.daypart-lunch { background: linear-gradient(145deg,rgba(240,237,211,.88),rgba(252,250,241,.82)); }
.daypart-dinner { background: linear-gradient(145deg,rgba(244,224,230,.88),rgba(252,247,249,.82)); }
.daypart-bedtime { background: linear-gradient(145deg,rgba(228,226,244,.9),rgba(249,248,253,.82)); }
.therapy-prn-card { min-height: 0; margin-top: 14px; background: linear-gradient(145deg,rgba(226,239,232,.9),rgba(249,252,250,.84)); }
.therapy-daypart > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; margin-bottom: 14px; }
.therapy-daypart h3 { margin: 0; font-size: 1.06rem; }
.therapy-daypart header p { margin: 3px 0 0; color: var(--muted); font-size: .7rem; }
.daypart-symbol { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.88); border-radius: 14px; color: #647e98; background: rgba(255,255,255,.56); box-shadow: var(--bevel); font-size: 1.1rem; }
.daypart-count { display: grid; min-width: 27px; height: 27px; place-items: center; border-radius: 999px; color: #687b8e; background: rgba(255,255,255,.58); font-size: .69rem; font-weight: 900; }
.daypart-doses { display: grid; gap: 13px; }
.therapy-time-group { display: grid; gap: 9px; }
.therapy-time-group + .therapy-time-group { padding-top: 14px; border-top: 1px solid rgba(102,126,149,.17); }
.therapy-time-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 3px; }
.therapy-time-heading time { color: #344f68; font-size: .94rem; font-weight: 950; letter-spacing: -.02em; }
.therapy-time-heading span { color: #7a8a9a; font-size: .62rem; font-weight: 820; }
.therapy-time-routes { display: grid; gap: 8px; }
.therapy-time-route { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: start; gap: 8px; }
.therapy-route-rail { display: grid; min-height: 0; align-self: start; align-content: center; justify-items: center; gap: 4px; padding: 8px 4px; border: 1px solid rgba(255,255,255,.74); border-radius: 14px; color: #5b7690; background: rgba(221,234,245,.64); box-shadow: inset 1px 1px 0 rgba(255,255,255,.72); text-align: center; }
.therapy-route-rail > .therapy-route-symbol { display: flex; width: auto; min-width: 27px; height: 27px; align-items: center; justify-content: center; gap: 3px; padding: 0 4px; border-radius: 9px; background: rgba(255,255,255,.58); }
.therapy-route-rail svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.therapy-route-rail strong { font-size: .58rem; line-height: 1.15; text-transform: uppercase; }
.therapy-route-symbol small { display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.72); font-size: .52rem; font-weight: 900; }
.therapy-time-route.route-sc .therapy-route-rail { color: #6f6b9b; background: rgba(225,222,244,.68); }
.therapy-time-route.route-im .therapy-route-rail { color: #946b64; background: rgba(244,226,220,.68); }
.therapy-time-route.route-iv .therapy-route-rail { color: #527d77; background: rgba(218,239,233,.68); }
.therapy-route-group { display: grid; gap: 7px; }
.therapy-route-group + .therapy-route-group { padding-top: 11px; border-top: 1px solid rgba(102,126,149,.14); }
.therapy-route-heading { display: flex; align-items: center; gap: 7px; padding: 0 3px; color: #617991; }
.therapy-route-heading > span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(255,255,255,.84); border-radius: 9px; background: rgba(255,255,255,.48); }
.therapy-route-heading svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.therapy-route-heading strong { font-size: .68rem; letter-spacing: .02em; text-transform: uppercase; }
.therapy-route-heading small { display: grid; min-width: 19px; height: 19px; margin-left: auto; place-items: center; border-radius: 50%; color: #718398; background: rgba(255,255,255,.55); font-size: .59rem; font-weight: 900; }
.route-sc .therapy-route-heading { color: #6f6b9b; }
.route-im .therapy-route-heading { color: #9a6b64; }
.route-iv .therapy-route-heading { color: #557f79; }
.therapy-route-doses { display: grid; gap: 9px; }
.daypart-empty { margin: 32px 0; color: rgba(91,108,126,.65); font-size: .8rem; text-align: center; }
.therapy-dose { padding: 10px; border: 1px solid rgba(255,255,255,.78); border-radius: 15px; background: rgba(255,255,255,.6); box-shadow: var(--bevel); transition: opacity 180ms ease, background 180ms ease; }
.therapy-dose.is-taken { background: rgba(230,241,234,.72); }
.dose-main { display: grid; grid-template-columns: 32px 50px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.therapy-dose.is-time-grouped .dose-main { grid-template-columns: 32px minmax(0,1fr) auto; }
.therapy-check { width: 30px; height: 30px; }
.therapy-check > span[aria-hidden] { width: 26px; height: 26px; border-radius: 9px; }
.dose-main time { color: #455f79; font-size: .86rem; font-weight: 900; }
.dose-copy { display: grid; gap: 2px; min-width: 0; }
.dose-copy strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.dose-copy small { color: var(--muted); font-size: .72rem; }
.dose-change-badge { width: max-content; margin-top: 2px; padding: 3px 7px; border-radius: 999px; color: #59768f; background: rgba(220,232,242,.76); font-size: .58rem; font-weight: 900; }
.therapy-dose-actions { display: flex; align-items: center; gap: 2px; }
.therapy-edit { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 50%; color: #647b92; background: rgba(231,238,244,.68); }
.therapy-edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.therapy-edit:hover { color: #456985; background: rgba(211,226,238,.9); }
.therapy-note { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 7px; margin-top: 9px; }
.therapy-note > span { color: #778595; font-size: .64rem; font-weight: 850; text-transform: uppercase; }
.therapy-note input { width: 100%; min-height: 34px; padding: 0 10px; border: 1px solid rgba(105,128,151,.14); border-radius: 10px; outline: 0; color: #3f4b57; background: rgba(255,255,255,.58); font-size: .75rem; }
.therapy-note input:focus { border-color: rgba(83,120,158,.4); background: rgba(255,255,255,.88); }
.therapy-shared-note { margin: 14px 0 0; color: var(--muted); font-size: .75rem; text-align: center; }

.upload-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.upload-panel, .pending-files-panel { padding: 24px; }
.upload-dropzone { display: grid; min-height: 310px; place-items: center; align-content: center; padding: 28px; border: 1px dashed rgba(95,122,150,.35); border-radius: 23px; background: rgba(237,243,248,.52); text-align: center; }
.upload-dropzone h2 { margin: 13px 0 7px; }
.upload-dropzone p { max-width: 420px; margin: 0 0 20px; color: var(--muted); }
.upload-dropzone small { margin-top: 12px; color: var(--muted); }
.upload-icon { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 21px; color: #5a7794; background: white; box-shadow: var(--bevel), var(--shadow); font-size: 1.7rem; }
.file-button { display: inline-flex; align-items: center; justify-content: center; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-panel > .field-label { margin: 18px 0; }
.submit-upload { width: 100%; }
.pending-file { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.pending-file strong { display: block; }
.pending-file small { color: var(--muted); }

.aether-dialog { width: min(610px,calc(100% - 28px)); padding: 0; border: 1px solid var(--edge); border-radius: 27px; color: var(--ink); background: rgba(248,250,252,.96); box-shadow: 0 35px 100px -30px rgba(30,42,57,.55); backdrop-filter: blur(26px); }
.aether-dialog::backdrop { background: rgba(49,60,74,.26); backdrop-filter: blur(5px); }
.aether-dialog form { padding: 25px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.dialog-heading h2 { margin: 0; }
.dialog-heading p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: .75rem; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: rgba(224,232,239,.7); font-size: 1.3rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.therapy-calendar-dialog { width: min(430px,calc(100% - 28px)); }
.therapy-calendar-panel { padding: 23px; }
.therapy-calendar-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.therapy-calendar-panel h2 { margin: 0; font-size: 1.42rem; text-transform: capitalize; }
.calendar-month-nav { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; margin: 18px 0 12px; }
.calendar-month-nav button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: #5c7690; background: rgba(232,239,245,.78); box-shadow: var(--bevel); font-weight: 900; }
.calendar-period-selects { display: grid; grid-template-columns: minmax(0,1fr) 82px; gap: 6px; }
.calendar-period-selects select { min-width: 0; min-height: 38px; padding: 0 27px 0 9px; border: 1px solid rgba(102,128,153,.14); border-radius: 12px; outline: 0; appearance: none; color: #455e76; background-color: rgba(249,251,252,.78); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235b7187' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 13px; font-size: .72rem; font-weight: 850; text-transform: capitalize; }
.therapy-calendar-weekdays, .therapy-calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.therapy-calendar-weekdays { margin-bottom: 5px; color: #8693a1; font-size: .59rem; font-weight: 900; text-align: center; text-transform: uppercase; }
.therapy-calendar-weekdays span { padding: 5px 0; }
.calendar-day, .calendar-blank { aspect-ratio: 1; }
.calendar-day { display: grid; place-items: center; border: 1px solid transparent; border-radius: 12px; color: #465a6e; background: rgba(241,245,248,.66); font-size: .75rem; font-weight: 750; }
.calendar-day:hover { border-color: rgba(88,119,149,.2); background: rgba(224,234,242,.78); }
.calendar-day.is-today { border-color: rgba(91,124,154,.35); color: #476c8c; }
.calendar-day.is-selected { border-color: transparent; color: white; background: linear-gradient(145deg,#597b9b,#415f7c); box-shadow: 0 10px 22px -14px rgba(38,70,99,.8); }
.calendar-day:disabled { opacity: .34; cursor: not-allowed; }
.therapy-calendar-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 18px; }
.therapy-calendar-panel > footer .primary-action, .therapy-calendar-panel > footer .secondary-action { min-height: 42px; padding: 0 17px; }
.therapy-edit-dialog { width: min(690px,calc(100% - 28px)); }
.tab-order-dialog { width: min(540px,calc(100% - 28px)); }
.tab-order-panel { padding: 24px; }
.tab-order-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.tab-order-panel h2 { margin: 0; }
.tab-order-panel header p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: .74rem; }
.tab-order-list { display: grid; gap: 7px; margin-top: 20px; }
.tab-order-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 7px 9px 7px 12px; border: 1px solid rgba(255,255,255,.86); border-radius: 15px; background: rgba(242,247,250,.76); box-shadow: var(--bevel); }
.tab-order-row > span { color: #607b94; }
.tab-order-row > span svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab-order-row strong { font-size: .78rem; }
.tab-order-row > div { display: flex; gap: 4px; }
.tab-order-row button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; color: #59738c; background: rgba(223,233,241,.82); font-weight: 900; }
.tab-order-row button:disabled { opacity: .3; }
.tab-order-panel > footer { display: flex; justify-content: space-between; gap: 9px; margin-top: 20px; }
.therapy-edit-fields { display: grid; grid-template-columns: 1.4fr .8fr .65fr .9fr; gap: 10px; }
.therapy-edit-scope { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; margin: 22px 0 0; padding: 0; border: 0; }
.therapy-edit-scope legend { grid-column: 1 / -1; margin-bottom: 8px; color: #516a82; font-size: .72rem; font-weight: 900; }
.therapy-edit-scope label { position: relative; display: block; cursor: pointer; }
.therapy-edit-scope input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.therapy-edit-scope span { display: grid; min-height: 70px; align-content: center; gap: 4px; padding: 12px 15px; border: 1px solid rgba(104,130,154,.16); border-radius: 17px; color: #566d83; background: rgba(238,243,247,.68); box-shadow: var(--bevel); }
.therapy-edit-scope b { font-size: .78rem; }
.therapy-edit-scope small { color: #8793a0; font-size: .68rem; }
.therapy-edit-scope input:checked + span { border-color: rgba(72,105,136,.4); color: #344f68; background: linear-gradient(135deg,rgba(220,232,242,.92),rgba(247,249,251,.86)); box-shadow: inset 0 0 0 2px rgba(88,120,150,.08),var(--bevel); }
.therapy-edit-scope input:focus-visible + span { outline: 3px solid rgba(83,120,158,.23); outline-offset: 2px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: none; max-width: 430px; padding: 13px 17px; border-radius: 16px; color: white; background: var(--ink); box-shadow: 0 22px 44px -20px rgba(20,26,34,.8); }
.toast.show { display: block; animation: toast-in 240ms ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 900px) {
  .welcome-hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 390px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .calendar-layout, .upload-layout { grid-template-columns: 1fr; }
  .patient-row { grid-template-columns: auto 1fr auto; }
  .patient-cell { display: none; }
  .therapy-dayparts { grid-template-columns: 1fr; }
  .tool-form-grid-wide { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 719px) {
  html { font-size: 15px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .app-header { width: calc(100% - 16px); min-height: 64px; margin-top: 8px; }
  .brand-mark { flex-basis: 45px; width: 45px; height: 45px; }
  .brand-copy small, .session-person { display: none; }
  .session-button { min-height: 40px; padding: 0 14px; }
  .app-main { width: calc(100% - 24px); padding-top: 18px; padding-bottom: 108px; }
  .primary-tabs { position: fixed; top: auto; right: 8px; bottom: max(10px,env(safe-area-inset-bottom)); left: 8px; z-index: 50; width: auto; max-width: none; margin: 0; justify-content: center; box-shadow: var(--bevel), 0 24px 50px -22px rgba(35,47,63,.55); }
  .primary-tabs .aether-tab { position: relative; flex: 1 1 0; min-width: 0; min-height: 51px; padding: 0 8px; flex-direction: column; gap: 2px; font-size: .63rem; }
  .primary-tabs .aether-tab svg { width: 20px; height: 20px; }
  .primary-tabs .aether-tab .tab-count { position: absolute; top: 2px; right: 12px; min-width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.9); font-size: .58rem; }
  .record-tabs-wrap { position: relative; top: auto; width: 100%; margin: 12px 0 18px; }
  .record-tabs { justify-content: flex-start; width: 100%; margin: 0; padding: 6px 52px 6px 6px; }
  .record-tabs .aether-tab { min-height: 44px; padding: 0 14px; font-size: .75rem; }
  .record-tabs .aether-tab svg { display: none; }
  .welcome-hero { min-height: 0; border-radius: 28px; }
  .welcome-copy { padding: 38px 22px 28px; text-align: center; }
  .welcome-copy h1 { font-size: clamp(2.8rem,15vw,4.2rem); }
  .hero-visual { min-height: 330px; }
  .card-front { top: 35%; left: 11%; }
  .card-back { top: 17%; right: 5%; }
  .access-panel { padding: 25px 16px; border-radius: 28px; }
  .role-grid { grid-template-columns: 1fr; }
  .role-card { grid-template-columns: auto 1fr auto; min-height: 118px; padding: 16px; }
  .role-icon { width: 58px; height: 58px; border-radius: 18px; }
  .feature-strip { grid-template-columns: 1fr; margin-top: 26px; }
  .feature-strip article { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .page-heading { align-items: stretch; flex-direction: column; margin-top: 10px; }
  .page-heading .primary-action { width: 100%; }
  .page-heading h1 { font-size: 2.35rem; }
  .metric-grid, .patient-metrics { grid-template-columns: repeat(2,1fr); }
  .metric-card { min-height: 135px; padding: 17px; }
  .metric-card strong { font-size: 1.7rem; }
  .metric-grid .metric-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .patient-toolbar { display: grid; grid-template-columns: 1fr auto; align-items: stretch; }
  .search-field { flex-basis: auto; max-width: none; }
  .search-field { grid-column: 1 / -1; }
  .patient-sort { grid-template-columns: 1fr; min-width: 0; padding: 0 5px; }
  .patient-sort > span { display: none; }
  .segmented-filter button { flex: 1; }
  .patient-row { grid-template-columns: auto 1fr; gap: 12px; min-height: 104px; padding: 15px 44px 15px 15px; }
  .patient-row .open-record { display: none; }
  .calendar-grid { gap: 3px; }
  .calendar-grid span { min-height: 39px; }
  .patient-welcome { align-items: stretch; flex-direction: column; padding: 32px 23px; }
  .patient-banner { grid-template-columns: auto 1fr; gap: 14px; padding: 20px; }
  .banner-avatar { width: 62px; height: 62px; border-radius: 20px; }
  .banner-status { grid-column: 1 / -1; width: max-content; }
  .content-grid, .anamnesis-grid, .field-grid { grid-template-columns: 1fr; }
  .clinical-tool-picker { grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: 20px; }
  .clinical-tool-card { padding: 16px; border-radius: 20px; }
  .tool-card-heading { align-items: stretch; flex-direction: column; }
  .tool-live-badge { width: max-content; }
  .tool-form-grid, .tool-form-grid-wide { grid-template-columns: 1fr; }
  .tool-result { min-height: 108px; margin-top: 16px; padding: 16px; }
  .qtc-results { grid-template-columns: 1fr; }
  .clinical-tools-disclaimer { flex-direction: column; }
  .monitoring-toolbar { grid-template-columns: 38px minmax(0,1fr) 38px; padding: 8px; }
  .monitoring-toolbar .monitoring-all-days, .monitoring-toolbar .monitoring-sort, .monitoring-toolbar .monitoring-chart-toggle { grid-column: span 3; }
  .monitoring-toolbar .monitoring-sort { grid-template-columns: auto minmax(0,1fr); }
  .monitoring-toolbar .monitoring-chart-toggle { justify-content: center; }
  .monitoring-summary { grid-template-columns: 1fr; gap: 0; padding: 13px 16px; }
  .monitoring-summary-stat { padding: 12px 2px; }
  .monitoring-summary-stat + .monitoring-summary-stat { border-top: 1px solid rgba(102,126,149,.15); border-left: 0; }
  .monitoring-charts { grid-template-columns: 1fr; }
  .monitoring-chart-card { padding: 15px; }
  .monitoring-fields { grid-template-columns: 1fr; }
  .monitor-context { grid-column: auto; }
  .monitoring-form-footer { align-items: stretch; flex-direction: column; }
  .monitoring-form-footer > span { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .monitoring-form-footer > span:has(.primary-action:only-child) { grid-template-columns: 1fr; }
  .monitoring-entry { grid-template-columns: 76px minmax(0,1fr); gap: 12px; padding: 14px; }
  .monitoring-entry-time { padding-right: 11px; }
  .monitor-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .record-card.full-width { grid-column: auto; }
  .record-section-heading { align-items: start; flex-direction: column; }
  .detail-row { grid-template-columns: 1fr; gap: 5px; }
  .exam-row { grid-template-columns: auto 1fr; }
  .exam-row-end { grid-column: 2; max-width: none; align-items: flex-start; flex-direction: column; }
  .exam-row-end .exam-value { text-align: left; }
  .document-exam-composer { padding: 18px; }
  .document-exam-fields { grid-template-columns: 1fr; }
  .document-exam-summary, .document-exam-file { grid-column: auto; }
  .document-file-picker > span { width: 100%; justify-content: center; }
  .document-file-picker b { max-width: calc(100vw - 125px); }
  .document-exam-footer { align-items: stretch; flex-direction: column; }
  .document-exam-footer > span { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .document-exam-footer button { min-width: 0; padding-right: 10px; padding-left: 10px; }
  .pending-action-row { align-items: stretch; flex-direction: column; grid-column: 1 / -1; }
  .lab-import-card, .lab-review-card, .lab-grid-card, .lab-grid-empty { padding: 18px; }
  .lab-import-grid { grid-template-columns: 1fr; }
  .lab-import-footer, .lab-review-actions { align-items: stretch; flex-direction: column; }
  .lab-import-footer .primary-action, .lab-review-actions button { width: 100%; }
  .lab-review-head { display: none; }
  .lab-review-row { grid-template-columns: 1fr 1fr 32px; }
  .lab-review-row label:first-child { grid-column: 1 / -1; }
  .lab-review-remove { grid-column: 3; grid-row: 2; }
  .lab-grid-scroll { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
  .clinical-chart-card { margin-right: -7px; margin-left: -7px; padding: 14px; }
  .chart-card-heading { align-items: stretch; flex-direction: column; }
  .chart-card-heading select { width: 100%; min-width: 0; }
  .trend-chart svg { min-width: 560px; }
  .trend-chart { overflow-x: auto; padding-bottom: 4px; }
  .urine-grid-card .card-heading { align-items: stretch; flex-direction: column; }
  .urine-grid-actions { justify-content: space-between; }
  .lab-review-card .card-heading, .lab-edit-card .card-heading, .lab-edit-actions, .lab-edit-heading-controls { align-items: stretch; flex-direction: column; }
  .lab-review-card .card-heading > div:first-child { min-width: 0; }
  .lab-review-card .card-heading h3 { margin: 0; font-size: 1.18rem; }
  .lab-review-card .card-heading .auto-badge { display: inline-flex; width: max-content; max-width: 100%; margin-top: 10px; }
  .lab-review-top-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .lab-review-top-actions button { min-width: 0; padding: 0 9px; font-size: .76rem; white-space: nowrap; }
  .lab-edit-actions > span { display: grid; grid-template-columns: 1fr 1fr; }
  .lab-edit-actions > .danger-action { width: 100%; }
  .program-card, .recommendations-card, .therapy-composer { padding: 19px; }
  .card-title-row { align-items: start; }
  .program-item { grid-template-columns: 32px minmax(0,1fr) auto; padding-right: 8px; padding-left: 8px; }
  .program-compose-input { min-height: 190px; }
  .diary-form { padding: 18px; }
  .diary-form textarea { min-height: 260px; }
  .diary-form-actions { display: grid; grid-template-columns: 1fr; }
  .diary-form-actions button { width: 100%; }
  .program-footer { align-items: stretch; flex-direction: column; }
  .program-add { width: 100%; }
  .composer-heading, .composer-footer { align-items: stretch; flex-direction: column; }
  .prescription-grid { grid-template-columns: 1fr; }
  .therapy-date-toolbar { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; }
  .therapy-selected-date { min-width: 0; }
  .therapy-date-toolbar > button.therapy-today:not(.therapy-selected-date) { grid-column: 2; justify-self: center; width: max-content; min-width: 0; height: auto; padding: 0 7px; }
  .therapy-options { grid-template-columns: 1fr; }
  .composer-footer .primary-action { width: 100%; }
  .therapy-daypart { min-height: 0; padding: 12px; border-radius: 19px; }
  .therapy-daypart > header { gap: 8px; margin-bottom: 10px; }
  .daypart-symbol { width: 35px; height: 35px; border-radius: 12px; }
  .therapy-time-group { gap: 6px; }
  .therapy-time-group + .therapy-time-group { padding-top: 10px; }
  .therapy-time-heading span { display: none; }
  .therapy-time-route { grid-template-columns: 62px minmax(0,1fr); gap: 6px; }
  .therapy-route-rail { gap: 2px; padding: 6px 2px; border-radius: 12px; }
  .therapy-route-rail > .therapy-route-symbol { min-width: 24px; height: 24px; border-radius: 8px; }
  .therapy-route-rail strong { max-width: 58px; font-size: .49rem; }
  .therapy-route-symbol small { display: grid; width: 14px; height: 14px; font-size: .47rem; }
  .therapy-dose { padding: 8px; border-radius: 13px; }
  .dose-main { grid-template-columns: 30px 46px minmax(0,1fr) auto; }
  .therapy-dose.is-time-grouped .dose-main { grid-template-columns: 28px minmax(0,1fr) auto; gap: 6px; }
  .therapy-check { width: 27px; height: 27px; }
  .therapy-check > span[aria-hidden] { width: 24px; height: 24px; }
  .therapy-dose-actions { flex-direction: row; }
  .therapy-edit, .program-remove, .therapy-remove { width: 27px; height: 27px; }
  .dose-copy strong { font-size: .78rem; }
  .dose-copy small { font-size: .66rem; }
  .therapy-note { grid-template-columns: 30px minmax(0,1fr); margin-top: 7px; }
  .therapy-note input { min-height: 32px; font-size: .7rem; }
  .therapy-edit-fields, .therapy-edit-scope { grid-template-columns: 1fr; }
  .therapy-calendar-panel { padding: 18px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .toast { right: 12px; bottom: 92px; left: 12px; max-width: none; }
}

@media (max-width: 420px) {
  .metric-grid, .patient-metrics { grid-template-columns: 1fr; }
  .metric-grid .metric-card:last-child:nth-child(odd) { grid-column: auto; }
  .brand-copy strong { font-size: .95rem; }
}

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