:root {
  --navy-950: #10283c;
  --navy-900: #17344d;
  --navy-800: #23445f;
  --blue-700: #23739a;
  --blue-600: #2c88ae;
  --blue-500: #4fa9c2;
  --sky-100: #eaf5fa;
  --sky-50: #f3f9fb;
  --green-700: #287b69;
  --green-600: #34917b;
  --green-100: #e5f4ef;
  --green-50: #f2faf7;
  --warm-100: #fff3df;
  --warm-50: #fffaf2;
  --danger-700: #b65454;
  --danger-100: #fbe9e8;
  --amber-700: #a16425;
  --amber-100: #fff0d5;
  --ink: #173247;
  --muted: #64778a;
  --muted-2: #8493a0;
  --line: #dce8ec;
  --surface: #ffffff;
  --canvas: #f7fbfc;
  --shadow-sm: 0 8px 24px rgba(28, 73, 96, 0.07);
  --shadow-md: 0 18px 48px rgba(28, 73, 96, 0.11);
  --shadow-lg: 0 28px 72px rgba(20, 57, 78, 0.15);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --container: 1200px;
  --font-sans: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
}

/* AI 畫面問答與結構化報告助理 */
.ai-vision-assistant {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #bfd9e4;
  background: linear-gradient(145deg, #ffffff 0%, #f4fbfd 58%, #edf8f5 100%);
  box-shadow: 0 18px 44px rgba(20, 61, 77, .11);
}

.ai-vision-head,
.ai-report > header,
.ai-report > footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.ai-vision-head h2,
.ai-report h3 { margin: 4px 0 8px; color: #102e3a; }
.ai-vision-head p,
.ai-report header p { margin: 0; max-width: 760px; color: #526c78; line-height: 1.7; }
.ai-vision-head .status-badge { white-space: nowrap; }

.ai-vision-privacy {
  display: flex;
  gap: 14px;
  margin: 20px 0;
  padding: 15px 17px;
  border: 1px solid #cae3dc;
  border-radius: 16px;
  background: rgba(237, 249, 246, .92);
  color: #244954;
}

.ai-vision-privacy > span { font-size: 23px; }
.ai-vision-privacy strong { display: block; font-size: 16px; }
.ai-vision-privacy p { margin: 5px 0 0; color: #55717a; line-height: 1.6; }

.ai-video-buffer {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid #c7dce5;
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
}

.ai-video-buffer > header,
.ai-video-buffer > header > div,
.ai-card-step,
.ai-buffer-summary,
.ai-buffer-actions {
  display: flex;
  align-items: center;
}

.ai-video-buffer > header { justify-content: space-between; gap: 18px; }
.ai-video-buffer > header > div,
.ai-card-step { gap: 12px; }
.ai-video-buffer h3 { margin: 0 0 4px; color: #173d4b; font-size: 18px; }
.ai-video-buffer header p { margin: 0; color: #627a84; line-height: 1.55; }
.ai-video-buffer .status-badge { white-space: nowrap; }

.ai-step-number {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1c7186, #249678);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(31, 126, 125, .2);
}

.ai-card-step { margin-bottom: 14px; }
.ai-card-step strong,
.ai-card-step small { display: block; }
.ai-card-step strong { color: #234653; font-size: 16px; }
.ai-card-step small { margin-top: 3px; color: #70858e; line-height: 1.45; }

.ai-buffer-timeline {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #dbe7eb;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbfc, #eef6f8);
}

.ai-buffer-summary { justify-content: space-between; gap: 14px; color: #42616c; }
.ai-buffer-summary > span { display: flex; align-items: center; gap: 9px; }
.ai-buffer-summary i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9aacb3;
}
.ai-buffer-summary i.active { background: #1ba676; box-shadow: 0 0 0 5px rgba(27, 166, 118, .12); animation: ai-buffer-pulse 1.6s ease-out infinite; }
.ai-buffer-summary b { color: #1e5364; }

@keyframes ai-buffer-pulse {
  0% { box-shadow: 0 0 0 0 rgba(27, 166, 118, .28); }
  70% { box-shadow: 0 0 0 8px rgba(27, 166, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(27, 166, 118, 0); }
}

.ai-buffer-thumbnails {
  display: grid;
  grid-template-columns: repeat(7, minmax(76px, 1fr));
  gap: 9px;
  min-height: 86px;
  margin: 13px 0;
}

.ai-buffer-thumbnails > p {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px dashed #b9ced7;
  border-radius: 12px;
  color: #71858d;
  text-align: center;
}

.ai-buffer-thumbnails button {
  position: relative;
  min-height: 82px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #173642;
  cursor: pointer;
}

.ai-buffer-thumbnails button.active { border-color: #21a17b; box-shadow: 0 0 0 3px rgba(33, 161, 123, .15); }
.ai-buffer-thumbnails img { width: 100%; height: 82px; object-fit: cover; opacity: .9; }
.ai-buffer-thumbnails button:hover img { opacity: 1; }
.ai-buffer-thumbnails span { position: absolute; right: 5px; bottom: 5px; padding: 3px 7px; border-radius: 999px; background: rgba(6, 27, 36, .82); color: #fff; font-size: 12px; font-weight: 800; }

.ai-buffer-scrubber {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  color: #637b85;
  font-size: 14px;
  font-weight: 700;
}

.ai-buffer-scrubber input { width: 100%; height: 30px; padding: 0; accent-color: #16866d; cursor: ew-resize; }
.ai-buffer-scrubber input:disabled { cursor: not-allowed; opacity: .5; }
.ai-buffer-scale { display: flex; justify-content: space-between; gap: 12px; margin: -2px 45px 0; color: #748993; font-size: 13px; }
.ai-buffer-scale strong { color: #1d6577; }
.ai-buffer-actions { justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 13px; }

.ai-vision-grid {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr);
  gap: 20px;
}

.ai-capture-card,
.ai-question-card {
  padding: 18px;
  border: 1px solid #d5e4ea;
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
}

.ai-capture-preview {
  position: relative;
  display: grid;
  min-height: 270px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #91b8c8;
  border-radius: 16px;
  background: linear-gradient(145deg, #102f3d, #0e2430);
}

.ai-capture-preview > div {
  display: grid;
  max-width: 300px;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: #eaf9ff;
}

.ai-capture-preview > div > span { font-size: 40px; color: #75d5bd; }
.ai-capture-preview > div > small { color: #b9d0da; line-height: 1.6; }
.ai-capture-preview img { width: 100%; height: 100%; max-height: 360px; object-fit: contain; }
.ai-capture-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.ai-upload-button { cursor: pointer; }

.ai-capture-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.ai-capture-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #e8eff2; }
.ai-capture-meta dt { color: #6c838d; }
.ai-capture-meta dd { margin: 0; color: #213f4c; font-weight: 700; text-align: right; }

.ai-question-card { display: flex; flex-direction: column; gap: 15px; }
.ai-question-settings { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.ai-question-settings label { flex: 1; }
.ai-question-settings label > span,
.ai-question-field > span { display: block; margin-bottom: 7px; color: #294854; font-weight: 800; }
.ai-question-settings select,
.ai-question-field textarea { width: 100%; border: 1px solid #aac5d0; border-radius: 13px; background: #fff; color: #193845; font: inherit; }
.ai-question-settings select { min-height: 50px; padding: 0 14px; }
.ai-question-field textarea { min-height: 126px; padding: 14px 15px; resize: vertical; line-height: 1.65; }
.ai-question-field textarea:focus,
.ai-question-settings select:focus { outline: 3px solid rgba(38, 133, 158, .18); border-color: #297f99; }
.ai-question-field small { display: block; margin-top: 6px; color: #6c818a; }
.ai-context-chip { padding: 11px 13px; border-radius: 999px; background: #eaf5f8; color: #295b6d; font-weight: 800; white-space: nowrap; }

.ai-prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-prompt-chips button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #c7dbe3;
  border-radius: 999px;
  background: #f7fbfc;
  color: #285468;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ai-prompt-chips button:hover { border-color: #5fa8b9; background: #eaf6f8; }

.ai-consent {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #d5e2e7;
  border-radius: 14px;
  background: #f8fafb;
  cursor: pointer;
}
.ai-consent input { width: 21px; height: 21px; margin-top: 2px; accent-color: #14775f; }
.ai-consent strong,
.ai-consent small { display: block; }
.ai-consent strong { color: #23434f; }
.ai-consent small { margin-top: 4px; color: #69808a; line-height: 1.5; }
.ai-submit-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-form-message { margin: 0; padding: 11px 13px; border-radius: 12px; background: #f1f6f8; color: #57717c; line-height: 1.55; }
.ai-form-message[data-tone="success"] { background: #e9f8f1; color: #1b6b50; }
.ai-form-message[data-tone="warning"] { background: #fff8df; color: #806019; }
.ai-form-message[data-tone="error"] { background: #fff0ef; color: #a33a32; }
.ai-form-message[data-tone="progress"] { background: #eaf4ff; color: #245d8c; }

.ai-report { margin-top: 22px; padding: 20px; border: 1px solid #bcd9df; border-radius: 20px; background: #fff; }
.ai-answer-card { margin: 18px 0; padding: 16px 18px; border-left: 5px solid #238d73; border-radius: 13px; background: #edf8f5; }
.ai-answer-card strong { color: #17654f; }
.ai-answer-card p { margin: 7px 0 0; color: #294b57; line-height: 1.75; white-space: pre-wrap; }
.ai-measurement-table { overflow: hidden; margin: 16px 0; border: 1px solid #dce7eb; border-radius: 14px; }
.ai-measurement-table > div { display: grid; grid-template-columns: 1.35fr .8fr 1fr .65fr; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #e5edef; color: #49636e; }
.ai-measurement-table > div:first-child { background: #eef5f7; color: #244654; font-weight: 800; }
.ai-measurement-table > div:last-child { border-bottom: 0; }
.ai-measurement-table strong { color: #244654; }
.ai-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.ai-report-grid article { padding: 16px; border: 1px solid #dce8ec; border-radius: 15px; background: #fafcfd; }
.ai-report-grid h4 { margin: 0 0 9px; color: #254653; }
.ai-report-grid ul { margin: 0; padding-left: 20px; color: #536c76; line-height: 1.7; }
.ai-report-grid p { margin: 0; color: #71838b; }
.ai-report > footer { align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e0e9ec; }
.ai-report > footer strong { color: #234653; }
.ai-report > footer p { margin: 4px 0 0; color: #6b7f88; }

@media (max-width: 980px) {
  .ai-vision-grid { grid-template-columns: 1fr; }
  .ai-capture-preview { min-height: 330px; }
}

@media (max-width: 680px) {
  .ai-vision-assistant { margin-top: 18px; border-radius: 18px; }
  .ai-vision-head,
  .ai-report > header,
  .ai-report > footer,
  .ai-question-settings { align-items: stretch; flex-direction: column; }
  .ai-vision-head .status-badge { align-self: flex-start; }
  .ai-vision-privacy { align-items: flex-start; }
  .ai-video-buffer { padding: 14px; }
  .ai-video-buffer > header { align-items: flex-start; flex-direction: column; }
  .ai-video-buffer .status-badge { align-self: flex-start; }
  .ai-buffer-summary { align-items: flex-start; flex-direction: column; }
  .ai-buffer-thumbnails { display: flex; min-height: 96px; overflow-x: auto; padding: 3px; scroll-snap-type: x mandatory; }
  .ai-buffer-thumbnails > p { flex: 1 0 100%; min-height: 88px; }
  .ai-buffer-thumbnails button { flex: 0 0 128px; scroll-snap-align: start; }
  .ai-buffer-scale { margin-right: 40px; margin-left: 40px; }
  .ai-buffer-actions .btn { width: 100%; min-height: 50px; justify-content: center; }
  .ai-capture-card,
  .ai-question-card,
  .ai-report { padding: 14px; }
  .ai-capture-preview { min-height: 225px; }
  .ai-capture-actions .btn,
  .ai-upload-button,
  .ai-submit-row .btn { width: 100%; min-height: 50px; justify-content: center; }
  .ai-context-chip { align-self: flex-start; }
  .ai-report-grid { grid-template-columns: 1fr; }
  .ai-measurement-table { overflow-x: auto; }
  .ai-measurement-table > div { min-width: 650px; }
}

/* Patient MediaPipe motion game */
.motion-game-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:16px; padding:28px 30px; border:1px solid #cce1e2; border-radius:24px; background:linear-gradient(135deg,#fafdff 0%,#e9f8f2 58%,#eaf4ff 100%); box-shadow:0 14px 34px rgba(25,67,87,.07); }
.motion-game-page-head h1 { margin:7px 0 9px; color:#153f54; font-size:clamp(1.9rem,3.4vw,2.65rem); line-height:1.16; }
.motion-game-page-head p { max-width:840px; margin:0; color:#55717d; font-size:1.05rem; line-height:1.72; }
.rehab-game-assignment { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.rehab-game-assignment span { display:grid; gap:3px; min-height:74px; padding:14px 16px; border:1px solid #d7e6e9; border-radius:15px; background:#fff; box-shadow:0 8px 18px rgba(30,72,88,.04); }
.rehab-game-assignment small { color:#70858e; font-weight:750; }
.rehab-game-assignment strong { color:#244f63; line-height:1.4; }
.motion-game-back { display:inline-flex; align-items:center; gap:8px; min-height:48px; margin:0 0 10px; color:#276e75; font-weight:900; text-decoration:none; }
.motion-game-back .icon { width:19px; transform:rotate(180deg); }
.motion-game-hub { display:grid; gap:18px; }
.motion-game-daily { display:grid; grid-template-columns:92px minmax(0,1fr) auto; align-items:center; gap:20px; padding:22px; border-color:#acd8c8; background:linear-gradient(135deg,#f4fbf8,#edf7ff); }
.motion-game-daily-art { display:grid; width:92px; height:92px; place-items:center; overflow:hidden; border-radius:27px; background:linear-gradient(145deg,#1c5470,#287d76); color:#fff; box-shadow:0 12px 24px rgba(30,85,100,.16); }
.motion-game-daily-art .icon { width:42px; height:42px; }
.motion-game-daily h2 { margin:4px 0; color:#18485c; font-size:1.45rem; }
.motion-game-daily p { margin:0 0 10px; color:#627b85; font-size:1rem; line-height:1.6; }
.motion-game-daily > div:nth-child(2) > div { display:flex; flex-wrap:wrap; gap:7px; }
.motion-game-category-bar { position:sticky; z-index:5; top:76px; display:flex; gap:8px; overflow:auto; padding:9px; border:1px solid #d8e6e9; border-radius:16px; background:rgba(255,255,255,.94); box-shadow:0 9px 22px rgba(25,67,87,.06); scrollbar-width:none; }
.motion-game-category-bar a { display:inline-flex; align-items:center; justify-content:center; min-width:max-content; min-height:44px; padding:0 16px; border:1px solid #d8e6e9; border-radius:12px; color:#55727e; font-weight:850; text-decoration:none; }
.motion-game-category-bar a:hover,.motion-game-category-bar a.active { border-color:#4aa88c; background:#eaf7f2; color:#236e59; }
.motion-game-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; scroll-margin-top:150px; }
.motion-game-card { display:grid; grid-template-columns:190px minmax(0,1fr); min-height:320px; overflow:hidden; scroll-margin-top:150px; border:1px solid #d5e5e8; border-radius:24px; background:#fff; box-shadow:0 13px 32px rgba(26,68,87,.07); transition:transform .2s ease,box-shadow .2s ease; }
.motion-game-card:hover { transform:translateY(-3px); box-shadow:0 18px 38px rgba(26,68,87,.12); }
.motion-game-card-art { position:relative; display:grid; min-height:100%; place-items:center; overflow:hidden; color:#fff; background:linear-gradient(150deg,#1d5269,#267b75); }
.motion-game-card-art::before,.motion-game-card-art::after { content:""; position:absolute; border-radius:50%; background:rgba(255,255,255,.13); }
.motion-game-card-art::before { width:150px; height:150px; top:-45px; right:-60px; }
.motion-game-card-art::after { width:100px; height:100px; bottom:-30px; left:-25px; }
.motion-game-card-art > i { position:absolute; width:125px; height:125px; border:2px dashed rgba(255,255,255,.35); border-radius:50%; animation:game-art-spin 15s linear infinite; }
.motion-game-card-art > span { position:relative; z-index:2; display:grid; width:76px; height:76px; place-items:center; border:1px solid rgba(255,255,255,.3); border-radius:23px; background:rgba(255,255,255,.18); backdrop-filter:blur(6px); }
.motion-game-card-art .icon { width:38px; height:38px; }
.motion-game-card-art b { position:absolute; z-index:2; right:14px; bottom:12px; color:rgba(255,255,255,.7); font-family:"Plus Jakarta Sans",sans-serif; font-size:2rem; }
.game-visual-river .motion-game-card-art,.game-head-river { background:linear-gradient(145deg,#eafaf8,#eaf4ff); }.game-visual-river .motion-game-card-art { background:linear-gradient(150deg,#166982,#2aa28c); }
.game-visual-bubble .motion-game-card-art { background:linear-gradient(150deg,#315b9d,#8061ad); }
.game-visual-park .motion-game-card-art { background:linear-gradient(150deg,#397855,#9a9d42); }
.game-visual-elevator .motion-game-card-art { background:linear-gradient(150deg,#2d435a,#67839b); }
.game-visual-lighthouse .motion-game-card-art { background:linear-gradient(150deg,#16465f,#297b86); }
.game-visual-garden .motion-game-card-art { background:linear-gradient(150deg,#347950,#a87951); }
.game-visual-soccer .motion-game-card-art { background:linear-gradient(150deg,#14653f,#2e9271); }
.game-head-star { background:linear-gradient(135deg,#fbfdff,#edf2ff 58%,#e7f7f2); }.game-head-bubble { background:linear-gradient(135deg,#fbfdff,#f3edff 58%,#eaf8f7); }.game-head-park,.game-head-garden,.game-head-soccer { background:linear-gradient(135deg,#fbfefc,#ecf8ef 58%,#fff8e8); }.game-head-elevator { background:linear-gradient(135deg,#fbfdff,#eaf1f6 58%,#eaf8f5); }.game-head-lighthouse { background:linear-gradient(135deg,#fbfdff,#e8f5fa 58%,#fff9df); }
.motion-game-card-body { display:grid; align-content:start; gap:10px; padding:21px; }
.motion-game-card-tags { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.motion-game-card-tags span { padding:5px 9px; border-radius:999px; background:#e8f5f0; color:#26715c; font-size:.79rem; font-weight:900; }
.motion-game-card-tags small { color:#728790; font-weight:800; }
.motion-game-card h2 { margin:0; color:#19485c; font-size:1.35rem; }
.motion-game-card p { margin:0; color:#617a84; line-height:1.6; }
.motion-game-card dl { display:grid; gap:7px; margin:0; }
.motion-game-card dl div { display:grid; grid-template-columns:45px minmax(0,1fr); gap:7px; }
.motion-game-card dt { color:#799098; font-size:.82rem; font-weight:850; }.motion-game-card dd { margin:0; color:#365e6e; font-size:.86rem; font-weight:750; }
.motion-game-card .btn { align-self:end; min-height:50px; margin-top:auto; }
.motion-game-hub-lower { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.motion-game-week,.motion-game-records { padding:20px; }
.motion-game-week-days { display:grid; grid-template-columns:repeat(7,1fr); gap:7px; margin:15px 0; }
.motion-game-week-days span { display:grid; gap:6px; place-items:center; padding:9px 4px; border:1px solid #dbe7e9; border-radius:12px; color:#70848c; }
.motion-game-week-days i { display:grid; width:31px; height:31px; place-items:center; border-radius:10px; background:#eef3f4; font-style:normal; font-weight:900; }.motion-game-week-days .done i { background:#2d9175; color:#fff; }.motion-game-week-days .today { border-color:#e7b856; background:#fff9ea; }.motion-game-week-days .today i { background:#f2c966; color:#694715; }
.motion-game-week > p { margin:0; color:#6f838b; line-height:1.55; }
.motion-game-records > div:last-child { display:grid; gap:9px; }
.motion-game-records > div:last-child span { display:grid; grid-template-columns:12px minmax(0,1fr); gap:2px 9px; padding:11px; border:1px solid #dce8ea; border-radius:13px; }
.motion-game-records > div:last-child i { grid-row:1/3; align-self:center; width:10px; height:10px; border-radius:50%; background:#3c9a7d; }.motion-game-records > div:last-child i.info { background:#3e91b8; }.motion-game-records > div:last-child i.warning { background:#e1a145; }
.motion-game-records b { color:#315c6c; }.motion-game-records small { color:#748990; }
@keyframes game-art-spin { to { transform:rotate(360deg); } }
.rehab-game-shell { display:grid; gap:16px; }
.rehab-game-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(290px,.65fr); gap:16px; }
.rehab-game-stage-card,.rehab-game-control-panel,.rehab-game-rom-panel,.rehab-game-guide,.rehab-game-summary { border:1px solid #d2e3e7; border-radius:22px; background:#fff; box-shadow:0 14px 34px rgba(25,67,87,.07); }
.rehab-game-stage-card { overflow:hidden; }
.rehab-game-stage-card > header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 19px; border-bottom:1px solid #deeaed; background:#fbfdfd; }
.rehab-game-stage-card > header > div { display:grid; gap:3px; }
.rehab-game-stage-card > header span:first-child { color:#71868f; font-size:.82rem; font-weight:800; }
.rehab-game-stage-card > header strong { color:#183f54; font-size:1.25rem; }
.rehab-game-stage { position:relative; min-height:480px; overflow:hidden; background:linear-gradient(135deg,#123d52,#1f6e6c); }
.rehab-game-stage video,.rehab-game-stage canvas { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.rehab-game-stage video { transform:scaleX(-1); opacity:0; transition:opacity .25s ease; }
.rehab-game-shell.is-live .rehab-game-stage video { opacity:1; }
.rehab-game-stage canvas { z-index:2; }
.rehab-game-live-badges { position:absolute; z-index:3; top:14px; left:14px; display:flex; flex-wrap:wrap; gap:8px; pointer-events:none; }
.rehab-game-live-badges span { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid rgba(255,255,255,.25); border-radius:999px; background:rgba(8,37,50,.73); color:#f1fbfb; font-size:.78rem; font-weight:800; backdrop-filter:blur(9px); }
.rehab-game-live-badges i { width:8px; height:8px; border-radius:50%; background:#70e3bd; box-shadow:0 0 0 5px rgba(112,227,189,.18); }
.rehab-game-hud { position:absolute; z-index:4; top:14px; right:14px; display:grid; grid-template-columns:repeat(4,minmax(72px,auto)); gap:7px; pointer-events:none; }
.rehab-game-hud > span { display:grid; gap:1px; min-height:54px; padding:8px 11px; border:1px solid rgba(255,255,255,.3); border-radius:14px; background:rgba(8,37,50,.78); color:#fff; text-align:center; box-shadow:0 7px 18px rgba(4,29,40,.18); backdrop-filter:blur(9px); }
.rehab-game-hud small { color:#bfe2e7; font-size:.67rem; font-weight:800; }.rehab-game-hud strong { font-family:"Plus Jakarta Sans","Noto Sans TC",sans-serif; font-size:.98rem; }
.rehab-game-hud [data-game-energy] { color:#ff858c; letter-spacing:1px; }.rehab-game-hud [data-game-energy][data-level="3"] { color:#84e9b9; }
.rehab-game-event { position:absolute; z-index:5; top:50%; left:50%; display:grid; min-width:240px; gap:4px; padding:18px 24px; border:2px solid rgba(255,255,255,.7); border-radius:22px; background:linear-gradient(135deg,rgba(25,89,97,.94),rgba(39,142,111,.92)); color:#fff; text-align:center; transform:translate(-50%,-50%); box-shadow:0 20px 45px rgba(4,28,40,.3); pointer-events:none; backdrop-filter:blur(10px); }
.rehab-game-event[hidden] { display:none; }.rehab-game-event strong { font-size:1.55rem; }.rehab-game-event span { color:#dffcf1; font-weight:800; }
.rehab-game-event[data-tone="combo"] { background:linear-gradient(135deg,rgba(104,49,143,.95),rgba(209,91,145,.93)); }.rehab-game-event[data-tone="wave"] { min-width:330px; background:linear-gradient(135deg,rgba(27,75,137,.96),rgba(55,156,145,.94)); }.rehab-game-event[data-tone="miss"] { background:linear-gradient(135deg,rgba(139,87,35,.94),rgba(200,130,53,.92)); }.rehab-game-event[data-tone="bonus"],.rehab-game-event[data-tone="time"] { background:linear-gradient(135deg,rgba(93,67,148,.96),rgba(40,132,153,.94)); }
.rehab-game-event.pop { animation:rehab-event-pop .95s cubic-bezier(.2,.8,.2,1) both; }
.rehab-game-shell.effect-success .rehab-game-stage-card { animation:rehab-stage-glow .42s ease; }
.rehab-game-feedback { display:grid; grid-template-columns:minmax(0,1fr) 110px; align-items:center; gap:18px; padding:16px 19px; border-top:1px solid #dbe9eb; background:#f9fcfc; }
.rehab-game-feedback span { color:#71878f; font-size:.78rem; font-weight:850; }
.rehab-game-feedback strong { display:block; margin:3px 0; color:#1b5366; font-size:1.1rem; }
.rehab-game-feedback p { margin:0; color:#607983; line-height:1.5; }
.rehab-game-hold-meter { position:relative; height:14px; overflow:hidden; border-radius:99px; background:#dce8e9; }
.rehab-game-hold-meter::after { content:""; position:absolute; inset:0 auto 0 0; width:var(--hold,0%); border-radius:inherit; background:linear-gradient(90deg,#2d9878,#67d8b8); transition:width .08s linear; }
.rehab-game-primary-controls { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:9px; padding:0 19px 19px; background:#f9fcfc; }
.rehab-game-primary-controls .btn { min-height:52px; }
.rehab-game-stop { border:1px solid #e3bfc0; background:#fff4f3; color:#ad3c3e; }
.rehab-game-stop:hover { background:#ffe9e7; }
.rehab-game-control-panel { display:grid; align-content:start; gap:17px; padding:18px; }
.rehab-game-control-panel > section { display:grid; gap:11px; padding-bottom:17px; border-bottom:1px solid #e1ebed; }
.rehab-game-control-panel > section:last-child { padding-bottom:0; border-bottom:0; }
.rehab-game-section-title { display:grid; grid-template-columns:31px minmax(0,1fr); align-items:center; gap:9px; }
.rehab-game-section-title > span { display:grid; width:31px; height:31px; place-items:center; border-radius:10px; background:#e6f4ef; color:#24715c; font-weight:900; }
.rehab-game-section-title > div { display:grid; gap:2px; }
.rehab-game-section-title strong { color:#244e61; }
.rehab-game-section-title small { color:#778b93; line-height:1.35; }
.rehab-game-mode-list { display:grid; gap:8px; }
.rehab-game-mode-list button { display:grid; grid-template-columns:40px minmax(0,1fr); align-items:center; gap:10px; min-height:64px; padding:10px; border:1px solid #dae7ea; border-radius:14px; background:#fbfdfd; color:inherit; text-align:left; cursor:pointer; transition:.18s ease; }
.rehab-game-mode-list button:hover,.rehab-game-mode-list button.active { border-color:#67b59e; background:#edf8f4; box-shadow:0 7px 16px rgba(34,112,87,.08); transform:translateY(-1px); }
.rehab-game-mode-list i { display:grid; width:40px; height:40px; place-items:center; border-radius:12px; background:#e7f1f4; color:#315f72; }
.rehab-game-mode-list button.active i { background:#2c8e73; color:#fff; }
.rehab-game-mode-list strong,.rehab-game-mode-list small { display:block; }
.rehab-game-mode-list strong { color:#234e60; }.rehab-game-mode-list small { margin-top:2px; color:#758a93; }
.rehab-game-rule-card { display:grid; grid-template-columns:52px minmax(0,1fr); gap:12px; padding:13px; border:1px solid #d9e7e9; border-radius:15px; background:linear-gradient(135deg,#f8fcfb,#eff8f5); }
.rehab-game-rule-card > i { display:grid; width:52px; height:52px; place-items:center; border-radius:16px; background:#2d8f74; color:#fff; }
.rehab-game-rule-card > i .icon { width:27px; height:27px; }
.rehab-game-rule-card strong,.rehab-game-rule-card p,.rehab-game-rule-card small { display:block; }.rehab-game-rule-card strong { color:#275566; }.rehab-game-rule-card p { margin:3px 0; color:#57727e; line-height:1.4; }.rehab-game-rule-card small { color:#778b93; }
.rehab-game-difficulty { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; padding:4px; border-radius:13px; background:#edf3f4; }
.rehab-game-difficulty button { min-height:44px; border:0; border-radius:10px; background:transparent; color:#58727d; font-weight:900; cursor:pointer; }
.rehab-game-difficulty button.active { background:#fff; color:#1f705b; box-shadow:0 4px 11px rgba(28,69,86,.11); }
.rehab-game-safety > label { display:flex; align-items:flex-start; gap:10px; padding:10px; border:1px solid #dce8ea; border-radius:12px; background:#fbfdfd; }
.rehab-game-safety > label input { width:23px; height:23px; flex:none; accent-color:#2d8d72; }
.rehab-game-safety > label span { display:grid; gap:2px; }.rehab-game-safety > label strong { color:#325a6a; }.rehab-game-safety > label small { color:#71868f; line-height:1.4; }
.rehab-game-safety > div:last-child { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.rehab-game-voice { display:inline-flex; align-items:center; gap:6px; color:#55727d; font-size:.84rem; font-weight:800; }
.rehab-game-voice input { width:19px; height:19px; accent-color:#2d8d72; }
.rehab-game-live-data { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.rehab-game-live-data article { display:grid; gap:3px; min-height:116px; padding:16px; border:1px solid #d8e6e9; border-radius:17px; background:#fff; box-shadow:0 9px 22px rgba(25,67,87,.05); }
.rehab-game-live-data span { color:#657e88; font-weight:800; }.rehab-game-live-data strong { color:#184f64; font-family:"Plus Jakarta Sans",sans-serif; font-size:1.75rem; }.rehab-game-live-data small { margin-top:auto; color:#7c8e95; }
.rehab-game-rom-panel { padding:20px; }
.rehab-game-rom-panel > header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:14px; }
.rehab-game-rom-panel h2 { margin:4px 0; color:#18465b; }.rehab-game-rom-panel p { margin:0; color:#657d87; }
.rehab-game-rom-panel > div { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; }
.rehab-game-rom-panel article { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:66px; padding:12px 14px; border:1px solid #dbe8ea; border-radius:14px; background:linear-gradient(135deg,#fff,#f5faf9); }
.rehab-game-rom-panel article span { display:grid; gap:2px; color:#54717d; font-weight:850; }.rehab-game-rom-panel article span small { color:#82959c; font-size:.72rem; font-weight:650; }.rehab-game-rom-panel article strong { color:#21705e; font-size:1.25rem; text-align:right; }
.rehab-game-summary { display:grid; grid-template-columns:auto minmax(0,1.3fr) minmax(300px,.7fr) auto; align-items:center; gap:18px; padding:22px; border-color:#9ed5c4; background:linear-gradient(135deg,#f5fcf8,#edf8ff); }
.rehab-game-summary[hidden] { display:none; }
.rehab-game-summary-mark { display:grid; width:64px; height:64px; place-items:center; border-radius:20px; background:#2e9376; color:#fff; }.rehab-game-summary-mark .icon { width:34px; height:34px; }
.rehab-game-summary span { color:#34745f; font-weight:850; }.rehab-game-summary h2 { margin:3px 0; color:#19465a; }.rehab-game-summary p { margin:0; color:#627b85; }
.rehab-game-summary dl { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:0; }
.rehab-game-summary dl div { padding:10px; border-radius:12px; background:rgba(255,255,255,.82); }.rehab-game-summary dt { color:#6c828a; font-size:.78rem; }.rehab-game-summary dd { margin:3px 0 0; color:#1c5b64; font-size:1.2rem; font-weight:900; }
.rehab-game-summary .button-row { display:grid; gap:7px; }
.rehab-game-level-map { padding:20px; }
.rehab-game-level-map > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:15px; }.rehab-game-level-map h2 { margin:4px 0; color:#19485c; }.rehab-game-level-map p { margin:0; color:#667e87; line-height:1.55; }
.rehab-game-level-map > div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.rehab-game-level-map article { display:grid; grid-template-columns:42px minmax(0,1fr); gap:10px; min-height:116px; padding:14px; border:1px solid #dce7e9; border-radius:16px; background:#fafcfc; opacity:.7; }
.rehab-game-level-map article > i { display:grid; width:42px; height:42px; place-items:center; border-radius:13px; background:#e8eff1; color:#607982; font-style:normal; font-weight:950; }
.rehab-game-level-map article span { display:grid; align-content:start; gap:3px; }.rehab-game-level-map article strong { color:#315969; }.rehab-game-level-map article small { color:#758a92; line-height:1.45; }.rehab-game-level-map article > b { grid-column:2; width:max-content; padding:4px 8px; border-radius:99px; background:#edf2f3; color:#73868e; font-size:.72rem; }
.rehab-game-level-map article.active { border-color:#5eb899; background:linear-gradient(135deg,#f0faf6,#edf7ff); opacity:1; box-shadow:0 9px 21px rgba(37,117,91,.1); }.rehab-game-level-map article.active > i { background:#2d9074; color:#fff; }.rehab-game-level-map article.active > b { background:#dff4eb; color:#26715b; }
.rehab-game-level-map article.done { border-color:#b8d9ce; background:#f5faf8; opacity:.9; }.rehab-game-level-map article.done > i { background:#bce3d5; color:#235e4e; }.rehab-game-level-map article.done > b { background:#e3f2ec; color:#39715f; }
.rehab-game-timeup { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px; border:2px solid #84c9b2; background:linear-gradient(135deg,#effaf6,#eef6ff); }
.rehab-game-timeup[hidden] { display:none; }.rehab-game-timeup h2 { margin:4px 0; color:#184b5e; }.rehab-game-timeup p { margin:0; color:#617a84; line-height:1.55; }.rehab-game-timeup .button-row { display:flex; gap:9px; flex-wrap:wrap; }.rehab-game-timeup .btn { min-height:54px; }
.rehab-game-guide { padding:20px; }
.rehab-game-guide > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:15px; }.rehab-game-guide h2 { margin:4px 0 0; color:#19475b; }
.rehab-game-guide > div:nth-of-type(1) { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.rehab-game-guide article { display:grid; grid-template-columns:42px minmax(0,1fr); gap:11px; padding:15px; border:1px solid #dce8ea; border-radius:15px; background:#fafcfc; }
.rehab-game-guide article i { display:grid; width:42px; height:42px; place-items:center; border-radius:13px; background:#e6f4ef; color:#23715b; font-style:normal; font-weight:900; }
.rehab-game-guide article strong,.rehab-game-guide article small { display:block; }.rehab-game-guide article strong { color:#2d5667; }.rehab-game-guide article small { margin-top:4px; color:#71868e; line-height:1.5; }
.rehab-game-guide .security-note { margin:14px 0 0; }

@keyframes rehab-event-pop { 0% { opacity:0; transform:translate(-50%,-50%) scale(.6) rotate(-2deg); } 20%,72% { opacity:1; transform:translate(-50%,-50%) scale(1.04) rotate(0); } 100% { opacity:0; transform:translate(-50%,-58%) scale(.95); } }
@keyframes rehab-stage-glow { 0%,100% { box-shadow:0 14px 34px rgba(25,67,87,.07); } 40% { box-shadow:0 0 0 5px rgba(89,220,171,.34),0 18px 45px rgba(35,135,103,.2); } }

@media (max-width:1100px) {
  .motion-game-card-grid { grid-template-columns:1fr; }
  .motion-game-card { grid-template-columns:220px minmax(0,1fr); }
  .motion-game-hub-lower { grid-template-columns:1fr; }
  .rehab-game-assignment { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rehab-game-layout { grid-template-columns:1fr; }
  .rehab-game-control-panel { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rehab-game-control-panel > section { align-content:start; padding:0 14px 0 0; border-right:1px solid #e1ebed; border-bottom:0; }
  .rehab-game-control-panel > section:last-child { padding-right:0; border-right:0; }
  .rehab-game-live-data { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rehab-game-level-map > div { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rehab-game-rom-panel > div { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rehab-game-summary { grid-template-columns:auto 1fr; }.rehab-game-summary dl,.rehab-game-summary .button-row { grid-column:2; }
}

@media (max-width:700px) {
  .motion-game-page-head { align-items:stretch; flex-direction:column; padding:20px; border-radius:19px; }.motion-game-page-head .mp-head-badges { justify-content:flex-start; }
  .motion-game-daily { grid-template-columns:64px minmax(0,1fr); padding:16px; }.motion-game-daily-art { width:64px; height:64px; border-radius:19px; }.motion-game-daily-art .icon { width:31px; height:31px; }.motion-game-daily .btn { grid-column:1 / -1; width:100%; min-height:54px; }
  .motion-game-category-bar { top:64px; margin-inline:-4px; border-radius:13px; }.motion-game-category-bar a { min-height:48px; }
  .motion-game-card { grid-template-columns:1fr; min-height:0; border-radius:20px; }.motion-game-card-art { min-height:152px; }.motion-game-card-art > i { width:108px; height:108px; }.motion-game-card-body { padding:18px; }.motion-game-card .btn { min-height:54px; font-size:1rem; }
  .motion-game-week-days { gap:4px; }.motion-game-week-days span { padding:7px 2px; font-size:.78rem; }.motion-game-week-days i { width:27px; height:27px; }
  .motion-game-records .panel-header { align-items:stretch; flex-direction:column; }.motion-game-records .btn { width:100%; min-height:50px; }
  .rehab-game-assignment { grid-template-columns:1fr 1fr; }.rehab-game-assignment span { min-height:68px; padding:11px; }
  .rehab-game-stage-card,.rehab-game-control-panel,.rehab-game-rom-panel,.rehab-game-guide,.rehab-game-summary { border-radius:18px; }
  .rehab-game-stage { min-height:330px; }.rehab-game-stage canvas { object-fit:cover; }
  .rehab-game-hud { top:auto; right:8px; bottom:8px; left:8px; grid-template-columns:repeat(4,1fr); gap:4px; }.rehab-game-hud > span { min-width:0; min-height:48px; padding:6px 3px; border-radius:10px; }.rehab-game-hud strong { font-size:.78rem; }.rehab-game-event { min-width:min(82vw,300px); padding:15px 18px; }.rehab-game-event strong { font-size:1.25rem; }
  .rehab-game-feedback { grid-template-columns:1fr; }.rehab-game-hold-meter { height:12px; }
  .rehab-game-primary-controls { grid-template-columns:1fr; }.rehab-game-primary-controls .btn { min-height:56px; font-size:1rem; }
  .rehab-game-control-panel { grid-template-columns:1fr; padding:15px; }
  .rehab-game-control-panel > section { padding:0 0 15px; border-right:0; border-bottom:1px solid #e1ebed; }
  .rehab-game-control-panel > section:last-child { padding-bottom:0; border-bottom:0; }
  .rehab-game-live-data { grid-template-columns:1fr 1fr; }.rehab-game-live-data article { min-height:100px; padding:13px; }
  .rehab-game-level-map { padding:15px; }.rehab-game-level-map > header { align-items:stretch; flex-direction:column; }.rehab-game-level-map > div { grid-template-columns:1fr; }.rehab-game-level-map article { min-height:96px; }
  .rehab-game-timeup { align-items:stretch; flex-direction:column; padding:17px; }.rehab-game-timeup .button-row { display:grid; width:100%; }.rehab-game-timeup .btn { width:100%; }
  .rehab-game-rom-panel { padding:15px; }.rehab-game-rom-panel > header { align-items:stretch; flex-direction:column; }
  .rehab-game-rom-panel > div { grid-template-columns:1fr 1fr; }.rehab-game-rom-panel article:last-child { grid-column:1 / -1; }
  .rehab-game-summary { grid-template-columns:1fr; text-align:center; }.rehab-game-summary-mark { margin:auto; }.rehab-game-summary dl,.rehab-game-summary .button-row { grid-column:auto; }.rehab-game-summary .button-row { width:100%; }.rehab-game-summary .btn { min-height:52px; }
  .rehab-game-guide > header { align-items:stretch; flex-direction:column; }.rehab-game-guide > div:nth-of-type(1) { grid-template-columns:1fr; }.rehab-game-guide > header .btn { width:100%; min-height:50px; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.dashboard-body {
  background: #f2f7f9;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy-950);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.45rem, 4vw, 4.5rem);
  margin-bottom: 26px;
}

h2 {
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  margin-bottom: 18px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

p {
  color: var(--muted);
  margin-bottom: 22px;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--navy-950);
  color: white;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #68bdd3;
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 104px 0;
}

.section-sm {
  padding: 76px 0;
}

.section-tint {
  background: var(--sky-50);
}

.section-green {
  background: var(--green-50);
}

.section-heading {
  width: min(860px, 100%);
  margin: 0 auto 50px;
  text-align: center;
}

.section-heading p {
  font-size: 1.06rem;
  margin-bottom: 0;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid #cbe3ea;
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-600);
  content: "";
  box-shadow: 0 0 0 5px rgba(52, 145, 123, 0.12);
}

.icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 30px;
  height: 30px;
}

.icon-box {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--sky-100);
  color: var(--blue-700);
}

.icon-box.green {
  background: var(--green-100);
  color: var(--green-700);
}

.icon-box.warm {
  background: var(--warm-100);
  color: var(--amber-700);
}

.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 22px;
  font-weight: 700;
  line-height: 1.25;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 10px 22px rgba(23, 52, 77, 0.18);
}

.btn-primary:hover {
  background: var(--navy-950);
  box-shadow: 0 14px 26px rgba(23, 52, 77, 0.24);
}

.btn-secondary {
  border-color: #bcd2dc;
  background: #fff;
  color: var(--navy-900);
}

.btn-secondary:hover {
  border-color: var(--blue-500);
  background: var(--sky-50);
}

.btn-soft {
  background: var(--sky-100);
  color: var(--blue-700);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  min-height: 58px;
  padding-inline: 28px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(220, 232, 236, 0.9);
  background: rgba(247, 251, 252, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--navy-950);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--navy-900), var(--blue-600));
  color: white;
  box-shadow: 0 8px 20px rgba(32, 111, 145, 0.22);
}

.brand-mark::after {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,.48);
  border-radius: 50%;
  content: "";
}

.brand-mark svg {
  position: relative;
  z-index: 1;
  width: 25px;
}

.brand-label {
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.brand-label strong { font-size: 1.02em; }
.brand-label small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.54em;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;
  font-weight: 600;
}

.main-nav a:not(.btn) {
  color: #4e6577;
  transition: color 0.2s ease;
}

.main-nav a:not(.btn):hover {
  color: var(--blue-700);
}

.menu-toggle {
  display: none;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
}

.header-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 13px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 114px;
  background:
    radial-gradient(circle at 72% 20%, rgba(83, 175, 198, 0.15), transparent 31%),
    radial-gradient(circle at 6% 80%, rgba(52, 145, 123, 0.1), transparent 25%),
    linear-gradient(180deg, #f9fcfd 0%, #f5fafb 100%);
}

.hero::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 48%;
  height: 100%;
  background-image: radial-gradient(#8fc7d4 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
  opacity: 0.2;
  mask-image: linear-gradient(to left, black, transparent);
}

.hero-grid {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(470px, 0.98fr);
  gap: 70px;
}

.hero-copy .eyebrow {
  margin-bottom: 22px;
}

.hero-copy h1 {
  font-size: clamp(2.45rem, 3.45vw, 3.5rem);
}

.hero-copy > p {
  max-width: 680px;
  font-size: 1.14rem;
  line-height: 1.8;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

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

.trust-dot {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
}

.trust-dot .icon {
  width: 15px;
  height: 15px;
}

.hero-visual {
  position: relative;
}

.dashboard-mockup {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(197, 218, 226, 0.95);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}

.mock-topbar {
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
  background: #fbfdfe;
}

.mock-dots {
  display: flex;
  gap: 7px;
}

.mock-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5d6dd;
}

.mock-live {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green-700);
  font-size: 0.7rem;
  font-weight: 700;
}

.mock-live::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42a789;
  content: "";
  box-shadow: 0 0 0 5px rgba(66, 167, 137, 0.12);
}

.mock-grid {
  display: grid;
  min-height: 380px;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  padding: 14px;
  background: #f4f8f9;
}

.pose-panel {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(150deg, #173c53, #286b7e);
}

.pose-panel::before,
.pose-panel::after {
  position: absolute;
  inset: 0;
  content: "";
}

.pose-panel::before {
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 34px 34px;
}

.pose-panel::after {
  inset: 14px;
  border: 1px solid rgba(124, 221, 225, 0.3);
  border-radius: 12px;
}

.skeleton {
  position: relative;
  z-index: 2;
  width: 155px;
  color: #8ee2dd;
  filter: drop-shadow(0 0 8px rgba(90, 213, 209, 0.3));
}

.scan-label {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  padding: 5px 9px;
  background: rgba(10, 34, 50, 0.56);
  color: #d4fffb;
  font-size: 0.62rem;
  font-weight: 700;
}

.mock-side {
  display: grid;
  align-content: stretch;
  gap: 10px;
}

.mini-stat {
  border: 1px solid #e0eaed;
  border-radius: 15px;
  padding: 14px;
  background: #fff;
}

.mini-stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.mini-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.mini-stat strong small {
  color: var(--muted);
  font-size: 0.62rem;
}

.mini-progress {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eef1;
}

.mini-progress span {
  display: block;
  width: var(--progress, 72%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-600), #67bdad);
}

.ai-generating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--blue-700);
  font-size: 0.66rem;
  font-weight: 700;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue-500);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 169, 194, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(79, 169, 194, 0); }
}

.floating-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(210, 227, 232, 0.9);
  border-radius: 14px;
  padding: 11px 15px;
  background: rgba(255,255,255,.95);
  color: var(--navy-900);
  box-shadow: var(--shadow-md);
  font-size: 0.74rem;
  font-weight: 700;
}

.floating-chip.one {
  top: -22px;
  right: 34px;
}

.floating-chip.two {
  bottom: -20px;
  left: -25px;
}

.floating-chip .chip-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: var(--green-100);
  color: var(--green-700);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.pain-card,
.value-card,
.stat-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pain-card {
  position: relative;
  min-height: 260px;
  padding: 32px;
  overflow: hidden;
}

.pain-card::after {
  position: absolute;
  right: -35px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border: 20px solid var(--sky-100);
  border-radius: 50%;
  content: "";
  opacity: 0.7;
}

.pain-number {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--blue-600);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.pain-card h3 {
  max-width: 290px;
  font-size: 1.34rem;
}

.pain-card p {
  margin: 0;
  font-size: 0.92rem;
}

.feature-card {
  min-height: 218px;
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  border-color: #bad7e0;
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.feature-card .icon-box {
  margin-bottom: 26px;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
}

.role-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.role-card {
  position: relative;
  display: flex;
  min-height: 310px;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.role-card:hover {
  border-color: var(--role-accent, var(--blue-500));
  box-shadow: var(--shadow-md);
  transform: translateY(-6px);
}

.role-card::before {
  position: absolute;
  top: -52px;
  right: -52px;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: var(--role-soft, var(--sky-100));
  content: "";
}

.role-card .icon-box {
  position: relative;
  margin-bottom: 24px;
  background: var(--role-soft, var(--sky-100));
  color: var(--role-accent, var(--blue-700));
}

.role-card h3 {
  min-height: 62px;
  font-size: 1.12rem;
}

.role-card p {
  flex: 1;
  margin-bottom: 22px;
  font-size: 0.82rem;
}

.role-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -6px 0 20px;
}

.role-feature-tags span {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--role-soft, var(--sky-100));
  color: var(--role-accent, var(--blue-700));
  font-size: 0.62rem;
  font-weight: 700;
}

.role-feature-list {
  display: grid;
  width: 100%;
  gap: 9px;
  margin: 0 0 25px;
  padding: 0;
  list-style: none;
}

.role-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #4e6577;
  font-size: 0.76rem;
  font-weight: 600;
}

.role-feature-list .icon {
  width: 17px;
  flex: 0 0 17px;
  margin-top: 4px;
  color: var(--role-accent, var(--green-700));
}

.role-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--role-accent, var(--blue-700));
  font-size: 0.84rem;
  font-weight: 700;
}

.role-patient { --role-accent: #368b78; --role-soft: #e7f5f0; }
.role-family { --role-accent: #b0702c; --role-soft: #fff1db; }
.role-professional { --role-accent: #287da4; --role-soft: #e5f3f8; }
.role-ot { --role-accent: #338873; --role-soft: #e4f3ee; }
.role-doctor { --role-accent: #245f80; --role-soft: #e6f0f5; }
.role-institution { --role-accent: #52729a; --role-soft: #eaf0f7; }
.role-admin { --role-accent: #59687b; --role-soft: #edf0f3; }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.evidence-item {
  min-height: 180px;
  border-right: 1px solid var(--line);
  padding: 30px 24px;
}

.evidence-item:last-child {
  border: 0;
}

.evidence-value {
  display: block;
  margin-bottom: 10px;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.evidence-label {
  color: var(--muted);
  font-size: 0.84rem;
}

.evidence-note {
  display: block;
  margin-top: 6px;
  color: var(--green-700);
  font-size: 0.72rem;
  font-weight: 700;
}

.final-cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 76px 64px;
  background: linear-gradient(130deg, #15364f, #205d72 65%, #287867);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.final-cta::before,
.final-cta::after {
  position: absolute;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  content: "";
}

.final-cta::before {
  top: -160px;
  left: -90px;
  width: 350px;
  height: 350px;
}

.final-cta::after {
  right: -80px;
  bottom: -190px;
  width: 420px;
  height: 420px;
}

.final-cta h2 {
  position: relative;
  color: #fff;
}

.final-cta p {
  position: relative;
  max-width: 680px;
  margin-inline: auto;
  color: #d7e9ee;
}

.final-cta .button-row {
  position: relative;
  z-index: 1;
  justify-content: center;
}

.final-cta .btn-primary {
  background: #fff;
  color: var(--navy-900);
}

.site-footer {
  padding: 62px 0 30px;
  background: #10283c;
  color: #fff;
}

.site-footer .brand {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 56px;
}

.footer-grid p,
.footer-grid a {
  color: #aebfcb;
  font-size: 0.84rem;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-title {
  margin-bottom: 18px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 28px;
  color: #8299a8;
  font-size: 0.75rem;
}

/* Role selector */
.role-page-hero {
  padding: 78px 0 58px;
  background: linear-gradient(180deg, #f7fbfc, #edf7f8);
  text-align: center;
}

.role-page-hero .eyebrow {
  margin-bottom: 20px;
}

.role-page-hero h1 {
  font-size: clamp(2.3rem, 4vw, 3.8rem);
}

.role-page-hero p {
  max-width: 700px;
  margin-inline: auto;
  font-size: 1.08rem;
}

.role-selector {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.role-selector .role-card {
  min-height: 520px;
  grid-column: span 2;
  padding: 34px;
}

/* Cross-role workflow and plans */
.data-flow-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 12px;
}

.data-flow-card {
  position: relative;
  min-height: 184px;
  border: 1px solid rgba(33, 89, 83, 0.13);
  border-radius: 18px;
  padding: 18px 15px;
  background: rgba(255,255,255,.78);
}

.flow-index,
.flow-role { display: block; }
.flow-index {
  margin-bottom: 22px;
  color: var(--role-accent, var(--green-700));
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
}
.flow-role {
  margin-bottom: 7px;
  color: var(--role-accent, var(--green-700));
  font-size: 0.62rem;
  font-weight: 800;
}
.data-flow-card h3 { margin: 0; font-size: 0.8rem; }
.flow-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -17px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}
.flow-arrow .icon { width: 14px; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.plan-card {
  position: relative;
  display: flex;
  min-height: 500px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 32px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.plan-card.featured {
  border: 2px solid var(--role-accent, var(--blue-600));
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
}
.plan-card .icon-box { margin-bottom: 24px; background: var(--role-soft); color: var(--role-accent); }
.plan-card .plan-label { margin-bottom: 7px; color: var(--role-accent); font-size: 0.7rem; font-weight: 800; }
.plan-card h3 { font-size: 1.35rem; }
.plan-card p { font-size: 0.84rem; }
.plan-card ul { display: grid; flex: 1; gap: 12px; margin: 12px 0 26px; padding: 0; list-style: none; }
.plan-card li { display: flex; gap: 9px; font-size: 0.78rem; font-weight: 600; }
.plan-card li .icon { width: 18px; color: var(--role-accent); }
.plan-recommend { position: absolute; top: 20px; right: 20px; border-radius: 999px; padding: 5px 10px; background: var(--role-soft); color: var(--role-accent); font-size: 0.62rem; font-weight: 800; }

.role-selector .role-card:nth-child(4),
.role-selector .role-card:nth-child(5),
.role-selector .role-card:nth-child(6) { grid-column: span 2; }
.role-selector .role-card:nth-child(7) { grid-column: 3 / span 2; }
.role-preview-grid .role-card:last-child { grid-column: 2; }

.role-selector .role-card h3 {
  min-height: auto;
  font-size: 1.3rem;
}

.role-selector .role-card p {
  font-size: 0.92rem;
}

.role-selector .role-card .btn {
  width: 100%;
  background: var(--role-accent);
  color: #fff;
}

.privacy-note {
  display: flex;
  max-width: 800px;
  align-items: flex-start;
  gap: 16px;
  margin: 42px auto 0;
  border-radius: 16px;
  padding: 18px 22px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 0.86rem;
}

.privacy-note p {
  margin: 0;
  color: inherit;
}

/* Role home */
.role-home-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 96px;
  background: linear-gradient(135deg, var(--role-soft, var(--sky-50)), #fbfdfd 68%);
}

.role-home-hero::after {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 480px;
  height: 480px;
  border: 80px solid rgba(255,255,255,.5);
  border-radius: 50%;
  content: "";
}

.role-home-grid {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 0.92fr;
  gap: 70px;
}

.role-home-copy h1 {
  font-size: clamp(2.3rem, 4vw, 4rem);
}

.role-home-copy > p {
  font-size: 1.08rem;
}

.role-home-visual {
  position: relative;
  min-height: 450px;
}

.illustration-card {
  position: absolute;
  inset: 18px 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(210,226,231,.95);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.warm-scene {
  position: relative;
  height: 100%;
  min-height: 430px;
  background: linear-gradient(160deg, #f1f9f8, #e6f2f5);
}

.scene-sun {
  position: absolute;
  top: 48px;
  right: 52px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff2cf;
  box-shadow: 0 0 0 20px rgba(255, 242, 207, 0.38);
}

.scene-floor {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 34%;
  background: #deeee9;
  clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 100%);
}

.person-illustration {
  position: absolute;
  z-index: 2;
  bottom: 45px;
  left: 50%;
  width: 235px;
  transform: translateX(-52%);
}

.scene-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5e7ea;
  border-radius: 13px;
  padding: 10px 13px;
  background: rgba(255,255,255,.92);
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.scene-chip.a { top: 104px; left: 30px; }
.scene-chip.b { right: 26px; bottom: 92px; }

.role-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.role-feature-grid.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-feature {
  display: flex;
  min-height: 155px;
  align-items: flex-start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.compact-feature .icon-box {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.compact-feature h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.compact-feature p {
  margin: 0;
  font-size: 0.82rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(var(--step-count, 6), minmax(0, 1fr));
  gap: 0;
}

.step {
  position: relative;
  text-align: center;
}

.step:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 25px;
  left: calc(50% + 30px);
  width: calc(100% - 60px);
  height: 2px;
  background: #cfe0e5;
  content: "";
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 17px;
  place-items: center;
  border: 5px solid #f7fbfc;
  border-radius: 50%;
  background: var(--role-accent, var(--blue-700));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 0 0 1px #cfe0e5;
}

.step h3 {
  font-size: 0.92rem;
}

.step p {
  max-width: 150px;
  margin: 0 auto;
  font-size: 0.76rem;
}

.safety-banner {
  display: flex;
  align-items: center;
  gap: 22px;
  border: 1px solid #f0d4b4;
  border-radius: 22px;
  padding: 30px 34px;
  background: var(--warm-50);
}

.safety-banner .icon-box {
  background: var(--warm-100);
  color: var(--amber-700);
}

.safety-banner h3 {
  margin-bottom: 5px;
}

.safety-banner p {
  margin: 0;
  color: #786a5c;
}

.professional-preview {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 0.9fr;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid #cfdfe5;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.preview-column {
  padding: 24px;
}

.preview-column + .preview-column {
  border-left: 1px solid var(--line);
}

.preview-column.soft {
  background: #f7fafb;
}

.preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.search-mini {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
  color: var(--muted-2);
  font-size: 0.68rem;
}

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

.patient-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px;
  background: #fff;
}

.patient-mini.active {
  border-color: #a9d0dd;
  background: var(--sky-100);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e0ecf0;
  color: var(--navy-800);
  font-size: 0.68rem;
  font-weight: 800;
}

.patient-mini strong,
.patient-mini small {
  display: block;
  line-height: 1.4;
}

.patient-mini strong { font-size: 0.72rem; }
.patient-mini small { color: var(--muted); font-size: 0.62rem; }

.trend-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.trend-summary {
  display: flex;
  gap: 28px;
  margin-bottom: 18px;
}

.trend-summary span {
  color: var(--muted);
  font-size: 0.64rem;
}

.trend-summary strong {
  display: block;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.line-chart {
  position: relative;
  height: 178px;
  overflow: hidden;
  border-bottom: 1px solid #d9e5e9;
  background-image: linear-gradient(#e8f0f2 1px, transparent 1px);
  background-size: 100% 44px;
}

.line-chart svg {
  width: 100%;
  height: 100%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  color: var(--muted-2);
  font-size: 0.58rem;
}

.alert-mini {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 11px;
  border-radius: 12px;
  padding: 12px;
  background: var(--warm-50);
}

.alert-mini.red { background: #fff1f0; }
.alert-mini.blue { background: var(--sky-50); }

.alert-mini strong,
.alert-mini small { display: block; line-height: 1.45; }
.alert-mini strong { font-size: 0.68rem; }
.alert-mini small { color: var(--muted); font-size: 0.58rem; }

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.value-card {
  padding: 30px;
}

.value-card .icon-box {
  margin-bottom: 22px;
}

.value-card p {
  margin: 0;
  font-size: 0.85rem;
}

/* Authentication */
.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 0.92fr 1.08fr;
  background: #fff;
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px clamp(38px, 5vw, 76px);
  background: linear-gradient(150deg, var(--role-soft, var(--sky-100)), #f7fbfc);
}

.auth-visual::before {
  position: absolute;
  right: -130px;
  bottom: -130px;
  width: 480px;
  height: 480px;
  border: 90px solid rgba(255,255,255,.45);
  border-radius: 50%;
  content: "";
}

.auth-visual-copy {
  position: relative;
  z-index: 2;
  max-width: 540px;
  margin-top: 64px;
}

.auth-visual-copy h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.auth-visual-copy p {
  font-size: 1rem;
}

.auth-scene {
  position: relative;
  z-index: 2;
  min-height: 300px;
  margin-top: 30px;
}

.auth-floating-panel {
  position: absolute;
  right: 8%;
  bottom: 10%;
  left: 8%;
  min-height: 250px;
  border: 1px solid rgba(204,223,229,.9);
  border-radius: 24px;
  padding: 24px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-lg);
}

.auth-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-panel-header strong {
  font-size: 0.82rem;
}

.auth-task {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  padding: 12px;
  background: #f5f9fa;
}

.auth-task .icon-box {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.auth-task strong,
.auth-task small { display: block; line-height: 1.4; }
.auth-task strong { font-size: 0.72rem; }
.auth-task small { color: var(--muted); font-size: 0.62rem; }

.auth-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px clamp(30px, 6vw, 92px);
}

.auth-card {
  width: min(520px, 100%);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.auth-back:hover { color: var(--navy-900); }

.auth-card .eyebrow {
  margin-bottom: 18px;
}

.auth-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
}

.auth-card > p {
  margin-bottom: 34px;
  font-size: 0.94rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--navy-900);
  font-size: 0.84rem;
  font-weight: 700;
}

.optional {
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  min-height: 54px;
  border: 1px solid #cbdde3;
  border-radius: 13px;
  padding: 12px 15px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder { color: #9aa9b4; }

.form-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(79, 169, 194, 0.13);
}

textarea.form-control {
  min-height: 112px;
  resize: vertical;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: #eff7f8;
  color: var(--blue-700);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #dff0f2;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 28px;
  font-size: 0.82rem;
}

.quick-access-field {
  margin-bottom: 24px;
}

.quick-access-field .form-control {
  min-height: 58px;
  padding-inline: 18px;
  font-size: 1.08rem;
  font-weight: 650;
}

.quick-access-field > small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: #54717d;
  font-size: .84rem;
  line-height: 1.5;
}

.quick-access-field > small .icon {
  width: 17px;
  height: 17px;
  color: var(--blue-500);
}

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 3px;
  accent-color: var(--green-600);
}

.text-link {
  color: var(--blue-700);
  font-weight: 700;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 27px 0;
  color: var(--muted-2);
  font-size: 0.74rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.auth-switch {
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.auth-switch .btn { width: 100%; }

.auth-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 26px;
}

.auth-trust-grid span {
  display: flex;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d8e7ea;
  border-radius: 14px;
  background: #f7fafb;
  color: #47636e;
  font-size: .72rem;
  font-weight: 750;
  text-align: center;
}

.auth-trust-grid .icon {
  width: 22px;
  height: 22px;
  color: var(--green-600);
}

.auth-device-note {
  margin: 18px 0 0 !important;
  color: #718791 !important;
  font-size: .74rem !important;
  text-align: center;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
  border-radius: 13px;
  padding: 14px 16px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 0.74rem;
}

.security-note p { margin: 0; color: inherit; }

/* Registration */
.register-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--role-soft, var(--sky-50)) 0, #f7fbfc 380px);
}

.register-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
}

.register-shell {
  display: grid;
  align-items: start;
  grid-template-columns: 0.68fr 1.32fr;
  gap: 54px;
  padding: 54px 0 90px;
}

.register-aside {
  position: sticky;
  top: 112px;
}

.register-aside h1 {
  margin-top: 20px;
  font-size: clamp(2.2rem, 4vw, 3.35rem);
}

.registration-steps {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.registration-step {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.registration-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #c9dce2;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.74rem;
}

.registration-step.active { color: var(--role-accent, var(--blue-700)); }
.registration-step.active span {
  border-color: var(--role-accent, var(--blue-700));
  background: var(--role-accent, var(--blue-700));
  color: #fff;
}

.register-form-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(28px, 4vw, 48px);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.form-section + .form-section {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 38px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.form-section-title span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--role-soft, var(--sky-100));
  color: var(--role-accent, var(--blue-700));
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
}

.form-section-title h2 {
  margin: 0;
  font-size: 1.22rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

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

.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-card {
  position: relative;
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 12px;
  border: 1px solid #cbdde3;
  border-radius: 13px;
  padding: 14px;
  color: var(--navy-900);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.radio-card:has(input:checked) {
  border-color: var(--role-accent, var(--blue-700));
  background: var(--role-soft, var(--sky-50));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--role-accent, var(--blue-700)) 12%, transparent);
}

.radio-card input {
  width: 20px;
  height: 20px;
  accent-color: var(--role-accent, var(--blue-700));
}

.consent-box {
  display: grid;
  gap: 14px;
  border-radius: 16px;
  padding: 20px;
  background: #f6fafb;
}

.consent-box .checkbox-label {
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 34px;
}

/* Dashboard */
.dashboard-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 262px minmax(0, 1fr);
  background: #f3f7f9;
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid #dbe7eb;
  padding: 28px 18px;
  background: #fff;
}

.dashboard-sidebar .brand {
  margin: 0 12px 34px;
}

.dashboard-nav {
  display: grid;
  gap: 7px;
}

.dashboard-nav a {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 13px;
  border-radius: 13px;
  padding: 11px 14px;
  color: #607386;
  font-size: 0.84rem;
  font-weight: 600;
}

.dashboard-nav a:hover {
  background: #f4f8f9;
  color: var(--navy-900);
}

.dashboard-nav a.active {
  background: var(--role-soft, var(--sky-100));
  color: var(--role-accent, var(--blue-700));
  font-weight: 700;
}

.dashboard-nav .icon {
  width: 21px;
  height: 21px;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-help {
  margin-bottom: 18px;
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(140deg, var(--sky-100), var(--green-50));
}

.sidebar-help strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.sidebar-help p {
  margin: 0 0 12px;
  font-size: 0.68rem;
}

.sidebar-help a {
  color: var(--blue-700);
  font-size: 0.7rem;
  font-weight: 700;
}

.dashboard-main {
  min-width: 0;
}

.dashboard-topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(219,231,235,.95);
  padding: 0 34px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
}

.dashboard-topbar-title strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.dashboard-topbar-title span {
  color: var(--muted);
  font-size: 0.7rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--navy-900);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #d45e5e;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.user-menu .avatar {
  width: 44px;
  height: 44px;
  background: var(--role-soft, var(--sky-100));
  color: var(--role-accent, var(--blue-700));
}

.user-menu strong,
.user-menu small { display: block; line-height: 1.4; }
.user-menu strong { font-size: 0.78rem; }
.user-menu small { color: var(--muted); font-size: 0.64rem; }

.dashboard-content {
  width: min(100%, 1500px);
  padding: 34px;
}

.dashboard-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.dashboard-welcome h1 {
  margin-bottom: 6px;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
}

.dashboard-welcome p { margin: 0; font-size: 0.88rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.metric-card {
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(30,71,91,.045);
}

.metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.metric-card strong.value {
  display: block;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.2;
}

.metric-card strong.value small {
  color: var(--muted);
  font-size: 0.72rem;
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--green-700);
  font-size: 0.66rem;
  font-weight: 700;
}

.metric-change.warning { color: var(--amber-700); }

.panel {
  min-width: 0;
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-header h2 {
  margin-bottom: 4px;
  font-size: 1.08rem;
}

.panel-header p {
  margin: 0;
  font-size: 0.72rem;
}

.panel-link {
  flex: 0 0 auto;
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 11px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e3ecef;
  border-radius: 14px;
  padding: 14px;
  background: #fbfdfe;
}

.task-item .icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.task-copy {
  min-width: 0;
  flex: 1;
}

.task-copy strong,
.task-copy small { display: block; line-height: 1.5; }
.task-copy strong { font-size: 0.8rem; }
.task-copy small { color: var(--muted); font-size: 0.66rem; }

.status-badge {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.warning { background: var(--amber-100); color: var(--amber-700); }
.status-badge.danger { background: var(--danger-100); color: var(--danger-700); }
.status-badge.info { background: var(--sky-100); color: var(--blue-700); }
.status-badge.neutral { background: #edf1f3; color: #63717f; }

.progress-ring-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 12px 0 22px;
}

.progress-ring {
  position: relative;
  display: grid;
  width: 142px;
  height: 142px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--role-accent, var(--green-600)) calc(var(--value, 78) * 1%), #e4edef 0);
}

.progress-ring::before {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.progress-ring strong {
  position: relative;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: 1.65rem;
}

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

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.7rem;
}

.legend-item span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-600);
}

.data-chart {
  position: relative;
  height: 240px;
  margin-top: 8px;
  overflow: hidden;
  background-image: linear-gradient(#ebf1f3 1px, transparent 1px);
  background-size: 100% 52px;
}

.data-chart svg {
  width: 100%;
  height: 100%;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 0.62rem;
}

.message-card {
  display: flex;
  gap: 14px;
  border-radius: 14px;
  padding: 16px;
  background: var(--sky-50);
}

.message-card p {
  margin: 5px 0 8px;
  color: var(--ink);
  font-size: 0.74rem;
}

.message-card small { color: var(--muted); font-size: 0.63rem; }

.ai-report-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #c9e0e4;
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(145deg, #f0f9f8, #edf7fa);
}

.ai-report-card::after {
  position: absolute;
  top: -35px;
  right: -35px;
  width: 110px;
  height: 110px;
  border: 18px solid rgba(87,171,181,.1);
  border-radius: 50%;
  content: "";
}

.ai-report-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ai-report-top strong { font-size: 0.84rem; }

.ai-report-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: #496475;
  font-size: 0.72rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e5edef;
  padding: 14px 12px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.data-table td {
  color: var(--ink);
  font-size: 0.72rem;
}

.data-table tr:last-child td { border-bottom: 0; }

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person-cell .avatar {
  width: 36px;
  height: 36px;
}

.person-cell strong,
.person-cell small { display: block; line-height: 1.35; }
.person-cell small { color: var(--muted); font-size: 0.62rem; }

.bar-chart {
  display: flex;
  height: 230px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 16px;
  border-bottom: 1px solid #dfe9ec;
  padding: 0 10px;
  background-image: linear-gradient(#edf2f4 1px, transparent 1px);
  background-size: 100% 52px;
}

.bar-group {
  display: flex;
  height: 100%;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

.bar {
  width: min(22px, 38%);
  height: var(--height, 50%);
  border-radius: 7px 7px 0 0;
  background: var(--blue-500);
}

.bar.green { background: var(--green-600); }

.notification-panel {
  position: fixed;
  z-index: 200;
  top: 76px;
  right: 24px;
  width: min(390px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notification-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.notification-panel h2 {
  font-size: 1.05rem;
}

.notification-item {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.notification-item p {
  margin: 0;
  color: var(--ink);
  font-size: 0.73rem;
}

.notification-item small { color: var(--muted); font-size: 0.62rem; }

.mobile-sidebar-toggle {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 1000;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
}

.toast {
  display: flex;
  max-width: 390px;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #cfe2e6;
  border-radius: 15px;
  padding: 15px 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease both;
}

.toast strong,
.toast span { display: block; line-height: 1.45; }
.toast strong { font-size: 0.78rem; }
.toast span { color: var(--muted); font-size: 0.68rem; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Extended dashboard modules */
.dashboard-module-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 54px 0 22px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.dashboard-module-heading .eyebrow { margin-bottom: 8px; }
.dashboard-module-heading h2 { margin-bottom: 5px; font-size: clamp(1.5rem, 2.2vw, 2rem); }
.dashboard-module-heading p { margin: 0; font-size: 0.78rem; }
.dashboard-extensions + .status-legend { margin-top: 20px; }

.training-room-panel { padding: 0; overflow: hidden; }
.training-room { display: grid; min-height: 520px; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr); }
.camera-stage {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #254c61, #0d2333 72%);
  color: #fff;
}
.camera-stage::before {
  position: absolute;
  inset: 38px;
  border: 1px dashed rgba(162,232,219,.4);
  border-radius: 28px;
  content: "";
}
.camera-topline {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 24px;
  left: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255,255,255,.74);
  font-size: 0.67rem;
  font-weight: 700;
}
.camera-topline span:first-child { display: flex; align-items: center; gap: 8px; color: #c0f4e4; }
.camera-topline i { width: 8px; height: 8px; border-radius: 50%; background: #62d5ae; box-shadow: 0 0 0 5px rgba(98,213,174,.13); }
.training-skeleton { position: relative; z-index: 1; width: min(520px, 88%); }
.skeleton-guide { fill: none; stroke: rgba(255,255,255,.09); stroke-dasharray: 8 9; }
.skeleton-lines { fill: rgba(117,231,209,.75); stroke: #76e0ca; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.angle-arc { fill: none; stroke: #ffd58d; stroke-width: 5; stroke-linecap: round; }
.camera-side,
.angle-tag,
.safety-distance { position: absolute; z-index: 3; border-radius: 999px; backdrop-filter: blur(10px); font-size: 0.65rem; font-weight: 800; }
.camera-side { top: 50%; display: grid; width: 34px; height: 34px; place-items: center; background: rgba(255,255,255,.12); }
.camera-side.left { left: 24px; }
.camera-side.right { right: 24px; }
.angle-tag { top: 31%; left: 59%; padding: 7px 11px; background: #fff4d8; color: #8d5d1e; }
.safety-distance { bottom: 22px; left: 24px; display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: rgba(31,117,98,.72); color: #eafff8; }
.safety-distance .icon { width: 16px; }
.training-control { display: flex; flex-direction: column; padding: 34px; background: #fff; }
.training-control h2 { margin-bottom: 8px; font-size: 1.45rem; }
.training-control p { font-size: 0.78rem; }
.training-count { display: flex; align-items: baseline; gap: 8px; margin: 18px 0; }
.training-count strong { color: var(--role-accent); font-family: var(--font-display); font-size: 3.3rem; line-height: 1; }
.training-count span { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.result-grid > div { border-radius: 13px; padding: 14px; background: #f3f8fa; }
.result-grid span,
.result-grid strong { display: block; }
.result-grid span { color: var(--muted); font-size: 0.63rem; }
.result-grid strong { margin-top: 3px; font-family: var(--font-display); font-size: 1.08rem; }
.result-grid.compact { grid-template-columns: repeat(3, 1fr); }
.feedback-callout { margin: 15px 0; border-radius: 13px; padding: 13px 15px; font-size: 0.74rem; font-weight: 800; }
.feedback-callout.good { display: flex; align-items: center; gap: 9px; background: var(--green-100); color: var(--green-700); }
.feedback-callout .icon { width: 18px; }
.training-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.training-control .button-row { margin-top: auto; }

.control-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 13px; align-items: end; }
.control-grid.vertical { grid-template-columns: 1fr; align-items: stretch; }
.control-grid label,
.task-form-grid label,
.survey-preview label,
.group-training label { display: grid; gap: 6px; color: var(--navy-900); font-size: 0.7rem; font-weight: 700; }
.control-grid input,
.control-grid select,
.control-grid textarea,
.task-form-grid input,
.task-form-grid select,
.task-form-grid textarea,
.survey-preview textarea,
.group-training select {
  width: 100%;
  min-height: 49px;
  border: 1px solid #cbdde3;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.measurement-result { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; margin: 22px 0; }
.rom-gauge { display: grid; place-items: center; border-radius: 18px; padding: 24px; background: linear-gradient(135deg, var(--sky-100), var(--green-50)); text-align: center; }
.rom-gauge span,
.rom-gauge small { color: var(--muted); font-size: 0.65rem; }
.rom-gauge strong { color: var(--role-accent); font-family: var(--font-display); font-size: 2.5rem; line-height: 1.2; }
.positive { color: var(--green-700) !important; }
.survey-preview { display: grid; gap: 18px; }
.scale-row > span { display: block; margin-bottom: 7px; color: var(--navy-900); font-size: 0.7rem; font-weight: 700; }
.scale-options { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.scale-options button { min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font-size: 0.7rem; }
.scale-options button.active { border-color: var(--role-accent); background: var(--role-soft); color: var(--role-accent); font-weight: 800; }
.check-line { display: flex !important; min-height: 42px; align-items: center; gap: 9px; border-radius: 10px; padding: 8px 11px; background: #f6fafb; }
.check-line input,
.option-pills input { width: 18px; height: 18px; accent-color: var(--role-accent); }
.progress-overview { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 14px; }
.week-checkin { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; border-radius: 16px; padding: 16px; background: #f5f9fa; }
.week-checkin div { display: grid; justify-items: center; gap: 7px; color: var(--muted); font-size: 0.64rem; font-weight: 700; }
.week-checkin i { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #e5edef; color: #81919d; font-style: normal; }
.week-checkin .done i { background: var(--green-100); color: var(--green-700); }
.week-checkin .today i { border: 2px solid var(--role-accent); background: #fff; color: var(--role-accent); }
.week-checkin .icon { width: 17px; }
.comparison-card { border: 1px solid var(--line); border-radius: 16px; padding: 17px; }
.comparison-card span,
.comparison-card strong,
.comparison-card small { display: block; }
.comparison-card span,
.comparison-card small { color: var(--muted); font-size: 0.64rem; }
.comparison-card strong { margin: 6px 0; font-size: 1rem; }

.alert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alert-card { display: flex; gap: 12px; border-left: 4px solid #8998a4; border-radius: 13px; padding: 14px; background: #f5f7f8; }
.alert-card.danger { border-left-color: var(--danger-700); background: var(--danger-100); }
.alert-card.warning { border-left-color: var(--amber-700); background: var(--amber-100); }
.alert-card.info { border-left-color: var(--blue-700); background: var(--sky-100); }
.alert-card > .icon { width: 20px; flex: 0 0 20px; margin-top: 3px; }
.alert-card strong,
.alert-card p,
.alert-card small { display: block; line-height: 1.45; }
.alert-card strong { font-size: 0.74rem; }
.alert-card p { margin: 3px 0; font-size: 0.65rem; }
.alert-card small { font-size: 0.61rem; font-weight: 700; }
.report-score { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 18px; }
.report-score .progress-ring { width: 110px; height: 110px; }
.report-score > div:last-child { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.report-score span { color: var(--muted); font-size: 0.65rem; }
.report-score strong { font-size: 0.72rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.report-actions .btn { min-height: 44px; padding: 8px 13px; font-size: 0.68rem; }
.report-actions.vertical { align-items: stretch; flex-direction: column; }
.care-log-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 28px; }
.timeline-list { display: grid; gap: 19px; }
.timeline-list > div { position: relative; border-left: 2px solid #dce8ec; padding-left: 22px; }
.timeline-list i { position: absolute; top: 5px; left: -6px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--role-accent); box-shadow: 0 0 0 2px var(--role-soft); }
.timeline-list strong { font-size: 0.76rem; }
.timeline-list p { margin: 4px 0; font-size: 0.7rem; }
.timeline-list small { color: var(--muted); font-size: 0.62rem; }

.tab-strip { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); padding-bottom: 1px; scrollbar-width: thin; }
.tab-strip button { min-height: 44px; flex: 0 0 auto; border-bottom: 3px solid transparent; padding: 8px 12px; background: transparent; color: var(--muted); font-size: 0.69rem; font-weight: 700; }
.tab-strip button.active { border-bottom-color: var(--role-accent); color: var(--role-accent); }
.detail-summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 20px; }
.detail-summary-grid > div { border-radius: 13px; padding: 14px; background: #f6fafb; }
.detail-summary-grid span,
.detail-summary-grid strong { display: block; }
.detail-summary-grid span { color: var(--muted); font-size: 0.62rem; }
.detail-summary-grid strong { margin-top: 5px; font-size: 0.78rem; }
.task-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.task-form-grid .wide { grid-column: 1 / -1; }
.option-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.option-pills label { display: flex; min-height: 40px; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 12px; background: var(--sky-50); font-size: 0.67rem; font-weight: 700; }
.template-row { display: flex; width: 100%; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 13px; padding: 11px; background: #fff; color: var(--ink); text-align: left; }
.template-row > span:nth-child(2) { flex: 1; }
.template-row strong,
.template-row small { display: block; }
.template-row strong { font-size: 0.72rem; }
.template-row small { color: var(--muted); font-size: 0.61rem; }
.template-row > .icon { width: 17px; color: var(--muted); }
.review-layout { display: grid; grid-template-columns: 1.4fr .6fr; gap: 14px; }
.review-video { position: relative; display: grid; min-height: 360px; place-items: center; overflow: hidden; border-radius: 16px; background: radial-gradient(circle, #294f64, #102a3d); color: #fff; }
.review-video > span { position: absolute; bottom: 14px; left: 16px; display: flex; align-items: center; gap: 7px; font-size: 0.65rem; font-weight: 700; }
.review-video > span .icon { width: 17px; }
.review-analysis { display: grid; align-content: start; gap: 10px; }
.event-timeline { position: relative; height: 8px; margin-top: 18px; border-radius: 999px; background: linear-gradient(90deg, var(--green-600), var(--amber-700), var(--green-600)); }
.event-timeline span { position: absolute; top: 50%; left: var(--x); width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 2px var(--green-600); transform: translate(-50%,-50%); }
.event-timeline .danger { background: var(--danger-700); box-shadow: 0 0 0 2px var(--danger-700); }
.event-timeline .warning { background: var(--amber-700); box-shadow: 0 0 0 2px var(--amber-700); }
.risk-stack { display: grid; gap: 9px; }
.risk-level { display: flex; min-height: 46px; align-items: center; justify-content: space-between; border-left: 5px solid; border-radius: 11px; padding: 10px 13px; }
.risk-level strong,
.risk-level span { font-size: 0.7rem; }
.risk-level.stable { border-color: var(--green-600); background: var(--green-100); }
.risk-level.attention { border-color: #d9a21d; background: #fff6d8; }
.risk-level.follow { border-color: #d77932; background: #fff0df; }
.risk-level.urgent { border-color: var(--danger-700); background: var(--danger-100); }
.microcopy { margin: 16px 0 0; font-size: 0.64rem; }
.report-builder { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.report-outline { border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.report-outline h3 { font-size: 1rem; }
.report-section { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; border-top: 1px solid #e9f0f2; padding: 11px 0; }
.report-section > span,
.report-section i { color: var(--muted); font-size: 0.61rem; font-style: normal; }
.report-section strong { font-size: 0.7rem; }

.group-training { display: grid; grid-template-columns: .55fr 1fr .65fr; gap: 14px; }
.group-training > * { border-radius: 16px; padding: 19px; background: #f5f9fa; }
.group-training aside { display: grid; align-content: start; gap: 16px; }
.group-training h3 { margin: 0; font-size: 0.94rem; }
.group-screen { position: relative; display: grid; min-height: 380px; place-items: center; overflow: hidden; background: radial-gradient(circle, #315b70, #142c3e); color: #fff; text-align: center; }
.group-screen .training-skeleton { position: absolute; inset: 25px 10%; width: 80%; opacity: .8; }
.group-screen > strong,
.group-screen > small { position: absolute; z-index: 2; right: 20px; left: 20px; }
.group-screen > strong { bottom: 45px; color: #fff; }
.group-screen > small { bottom: 20px; color: rgba(255,255,255,.72); font-size: 0.65rem; }
.screen-state { position: absolute; z-index: 2; top: 15px; left: 15px; display: flex; align-items: center; gap: 7px; border-radius: 999px; padding: 6px 9px; background: rgba(0,0,0,.25); font-size: 0.61rem; font-weight: 700; }
.screen-state i { width: 7px; height: 7px; border-radius: 50%; background: #73dbb5; }
.participant-state { display: flex; flex-direction: column; }
.participant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 18px; }
.participant-grid div { display: grid; min-height: 56px; place-items: center; border-radius: 10px; background: var(--green-100); }
.participant-grid div.warning { background: var(--amber-100); }
.participant-grid span { font-size: 0.62rem; }
.participant-grid strong { font-size: 0.65rem; }
.participant-state .btn { margin-top: auto; }
.monthly-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.monthly-metrics > div,
.admin-kpi-row > div { border-radius: 13px; padding: 14px; background: #f4f8fa; }
.monthly-metrics span,
.monthly-metrics strong,
.admin-kpi-row span,
.admin-kpi-row strong { display: block; }
.monthly-metrics span,
.admin-kpi-row span { color: var(--muted); font-size: 0.62rem; }
.monthly-metrics strong,
.admin-kpi-row strong { margin-top: 5px; font-family: var(--font-display); font-size: 1rem; }
.license-list { display: grid; gap: 9px; }
.license-list div,
.status-summary div { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6eef0; padding: 9px 0; }
.license-list span,
.license-list strong,
.status-summary span,
.status-summary strong { font-size: 0.7rem; }

.admin-kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.admin-kpi-row .warning { background: var(--danger-100); }
.permission-table td:not(:first-child),
.permission-table th:not(:first-child) { text-align: center; }
.permission-toggle { display: grid; width: 32px; height: 32px; margin: auto; place-items: center; border-radius: 9px; background: #edf1f3; color: #8a98a3; }
.permission-toggle.on { background: var(--green-100); color: var(--green-700); }
.permission-toggle .icon { width: 16px; }
.template-builder { display: grid; grid-template-columns: .7fr 1.3fr; gap: 14px; }
.template-builder aside { display: grid; align-content: start; gap: 7px; }
.template-builder aside button { display: flex; min-height: 44px; align-items: center; gap: 8px; border-radius: 10px; padding: 9px 11px; background: #f4f8fa; color: var(--muted); font-size: 0.65rem; text-align: left; }
.template-builder aside button.active { background: var(--role-soft); color: var(--role-accent); font-weight: 800; }
.template-builder aside .icon { width: 16px; }
.template-canvas { display: grid; gap: 7px; border: 1px dashed #b8ccd4; border-radius: 15px; padding: 16px; background: #fbfdfe; }
.draggable-field { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fff; }
.draggable-field span { color: #9aabb5; }
.draggable-field strong { font-size: 0.67rem; }
.draggable-field small { color: var(--muted); font-size: 0.59rem; }
.status-summary { display: grid; margin-bottom: 18px; }
.status-summary span { display: flex; align-items: center; gap: 8px; }
.status-summary i { width: 9px; height: 9px; border-radius: 50%; background: #96a4ae; }
.status-summary i.warning { background: #d9a21d; }
.status-summary i.follow { background: #d77932; }
.status-summary i.stable { background: var(--green-600); }
.status-summary i.danger { background: var(--danger-700); }

.status-badge.outline { border: 1px solid currentColor; background: transparent; }
.status-legend { border-left: 5px solid var(--role-accent); }
.status-legend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.status-legend-grid > div { border-radius: 13px; padding: 14px; background: #f6fafb; }
.status-legend-grid > div > strong { display: block; margin-bottom: 10px; font-size: 0.7rem; }
.status-legend-grid > div > div { display: flex; flex-wrap: wrap; gap: 6px; }

/* Doctor clinical decision workspace */
.status-badge.follow { background: #ffead8; color: #b85c20; }
.negative { color: var(--danger-700) !important; font-weight: 800; }

.doctor-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.doctor-kpi {
  min-width: 0;
  min-height: 154px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--role-accent);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(30,71,91,.045);
}
.doctor-kpi.danger { border-top-color: var(--danger-700); }
.doctor-kpi.warning { border-top-color: #d99031; }
.doctor-kpi.info { border-top-color: var(--blue-600); }
.doctor-kpi > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.doctor-kpi > div > span:first-child { color: var(--muted); font-size: 0.63rem; font-weight: 700; }
.doctor-kpi .icon-box { width: 35px; height: 35px; flex: 0 0 35px; border-radius: 10px; }
.doctor-kpi .icon { width: 17px; }
.doctor-kpi > strong { display: block; margin-top: 15px; font-family: var(--font-display); font-size: 1.55rem; line-height: 1; }
.doctor-kpi > strong small { margin-left: 3px; color: var(--muted); font-size: 0.62rem; }
.doctor-kpi p { margin: 8px 0 0; color: var(--muted); font-size: 0.59rem; line-height: 1.45; }

.doctor-priority-grid { align-items: start; }
.doctor-risk-list { display: grid; gap: 8px; }
.doctor-risk-row { position: relative; display: grid; grid-template-columns: 5px 42px 1fr auto; align-items: center; gap: 11px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px 11px 0; background: #fbfdfe; }
.doctor-risk-row:hover { border-color: var(--role-accent); background: var(--role-soft); }
.doctor-risk-row .risk-bar { align-self: stretch; border-radius: 0 5px 5px 0; background: var(--green-600); }
.doctor-risk-row .risk-bar.danger { background: var(--danger-700); }
.doctor-risk-row .risk-bar.follow { background: #d86f2c; }
.doctor-risk-row .risk-bar.warning { background: #d9a21d; }
.doctor-risk-row strong,
.doctor-risk-row small { display: block; line-height: 1.42; }
.doctor-risk-row strong { font-size: 0.72rem; }
.doctor-risk-row small { color: var(--muted); font-size: 0.59rem; }
.clinical-notice-list { display: grid; gap: 9px; }
.clinical-notice-list > div { display: flex; gap: 10px; border-left: 4px solid #97a5ae; border-radius: 11px; padding: 11px; background: #f4f7f8; }
.clinical-notice-list .urgent { border-color: var(--danger-700); background: var(--danger-100); }
.clinical-notice-list .today { border-color: #d86f2c; background: #ffead8; }
.clinical-notice-list .follow { border-color: #d9a21d; background: #fff5d8; }
.clinical-notice-list .info { border-color: var(--blue-700); background: var(--sky-100); }
.clinical-notice-list .icon { width: 19px; flex: 0 0 19px; margin-top: 2px; }
.clinical-notice-list strong,
.clinical-notice-list small { display: block; line-height: 1.45; }
.clinical-notice-list strong { font-size: 0.68rem; }
.clinical-notice-list small { color: var(--muted); font-size: 0.58rem; }
.clinical-trend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.clinical-trend-grid > div { display: flex; min-height: 220px; flex-direction: column; border-radius: 14px; padding: 17px; background: #f5f9fa; }
.clinical-trend-grid span { color: var(--muted); font-size: 0.64rem; }
.clinical-trend-grid strong { margin: 6px 0 15px; font-family: var(--font-display); font-size: 1.15rem; }
.clinical-trend-grid .mini-progress { margin-top: auto; }
.dual-bars,
.spark-bars { display: flex; height: 100px; align-items: end; justify-content: center; gap: 10px; margin-top: auto; border-bottom: 1px solid #cbdce2; }
.dual-bars i,
.spark-bars i { width: 24px; height: var(--height); border-radius: 5px 5px 0 0; background: var(--blue-600); }
.dual-bars i:last-child { background: #d68648; }
.spark-bars { gap: 5px; }
.spark-bars i { width: 12px; background: var(--role-accent); }
.doctor-risk-table { min-width: 1500px; }
.doctor-risk-table .btn { min-height: 36px; padding: 6px 9px; font-size: 0.61rem; }
.table-action-note { margin-top: 12px; color: var(--muted); font-size: 0.62rem; }

.doctor-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.clinical-report-card { border: 1px solid var(--line); border-radius: 16px; padding: 19px; background: #fbfdfe; }
.clinical-report-card.priority { border-left: 5px solid var(--danger-700); }
.clinical-report-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 11px; align-items: start; }
.clinical-report-head > div > span,
.clinical-report-head small { color: var(--muted); font-size: 0.59rem; }
.clinical-report-head h3 { margin: 2px 0; font-size: 0.86rem; }
.clinical-report-card > p { margin: 15px 0; font-size: 0.7rem; }
.report-section-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 16px; }
.report-section-list > span { display: flex; align-items: center; gap: 7px; color: var(--green-700); font-size: 0.62rem; font-weight: 700; }
.report-section-list > span.pending { color: var(--amber-700); }
.report-section-list .icon { width: 15px; }
.ai-clinical-note { border-radius: 12px; padding: 13px; background: var(--sky-100); }
.ai-clinical-note strong,
.ai-clinical-note span { display: block; }
.ai-clinical-note strong { font-size: 0.67rem; }
.ai-clinical-note span { margin-top: 3px; color: var(--muted); font-size: 0.62rem; }
.doctor-order-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doctor-order-form label { display: grid; gap: 6px; color: var(--navy-900); font-size: 0.67rem; font-weight: 700; }
.doctor-order-form .wide { grid-column: 1 / -1; }
.doctor-order-form input,
.doctor-order-form select,
.doctor-order-form textarea,
.compact-select { width: 100%; min-height: 48px; border: 1px solid #cbdde3; border-radius: 11px; padding: 9px 11px; background: #fff; color: var(--ink); outline: none; }
.assign-team { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 15px; }
.assign-team > span { color: var(--muted); font-size: 0.64rem; font-weight: 700; }
.assign-team label { display: flex; min-height: 36px; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; background: var(--sky-50); font-size: 0.63rem; font-weight: 700; }
.assign-team input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.doctor-notification-levels { display: grid; gap: 8px; }
.doctor-notification-levels > div { display: grid; grid-template-columns: 52px 1fr; gap: 1px 10px; border-left: 4px solid #9aa7b0; border-radius: 10px; padding: 10px 12px; background: #f4f7f8; }
.doctor-notification-levels > div > span { grid-row: span 2; align-self: center; font-size: 0.6rem; font-weight: 800; }
.doctor-notification-levels strong { font-size: 0.67rem; }
.doctor-notification-levels small { color: var(--muted); font-size: 0.58rem; }
.doctor-notification-levels .urgent { border-color: var(--danger-700); background: var(--danger-100); }
.doctor-notification-levels .today { border-color: #d86f2c; background: #ffead8; }
.doctor-notification-levels .follow { border-color: #d9a21d; background: #fff5d8; }
.doctor-notification-levels .info { border-color: var(--blue-700); background: var(--sky-100); }
.collaboration-board { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; }
.collaboration-thread { display: grid; grid-template-columns: 42px 1fr; gap: 12px; border-bottom: 1px solid #e6eef0; padding: 14px 0; }
.collaboration-thread:first-child { padding-top: 0; }
.collaboration-thread > div:nth-child(2) > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.collaboration-thread strong { font-size: 0.72rem; }
.collaboration-thread p { margin: 6px 0; font-size: 0.68rem; }
.collaboration-thread small { color: var(--muted); font-size: 0.58rem; }
.team-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--sky-100); color: var(--blue-700); font-size: 0.65rem; font-weight: 800; }
.team-avatar.doctor { background: #dcebf2; color: #194f6c; }
.team-avatar.family { background: var(--warm-100); color: var(--amber-700); }
.attachment-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.attachment-chips span { display: flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; background: var(--sky-100); color: var(--blue-700); font-size: 0.59rem; font-weight: 700; }
.attachment-chips .icon { width: 14px; }
.followup-board { border-radius: 15px; padding: 16px; background: #f5f9fa; }
.followup-board > label { display: grid; grid-template-columns: 18px 1fr 8px; align-items: start; gap: 9px; border-bottom: 1px solid #e0e9ec; padding: 11px 0; }
.followup-board input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.followup-board strong,
.followup-board small { display: block; }
.followup-board strong { font-size: 0.65rem; }
.followup-board small { color: var(--muted); font-size: 0.58rem; }
.followup-board i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #94a2ac; }
.followup-board i.danger { background: var(--danger-700); }
.followup-board i.warning { background: #d9a21d; }
.followup-board i.info { background: var(--blue-600); }

/* Doctor patient detail */
.patient-clinical-header { border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: #fff; box-shadow: var(--shadow-sm); }
.patient-clinical-header > a { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; color: var(--blue-700); font-size: 0.68rem; font-weight: 700; }
.patient-clinical-header > a .icon { width: 17px; }
.patient-clinical-header > div:nth-child(2) { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.patient-identity { display: flex; align-items: center; gap: 14px; }
.patient-identity .avatar { width: 60px; height: 60px; font-size: 1rem; }
.patient-identity h1 { margin: 2px 0; font-size: 1.85rem; }
.patient-identity p { margin: 0; font-size: 0.72rem; }
.patient-identity > .status-badge { margin-left: 10px; }
.clinical-demographics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.clinical-demographics > div { border-radius: 11px; padding: 11px; background: #f5f9fa; }
.clinical-demographics span,
.clinical-demographics strong { display: block; }
.clinical-demographics span { color: var(--muted); font-size: 0.58rem; }
.clinical-demographics strong { margin-top: 3px; font-size: 0.68rem; }
.clinical-tabbar { position: sticky; z-index: 30; top: 82px; display: flex; gap: 3px; margin: 18px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; padding: 5px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.clinical-tabbar button { min-height: 42px; flex: 0 0 auto; border-radius: 9px; padding: 7px 11px; background: transparent; color: var(--muted); font-size: 0.64rem; font-weight: 700; }
.clinical-tabbar button.active { background: var(--role-soft); color: var(--role-accent); }
.clinical-summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 11px; margin-bottom: 20px; }
.clinical-summary-card { display: flex; min-height: 112px; align-items: center; gap: 10px; border: 1px solid var(--line); border-left: 4px solid var(--green-600); border-radius: 14px; padding: 14px; background: #fff; }
.clinical-summary-card.danger { border-left-color: var(--danger-700); }
.clinical-summary-card.warning { border-left-color: #d9a21d; }
.clinical-summary-card .icon-box { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; }
.clinical-summary-card span,
.clinical-summary-card strong,
.clinical-summary-card small { display: block; }
.clinical-summary-card > div > span,
.clinical-summary-card small { color: var(--muted); font-size: 0.57rem; }
.clinical-summary-card strong { margin: 4px 0; font-size: 0.87rem; }
.clinical-detail-grid { align-items: start; }
.rom-clinical-layout { display: grid; grid-template-columns: 1.45fr .55fr; gap: 17px; }
.rom-measurement-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rom-measurement-facts > div { border-radius: 11px; padding: 11px; background: #f4f8fa; }
.rom-measurement-facts > div.danger { background: var(--danger-100); }
.rom-measurement-facts > div.warning { background: var(--amber-100); }
.rom-measurement-facts span,
.rom-measurement-facts strong { display: block; }
.rom-measurement-facts span { color: var(--muted); font-size: 0.58rem; }
.rom-measurement-facts strong { margin-top: 3px; font-size: 0.8rem; }
.rom-comparison-row { display: grid; grid-template-columns: 1fr .75fr 1fr; gap: 10px; margin-top: 15px; }
.rom-comparison-row > div { border: 1px solid var(--line); border-radius: 13px; padding: 13px; }
.side-compare > div { display: grid; grid-template-columns: 40px 1fr 42px; align-items: center; gap: 7px; margin-bottom: 7px; }
.side-compare span,
.side-compare strong,
.rom-comparison-row small { font-size: 0.59rem; }
.side-compare i { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--green-600) var(--value), #e5edef var(--value)); }
.side-compare i.danger { background: linear-gradient(90deg, var(--danger-700) var(--value), #e5edef var(--value)); }
.before-after > span,
.pain-rom-cross > span { color: var(--muted); font-size: 0.59rem; font-weight: 700; }
.before-after > div { display: flex; align-items: center; gap: 8px; margin: 14px 0 9px; }
.before-after > div strong { font-size: 1rem; }
.before-after > div .icon { width: 18px; }
.cross-plot { position: relative; height: 68px; margin: 8px 0; border-left: 1px solid #c9d8de; border-bottom: 1px solid #c9d8de; background: linear-gradient(#e9f0f2 1px, transparent 1px), linear-gradient(90deg,#e9f0f2 1px,transparent 1px); background-size: 25% 25%; }
.cross-plot i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); transform: translate(-50%,-50%); }
.cross-plot i.danger { background: var(--danger-700); }
.clinical-timeline { display: grid; gap: 5px; }
.clinical-timeline > div { display: grid; grid-template-columns: 14px 1fr; gap: 10px; border-left: 2px solid #dce7eb; margin-left: 6px; padding: 6px 0 10px 15px; }
.clinical-timeline i { width: 12px; height: 12px; margin-left: -22px; border: 3px solid #fff; border-radius: 50%; background: #96a5ae; box-shadow: 0 0 0 2px #dce7eb; }
.clinical-timeline .done i { background: var(--green-600); }
.clinical-timeline .danger i { background: var(--danger-700); }
.clinical-timeline strong,
.clinical-timeline small { display: block; }
.clinical-timeline strong { font-size: 0.68rem; }
.clinical-timeline small { color: var(--muted); font-size: 0.58rem; }
.doctor-motion-review { display: grid; grid-template-columns: 1.05fr .9fr .75fr; gap: 13px; }
.angle-curve-panel { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fbfdfe; }
.angle-curve-panel .data-chart { min-height: 215px; }
.angle-curve-panel > strong { display: block; margin-top: 10px; font-size: 0.68rem; }
.angle-legend { display: flex; gap: 12px; color: var(--muted); font-size: 0.57rem; }
.angle-legend span { display: flex; align-items: center; gap: 5px; }
.angle-legend i { width: 15px; height: 3px; background: #d27936; }
.angle-legend span:last-child i { border-top: 2px dashed #9eaab2; background: transparent; }
.ai-compensation-summary { display: grid; align-content: start; gap: 8px; border-radius: 16px; padding: 16px; background: #f5f9fa; }
.ai-compensation-summary > div { display: flex; align-items: center; gap: 9px; border-radius: 10px; padding: 9px; background: #fff; }
.ai-compensation-summary > div > i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--blue-600); }
.ai-compensation-summary > div.danger > i { background: var(--danger-700); }
.ai-compensation-summary > div.warning > i { background: #d9a21d; }
.ai-compensation-summary strong,
.ai-compensation-summary small { display: block; }
.ai-compensation-summary strong { font-size: 0.64rem; }
.ai-compensation-summary small { color: var(--muted); font-size: 0.56rem; }
.motion-event-timeline { margin-top: 19px; padding: 24px 25px 10px; overflow-x: auto; }
.timeline-track { position: relative; min-width: 650px; height: 8px; border-radius: 999px; background: linear-gradient(90deg,#dce7eb,#d2dee3); }
.timeline-track button { position: absolute; top: 50%; left: var(--x); background: transparent; transform: translate(-50%,-50%); }
.timeline-track button i { display: block; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 2px var(--blue-600); }
.timeline-track button.danger i { background: var(--danger-700); box-shadow: 0 0 0 2px var(--danger-700); }
.timeline-track button.warning i { background: #d9a21d; box-shadow: 0 0 0 2px #d9a21d; }
.timeline-track button.stable i { background: var(--green-600); box-shadow: 0 0 0 2px var(--green-600); }
.timeline-track button span { position: absolute; top: 18px; left: 50%; color: var(--muted); font-size: 0.55rem; white-space: nowrap; transform: translateX(-50%); }
.symptom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.symptom-grid > div { border-radius: 12px; padding: 13px; background: #f5f9fa; }
.symptom-grid span,
.symptom-grid strong,
.symptom-grid small { display: block; }
.symptom-grid span,
.symptom-grid small { color: var(--muted); font-size: 0.58rem; }
.symptom-grid strong { margin: 4px 0; font-size: 0.78rem; }
.team-record-grid { display: grid; gap: 9px; }
.team-record-grid article { display: grid; grid-template-columns: 42px 1fr; gap: 11px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.team-record-grid strong { font-size: 0.69rem; }
.team-record-grid p { margin: 4px 0; font-size: 0.65rem; }
.team-record-grid small { color: var(--muted); font-size: 0.57rem; }
.patient-report-order { display: grid; grid-template-columns: 1.2fr .8fr; gap: 15px; }
.doctor-order-summary { border-radius: 16px; padding: 19px; background: linear-gradient(145deg,var(--sky-100),#f7fbfc); }
.doctor-order-summary h3 { font-size: 0.94rem; }
.doctor-order-summary p { font-size: 0.68rem; }

/* Occupational therapist reablement workspace */
.ot-kpi-grid { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.ot-kpi-grid .doctor-kpi { min-height: 148px; }
.ot-main-grid { align-items: start; }
.ot-action-list { display: grid; gap: 8px; }
.ot-action-list article { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfdfe; }
.ot-action-list article > i { width: 7px; height: 36px; border-radius: 999px; background: #95a3ad; }
.ot-action-list article.danger > i { background: var(--danger-700); }
.ot-action-list article.warning > i { background: #d9a21d; }
.ot-action-list article.info > i { background: var(--blue-600); }
.ot-action-list strong,
.ot-action-list small { display: block; }
.ot-action-list strong { font-size: 0.68rem; }
.ot-action-list p { margin: 1px 0; color: var(--muted); font-size: 0.59rem; }
.ot-action-list button { min-height: 34px; border-radius: 8px; padding: 5px 8px; background: var(--role-soft); color: var(--role-accent); font-size: 0.58rem; font-weight: 800; }
.functional-patient-list { display: grid; gap: 7px; }
.functional-patient-list > a { display: grid; grid-template-columns: 42px 1.2fr .8fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfdfe; }
.functional-patient-list > a:hover { border-color: var(--role-accent); background: var(--role-soft); }
.functional-patient-list strong,
.functional-patient-list small { display: block; }
.functional-patient-list strong { font-size: 0.67rem; }
.functional-patient-list small { color: var(--muted); font-size: 0.57rem; }
.function-bars { display: grid; gap: 13px; }
.function-bars > div { display: grid; grid-template-columns: 72px 1fr 42px; align-items: center; gap: 8px; }
.function-bars span,
.function-bars strong { font-size: 0.63rem; }
.function-bars i { height: 10px; border-radius: 999px; background: linear-gradient(90deg,var(--role-accent) var(--value),#e6edef var(--value)); }
.report-status-donut { display: flex; align-items: center; justify-content: center; gap: 18px; }
.report-status-donut .progress-ring { width: 110px; height: 110px; }
.report-status-donut > div:last-child { display: grid; gap: 7px; }
.report-status-donut span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.59rem; }
.report-status-donut i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); }
.report-status-donut span:nth-child(2) i { background: #d9a21d; }
.report-status-donut span:nth-child(3) i { background: #9aa7b0; }
.ot-patient-table { min-width: 1600px; }
.ot-patient-table .btn { min-height: 36px; padding: 6px 9px; font-size: 0.6rem; }

.goal-type-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.goal-type-pills button { min-height: 38px; flex: 0 0 auto; border-radius: 999px; padding: 6px 11px; background: #f1f6f7; color: var(--muted); font-size: 0.6rem; font-weight: 700; }
.goal-type-pills button.active { background: var(--role-soft); color: var(--role-accent); }
.ot-goal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 14px; }
.ot-goal-form label,
.ot-compact-form label { display: grid; gap: 5px; color: var(--navy-900); font-size: 0.63rem; font-weight: 700; }
.ot-goal-form .wide { grid-column: 1 / -1; }
.ot-goal-form input,
.ot-goal-form select,
.ot-goal-form textarea,
.ot-compact-form input,
.ot-compact-form select { width: 100%; min-height: 45px; border: 1px solid #cbdde3; border-radius: 10px; padding: 8px 10px; background: #fff; color: var(--ink); outline: none; }
.adl-assessment-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 15px; }
.adl-radar { display: grid; justify-items: center; border-radius: 15px; padding: 15px; background: #f4faf7; text-align: center; }
.adl-radar > span { color: var(--green-700); font-size: 0.64rem; font-weight: 800; }
.radar-shape { width: 130px; height: 130px; margin: 10px; background: repeating-radial-gradient(circle,#d6e6e2 0 1px,transparent 1px 22px), conic-gradient(from 20deg,rgba(51,136,115,.78),rgba(64,149,181,.55),rgba(51,136,115,.78)); clip-path: polygon(50% 2%,88% 22%,98% 64%,70% 96%,24% 88%,4% 46%); }
.adl-radar small { color: var(--muted); font-size: 0.56rem; }
.iadl-progress { display: grid; align-content: center; gap: 9px; }
.iadl-progress > div { display: grid; grid-template-columns: 72px 1fr 38px; align-items: center; gap: 7px; }
.iadl-progress span,
.iadl-progress strong { font-size: 0.58rem; }
.iadl-progress i { height: 8px; border-radius: 999px; background: #e2ebee; }
.iadl-progress b { display: block; width: var(--value); height: 100%; border-radius: inherit; background: var(--role-accent); }
.adl-score-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.adl-score-legend span { border-radius: 999px; padding: 4px 7px; background: hsl(calc(8 + var(--i) * 20) 58% 91%); color: var(--ink); font-size: 0.52rem; font-weight: 700; }
.upper-limb-layout { display: grid; grid-template-columns: 1fr 1fr .75fr; gap: 13px; }
.hand-function-map { border-radius: 16px; padding: 16px; background: linear-gradient(145deg,var(--green-50),var(--sky-50)); }
.hand-visual { display: grid; min-height: 130px; place-items: center; border: 1px dashed #b8d5ce; border-radius: 13px; text-align: center; }
.hand-visual .icon { width: 38px; color: var(--role-accent); }
.hand-visual strong,
.hand-visual span { display: block; }
.hand-visual strong { font-size: 0.72rem; }
.hand-visual span { color: var(--muted); font-size: 0.58rem; }
.hand-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 10px; }
.hand-metrics > div { border-radius: 9px; padding: 8px; background: #fff; }
.hand-metrics span,
.hand-metrics strong { display: block; }
.hand-metrics span { color: var(--muted); font-size: 0.52rem; }
.hand-metrics strong { font-size: 0.66rem; }
.functional-task-library { display: grid; align-content: start; gap: 6px; }
.functional-task-library button { display: grid; grid-template-columns: 28px 1fr 16px; align-items: center; gap: 7px; min-height: 38px; border-radius: 9px; padding: 7px; background: #f5f9fa; color: var(--ink); font-size: 0.59rem; text-align: left; }
.functional-task-library button > span { color: var(--role-accent); font-weight: 800; }
.functional-task-library .icon { width: 15px; color: var(--muted); }
.ai-feedback-stack { display: grid; align-content: start; gap: 7px; }
.ai-feedback-stack > div { display: flex; align-items: center; gap: 8px; border-radius: 9px; padding: 9px; background: #f5f8f9; }
.ai-feedback-stack i { width: 8px; height: 8px; border-radius: 50%; background: #98a6af; }
.ai-feedback-stack .danger { background: var(--danger-100); }
.ai-feedback-stack .danger i { background: var(--danger-700); }
.ai-feedback-stack .warning { background: var(--amber-100); }
.ai-feedback-stack .warning i { background: #d9a21d; }
.ai-feedback-stack .info { background: var(--sky-100); }
.ai-feedback-stack .info i { background: var(--blue-600); }
.ai-feedback-stack strong { font-size: 0.59rem; }
.ot-motion-review { display: grid; grid-template-columns: 1.1fr .9fr .65fr; gap: 11px; }
.ot-compact-form { display: grid; gap: 10px; }
.ot-compact-form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-rehab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-rehab-grid article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.home-rehab-grid .icon-box { width: 38px; height: 38px; border-radius: 10px; }
.home-rehab-grid strong,
.home-rehab-grid small { display: block; }
.home-rehab-grid strong { font-size: 0.63rem; }
.home-rehab-grid small { color: var(--muted); font-size: 0.54rem; }
.education-list { display: grid; gap: 6px; margin-bottom: 12px; }
.education-list button { display: grid; grid-template-columns: 28px 1fr 16px; align-items: center; gap: 8px; border-radius: 10px; padding: 9px; background: #f5f9fa; color: var(--ink); text-align: left; }
.education-list button.danger { background: var(--danger-100); }
.education-list button .icon { width: 17px; }
.education-list strong,
.education-list small { display: block; }
.education-list strong { font-size: 0.62rem; }
.education-list small { color: var(--muted); font-size: 0.54rem; }
.assistive-list { display: grid; gap: 7px; }
.assistive-list > div { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; padding: 10px; }
.assistive-list .icon-box { width: 38px; height: 38px; border-radius: 10px; }
.assistive-list strong,
.assistive-list small { display: block; }
.assistive-list strong { font-size: 0.62rem; }
.assistive-list small { color: var(--muted); font-size: 0.54rem; }
.ot-report-builder { display: grid; grid-template-columns: .7fr 1.3fr; gap: 13px; }
.ot-report-builder > div:first-child { display: grid; align-content: start; gap: 6px; }
.ot-report-builder > div:first-child button { display: flex; min-height: 38px; align-items: center; gap: 7px; border-radius: 9px; padding: 7px 9px; background: #f4f8fa; color: var(--muted); font-size: 0.59rem; text-align: left; }
.ot-report-builder > div:first-child button.active { background: var(--role-soft); color: var(--role-accent); font-weight: 800; }
.ot-report-builder .icon { width: 15px; }

.ot-demographics { grid-template-columns: repeat(4,1fr); }
.ot-summary-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: 9px; margin-bottom: 20px; }
.ot-summary-grid .clinical-summary-card { min-height: 105px; padding: 11px; }
.occupation-goal-roadmap { display: grid; gap: 9px; }
.occupation-goal-roadmap article { border-left: 4px solid #9aa7b0; border-radius: 11px; padding: 13px; background: #f5f8f9; }
.occupation-goal-roadmap article.done { border-color: var(--green-600); background: var(--green-50); }
.occupation-goal-roadmap article.active { border-color: var(--role-accent); background: var(--role-soft); }
.occupation-goal-roadmap span,
.occupation-goal-roadmap small { color: var(--muted); font-size: 0.56rem; }
.occupation-goal-roadmap h3 { margin: 3px 0; font-size: 0.73rem; }
.occupation-goal-roadmap p { margin: 3px 0; font-size: 0.62rem; }
.adl-compare-table { display: grid; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.adl-compare-table > div { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; border-bottom: 1px solid var(--line); padding: 8px 10px; }
.adl-compare-table > div:first-child { background: #f2f7f8; font-weight: 800; }
.adl-compare-table > div:last-child { border-bottom: 0; }
.adl-compare-table span,
.adl-compare-table strong { font-size: 0.58rem; }
.ot-upper-detail { display: grid; grid-template-columns: 1.1fr 1fr .65fr; gap: 13px; }
.hand-metrics.detailed { align-content: start; margin: 0; }
.home-education-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.home-education-detail > div:first-child { display: grid; align-content: start; gap: 7px; }
.home-education-detail label { display: flex; gap: 8px; border-radius: 9px; padding: 9px; background: #f5f9fa; }
.home-education-detail input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.home-education-detail strong,
.home-education-detail small { display: block; }
.home-education-detail strong { font-size: 0.61rem; }
.home-education-detail small { color: var(--muted); font-size: 0.53rem; }
.safety-education { border-left: 4px solid var(--danger-700); border-radius: 10px; padding: 12px; background: var(--danger-100); }
.safety-education strong { display: flex; align-items: center; gap: 7px; font-size: 0.64rem; }
.safety-education .icon { width: 17px; }
.safety-education p { margin: 5px 0 0; font-size: 0.58rem; }
.ot-report-summary { background: linear-gradient(145deg,var(--green-50),#f7fbfc); }

/* OT custom form workflow */
.form-workspace { max-width: 1680px; margin-inline: auto; }
.form-hub-welcome { margin-bottom: 18px; }
.form-hub-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 18px; }
.form-hub-kpi { display: grid; grid-template-columns: 46px 1fr; gap: 11px; border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.form-hub-kpi.danger { border-color: #efd3ca; background: #fff8f6; }
.form-hub-kpi.info { background: #f7fbfd; }
.form-hub-kpi .icon-box { width: 46px; height: 46px; border-radius: 13px; background: var(--role-soft); color: var(--role-accent); }
.form-hub-kpi span,
.form-hub-kpi p { color: var(--muted); font-size: .61rem; }
.form-hub-kpi strong { display: block; margin: 1px 0; font-size: 1.18rem; }
.form-hub-kpi strong small { margin-left: 3px; font-size: .62rem; }
.form-hub-kpi p { margin: 0; }
.form-hub-tabs { display: flex; gap: 5px; margin-bottom: 14px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.form-hub-tabs a { min-height: 46px; flex: 0 0 auto; border-bottom: 3px solid transparent; padding: 11px 14px; color: var(--muted); font-size: .68rem; font-weight: 800; }
.form-hub-tabs a.active { border-color: var(--role-accent); color: var(--role-accent); }
.form-use-cases { display: flex; align-items: center; gap: 7px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: thin; }
.form-use-cases > span { flex: 0 0 auto; color: var(--muted); font-size: .61rem; font-weight: 800; }
.form-use-cases button { min-height: 36px; flex: 0 0 auto; border-radius: 999px; padding: 6px 10px; background: #edf4f5; color: var(--ink); font-size: .59rem; font-weight: 700; }
.form-list-table { min-width: 1420px; }
.form-list-table td:first-child strong,
.form-list-table td:first-child small { display: block; }
.form-list-table td:first-child small { margin-top: 3px; color: var(--muted); font-size: .55rem; }
.version-chip { display: inline-flex; border-radius: 7px; padding: 4px 7px; background: #edf3f5; color: var(--navy-700); font-size: .57rem; font-weight: 800; }
.abnormal-count { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--danger-100); color: var(--danger-700); font-weight: 900; }
.table-actions { display: flex; gap: 4px; }
.table-actions a,
.table-actions button { min-height: 32px; border-radius: 7px; padding: 5px 7px; background: #edf5f3; color: var(--role-accent); font-size: .54rem; font-weight: 800; white-space: nowrap; }
.dispatch-list { display: grid; gap: 8px; }
.dispatch-list article { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.dispatch-list .avatar { width: 40px; height: 40px; }
.dispatch-list strong,
.dispatch-list small { display: block; }
.dispatch-list strong { font-size: .65rem; }
.dispatch-list small { color: var(--muted); font-size: .55rem; }
.form-alert-list { display: grid; gap: 8px; margin-bottom: 13px; }
.form-alert-list article { display: grid; grid-template-columns: 42px 1fr; gap: 9px; border-left: 4px solid #d7a128; border-radius: 10px; padding: 10px; background: var(--amber-100); }
.form-alert-list article.danger { border-color: var(--danger-700); background: var(--danger-100); }
.form-alert-list article > span { align-self: start; border-radius: 7px; padding: 4px 5px; background: rgba(255,255,255,.8); color: var(--danger-700); font-size: .51rem; font-weight: 900; text-align: center; }
.form-alert-list strong { font-size: .64rem; }
.form-alert-list p { margin: 2px 0 0; font-size: .56rem; }
.form-workflow-strip { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.form-workflow-strip article { position: relative; min-height: 118px; border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: linear-gradient(145deg,#fff,#f5f9fa); }
.form-workflow-strip article:not(:last-child)::after { position: absolute; z-index: 2; top: 50%; right: -10px; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--role-accent); content: "›"; font-size: .8rem; font-weight: 900; line-height: 18px; text-align: center; transform: translateY(-50%); }
.form-workflow-strip span { color: var(--role-accent); font-size: .56rem; font-weight: 900; }
.form-workflow-strip strong { display: block; margin: 6px 0 4px; font-size: .68rem; }
.form-workflow-strip p { margin: 0; color: var(--muted); font-size: .56rem; }

.builder-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.builder-page-head > div:first-child > a { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 10px; color: var(--role-accent); font-size: .62rem; font-weight: 800; }
.builder-page-head > div:first-child > a .icon { width: 16px; }
.builder-page-head h1 { margin: 5px 0; font-size: clamp(1.45rem,2.1vw,2rem); }
.builder-page-head p { margin: 0; font-size: .67rem; }
.builder-stepper { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.builder-stepper span { display: flex; min-height: 52px; align-items: center; justify-content: center; gap: 7px; border-right: 1px solid var(--line); color: var(--muted); font-size: .64rem; font-weight: 800; }
.builder-stepper span:last-child { border-right: 0; }
.builder-stepper span.active { background: var(--role-soft); color: var(--role-accent); }
.builder-stepper b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #e9f0f2; font-size: .57rem; }
.builder-stepper .active b { background: var(--role-accent); color: #fff; }
.form-builder-layout { display: grid; grid-template-columns: minmax(190px,220px) minmax(360px,1fr) minmax(250px,280px); gap: 13px; align-items: start; }
.question-toolbox,
.question-settings-panel { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: #fff; box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.question-toolbox h2,
.question-settings-panel h2 { margin: 4px 0; font-size: .96rem; }
.question-toolbox > div:first-child p { margin: 0 0 12px; font-size: .58rem; }
.question-toolbox > button { display: grid; width: 100%; grid-template-columns: 38px 1fr 18px; align-items: center; gap: 8px; min-height: 56px; border-radius: 11px; padding: 8px; background: #f5f9fa; color: var(--ink); text-align: left; }
.question-toolbox > button + button { margin-top: 6px; }
.question-toolbox > button:hover { background: var(--role-soft); }
.question-toolbox .icon-box { width: 38px; height: 38px; border-radius: 10px; background: #fff; color: var(--role-accent); }
.question-toolbox strong,
.question-toolbox small { display: block; }
.question-toolbox strong { font-size: .61rem; }
.question-toolbox small { margin-top: 2px; color: var(--muted); font-size: .51rem; }
.question-toolbox b { color: var(--role-accent); font-size: .8rem; }
.toolbox-help { margin-top: 12px; border-radius: 10px; padding: 11px; background: var(--sky-100); }
.toolbox-help strong { font-size: .61rem; }
.toolbox-help p { margin: 3px 0 0; font-size: .54rem; }
.form-canvas { display: grid; gap: 10px; min-width: 0; border-radius: 18px; padding: 15px; background: #eaf1f3; }
.form-settings-card { border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: #fff; }
.form-settings-card h2 { margin: 4px 0 12px; font-size: .92rem; }
.form-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-settings-grid label,
.question-settings-panel label,
.dispatch-form-grid label,
.review-decision label { display: grid; gap: 5px; color: var(--navy-900); font-size: .58rem; font-weight: 800; }
.form-settings-grid input,
.form-settings-grid select,
.question-settings-panel input,
.question-settings-panel textarea,
.question-settings-panel select,
.dispatch-form-grid input,
.dispatch-form-grid select,
.review-decision select { width: 100%; min-height: 42px; border: 1px solid #cbdde3; border-radius: 9px; padding: 8px 9px; background: #fff; color: var(--ink); outline: none; }
.form-toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.form-toggle-grid label { display: flex; align-items: center; gap: 7px; border-radius: 8px; padding: 8px; background: #f5f9fa; font-size: .56rem; font-weight: 700; }
.form-toggle-grid input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.canvas-page-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 5px; color: var(--navy-700); font-size: .61rem; font-weight: 900; }
.canvas-page-label button { color: var(--role-accent); font-size: .57rem; font-weight: 800; }
.canvas-page-label button .icon { width: 15px; }
.condition-label { border-radius: 999px; padding: 5px 8px; background: var(--amber-100); color: #906816; font-size: .52rem; }
.builder-question { display: grid; grid-template-columns: 30px 32px 1fr 64px; gap: 8px; border: 1px solid transparent; border-radius: 14px; padding: 13px; background: #fff; box-shadow: 0 4px 12px rgba(26,67,86,.05); }
.builder-question.selected { border-color: var(--role-accent); box-shadow: 0 0 0 2px rgba(51,136,115,.1); }
.drag-handle { align-self: start; color: #9ba9b0; cursor: grab; }
.drag-handle .icon { width: 18px; }
.question-index { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--role-soft); color: var(--role-accent); font-size: .56rem; font-weight: 900; }
.question-content > span { color: var(--role-accent); font-size: .53rem; font-weight: 900; }
.question-content h3 { margin: 4px 0 10px; font-size: .76rem; }
.question-actions { display: flex; align-items: start; justify-content: flex-end; gap: 3px; }
.question-actions button { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 7px; background: #f2f6f7; color: var(--muted); }
.question-actions .icon { width: 14px; }
.choice-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.choice-preview span { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 7px; color: var(--muted); font-size: .53rem; }
.choice-preview span.risk { border-color: #efd1c8; background: var(--danger-100); color: var(--danger-700); }
.choice-preview i { width: 12px; height: 12px; flex: 0 0 12px; border: 1px solid #aebdc3; border-radius: 50%; }
.choice-preview.multi i { border-radius: 3px; }
.text-preview { border: 1px dashed #bdd0d6; border-radius: 9px; padding: 12px; color: var(--muted); font-size: .55rem; }
.media-question-preview { display: flex; align-items: center; gap: 10px; border: 1px dashed #a9c9bf; border-radius: 10px; padding: 12px; background: var(--green-50); color: var(--role-accent); }
.media-question-preview.video { border-color: #aacddd; background: var(--sky-100); color: var(--blue-700); }
.media-question-preview .icon { width: 26px; }
.media-question-preview strong,
.media-question-preview small { display: block; }
.media-question-preview strong { font-size: .62rem; }
.media-question-preview small { color: var(--muted); font-size: .52rem; }
.canvas-add { min-height: 60px; border: 2px dashed #b6cbd1; border-radius: 12px; background: rgba(255,255,255,.6); color: var(--role-accent); font-size: .61rem; font-weight: 800; }
.canvas-add .icon { width: 16px; }
.settings-title { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-bottom: 12px; }
.settings-title .eyebrow { grid-column: 1 / -1; }
.settings-options { display: grid; gap: 5px; margin: 12px 0; }
.settings-options > span { font-size: .58rem; font-weight: 800; }
.settings-options > div { display: grid; grid-template-columns: 22px 1fr 44px 8px; align-items: center; gap: 5px; }
.settings-options button { color: #9ba8af; }
.settings-options button .icon { width: 15px; }
.settings-options input { min-height: 36px; padding: 6px; font-size: .54rem; }
.settings-options i { width: 7px; height: 7px; border-radius: 50%; background: var(--green-600); }
.settings-options i.danger { background: var(--danger-700); }
.setting-switches { display: grid; gap: 2px; margin: 10px 0; }
.setting-switches label { display: flex; min-height: 36px; align-items: center; justify-content: space-between; flex-direction: row; border-bottom: 1px solid #edf2f3; }
.setting-switches input { width: 18px; min-height: 18px; accent-color: var(--role-accent); }
.branch-rule-card { margin: 11px 0; border-left: 4px solid var(--blue-600); border-radius: 10px; padding: 10px; background: var(--sky-100); }
.branch-rule-card strong { display: flex; align-items: center; gap: 6px; font-size: .6rem; }
.branch-rule-card .icon { width: 15px; }
.branch-rule-card p { margin: 4px 0; font-size: .53rem; }
.branch-rule-card button { color: var(--blue-700); font-size: .54rem; font-weight: 800; }
.form-builder-support { margin-top: 14px; }
.logic-flow { display: grid; gap: 7px; }
.logic-flow article { display: grid; grid-template-columns: 36px 1fr 22px 1.3fr; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; padding: 9px; }
.logic-flow article > span { border-radius: 7px; padding: 5px; background: var(--role-soft); color: var(--role-accent); font-size: .51rem; font-weight: 900; text-align: center; }
.logic-flow article.danger > span { background: var(--danger-100); color: var(--danger-700); }
.logic-flow strong { font-size: .61rem; }
.logic-flow p { margin: 0; font-size: .56rem; }
.logic-flow i { color: var(--muted); font-style: normal; text-align: center; }
.trigger-rule-list { display: grid; gap: 6px; }
.trigger-rule-list article { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; border-radius: 9px; padding: 9px; background: #f5f9fa; }
.trigger-rule-list article > i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-600); }
.trigger-rule-list article.danger > i { background: var(--danger-700); }
.trigger-rule-list article.warning > i { background: #d5a226; }
.trigger-rule-list strong,
.trigger-rule-list small { display: block; }
.trigger-rule-list strong { font-size: .59rem; }
.trigger-rule-list small { color: var(--muted); font-size: .51rem; }
.trigger-rule-list button { color: var(--role-accent); font-size: .52rem; font-weight: 800; }
.question-capability-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.question-capability-grid article { min-height: 142px; border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: #fbfdfe; }
.question-capability-grid .icon-box { width: 36px; height: 36px; border-radius: 9px; background: var(--role-soft); color: var(--role-accent); }
.question-capability-grid strong { display: block; margin: 9px 0 4px; font-size: .62rem; }
.question-capability-grid p { margin: 0; color: var(--muted); font-size: .53rem; }

.dispatch-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 14px; align-items: start; }
.dispatch-layout > main { display: grid; gap: 13px; }
.recipient-mode-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.recipient-mode-grid label { display: grid; min-height: 120px; align-content: start; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.recipient-mode-grid label.selected { border-color: var(--role-accent); background: var(--role-soft); }
.recipient-mode-grid input { position: absolute; opacity: 0; pointer-events: none; }
.recipient-mode-grid .icon-box { width: 40px; height: 40px; margin-bottom: 5px; border-radius: 10px; background: #fff; color: var(--role-accent); }
.recipient-mode-grid strong,
.recipient-mode-grid small { display: block; }
.recipient-mode-grid strong { font-size: .64rem; }
.recipient-mode-grid small { color: var(--muted); font-size: .53rem; }
.recipient-search { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 10px; border-radius: 10px; padding: 11px; background: #f4f8f9; }
.recipient-search span { color: var(--muted); font-size: .55rem; }
.recipient-search strong { font-size: .63rem; }
.recipient-search button { color: var(--role-accent); font-size: .56rem; font-weight: 800; }
.fill-role-grid { display: grid; gap: 7px; }
.fill-role-grid label { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; padding: 11px; }
.fill-role-grid label.selected { border-color: var(--role-accent); background: var(--role-soft); }
.fill-role-grid input { width: 18px; height: 18px; accent-color: var(--role-accent); }
.fill-role-grid strong,
.fill-role-grid small { display: block; }
.fill-role-grid strong { font-size: .63rem; }
.fill-role-grid small { color: var(--muted); font-size: .53rem; }
.dispatch-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.auto-dispatch-rules { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.auto-dispatch-rules > span { width: 100%; color: var(--navy-900); font-size: .58rem; font-weight: 800; }
.auto-dispatch-rules label { display: flex; align-items: center; gap: 6px; border-radius: 8px; padding: 7px 9px; background: #f4f8f9; font-size: .54rem; font-weight: 700; }
.auto-dispatch-rules input { width: 16px; height: 16px; accent-color: var(--role-accent); }
.dispatch-summary { position: sticky; top: 88px; border: 1px solid var(--line); border-radius: 16px; padding: 17px; background: #fff; box-shadow: var(--shadow-sm); }
.dispatch-summary h2 { margin: 5px 0 13px; font-size: .95rem; }
.dispatch-summary-list { display: grid; gap: 0; }
.dispatch-summary-list div { display: flex; min-height: 40px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8eff1; }
.dispatch-summary-list span { color: var(--muted); font-size: .56rem; }
.dispatch-summary-list strong { font-size: .61rem; }
.comparison-callout,
.permission-callout { display: flex; gap: 8px; margin: 13px 0; border-radius: 10px; padding: 11px; background: var(--sky-100); }
.comparison-callout .icon { width: 20px; flex: 0 0 20px; color: var(--blue-700); }
.comparison-callout strong,
.permission-callout strong { font-size: .6rem; }
.comparison-callout p,
.permission-callout p { margin: 3px 0 0; font-size: .53rem; }
.permission-callout { display: block; background: #f3f6f7; }

.review-queue-summary { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-bottom: 14px; }
.review-queue-summary button { display: flex; min-height: 64px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; background: #fff; color: var(--ink); }
.review-queue-summary button.danger { border-color: #efd0c7; background: var(--danger-100); }
.review-queue-summary button.warning { border-color: #ead9ae; background: var(--amber-100); }
.review-queue-summary button span { font-size: .6rem; font-weight: 800; }
.review-queue-summary button strong { font-size: 1rem; }
.result-table { min-width: 1380px; }
.abnormal-text { color: var(--danger-700); font-weight: 800; }
.response-comparison-card { display: grid; gap: 12px; }
.comparison-person { display: flex; align-items: center; gap: 9px; }
.comparison-person strong,
.comparison-person small { display: block; }
.comparison-person strong { font-size: .67rem; }
.comparison-person small { color: var(--muted); font-size: .55rem; }
.score-compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.score-compare > div { border-radius: 12px; padding: 14px; background: var(--green-50); text-align: center; }
.score-compare > div.family { background: var(--amber-100); }
.score-compare span,
.score-compare small { color: var(--muted); font-size: .56rem; }
.score-compare strong { display: inline-block; margin: 4px; font-size: 1.5rem; }
.score-compare > i { border-radius: 999px; padding: 5px 8px; background: var(--danger-100); color: var(--danger-700); font-size: .52rem; font-style: normal; font-weight: 900; }
.comparison-warning { display: flex; align-items: flex-start; gap: 7px; border-left: 4px solid #d5a226; border-radius: 9px; padding: 10px; background: var(--amber-100); font-size: .56rem; }
.comparison-warning .icon { width: 17px; flex: 0 0 17px; }
.review-process { display: grid; gap: 0; padding: 0; list-style: none; }
.review-process li { position: relative; display: grid; min-height: 60px; grid-template-columns: 32px 1fr; gap: 9px; }
.review-process li:not(:last-child)::after { position: absolute; top: 31px; bottom: -2px; left: 15px; width: 2px; background: #dfe8eb; content: ""; }
.review-process li > span { z-index: 1; display: grid; width: 32px; height: 32px; place-items: center; border: 2px solid #c7d5da; border-radius: 50%; background: #fff; color: var(--muted); font-size: .56rem; font-weight: 900; }
.review-process li.done > span { border-color: var(--green-600); background: var(--green-600); color: #fff; }
.review-process li.active > span { border-color: var(--role-accent); color: var(--role-accent); }
.review-process strong,
.review-process small { display: block; }
.review-process strong { margin-top: 3px; font-size: .62rem; }
.review-process small { color: var(--muted); font-size: .53rem; }
.response-detail-alert { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; margin-bottom: 14px; border-left: 5px solid var(--danger-700); border-radius: 13px; padding: 14px; background: var(--danger-100); }
.response-detail-alert > .icon { width: 28px; color: var(--danger-700); }
.response-detail-alert strong { font-size: .73rem; }
.response-detail-alert p { margin: 3px 0 0; font-size: .59rem; }
.answer-review-list { display: grid; gap: 7px; }
.answer-review-list article { display: grid; grid-template-columns: 32px 1fr; gap: 9px; border-left: 4px solid #b3c3c9; border-radius: 10px; padding: 10px; background: #f5f8f9; }
.answer-review-list article.danger { border-color: var(--danger-700); background: var(--danger-100); }
.answer-review-list article.warning { border-color: #d5a226; background: var(--amber-100); }
.answer-review-list article > span { color: var(--muted); font-size: .54rem; font-weight: 900; }
.answer-review-list small,
.answer-review-list strong { display: block; }
.answer-review-list small { color: var(--muted); font-size: .53rem; }
.answer-review-list strong { margin-top: 3px; font-size: .62rem; }
.image-review-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 11px; }
.uploaded-photo { position: relative; min-height: 300px; overflow: hidden; border-radius: 14px; background: linear-gradient(165deg,#d9e5e8 0 55%,#c9bba4 55% 100%); }
.photo-zone { position: absolute; display: block; background: #87979d; }
.photo-zone.floor { right: 5%; bottom: 18%; width: 55%; height: 4px; transform: rotate(-7deg); }
.photo-zone.chair { top: 22%; left: 18%; width: 30%; height: 46%; border: 12px solid #7d654f; border-top-width: 30px; background: transparent; }
.annotation-ring { position: absolute; right: 18%; bottom: 12%; width: 100px; height: 70px; border: 4px solid #d54d3e; border-radius: 50%; transform: rotate(-8deg); }
.uploaded-photo small { position: absolute; right: 10px; bottom: 9px; left: 10px; border-radius: 7px; padding: 6px 8px; background: rgba(20,44,55,.72); color: #fff; font-size: .52rem; }
.image-review-layout aside { display: grid; align-content: start; gap: 7px; }
.image-review-layout aside > button { display: flex; min-height: 38px; align-items: center; gap: 7px; border-radius: 9px; padding: 7px 9px; background: #f2f7f8; color: var(--ink); font-size: .55rem; font-weight: 700; text-align: left; }
.image-review-layout aside > button .icon { width: 15px; }
.image-review-layout aside label { display: grid; gap: 5px; font-size: .55rem; font-weight: 800; }
.image-review-layout textarea,
.video-analysis textarea { width: 100%; border: 1px solid #cbdde3; border-radius: 9px; padding: 8px; background: #fff; color: var(--ink); }
.image-review-layout aside label:last-child { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.image-review-layout aside input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.video-form-review { display: grid; grid-template-columns: 1.1fr .9fr; gap: 11px; }
.video-analysis { display: grid; align-content: start; gap: 7px; }
.video-analysis > div { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 7px; border-left: 4px solid var(--blue-600); border-radius: 9px; padding: 9px; background: var(--sky-100); }
.video-analysis > div.danger { border-color: var(--danger-700); background: var(--danger-100); }
.video-analysis span { font-size: .53rem; font-weight: 900; }
.video-analysis strong { font-size: .58rem; }
.video-analysis button { color: var(--role-accent); font-size: .52rem; font-weight: 800; }
.video-analysis label { display: grid; gap: 5px; margin-top: 4px; font-size: .56rem; font-weight: 800; }
.review-action-stack { display: grid; gap: 6px; }
.review-action-stack button { display: flex; min-height: 42px; align-items: center; gap: 8px; border-radius: 9px; padding: 8px 10px; background: #f3f7f8; color: var(--ink); font-size: .57rem; font-weight: 700; text-align: left; }
.review-action-stack .icon { width: 16px; color: var(--role-accent); }
.review-decision { display: grid; gap: 10px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }

.analytics-filter-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 13px; padding: 11px; background: #fff; }
.analytics-filter-bar label { display: grid; gap: 4px; font-size: .55rem; font-weight: 800; }
.analytics-filter-bar select { min-height: 40px; border: 1px solid #cbdde3; border-radius: 8px; padding: 7px; background: #fff; color: var(--ink); }
.dual-trend-legend { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.dual-trend-legend > span:not(.status-badge) { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .55rem; }
.dual-trend-legend i { width: 16px; height: 3px; background: var(--role-accent); }
.dual-trend-legend span:nth-child(2) i { background: #d28a43; }
.form-analysis-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-analysis-metrics div { border-radius: 11px; padding: 12px; background: var(--green-50); }
.form-analysis-metrics div.warning { background: var(--amber-100); }
.form-analysis-metrics span,
.form-analysis-metrics strong { display: block; }
.form-analysis-metrics span { color: var(--muted); font-size: .54rem; }
.form-analysis-metrics strong { margin-top: 4px; font-size: .86rem; }
.analysis-bars { display: grid; gap: 13px; }
.analysis-bars > div { display: grid; grid-template-columns: 88px 1fr 40px; align-items: center; gap: 8px; }
.analysis-bars span,
.analysis-bars strong { font-size: .57rem; }
.analysis-bars i { height: 10px; border-radius: 999px; background: #e5edef; }
.analysis-bars b { display: block; width: var(--value); height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--role-accent),#77b9aa); }
.difficulty-ranking { display: grid; gap: 8px; }
.difficulty-ranking > div { display: grid; grid-template-columns: 24px 110px 1fr 28px; align-items: center; gap: 7px; }
.difficulty-ranking > div > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; background: #eef3f5; color: var(--muted); font-size: .5rem; font-weight: 900; }
.difficulty-ranking strong,
.difficulty-ranking b { font-size: .56rem; }
.difficulty-ranking i { width: var(--value); height: 8px; border-radius: 999px; background: var(--blue-600); }
.difficulty-ranking i.danger { background: var(--danger-700); }
.difficulty-ranking i.warning { background: #d2a02d; }
.response-heatmap { display: grid; grid-template-columns: 48px repeat(7,1fr); gap: 5px; align-items: center; }
.response-heatmap b,
.response-heatmap em { color: var(--muted); font-size: .5rem; font-style: normal; font-weight: 800; text-align: center; }
.response-heatmap i { height: 34px; border-radius: 6px; background: color-mix(in srgb,var(--role-accent) calc(20% + var(--level)*16%),#eef5f3); }
.form-event-timeline { display: grid; }
.form-event-timeline article { display: grid; grid-template-columns: 42px 14px 1fr; gap: 8px; min-height: 55px; }
.form-event-timeline article > span { color: var(--muted); font-size: .5rem; }
.form-event-timeline article > i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-600); }
.form-event-timeline article > i::after { position: absolute; top: 10px; bottom: -45px; left: 4px; width: 2px; background: #dce6e9; content: ""; }
.form-event-timeline article:last-child > i::after { display: none; }
.form-event-timeline article.danger > i { background: var(--danger-700); }
.form-event-timeline article.warning > i { background: #d2a02d; }
.form-event-timeline strong,
.form-event-timeline small { display: block; }
.form-event-timeline strong { font-size: .59rem; }
.form-event-timeline small { color: var(--muted); font-size: .51rem; }
.multi-analysis-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.multi-analysis-grid article { border-radius: 11px; padding: 12px; background: #f4f8f9; }
.multi-analysis-grid span,
.multi-analysis-grid strong,
.multi-analysis-grid small { display: block; }
.multi-analysis-grid span,
.multi-analysis-grid small { color: var(--muted); font-size: .52rem; }
.multi-analysis-grid strong { margin: 5px 0; font-size: .82rem; }

.form-fill-shell { min-height: 100vh; background: linear-gradient(180deg,#f4faf8,#eef5f7); }
.form-fill-header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 10px max(20px,calc((100vw - 920px)/2)); background: rgba(255,255,255,.94); }
.form-fill-header .brand-label small { display: none; }
.form-fill-header > button { min-height: 48px; border-radius: 10px; padding: 8px 14px; background: var(--danger-100); color: var(--danger-700); font-size: .75rem; font-weight: 900; }
.fill-role-badge { margin-left: auto; border-radius: 999px; padding: 7px 11px; background: var(--role-soft); color: var(--role-accent); font-size: .72rem; font-weight: 900; }
.form-fill-intro,
.fill-progress,
.one-question-form,
.form-fill-footer { width: min(calc(100% - 32px),820px); margin-inline: auto; }
.form-fill-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 34px 0 18px; }
.form-fill-intro h2 { margin: 5px 0; font-size: 1.35rem; }
.form-fill-intro p { margin: 0; font-size: 1rem; }
.proxy-notice { display: flex; max-width: 330px; align-items: flex-start; gap: 8px; border-radius: 12px; padding: 11px; background: var(--amber-100); color: #745814; font-size: .88rem; font-weight: 700; }
.proxy-notice .icon { width: 20px; flex: 0 0 20px; }
.fill-progress { margin-bottom: 18px; }
.fill-progress > div { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .86rem; font-weight: 800; }
.fill-progress i { display: block; height: 11px; overflow: hidden; border-radius: 999px; background: #dce8eb; }
.fill-progress b { display: block; width: 20%; height: 100%; border-radius: inherit; background: var(--role-accent); transition: width .25s ease; }
.one-question-form { border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px,5vw,46px); background: #fff; box-shadow: var(--shadow-md); }
.fill-question { display: none; min-height: 470px; align-content: start; }
.fill-question.active { display: grid; }
.question-type { color: var(--role-accent); font-size: .84rem; font-weight: 900; }
.fill-question h1 { max-width: 680px; margin: 12px 0 9px; font-size: clamp(1.75rem,4vw,2.4rem); line-height: 1.3; }
.fill-question > p { margin: 0 0 22px; font-size: 1.08rem; }
.large-choice-list { display: grid; gap: 10px; }
.large-choice-list label { display: flex; min-height: 58px; align-items: center; gap: 12px; border: 2px solid #d6e3e7; border-radius: 13px; padding: 10px 15px; cursor: pointer; }
.large-choice-list label:has(input:checked) { border-color: var(--role-accent); background: var(--role-soft); }
.large-choice-list label.risk:has(input:checked) { border-color: var(--danger-700); background: var(--danger-100); }
.large-choice-list input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--role-accent); }
.large-choice-list span { font-size: 1.05rem; font-weight: 800; }
.large-choice-list.multi { grid-template-columns: 1fr 1fr; }
.fill-question > textarea { width: 100%; border: 2px solid #cbdde3; border-radius: 14px; padding: 16px; background: #fff; color: var(--ink); font-size: 1rem; line-height: 1.65; }
.voice-input-button { min-height: 52px; justify-self: start; margin-top: 12px; border-radius: 12px; padding: 10px 16px; background: var(--sky-100); color: var(--blue-700); font-size: .96rem; font-weight: 900; }
.voice-input-button .icon { width: 21px; }
.fill-question > small { margin-top: 12px; color: var(--green-700); font-size: .84rem; }
.capture-example { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; border-radius: 13px; padding: 13px; background: var(--green-50); }
.capture-example.video { background: var(--sky-100); }
.capture-example .icon-box { width: 48px; height: 48px; border-radius: 12px; color: var(--role-accent); }
.capture-example strong,
.capture-example small { display: block; }
.capture-example strong { font-size: 1rem; }
.capture-example small { color: var(--muted); font-size: .86rem; }
.large-upload { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 8px; border: 3px dashed #a9c6bd; border-radius: 17px; padding: 20px; background: #f8fcfa; cursor: pointer; text-align: center; }
.large-upload.uploaded { border-style: solid; border-color: var(--green-600); background: var(--green-50); }
.large-upload input { position: absolute; opacity: 0; pointer-events: none; }
.large-upload .icon-box { width: 58px; height: 58px; border-radius: 15px; background: var(--role-soft); color: var(--role-accent); }
.large-upload strong { font-size: 1.05rem; }
.large-upload small { color: var(--muted); font-size: .86rem; }
.fill-form-actions { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; margin-top: 26px; border-top: 1px solid var(--line); padding-top: 22px; }
.fill-form-actions .btn { min-height: 54px; font-size: .96rem; }
.form-fill-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 0 34px; color: var(--muted); font-size: .82rem; }
.form-fill-footer span { display: flex; align-items: center; gap: 6px; }
.form-fill-footer .icon { width: 17px; }
.form-fill-footer a { color: var(--blue-700); font-weight: 800; }

/* Long-term care operations workspace */
.ltc-workspace { max-width: 1720px; margin-inline: auto; }
.ltc-welcome { margin-bottom: 16px; }
.ltc-role-switcher { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.ltc-role-switcher > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.ltc-role-switcher > div p { margin: 0; font-size: .58rem; }
.ltc-role-switcher nav { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.ltc-role-switcher a { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 8px; min-height: 68px; border: 1px solid var(--line); border-radius: 11px; padding: 9px; color: var(--ink); }
.ltc-role-switcher a.active { border-color: var(--role-accent); background: var(--role-soft); }
.ltc-role-switcher .icon-box { width: 38px; height: 38px; border-radius: 10px; background: #f2f7f8; color: var(--role-accent); }
.ltc-role-switcher strong,
.ltc-role-switcher small { display: block; }
.ltc-role-switcher strong { font-size: .6rem; }
.ltc-role-switcher small { margin-top: 2px; color: var(--muted); font-size: .5rem; }
.ltc-kpi-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 9px; margin-bottom: 18px; }
.ltc-kpi { min-height: 132px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.ltc-kpi.danger { border-color: #efd0c7; background: #fff9f7; }
.ltc-kpi.warning { border-color: #e9d8a9; background: #fffdf7; }
.ltc-kpi.info { background: #f7fbfd; }
.ltc-kpi > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ltc-kpi > div > span:first-child { color: var(--muted); font-size: .55rem; font-weight: 800; }
.ltc-kpi .icon-box { width: 34px; height: 34px; border-radius: 9px; background: var(--role-soft); color: var(--role-accent); }
.ltc-kpi strong { display: block; margin: 10px 0 3px; font-size: 1.15rem; }
.ltc-kpi strong small { margin-left: 3px; font-size: .55rem; }
.ltc-kpi p { margin: 0; color: var(--muted); font-size: .51rem; }
.ltc-priority-list { display: grid; gap: 7px; }
.ltc-priority-list article { display: grid; grid-template-columns: 7px 38px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; padding: 9px; background: #fbfdfe; }
.ltc-priority-list article > i { width: 7px; height: 42px; border-radius: 999px; background: var(--blue-600); }
.ltc-priority-list article.danger > i { background: var(--danger-700); }
.ltc-priority-list article.warning > i { background: #d5a226; }
.ltc-priority-list .avatar { width: 38px; height: 38px; }
.ltc-priority-list strong,
.ltc-priority-list small { display: block; }
.ltc-priority-list strong { font-size: .62rem; }
.ltc-priority-list p { margin: 1px 0; font-size: .55rem; }
.ltc-priority-list small { color: var(--muted); font-size: .49rem; }
.ltc-priority-list button { min-height: 34px; border-radius: 8px; padding: 6px 8px; background: var(--role-soft); color: var(--role-accent); font-size: .52rem; font-weight: 800; }
.ltc-task-board { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ltc-task-card { border: 1px solid var(--line); border-top: 4px solid var(--green-600); border-radius: 12px; padding: 11px; background: #fbfefd; }
.ltc-task-card.danger { border-top-color: var(--danger-700); background: #fffaf8; }
.ltc-task-card.warning { border-top-color: #d5a226; background: #fffdf8; }
.ltc-task-head { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; }
.ltc-task-head .avatar { width: 38px; height: 38px; }
.ltc-task-head strong,
.ltc-task-head small { display: block; }
.ltc-task-head strong { font-size: .61rem; }
.ltc-task-head small { color: var(--muted); font-size: .49rem; }
.ltc-task-card h3 { margin: 10px 0 8px; font-size: .69rem; }
.task-evidence-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.task-evidence-chips span { display: flex; align-items: center; gap: 4px; border-radius: 7px; padding: 4px 6px; background: #eff5f6; color: var(--muted); font-size: .49rem; font-weight: 700; }
.task-evidence-chips .icon { width: 13px; }
.ltc-task-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; border-top: 1px solid #e8eff1; padding-top: 8px; }
.ltc-task-card footer button { color: var(--role-accent); font-size: .52rem; font-weight: 800; }
.handover-summary-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.handover-summary-grid article { border-left: 4px solid var(--blue-600); border-radius: 10px; padding: 10px; background: var(--sky-100); }
.handover-summary-grid article.danger { border-color: var(--danger-700); background: var(--danger-100); }
.handover-summary-grid article.warning { border-color: #d5a226; background: var(--amber-100); }
.handover-summary-grid span { color: var(--muted); font-size: .52rem; }
.handover-summary-grid strong { display: block; margin: 4px 0; font-size: .77rem; }
.handover-summary-grid p { margin: 0; font-size: .52rem; }
.staff-load-list { display: grid; gap: 7px; }
.staff-load-list article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; }
.staff-load-list .avatar { width: 38px; height: 38px; }
.staff-load-list strong,
.staff-load-list small { display: block; }
.staff-load-list strong { font-size: .61rem; }
.staff-load-list small { color: var(--muted); font-size: .5rem; }
.staff-load-list i { display: block; height: 6px; margin-top: 5px; border-radius: 999px; background: #e5edef; }
.staff-load-list b { display: block; width: var(--value); height: 100%; border-radius: inherit; background: var(--role-accent); }
.ltc-risk-overview { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; align-items: center; }
.risk-radar { position: relative; display: grid; min-height: 260px; place-items: center; }
.risk-radar-shape { width: 170px; height: 170px; background: repeating-radial-gradient(circle,#d8e3e6 0 1px,transparent 1px 28px), conic-gradient(from 12deg,rgba(197,73,54,.72),rgba(224,160,43,.6),rgba(50,139,116,.58),rgba(45,111,145,.62),rgba(197,73,54,.72)); clip-path: polygon(50% 1%,85% 15%,99% 50%,85% 85%,50% 99%,15% 85%,1% 50%,15% 15%); }
.risk-radar span { position: absolute; color: var(--muted); font-size: .48rem; font-weight: 800; }
.risk-radar .r1 { top: 3px; left: 50%; transform: translateX(-50%); }
.risk-radar .r2 { top: 18%; right: 5%; }
.risk-radar .r3 { top: 50%; right: 0; }
.risk-radar .r4 { right: 4%; bottom: 17%; }
.risk-radar .r5 { bottom: 0; left: 50%; transform: translateX(-50%); }
.risk-radar .r6 { bottom: 17%; left: 3%; }
.risk-radar .r7 { top: 50%; left: 0; }
.risk-radar .r8 { top: 18%; left: 4%; }
.risk-radar.large { min-height: 340px; }
.risk-radar.large .risk-radar-shape { width: 240px; height: 240px; }
.risk-zone-list { display: grid; gap: 7px; }
.risk-zone-list article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; }
.risk-zone-list .icon-box { width: 38px; height: 38px; border-radius: 10px; background: var(--role-soft); color: var(--role-accent); }
.risk-zone-list strong,
.risk-zone-list small { display: block; }
.risk-zone-list strong { font-size: .59rem; }
.risk-zone-list small { color: var(--muted); font-size: .49rem; }
.ltc-module-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ltc-module-links a { display: grid; grid-template-columns: 36px 1fr 15px; align-items: center; gap: 7px; min-height: 54px; border-radius: 10px; padding: 8px; background: #f3f8f8; color: var(--ink); }
.ltc-module-links a:hover { background: var(--role-soft); }
.ltc-module-links .icon-box { width: 36px; height: 36px; border-radius: 9px; background: #fff; color: var(--role-accent); }
.ltc-module-links strong { font-size: .56rem; }
.ltc-module-links a > .icon { width: 14px; color: var(--muted); }
.ltc-permission-table { min-width: 1080px; }
.ltc-role-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-bottom: 16px; }
.ltc-role-kpis article { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: #fff; }
.ltc-role-kpis span { color: var(--muted); font-size: .58rem; }
.ltc-role-kpis strong { display: block; margin-top: 7px; font-size: 1.1rem; }
.ltc-role-task-list { display: grid; gap: 8px; }
.ltc-role-task-list article { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 9px; border-left: 4px solid var(--blue-600); border-radius: 10px; padding: 10px; background: var(--sky-100); }
.ltc-role-task-list article.danger { border-color: var(--danger-700); background: var(--danger-100); }
.ltc-role-task-list article.warning { border-color: #d5a226; background: var(--amber-100); }
.ltc-role-task-list strong { font-size: .62rem; }
.ltc-role-task-list p { margin: 2px 0; font-size: .55rem; }
.ltc-role-task-list small { color: var(--muted); font-size: .49rem; }
.ltc-role-task-list button { min-height: 34px; border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--role-accent); font-size: .51rem; font-weight: 800; }

/* Care worker mobile app */
.care-worker-app { width: min(100%,760px); min-height: 100vh; margin-inline: auto; padding-bottom: 98px; background: #f1f7f5; box-shadow: 0 0 40px rgba(25,60,74,.13); }
.care-worker-app > header { position: sticky; z-index: 30; top: 0; display: grid; min-height: 72px; grid-template-columns: auto 1fr 44px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 18px; background: rgba(255,255,255,.96); }
.care-worker-app > header > a { display: flex; align-items: center; gap: 4px; color: var(--blue-700); font-size: .78rem; font-weight: 800; }
.care-worker-app > header > a .icon { width: 17px; }
.care-worker-app > header > div { text-align: center; }
.care-worker-app > header strong,
.care-worker-app > header small { display: block; }
.care-worker-app > header strong { font-size: .96rem; }
.care-worker-app > header small { color: var(--muted); font-size: .74rem; }
.care-worker-app > header > button { position: relative; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: #eef5f4; color: var(--navy-800); }
.care-worker-app > header > button i { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--danger-700); }
.care-worker-hello,
.care-worker-stats,
.care-announcement,
.care-risk-alert,
.care-task-section,
.care-next-tasks { margin: 16px 18px; }
.care-worker-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding-top: 6px; }
.care-worker-hello h1 { margin: 5px 0; font-size: 1.8rem; }
.care-worker-hello p { margin: 0; font-size: 1rem; }
.autosave-indicator { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; border-radius: 999px; padding: 7px 10px; background: #dff1eb; color: var(--green-700); font-size: .78rem; font-weight: 800; }
.autosave-indicator .icon { width: 16px; }
.care-worker-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.care-worker-stats article { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #fff; }
.care-worker-stats article.danger { border-color: #eccbc1; background: #fff8f5; }
.care-worker-stats span { color: var(--muted); font-size: .82rem; }
.care-worker-stats strong { display: block; margin-top: 5px; font-size: 1.45rem; }
.care-worker-stats small { margin-left: 3px; font-size: .78rem; }
.care-announcement { display: grid; grid-template-columns: 46px 1fr; align-items: start; gap: 10px; border-radius: 14px; padding: 14px; background: var(--amber-100); }
.care-announcement .icon-box { width: 46px; height: 46px; border-radius: 12px; background: #fff; color: #a97714; }
.care-announcement strong { font-size: .96rem; }
.care-announcement p { margin: 3px 0 0; font-size: .88rem; }
.care-risk-alert { border-left: 6px solid var(--danger-700); border-radius: 16px; padding: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.care-risk-alert > div { display: grid; grid-template-columns: 50px 1fr; gap: 12px; }
.care-risk-alert .avatar { width: 50px; height: 50px; }
.care-risk-alert h2 { margin: 5px 0 2px; font-size: 1.18rem; }
.care-risk-alert p { margin: 0; font-size: .94rem; }
.care-risk-alert > button { width: 100%; min-height: 52px; margin-top: 13px; border-radius: 12px; background: var(--danger-100); color: var(--danger-700); font-size: .92rem; font-weight: 900; }
.care-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.care-section-title h2 { margin: 0; font-size: 1.25rem; }
.care-section-title p { margin: 2px 0 0; font-size: .84rem; }
.care-current-task { border: 1px solid var(--line); border-radius: 17px; padding: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.care-current-task > div:first-child { display: grid; grid-template-columns: 52px 1fr; gap: 12px; }
.care-current-task .avatar { width: 52px; height: 52px; }
.care-current-task strong { font-size: .88rem; }
.care-current-task h3 { margin: 3px 0 6px; font-size: 1.22rem; }
.care-current-task p { margin: 0; font-size: .94rem; }
.care-evidence-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.care-evidence-row span { display: flex; align-items: center; gap: 5px; border-radius: 8px; padding: 7px 9px; background: #eff5f5; color: var(--muted); font-size: .78rem; font-weight: 800; }
.care-evidence-row .icon { width: 16px; }
.care-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.care-quick-actions button { min-height: 58px; border-radius: 13px; padding: 9px; background: #edf3f5; color: var(--navy-800); font-size: .9rem; font-weight: 900; }
.care-quick-actions button.complete { background: var(--green-600); color: #fff; }
.care-quick-actions button.warning { background: var(--amber-100); color: #8b6418; }
.care-quick-actions button.danger { background: var(--danger-700); color: #fff; }
.care-quick-actions .icon { width: 19px; }
.care-media-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.care-media-actions label,
.care-media-actions button { display: grid; min-height: 56px; place-items: center; border: 1px solid #c9dadf; border-radius: 12px; padding: 8px; background: #fff; color: var(--blue-700); cursor: pointer; font-size: .86rem; font-weight: 800; text-align: center; }
.care-media-actions label.uploaded { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); }
.care-media-actions input { position: absolute; opacity: 0; pointer-events: none; }
.care-media-actions span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.care-media-actions .icon { width: 18px; }
.care-next-tasks { border-radius: 16px; padding: 15px; background: #fff; }
.care-next-tasks article { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 9px; min-height: 66px; border-bottom: 1px solid #e7eef0; }
.care-next-tasks article:last-child { border-bottom: 0; }
.care-next-tasks .avatar { width: 42px; height: 42px; }
.care-next-tasks strong,
.care-next-tasks small { display: block; }
.care-next-tasks strong { font-size: .84rem; }
.care-next-tasks small { color: var(--muted); font-size: .74rem; }
.care-bottom-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; width: min(100%,760px); min-height: 76px; grid-template-columns: repeat(4,1fr); margin-inline: auto; border-top: 1px solid var(--line); padding: 7px 8px max(7px,env(safe-area-inset-bottom)); background: rgba(255,255,255,.98); box-shadow: 0 -8px 24px rgba(26,62,76,.08); }
.care-bottom-nav a,
.care-bottom-nav button { display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 10px; color: var(--muted); font-size: .72rem; font-weight: 800; }
.care-bottom-nav a.active { background: var(--role-soft); color: var(--role-accent); }
.care-bottom-nav .icon { width: 22px; }

/* Intake, handover, ISP and administration */
.ltc-intake-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 14px; align-items: start; }
.ltc-intake-layout > main { min-width: 0; }
.ltc-intake-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ltc-intake-form label,
.isp-form-grid label,
.event-quick-form label,
.quick-assignment label,
.missing-evidence-card label,
.family-message-composer label,
.course-record-card label { display: grid; gap: 5px; color: var(--navy-900); font-size: .57rem; font-weight: 800; }
.ltc-intake-form label.wide { grid-column: 1 / -1; }
.ltc-intake-form input,
.ltc-intake-form select,
.isp-form-grid input,
.isp-form-grid textarea,
.event-quick-form input,
.event-quick-form select,
.quick-assignment select,
.missing-evidence-card select,
.family-message-composer select,
.family-message-composer textarea,
.course-record-card textarea { width: 100%; min-height: 43px; border: 1px solid #c8dbe1; border-radius: 9px; padding: 8px 9px; background: #fff; color: var(--ink); }
.intake-ai-panel { position: sticky; top: 88px; border: 1px solid #cfe0dc; border-radius: 16px; padding: 17px; background: linear-gradient(150deg,#f6fcfa,#eef6f8); box-shadow: var(--shadow-sm); }
.intake-ai-panel h2 { margin: 5px 0 12px; font-size: .96rem; }
.intake-risk-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.intake-risk-tags span { border-radius: 999px; padding: 5px 8px; background: var(--sky-100); color: var(--blue-700); font-size: .52rem; font-weight: 900; }
.intake-risk-tags span.danger { background: var(--danger-100); color: var(--danger-700); }
.intake-risk-tags span.warning { background: var(--amber-100); color: #8b6418; }
.intake-suggestion { margin-top: 12px; border-radius: 10px; padding: 10px; background: #fff; }
.intake-suggestion strong { font-size: .59rem; }
.intake-suggestion ul { margin: 7px 0 0; padding-left: 17px; color: var(--muted); font-size: .52rem; }
.intake-decision-list { display: grid; gap: 6px; margin: 12px 0; }
.intake-decision-list label { display: grid; grid-template-columns: 18px 1fr; gap: 7px; border-radius: 9px; padding: 9px; background: #fff; }
.intake-decision-list input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.intake-decision-list strong,
.intake-decision-list small { display: block; }
.intake-decision-list strong { font-size: .58rem; }
.intake-decision-list small { color: var(--muted); font-size: .49rem; }
.care-task-filter { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: thin; }
.care-task-filter button { min-height: 38px; flex: 0 0 auto; border-radius: 999px; padding: 7px 10px; background: #edf3f5; color: var(--muted); font-size: .56rem; font-weight: 800; }
.care-task-filter button.active { background: var(--role-accent); color: #fff; }
.care-task-table { min-width: 1220px; }
.task-type-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.task-type-grid article { border-radius: 10px; padding: 11px; background: #f2f7f8; }
.task-type-grid span { color: var(--muted); font-size: .53rem; }
.task-type-grid strong { display: block; margin-top: 4px; font-size: .82rem; }
.quick-assignment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-assignment label:nth-last-of-type(-n+2) { display: flex; align-items: center; gap: 6px; border-radius: 8px; padding: 8px; background: #f4f8f9; }
.quick-assignment input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.quick-assignment .btn { grid-column: 1 / -1; }
.handover-category-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.handover-category-list article { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 8px; border-radius: 10px; padding: 9px; background: #f4f8f9; }
.handover-category-list article > i { width: 7px; height: 38px; border-radius: 999px; background: var(--blue-600); }
.handover-category-list article.danger > i { background: var(--danger-700); }
.handover-category-list article.warning > i { background: #d5a226; }
.handover-category-list strong { font-size: .59rem; }
.handover-category-list p { margin: 2px 0 0; font-size: .51rem; }
.handover-category-list button { color: var(--role-accent); font-size: .51rem; font-weight: 800; }
.handover-signoff { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; margin-top: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
.handover-signoff label { display: grid; gap: 4px; border-radius: 9px; padding: 9px; background: #f4f8f9; }
.handover-signoff span { color: var(--muted); font-size: .51rem; }
.handover-signoff strong { font-size: .57rem; }
.event-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 11px; }
.event-type-grid button { min-height: 36px; border-radius: 8px; padding: 6px; background: #eff4f6; color: var(--ink); font-size: .53rem; font-weight: 800; }
.event-type-grid button.selected { background: var(--danger-100); color: var(--danger-700); box-shadow: inset 0 0 0 1px #eabdb1; }
.event-quick-form { display: grid; gap: 8px; }
.event-media { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.event-media button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; background: #eff5f6; color: var(--blue-700); font-size: .54rem; font-weight: 800; }
.event-media .icon { width: 16px; }
.notify-chips { display: flex; gap: 6px; }
.notify-chips label { display: flex; align-items: center; gap: 5px; border-radius: 8px; padding: 7px 9px; background: var(--role-soft); font-size: .52rem; }
.notify-chips input { width: 16px; height: 16px; accent-color: var(--role-accent); }
.event-process-strip { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.event-process-strip article { position: relative; min-height: 80px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #f7fafa; }
.event-process-strip article.done { border-color: #b9d9d0; background: var(--green-50); }
.event-process-strip article.active { border-color: #e3c572; background: var(--amber-100); }
.event-process-strip article:not(:last-child)::after { position: absolute; top: 50%; right: -10px; z-index: 2; width: 19px; height: 19px; border: 1px solid var(--line); border-radius: 50%; background: #fff; content: "›"; line-height: 17px; text-align: center; transform: translateY(-50%); }
.event-process-strip span { color: var(--role-accent); font-size: .5rem; font-weight: 900; }
.event-process-strip strong { display: block; margin-top: 7px; font-size: .56rem; }
.isp-outline { display: grid; gap: 6px; }
.isp-outline article { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; }
.isp-outline article.ready { background: var(--green-50); }
.isp-outline article > span { color: var(--role-accent); font-size: .52rem; font-weight: 900; }
.isp-outline strong,
.isp-outline small { display: block; }
.isp-outline strong { font-size: .6rem; }
.isp-outline small { color: var(--muted); font-size: .49rem; }
.isp-outline button { color: var(--role-accent); font-size: .52rem; font-weight: 800; }
.isp-ai-output { display: grid; gap: 7px; }
.isp-ai-output article { border-left: 4px solid var(--green-600); border-radius: 9px; padding: 10px; background: var(--green-50); }
.isp-ai-output article.warning { border-color: #d5a226; background: var(--amber-100); }
.isp-ai-output article.info { border-color: var(--blue-600); background: var(--sky-100); }
.isp-ai-output strong { font-size: .59rem; }
.isp-ai-output p { margin: 3px 0; font-size: .51rem; }
.isp-ai-output button { color: var(--role-accent); font-size: .5rem; font-weight: 800; }
.isp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.isp-review-checks { display: grid; gap: 7px; margin-bottom: 12px; }
.isp-review-checks label { display: flex; align-items: center; gap: 7px; border-radius: 9px; padding: 9px; background: #f3f7f8; font-size: .55rem; font-weight: 700; }
.isp-review-checks input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.benefit-status-kpis { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-bottom: 14px; }
.benefit-status-kpis article { border-left: 4px solid var(--green-600); border-radius: 11px; padding: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.benefit-status-kpis article.danger { border-color: var(--danger-700); }
.benefit-status-kpis article.warning { border-color: #d5a226; }
.benefit-status-kpis article.info { border-color: var(--blue-600); }
.benefit-status-kpis article.neutral { border-color: #96a4ad; }
.benefit-status-kpis span { color: var(--muted); font-size: .54rem; }
.benefit-status-kpis strong { display: block; margin-top: 4px; font-size: 1rem; }
.benefit-table { min-width: 1260px; }
.data-package-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.data-package-checklist label { display: grid; grid-template-columns: 18px 1fr; gap: 7px; border-radius: 9px; padding: 9px; background: var(--green-50); }
.data-package-checklist label.missing { background: var(--danger-100); }
.data-package-checklist input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.data-package-checklist strong,
.data-package-checklist small { display: block; }
.data-package-checklist strong { font-size: .57rem; }
.data-package-checklist small { color: var(--muted); font-size: .49rem; }
.missing-evidence-card { display: grid; gap: 9px; }
.missing-evidence-card .icon-box { width: 52px; height: 52px; border-radius: 13px; background: var(--danger-100); color: var(--danger-700); }
.missing-evidence-card h3 { margin: 0; font-size: .8rem; }
.missing-evidence-card p { margin: 0; font-size: .57rem; }
.audit-metric-table { display: grid; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.audit-metric-table > div { display: grid; grid-template-columns: 1.4fr .65fr .8fr .9fr .7fr; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 9px; }
.audit-metric-table > div:last-child { border-bottom: 0; }
.audit-metric-table .audit-head { background: #eef4f5; color: var(--muted); font-size: .5rem; font-weight: 900; }
.audit-metric-table strong,
.audit-metric-table span { font-size: .54rem; }
.audit-reminder-list { display: grid; gap: 6px; }
.audit-reminder-list article { display: grid; grid-template-columns: 7px 1fr 36px auto; align-items: center; gap: 7px; border-radius: 9px; padding: 9px; background: #f4f8f9; }
.audit-reminder-list article > i { width: 7px; height: 32px; border-radius: 999px; background: var(--blue-600); }
.audit-reminder-list article.danger > i { background: var(--danger-700); }
.audit-reminder-list article.warning > i { background: #d5a226; }
.audit-reminder-list strong { font-size: .54rem; }
.audit-reminder-list span { font-size: .58rem; font-weight: 900; }
.audit-reminder-list button { color: var(--role-accent); font-size: .5rem; font-weight: 800; }

/* Family communication, field operations and risk analytics */
.family-template-list { display: grid; gap: 6px; }
.family-template-list button { display: grid; grid-template-columns: 36px 1fr 15px; align-items: center; gap: 7px; border-radius: 10px; padding: 8px; background: #f3f7f8; color: var(--ink); text-align: left; }
.family-template-list button.active { background: var(--role-soft); }
.family-template-list .icon-box { width: 36px; height: 36px; border-radius: 9px; background: #fff; color: var(--role-accent); }
.family-template-list strong { font-size: .56rem; }
.family-template-list button > .icon { width: 14px; color: var(--muted); }
.family-message-composer { display: grid; grid-template-columns: 1fr 220px; gap: 12px; }
.message-preview { border-radius: 13px; padding: 14px; background: linear-gradient(145deg,#f8fcfb,#eef6f8); }
.message-preview h3 { margin: 4px 0; font-size: .78rem; }
.message-preview > p { font-size: .57rem; }
.family-progress-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 10px 0; }
.family-progress-cards article { border-radius: 9px; padding: 9px; background: #fff; }
.family-progress-cards span { color: var(--muted); font-size: .49rem; }
.family-progress-cards strong { display: block; margin-top: 3px; font-size: .68rem; }
.family-message-composer aside { display: grid; align-content: start; gap: 8px; border-radius: 11px; padding: 11px; background: #f3f7f8; }
.family-message-composer aside > label:nth-last-of-type(-n+2) { display: flex; align-items: center; gap: 6px; }
.family-message-composer input { width: 17px; height: 17px; accent-color: var(--role-accent); }
.family-thread-list { display: grid; gap: 7px; }
.family-thread-list article { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; }
.family-thread-list .avatar { width: 40px; height: 40px; }
.family-thread-list strong,
.family-thread-list small { display: block; }
.family-thread-list strong { font-size: .59rem; }
.family-thread-list p { margin: 2px 0; font-size: .52rem; }
.family-thread-list small { color: var(--muted); font-size: .48rem; }
.consent-status-list { display: grid; gap: 6px; }
.consent-status-list article { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 7px; border-radius: 9px; padding: 8px; background: #f3f8f8; }
.consent-status-list .icon-box { width: 36px; height: 36px; border-radius: 9px; background: #fff; color: var(--role-accent); }
.consent-status-list strong { font-size: .54rem; }
.course-schedule { display: grid; }
.course-schedule article { display: grid; min-height: 80px; grid-template-columns: 48px 10px 1fr auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.course-schedule article:last-child { border-bottom: 0; }
.course-schedule time { color: var(--navy-800); font-size: .58rem; font-weight: 900; }
.course-schedule article > i { width: 10px; height: 10px; border-radius: 50%; background: var(--role-accent); }
.course-schedule div > span { color: var(--role-accent); font-size: .48rem; font-weight: 900; }
.course-schedule strong,
.course-schedule small { display: block; }
.course-schedule strong { margin: 2px 0; font-size: .61rem; }
.course-schedule small { color: var(--muted); font-size: .49rem; }
.course-record-card { display: grid; gap: 8px; }
.course-record-card > div:not(.event-media) { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 7px 0; }
.course-record-card span { color: var(--muted); font-size: .54rem; }
.course-record-card strong { font-size: .65rem; }
.device-table { min-width: 1280px; }
.device-mode-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.device-mode-chips span { border-radius: 999px; padding: 6px 9px; background: var(--role-soft); color: var(--role-accent); font-size: .51rem; font-weight: 800; }
.zone-map { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-height: 300px; border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: #edf4f4; }
.zone { position: relative; z-index: 2; border: 2px solid #bad6cf; border-radius: 12px; padding: 13px; background: #f8fcfb; }
.zone.risk { border-color: #e9a99b; background: #fff7f4; }
.zone span,
.zone strong,
.zone small { display: block; }
.zone span { color: var(--muted); font-size: .51rem; }
.zone strong { margin: 5px 0; font-size: .8rem; }
.zone small { font-size: .51rem; }
.route-line { position: absolute; z-index: 1; top: 50%; right: 20%; left: 20%; height: 4px; border-radius: 999px; background: repeating-linear-gradient(90deg,var(--blue-600) 0 12px,transparent 12px 20px); transform: rotate(-18deg); }
.patrol-route { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.patrol-route li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; border-left: 4px solid var(--blue-600); border-radius: 9px; padding: 10px; background: var(--sky-100); }
.patrol-route span { color: var(--blue-700); font-size: .54rem; font-weight: 900; }
.patrol-route strong { font-size: .57rem; }
.zone-risk-heatmap { display: grid; gap: 5px; }
.zone-risk-heatmap > div { display: grid; grid-template-columns: 110px repeat(5,1fr); gap: 5px; align-items: center; }
.zone-risk-heatmap .heat-head { color: var(--muted); font-size: .49rem; font-weight: 900; text-align: center; }
.zone-risk-heatmap strong { font-size: .54rem; }
.zone-risk-heatmap i { display: grid; min-height: 36px; place-items: center; border-radius: 7px; background: color-mix(in srgb,var(--danger-700) calc(7% + var(--level)*14%),#f3f7f8); color: var(--ink); font-size: .54rem; font-style: normal; font-weight: 900; }
.risk-ranking { display: grid; gap: 6px; }
.risk-ranking article { display: grid; grid-template-columns: 24px 38px 1fr auto; align-items: center; gap: 7px; border-radius: 9px; padding: 8px; background: #f3f7f8; }
.risk-ranking article > b { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; background: #fff; color: var(--muted); font-size: .49rem; }
.risk-ranking .avatar { width: 38px; height: 38px; }
.risk-ranking strong,
.risk-ranking small { display: block; }
.risk-ranking strong { font-size: .57rem; }
.risk-ranking small { color: var(--muted); font-size: .49rem; }
.operation-outcomes { display: grid; grid-template-columns: repeat(9,1fr); gap: 7px; }
.operation-outcomes article { border-radius: 10px; padding: 10px; background: #f2f7f8; }
.operation-outcomes span,
.operation-outcomes strong,
.operation-outcomes small { display: block; }
.operation-outcomes span,
.operation-outcomes small { color: var(--muted); font-size: .48rem; }
.operation-outcomes strong { margin: 5px 0; font-size: .76rem; }
.operation-outcomes small { color: var(--green-700); }
.management-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.management-summary span { display: flex; align-items: center; gap: 5px; border-radius: 999px; padding: 6px 9px; background: var(--green-50); color: var(--green-700); font-size: .51rem; font-weight: 800; }
.management-summary .icon { width: 14px; }

/* Responsive */
@media (max-width: 1120px) {
  .main-nav { gap: 18px; font-size: 0.82rem; }
  .main-nav .btn { padding-inline: 16px; }
  .hero-grid { grid-template-columns: 1fr 0.92fr; gap: 40px; }
  .role-preview-grid { grid-template-columns: repeat(3, 1fr); }
  .evidence-grid { grid-template-columns: repeat(3, 1fr); }
  .evidence-item:nth-child(3) { border-right: 0; }
  .evidence-item:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .role-feature-grid.four-col { grid-template-columns: repeat(2, 1fr); }
  .dashboard-shell { grid-template-columns: 230px minmax(0,1fr); }
  .col-3 { grid-column: span 6; }
  .data-flow-grid { grid-template-columns: repeat(3, 1fr); }
  .data-flow-card:nth-child(3n) .flow-arrow { display: none; }
  .admin-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .progress-overview { grid-template-columns: 1fr 1fr; }
  .doctor-kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .ot-kpi-grid,
  .ot-summary-grid { grid-template-columns: repeat(4, 1fr); }
  .clinical-summary-grid,
  .clinical-demographics { grid-template-columns: repeat(3, 1fr); }
  .doctor-motion-review { grid-template-columns: 1fr 1fr; }
  .ai-compensation-summary { grid-column: 1 / -1; }
  .upper-limb-layout,
  .ot-upper-detail { grid-template-columns: 1fr 1fr; }
  .upper-limb-layout .ai-feedback-stack,
  .ot-upper-detail .ai-feedback-stack { grid-column: 1 / -1; }
  .form-builder-layout { grid-template-columns: 205px minmax(0,1fr); }
  .question-settings-panel { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; max-height: none; }
  .settings-title,
  .question-settings-panel > .btn { grid-column: 1 / -1; }
  .form-workflow-strip { grid-template-columns: repeat(3,1fr); }
  .form-workflow-strip article:nth-child(3)::after { display: none; }
  .question-capability-grid { grid-template-columns: repeat(4,1fr); }
  .multi-analysis-grid { grid-template-columns: repeat(3,1fr); }
  .ltc-role-switcher nav { grid-template-columns: repeat(3,1fr); }
  .ltc-kpi-grid { grid-template-columns: repeat(4,1fr); }
  .operation-outcomes { grid-template-columns: repeat(3,1fr); }
  .event-process-strip { grid-template-columns: repeat(4,1fr); }
  .event-process-strip article:nth-child(4)::after { display: none; }
}

@media (max-width: 900px) {
  body { font-size: 18px; }
  .container { width: min(calc(100% - 36px), var(--container)); }
  .section { padding: 80px 0; }
  .menu-toggle { display: grid; }
  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 18px;
    left: 18px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 11px 8px; }
  .hero { padding: 72px 0 94px; }
  .hero-grid,
  .role-home-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .eyebrow { margin-inline: auto; }
  .hero-copy > p { margin-inline: auto; }
  .hero-copy .button-row,
  .trust-row { justify-content: center; }
  .hero-visual { width: min(620px, 100%); margin: 30px auto 0; }
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .role-selector { grid-template-columns: repeat(2, 1fr); }
  .role-selector .role-card,
  .role-selector .role-card:nth-child(4),
  .role-selector .role-card:nth-child(5),
  .role-selector .role-card:nth-child(6),
  .role-selector .role-card:nth-child(7) { grid-column: auto; }
  .role-selector .role-card:last-child { grid-column: 1 / -1; width: calc(50% - 11px); justify-self: center; }
  .role-home-copy { text-align: center; }
  .role-home-copy .eyebrow { margin-inline: auto; }
  .role-home-copy .button-row { justify-content: center; }
  .role-home-visual { width: min(620px, 100%); margin: 0 auto; }
  .role-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 34px 0; }
  .step:nth-child(3n)::after { display: none; }
  .professional-preview { grid-template-columns: 1fr 1.7fr; }
  .professional-preview .preview-column:last-child { display: none; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-main { min-height: 100vh; }
  .register-shell { grid-template-columns: 1fr; gap: 28px; }
  .register-aside { position: static; text-align: center; }
  .register-aside .eyebrow { margin-inline: auto; }
  .registration-steps { grid-template-columns: repeat(3, 1fr); }
  .registration-step { flex-direction: column; gap: 7px; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .dashboard-sidebar {
    position: fixed;
    z-index: 180;
    left: 0;
    width: 280px;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }
  .dashboard-sidebar.open { transform: translateX(0); }
  .mobile-sidebar-toggle { display: grid; }
  .dashboard-topbar { padding-inline: 20px; }
  .dashboard-content { padding: 26px 20px; }
  .col-4 { grid-column: span 6; }
  .col-5,
  .col-7 { grid-column: span 12; }
  .col-8,
  .col-9 { grid-column: span 12; }
  .plan-card.featured { transform: none; }
  .training-room { grid-template-columns: 1fr; }
  .training-control { min-height: 460px; }
  .group-training { grid-template-columns: 1fr 1fr; }
  .participant-state { grid-column: 1 / -1; }
  .report-builder,
  .care-log-layout { grid-template-columns: 1fr; }
  .status-legend-grid { grid-template-columns: 1fr 1fr; }
  .detail-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .doctor-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ot-kpi-grid,
  .ot-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-report-grid,
  .collaboration-board,
  .rom-clinical-layout,
  .patient-report-order { grid-template-columns: 1fr; }
  .doctor-motion-review { grid-template-columns: 1fr; }
  .ai-compensation-summary { grid-column: auto; }
  .patient-clinical-header > div:nth-child(2) { align-items: flex-start; flex-direction: column; }
  .clinical-tabbar { top: 72px; }
  .upper-limb-layout,
  .ot-motion-review,
  .ot-upper-detail,
  .ot-report-builder { grid-template-columns: 1fr; }
  .upper-limb-layout .ai-feedback-stack,
  .ot-upper-detail .ai-feedback-stack { grid-column: auto; }
  .home-rehab-grid,
  .home-education-detail { grid-template-columns: 1fr; }
  .form-hub-kpis { grid-template-columns: 1fr 1fr; }
  .form-builder-layout { grid-template-columns: 1fr; }
  .question-toolbox { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: none; }
  .question-toolbox > div:first-child,
  .question-toolbox .toolbox-help { grid-column: 1 / -1; }
  .question-toolbox > button + button { margin-top: 0; }
  .question-settings-panel { grid-column: auto; }
  .dispatch-layout { grid-template-columns: 1fr; }
  .dispatch-summary { position: static; }
  .question-capability-grid { grid-template-columns: repeat(3,1fr); }
  .recipient-mode-grid { grid-template-columns: 1fr 1fr; }
  .image-review-layout,
  .video-form-review { grid-template-columns: 1fr; }
  .analytics-filter-bar { grid-template-columns: 1fr; }
  .form-fill-header { padding-inline: 20px; }
  .ltc-role-switcher nav { grid-template-columns: 1fr 1fr; }
  .ltc-kpi-grid { grid-template-columns: repeat(3,1fr); }
  .ltc-risk-overview,
  .ltc-intake-layout,
  .family-message-composer { grid-template-columns: 1fr; }
  .intake-ai-panel { position: static; }
  .event-process-strip { grid-template-columns: repeat(3,1fr); }
  .event-process-strip article:nth-child(3n)::after { display: none; }
  .audit-metric-table { overflow-x: auto; }
  .audit-metric-table > div { min-width: 760px; }
  .operation-outcomes { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 640px) {
  body { font-size: 18px; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.85rem; }
  .container { width: min(calc(100% - 28px), var(--container)); }
  .section { padding: 68px 0; }
  .header-inner { min-height: 72px; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 38px; height: 38px; }
  .header-role-pill { display: none; }
  .button-row { flex-direction: column; }
  .button-row .btn { width: 100%; }
  .hero { padding-top: 58px; }
  .hero-grid { gap: 34px; }
  .hero-copy h1 { font-size: 2rem; }
  .hero-copy > p { font-size: 1.125rem; }
  .trust-row { align-items: flex-start; flex-direction: column; gap: 12px; padding-left: 4px; }
  .mock-grid { min-height: auto; grid-template-columns: 1fr; }
  .pose-panel { min-height: 260px; }
  .mock-side { grid-template-columns: 1fr 1fr; }
  .mini-stat:last-child { grid-column: 1 / -1; }
  .floating-chip.one { top: -18px; right: 10px; }
  .floating-chip.two { bottom: -18px; left: 8px; }
  .card-grid,
  .card-grid.two,
  .card-grid.four,
  .role-preview-grid,
  .role-selector,
  .role-feature-grid,
  .role-feature-grid.four-col,
  .value-grid { grid-template-columns: 1fr; }
  .role-selector .role-card { min-height: auto; }
  .role-selector .role-card:last-child { grid-column: auto; width: 100%; }
  .role-preview-grid .role-card:last-child { grid-column: auto; }
  .data-flow-grid,
  .plan-grid { grid-template-columns: 1fr; }
  .data-flow-card { min-height: 126px; padding: 18px 20px; }
  .data-flow-card .flow-arrow { top: auto; right: 50%; bottom: -18px; display: grid !important; transform: translateX(50%) rotate(90deg); }
  .data-flow-card:last-child .flow-arrow { display: none !important; }
  .flow-index { margin-bottom: 11px; }
  .plan-card { min-height: auto; padding: 27px 23px; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .evidence-item { min-height: 150px; padding: 24px 18px; border-bottom: 1px solid var(--line); }
  .evidence-item:nth-child(odd) { border-right: 1px solid var(--line); }
  .evidence-item:nth-child(even) { border-right: 0; }
  .evidence-item:last-child { grid-column: 1 / -1; border-bottom: 0; text-align: center; }
  .final-cta { border-radius: 24px; padding: 54px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .role-home-hero { padding: 62px 0 72px; }
  .role-home-grid { gap: 44px; }
  .role-home-visual { min-height: 390px; }
  .illustration-card { inset: 0; }
  .warm-scene { min-height: 390px; }
  .person-illustration { width: 200px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .step { display: grid; grid-template-columns: 52px 1fr; gap: 0 16px; text-align: left; }
  .step::after { display: none !important; }
  .step-number { grid-row: span 2; margin: 0; }
  .step h3 { margin: 5px 0 3px; }
  .step p { max-width: none; margin: 0; }
  .safety-banner { align-items: flex-start; padding: 24px; }
  .professional-preview { min-height: 460px; grid-template-columns: 1fr; }
  .professional-preview .preview-column:first-child { display: none; }
  .preview-column + .preview-column { border-left: 0; }
  .auth-main { padding: 32px 20px; }
  .auth-card { max-width: 500px; }
  .auth-back { margin-bottom: 26px; }
  .auth-trust-grid { grid-template-columns: 1fr; }
  .auth-trust-grid span { min-height: 54px; flex-direction: row; }
  .register-header { min-height: 72px; }
  .register-shell { padding-top: 32px; }
  .registration-steps { font-size: 0.72rem; }
  .register-form-card { padding: 24px 18px; }
  .form-grid,
  .radio-grid { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .dashboard-topbar-title { display: none; }
  .user-menu > div:last-child { display: none; }
  .dashboard-welcome { align-items: stretch; flex-direction: column; }
  .dashboard-welcome .btn { width: 100%; }
  .dashboard-grid { gap: 14px; }
  .col-3,
  .col-4,
  .col-6 { grid-column: span 12; }
  .metric-card { min-height: 136px; }
  .progress-ring-wrap { flex-direction: column; }
  .panel { padding: 19px; }
  .task-item { align-items: flex-start; }
  .task-item .status-badge { margin-left: auto; }
  .dashboard-module-heading { align-items: flex-start; flex-direction: column; margin-top: 44px; padding-top: 32px; }
  .camera-stage { min-height: 430px; }
  .camera-stage::before { inset: 28px 18px; }
  .camera-topline { right: 16px; left: 16px; font-size: 0.61rem; }
  .camera-topline span:last-child { display: none; }
  .training-control { min-height: auto; padding: 24px 20px; }
  .training-control .button-row { margin-top: 18px; }
  .control-grid,
  .measurement-result,
  .task-form-grid,
  .review-layout,
  .template-builder,
  .group-training { grid-template-columns: 1fr; }
  .task-form-grid .wide,
  .participant-state { grid-column: auto; }
  .result-grid.compact,
  .monthly-metrics,
  .detail-summary-grid { grid-template-columns: 1fr 1fr; }
  .progress-overview { grid-template-columns: 1fr; }
  .alert-grid,
  .status-legend-grid,
  .admin-kpi-row { grid-template-columns: 1fr; }
  .week-checkin { padding: 12px 8px; }
  .week-checkin i { width: 30px; height: 30px; }
  .report-score { grid-template-columns: 1fr; justify-items: center; }
  .report-score > div:last-child { width: 100%; }
  .group-screen { min-height: 340px; }
  .participant-grid { grid-template-columns: repeat(4, 1fr); }
  .report-actions { align-items: stretch; flex-direction: column; }
  .report-actions .btn { width: 100%; min-height: 48px; }
  .status-legend { overflow: hidden; }
  .doctor-kpi-grid,
  .clinical-summary-grid,
  .clinical-demographics,
  .doctor-order-form,
  .rom-comparison-row { grid-template-columns: 1fr; }
  .doctor-order-form .wide { grid-column: auto; }
  .doctor-kpi { min-height: 136px; }
  .ot-kpi-grid,
  .ot-summary-grid,
  .ot-goal-form,
  .adl-assessment-layout { grid-template-columns: 1fr; }
  .ot-goal-form .wide { grid-column: auto; }
  .functional-patient-list > a { grid-template-columns: 38px 1fr; }
  .functional-patient-list > a > span:nth-child(3),
  .functional-patient-list > a > .status-badge { grid-column: 2; justify-self: start; }
  .ot-action-list article { grid-template-columns: 7px 1fr; }
  .ot-action-list article button { grid-column: 2; justify-self: start; }
  .home-rehab-grid article,
  .assistive-list > div { grid-template-columns: 38px 1fr; }
  .home-rehab-grid .status-badge,
  .assistive-list .status-badge { grid-column: 2; justify-self: start; }
  .ot-demographics { grid-template-columns: 1fr; }
  .doctor-risk-row { grid-template-columns: 5px 38px 1fr; }
  .doctor-risk-row > .status-badge { grid-column: 2 / -1; justify-self: start; }
  .clinical-report-head { grid-template-columns: 40px 1fr; }
  .clinical-report-head > .status-badge { grid-column: 1 / -1; justify-self: start; }
  .report-section-list { grid-template-columns: 1fr; }
  .patient-identity { align-items: flex-start; flex-wrap: wrap; }
  .patient-identity > .status-badge { width: 100%; margin-left: 0; }
  .patient-clinical-header .button-row { width: 100%; }
  .patient-clinical-header .button-row .btn { width: 100%; }
  .rom-measurement-facts,
  .symptom-grid { grid-template-columns: 1fr 1fr; }
  .clinical-trend-grid { grid-template-columns: 1fr; }
  .clinical-trend-grid > div { min-height: 170px; }
  .doctor-preview .preview-column:first-child { display: none; }
  .form-hub-kpis,
  .review-queue-summary,
  .form-workflow-strip,
  .builder-stepper,
  .form-settings-grid,
  .form-toggle-grid,
  .dispatch-form-grid,
  .form-analysis-metrics,
  .multi-analysis-grid { grid-template-columns: 1fr; }
  .form-workflow-strip article:not(:last-child)::after { top: auto; right: 50%; bottom: -11px; display: grid !important; place-items: center; transform: translateX(50%) rotate(90deg); }
  .builder-page-head { align-items: stretch; flex-direction: column; }
  .builder-page-head .button-row { width: 100%; }
  .builder-stepper { overflow: visible; border: 0; background: transparent; }
  .builder-stepper span { justify-content: flex-start; border: 0; border-left: 2px solid #dce6e9; padding: 8px 12px; }
  .question-toolbox,
  .question-settings-panel { display: grid; grid-template-columns: 1fr; }
  .question-toolbox > div:first-child,
  .question-toolbox .toolbox-help,
  .settings-title,
  .question-settings-panel > .btn { grid-column: auto; }
  .builder-question { grid-template-columns: 24px 30px 1fr; padding: 11px; }
  .question-actions { grid-column: 3; justify-content: flex-start; }
  .choice-preview,
  .large-choice-list.multi { grid-template-columns: 1fr; }
  .logic-flow article { grid-template-columns: 34px 1fr; }
  .logic-flow article i { display: none; }
  .logic-flow article p { grid-column: 2; }
  .question-capability-grid { grid-template-columns: 1fr 1fr; }
  .recipient-mode-grid { grid-template-columns: 1fr; }
  .recipient-search { grid-template-columns: 1fr auto; }
  .recipient-search span { grid-column: 1 / -1; }
  .fill-role-grid label { grid-template-columns: 22px 1fr; }
  .fill-role-grid .status-badge { grid-column: 2; justify-self: start; }
  .response-detail-alert { grid-template-columns: 34px 1fr; }
  .response-detail-alert .status-badge { grid-column: 2; justify-self: start; }
  .score-compare { grid-template-columns: 1fr; }
  .score-compare > i { justify-self: center; }
  .difficulty-ranking > div { grid-template-columns: 24px 92px 1fr 24px; }
  .response-heatmap { min-width: 520px; }
  .panel:has(.response-heatmap) { overflow-x: auto; }
  .form-fill-header .brand-label { display: none; }
  .fill-role-badge { margin-left: 0; }
  .form-fill-header > button { padding-inline: 10px; font-size: .68rem; }
  .form-fill-intro { align-items: flex-start; flex-direction: column; padding-top: 24px; }
  .proxy-notice { max-width: none; }
  .one-question-form { width: min(calc(100% - 20px),820px); border-radius: 17px; padding: 24px 17px; }
  .fill-question { min-height: 430px; }
  .fill-question h1 { font-size: 1.65rem; }
  .fill-form-actions { grid-template-columns: 1fr 1fr; }
  .fill-form-actions .btn-secondary { grid-column: 1 / -1; grid-row: 1; }
  .fill-form-actions .btn-soft { grid-row: 2; }
  .fill-form-actions .btn-primary { grid-row: 2; }
  .form-fill-footer { align-items: flex-start; flex-direction: column; }
  .ltc-role-switcher > div { align-items: flex-start; flex-direction: column; }
  .ltc-role-switcher nav,
  .ltc-kpi-grid,
  .ltc-role-kpis,
  .ltc-task-board,
  .handover-summary-grid,
  .task-type-grid,
  .handover-category-list,
  .isp-form-grid,
  .benefit-status-kpis,
  .data-package-checklist,
  .family-progress-cards,
  .operation-outcomes { grid-template-columns: 1fr 1fr; }
  .ltc-role-switcher a { min-height: 74px; }
  .ltc-priority-list article { grid-template-columns: 7px 38px 1fr; }
  .ltc-priority-list article button { grid-column: 3; justify-self: start; }
  .ltc-module-links { grid-template-columns: 1fr; }
  .ltc-role-task-list article { grid-template-columns: 40px 1fr; }
  .ltc-role-task-list article button { grid-column: 2; justify-self: start; }
  .ltc-intake-form { grid-template-columns: 1fr; }
  .ltc-intake-form label.wide { grid-column: auto; }
  .quick-assignment { grid-template-columns: 1fr; }
  .quick-assignment .btn { grid-column: auto; }
  .handover-signoff { grid-template-columns: 1fr; }
  .event-process-strip { grid-template-columns: 1fr; }
  .event-process-strip article:not(:last-child)::after { top: auto; right: 50%; bottom: -11px; display: grid !important; place-items: center; transform: translateX(50%) rotate(90deg); }
  .event-process-strip article:last-child::after { display: none !important; }
  .audit-reminder-list article { grid-template-columns: 7px 1fr auto; }
  .audit-reminder-list article button { grid-column: 2 / -1; justify-self: start; }
  .course-schedule article { grid-template-columns: 42px 10px 1fr; }
  .course-schedule article > .status-badge { grid-column: 3; justify-self: start; }
  .zone-map { grid-template-columns: 1fr; }
  .route-line { display: none; }
  .zone-risk-heatmap { min-width: 620px; }
  .panel:has(.zone-risk-heatmap) { overflow-x: auto; }
  .care-worker-hello { align-items: flex-start; flex-direction: column; }
  .care-worker-stats { grid-template-columns: repeat(3,1fr); }
  .care-worker-app > header { grid-template-columns: 88px 1fr 44px; }
  .care-worker-app > header > a { font-size: .68rem; }
  .care-quick-actions,
  .care-media-actions { grid-template-columns: 1fr 1fr; }
  .care-next-tasks article { grid-template-columns: 42px 1fr; padding-block: 8px; }
  .care-next-tasks .status-badge { grid-column: 2; justify-self: start; }
  .ltc-risk-overview { gap: 10px; }
  .risk-radar { min-height: 250px; }
  .family-thread-list article { grid-template-columns: 40px 1fr; }
  .family-thread-list .status-badge { grid-column: 2; justify-self: start; }
  .consent-status-list article { grid-template-columns: 36px 1fr; }
  .consent-status-list .status-badge { grid-column: 2; justify-self: start; }
  .toast-region { right: 14px; bottom: 14px; left: 14px; }
  .toast { max-width: none; }
}

/* Functional workspace interactions */
.workspace-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  padding: 26px;
  margin-bottom: 22px;
  border: 1px solid #cfe1e8;
  border-radius: 22px;
  background: linear-gradient(135deg, #f7fbfd, #edf7f4);
  box-shadow: 0 14px 34px rgba(27, 62, 78, .08);
}

.workspace-focus h1 { margin: 5px 0 7px; font-size: clamp(1.5rem, 2.2vw, 2.05rem); color: #173c50; }
.workspace-focus p { margin: 0 0 18px; color: #526a78; }
.workspace-focus aside { padding: 17px; border-radius: 17px; background: rgba(255,255,255,.88); border: 1px solid #d9e7ec; }
.workspace-focus aside > strong { display: block; margin-bottom: 10px; color: #173c50; }
.workspace-focus aside > span { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #e6eef1; font-weight: 700; color: #2d5365; }
.workspace-focus aside small { color: #71838d; font-weight: 500; white-space: nowrap; }

.dashboard-view-stage {
  scroll-margin-top: 22px;
  outline: none;
}

.workspace-reveal {
  opacity: 0;
  transform: translateY(28px) scale(.985);
  filter: blur(4px);
}

.workspace-reveal.is-visible {
  animation: workspace-pop-in .72s cubic-bezier(.2,.8,.2,1) forwards;
}

@keyframes workspace-pop-in {
  0% { opacity: 0; transform: translateY(28px) scale(.985); filter: blur(4px); }
  62% { opacity: 1; transform: translateY(-4px) scale(1.004); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.workspace-screen {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid #c9dde5;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(242,249,250,.98));
  box-shadow: 0 22px 54px rgba(22, 64, 82, .11);
}

.workspace-screen::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, var(--role-accent), #67b8a4, #7baec8);
}

.workspace-screen > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.workspace-screen > header h2 { margin: 4px 0 5px; font-size: clamp(1.35rem, 2vw, 1.8rem); color: #173e52; }
.workspace-screen > header p { margin: 0; color: #5a7280; font-size: .8rem; }
.workspace-live { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; border: 1px solid #cce4dc; border-radius: 999px; background: #edf8f4; color: #26715e; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.workspace-live i { width: 9px; height: 9px; border-radius: 50%; background: #35a27f; box-shadow: 0 0 0 5px rgba(53,162,127,.12); animation: workspace-live-pulse 1.8s ease-in-out infinite; }

@keyframes workspace-live-pulse {
  50% { box-shadow: 0 0 0 9px rgba(53,162,127,0); }
}

.workspace-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.workspace-metric-grid article {
  min-height: 126px;
  padding: 18px;
  border: 1px solid #d7e5ea;
  border-radius: 17px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 20px rgba(25,70,89,.05);
}

.workspace-metric-grid span, .workspace-metric-grid small { display: block; color: #6a808b; }
.workspace-metric-grid span { font-size: .7rem; font-weight: 750; }
.workspace-metric-grid strong { display: block; margin: 10px 0 5px; color: #173e52; font-family: var(--font-display); font-size: 1.55rem; }
.workspace-metric-grid small { font-size: .62rem; }

.workspace-screen-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 16px;
}

.workspace-screen-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d5e4e9;
  border-radius: 18px;
  background: #fff;
}

.workspace-screen-panel .panel-header { margin-bottom: 10px; }
.workspace-screen-panel .panel-header h3 { margin: 0 0 3px; color: #21485a; font-size: 1rem; }
.workspace-screen-panel .panel-header p { margin: 0; color: #71848e; font-size: .66rem; }

.workspace-action-list { display: grid; gap: 8px; }
.workspace-action-list article { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; min-height: 66px; padding: 10px 11px; border: 1px solid #e0eaed; border-radius: 13px; background: #fbfdfd; }
.workspace-action-list strong, .workspace-action-list small { display: block; }
.workspace-action-list strong { color: #23495a; font-size: .73rem; }
.workspace-action-list small { margin-top: 3px; color: #71858f; font-size: .6rem; }
.workspace-row-mark { width: 7px; height: 36px; border-radius: 999px; background: #69a996; }
.workspace-row-mark.warning { background: #e7ac43; }
.workspace-row-mark.danger { background: #d66858; }
.workspace-row-mark.info { background: #5795b2; }
.workspace-action-list article > button { min-width: 62px; min-height: 40px; padding: 8px 12px; border: 1px solid #c8dce3; border-radius: 10px; background: #fff; color: #28566a; font: inherit; font-size: .63rem; font-weight: 800; cursor: pointer; }
.workspace-action-list article > button:hover { border-color: var(--role-accent); color: var(--role-accent); }

.workspace-insight { display: grid; align-content: start; gap: 14px; background: linear-gradient(155deg, #f4faf8, #eff6f9); }
.workspace-insight > div:first-child { display: flex; align-items: center; gap: 10px; }
.workspace-insight > div:first-child > span:last-child { min-width: 0; }
.workspace-insight strong, .workspace-insight small { display: block; }
.workspace-insight strong { color: #204b5a; font-size: .78rem; }
.workspace-insight small { margin-top: 2px; color: #6e838b; font-size: .58rem; }
.workspace-insight > p { margin: 0; color: #4f6d78; font-size: .7rem; line-height: 1.7; }
.workspace-mini-chart { min-height: 124px; padding: 10px; border: 1px solid rgba(202,221,228,.8); border-radius: 13px; background: rgba(255,255,255,.78); }
.workspace-mini-chart svg { width: 100%; height: 118px; }
.workspace-insight-actions { display: grid; gap: 7px; }
.workspace-insight-actions button { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 44px; padding: 10px 12px; border: 1px solid #c7dde3; border-radius: 11px; background: #fff; color: #28596b; font: inherit; font-size: .65rem; font-weight: 800; cursor: pointer; }
.workspace-insight-actions button:first-child { border-color: transparent; background: var(--role-accent); color: #fff; }
.workspace-insight-actions .icon { width: 15px; }

.interaction-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 36px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: auto;
  color: #203e4e;
  box-shadow: 0 28px 90px rgba(16, 39, 52, .34);
}

.interaction-dialog.wide { width: min(940px, calc(100vw - 28px)); }
.interaction-dialog::backdrop { background: rgba(15, 37, 49, .54); backdrop-filter: blur(4px); }
.interaction-form > header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 26px 19px; background: #fff; border-bottom: 1px solid #dfeaec; }
.interaction-form > header h2 { margin: 4px 0 5px; font-size: 1.45rem; color: #153b50; }
.interaction-form > header p { margin: 0; color: #637986; line-height: 1.55; }
.interaction-fields { display: grid; gap: 16px; padding: 24px 26px; background: #f8fbfc; }
.interaction-fields > label, .interaction-field-grid label, .support-form label { display: grid; gap: 7px; font-weight: 750; color: #294f61; }
.interaction-fields input:not([type=checkbox]), .interaction-fields select, .interaction-fields textarea,
.support-form input:not([type=checkbox]), .support-form select, .support-form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #bfd3db; border-radius: 12px; background: #fff; color: #173c50; font: inherit;
}
.interaction-fields textarea, .support-form textarea { resize: vertical; min-height: 116px; }
.interaction-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.interaction-form > footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 17px 26px; background: #fff; border-top: 1px solid #dfeaec; }
.interaction-dialog .checkbox-label { display: flex; grid-template-columns: none; align-items: center; gap: 10px; }
.interaction-dialog .checkbox-label input { width: 20px; height: 20px; }
.detail-view-content { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.detail-view-content > div { padding: 18px; border: 1px solid #d9e6eb; border-radius: 15px; background: #fff; }
.detail-view-content p { line-height: 1.7; color: #4c6674; }
.detail-view-content article { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #e3ecef; }
.detail-view-content article small { color: #71838d; }
.action-complete { box-shadow: inset 0 0 0 2px rgba(46, 143, 118, .22); }

.inline-operation-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px;
  padding: 14px 16px;
  border: 1px solid #cbe3da;
  border-radius: 14px;
  background: #edf8f4;
  color: #245646;
}
.inline-operation-result .icon-box { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; }
.inline-operation-result strong { display: block; margin-bottom: 3px; }
.inline-operation-result p { margin: 0; color: #58736a; line-height: 1.55; }
.builder-question.dragging { opacity: .55; outline: 2px dashed #4b9b89; }

.tab-view-state { display: flex; gap: 12px; align-items: center; padding: 14px 18px; margin: 12px 0 18px; border-radius: 15px; background: #edf7f4; border: 1px solid #cfe6de; }
.tab-view-state strong { display: block; color: #195547; }
.tab-view-state p { margin: 2px 0 0; color: #56736a; }

.rehab-session { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .5fr); gap: 18px; }
.rehab-camera { position: relative; min-height: 390px; overflow: hidden; border-radius: 18px; background: #102d3c; }
.rehab-camera video { width: 100%; height: 100%; min-height: 390px; object-fit: cover; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 25px; color: #dcecf2; text-align: center; }
.camera-placeholder .icon { width: 52px; height: 52px; }
.rehab-session aside { display: grid; align-content: start; gap: 14px; padding: 19px; border-radius: 18px; background: #fff; border: 1px solid #d8e6eb; }
.rehab-session aside > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #e3ecef; }

.notification-item { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.notification-item.read { opacity: .56; }
.user-menu { border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; }

.trust-page { min-height: 75vh; background: #f8fbfc; }
.trust-hero { padding: 76px 0 55px; background: linear-gradient(135deg, #eef7fa, #eff8f4); border-bottom: 1px solid #dbe8ec; }
.trust-hero h1 { max-width: 820px; margin: 8px 0 12px; font-size: clamp(2rem, 4vw, 3.2rem); color: #143b50; }
.trust-hero p { max-width: 780px; margin: 0 0 22px; font-size: 1.08rem; line-height: 1.75; color: #506b78; }
.trust-content { padding-top: 32px; padding-bottom: 72px; }
.trust-content > nav { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.trust-content > nav a { padding: 10px 14px; border: 1px solid #cbdde3; border-radius: 999px; background: #fff; color: #285669; font-weight: 750; text-decoration: none; }
.trust-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.trust-section-grid article { display: flex; gap: 16px; padding: 24px; border: 1px solid #d6e5ea; border-radius: 18px; background: #fff; }
.trust-section-grid article > span { font-weight: 900; color: #3a8e7c; }
.trust-section-grid h2 { margin: 0 0 7px; font-size: 1.15rem; color: #1c465a; }
.trust-section-grid p { margin: 0; line-height: 1.7; color: #58707c; }
.trust-contact { display: flex; align-items: center; gap: 15px; margin-top: 22px; padding: 20px; border-radius: 18px; background: #eaf6f2; border: 1px solid #cfe5dd; }
.trust-contact div { flex: 1; }
.trust-contact p { margin: 3px 0 0; color: #59736a; }
.support-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 22px; padding-top: 34px; padding-bottom: 72px; }
.support-form, .support-status { padding: 26px; border: 1px solid #d6e5ea; border-radius: 20px; background: #fff; box-shadow: 0 12px 30px rgba(28, 65, 82, .06); }
.support-form { display: grid; gap: 16px; }
.support-form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.support-status ol { padding-left: 22px; color: #536f7c; line-height: 1.8; }

html[data-font-size="large"] { font-size: 18px; }
html[data-font-size="xlarge"] { font-size: 20px; }
html.high-contrast { filter: contrast(1.12); }

@media (max-width: 900px) {
  .workspace-focus, .detail-view-content, .rehab-session, .support-layout, .workspace-screen-body { grid-template-columns: 1fr; }
  .workspace-focus aside { order: 2; }
  .trust-section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .workspace-focus { padding: 20px; border-radius: 18px; }
  .workspace-focus .button-row { display: grid; }
  .dashboard-view-stage { scroll-margin-top: 10px; }
  .workspace-screen { padding: 19px; border-radius: 19px; }
  .workspace-screen > header { align-items: flex-start; flex-direction: column; }
  .workspace-metric-grid { grid-template-columns: 1fr; }
  .workspace-metric-grid article { min-height: auto; }
  .workspace-screen-panel { padding: 15px; }
  .workspace-action-list article { grid-template-columns: 7px minmax(0, 1fr) auto; }
  .workspace-action-list article > .status-badge { grid-column: 2; justify-self: start; }
  .workspace-action-list article > button { grid-column: 3; grid-row: 1 / span 2; }
  .interaction-dialog { width: calc(100vw - 14px); max-height: calc(100vh - 14px); border-radius: 17px; }
  .interaction-form > header, .interaction-fields, .interaction-form > footer { padding-left: 18px; padding-right: 18px; }
  .interaction-field-grid, .support-form > div { grid-template-columns: 1fr; }
  .interaction-form > footer { display: grid; grid-template-columns: 1fr 1fr; }
  .interaction-form > footer .btn { width: 100%; }
  .rehab-camera, .rehab-camera video { min-height: 300px; }
  .trust-hero { padding: 54px 0 38px; }
  .trust-contact { align-items: flex-start; flex-wrap: wrap; }
  .trust-contact .btn { width: 100%; }
  .support-form, .support-status { padding: 20px; }
}

@media print {
  .dashboard-sidebar, .dashboard-topbar, .site-header, .notification-panel, .button-row, button, .btn, footer { display: none !important; }
  .dashboard-main, .dashboard-content { margin: 0 !important; width: 100% !important; }
  body { background: #fff !important; }
  .panel, .workspace-focus { break-inside: avoid; box-shadow: none !important; }
}

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

/* MediaPipe rehabilitation workspaces */
.mediapipe-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 28px 30px; border: 1px solid #cfe0e7; border-radius: 24px; background: linear-gradient(135deg,#fafdff 0%,#edf7f5 100%); box-shadow: 0 14px 36px rgba(25,67,87,.07); scroll-margin-top: 16px; }
.mediapipe-page-head h1 { max-width: 850px; margin: 7px 0 9px; color: #153e53; font-size: clamp(1.65rem,3vw,2.35rem); line-height: 1.22; }
.mediapipe-page-head p { max-width: 850px; margin: 0; color: #53707e; font-size: 1rem; line-height: 1.7; }
.mp-head-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mp-head-badges span { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 13px; border: 1px solid #c9e0dd; border-radius: 999px; background: #fff; color: #276a5e; font-weight: 800; white-space: nowrap; }
.mp-camera-panel { margin-bottom: 18px; }
.mp-camera-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(260px,.65fr); gap: 18px; }
.mp-camera-stage { position: relative; min-height: 500px; overflow: hidden; border: 3px solid #d4e3e9; border-radius: 22px; background: radial-gradient(circle at 50% 38%,#244f63,#102d3d 70%); }
.mp-camera-stage video { width: 100%; height: 100%; min-height: 500px; object-fit: cover; transform: scaleX(-1); }
.mp-camera-stage [data-mp-canvas] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; min-height: 500px; pointer-events: none; }
.mp-camera-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 28px; color: #e6f2f5; text-align: center; }
.mp-camera-empty .icon { width: 58px; height: 58px; }
.mp-camera-stage.is-live .mp-camera-empty { display: none; }
.mp-skeleton { position: absolute; inset: 8% 12%; display: none; pointer-events: none; filter: drop-shadow(0 0 8px rgba(70,230,190,.45)); }
.mp-camera-stage.is-live .mp-skeleton { display: block; animation: mp-tracking-pulse 1.8s ease-in-out infinite; }
.mp-skeleton i { position: absolute; width: 14px; height: 14px; border: 3px solid #d9fff4; border-radius: 50%; background: #35b997; }
.mp-skeleton i:nth-child(1) { top: 3%; left: 48%; width: 24px; height: 24px; }
.mp-skeleton i:nth-child(2) { top: 18%; left: 38%; }.mp-skeleton i:nth-child(3) { top: 18%; left: 60%; }
.mp-skeleton i:nth-child(4) { top: 39%; left: 29%; }.mp-skeleton i:nth-child(5) { top: 39%; left: 69%; }
.mp-skeleton i:nth-child(6) { top: 57%; left: 22%; }.mp-skeleton i:nth-child(7) { top: 57%; left: 76%; }
.mp-skeleton i:nth-child(8) { top: 52%; left: 41%; }.mp-skeleton i:nth-child(9) { top: 52%; left: 57%; }
.mp-skeleton i:nth-child(10) { top: 75%; left: 38%; }.mp-skeleton i:nth-child(11) { top: 75%; left: 61%; }
.mp-skeleton i:nth-child(12) { top: 94%; left: 34%; }
.mp-skeleton b { position: absolute; height: 4px; border-radius: 99px; background: #57e0bd; transform-origin: left center; }
.mp-skeleton .line-a { top: 21%; left: 40%; width: 24%; }.mp-skeleton .line-b { top: 22%; left: 39%; width: 24%; transform: rotate(137deg); }
.mp-skeleton .line-c { top: 22%; left: 61%; width: 24%; transform: rotate(43deg); }.mp-skeleton .line-d { top: 53%; left: 43%; width: 17%; }
.mp-skeleton .line-e { top: 54%; left: 50%; width: 41%; transform: rotate(90deg); }
.mp-live-readout { position: absolute; right: 14px; bottom: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid rgba(220,246,244,.24); border-radius: 14px; background: rgba(8,34,47,.78); color: #dcecf2; backdrop-filter: blur(12px); }
.mp-camera-stage .mp-live-readout { z-index: 3; }
.mp-live-readout span { flex: 1; min-width: 120px; font-size: .82rem; }.mp-live-readout strong { display: block; margin-top: 2px; color: #fff; }
.mp-session-controls { display: grid; align-content: start; gap: 12px; padding: 20px; border: 1px solid #d6e5ea; border-radius: 20px; background: #f8fbfc; }
.mp-primary-reading { padding: 22px; border-radius: 18px; background: #163f54; color: #fff; }
.mp-primary-reading span,.mp-primary-reading small { display: block; color: #cbe0e8; }.mp-primary-reading strong { display: block; margin: 5px 0; font-size: 3.1rem; line-height: 1; }
.mp-feedback { display: grid; gap: 8px; }.mp-feedback > strong { color: #214d61; }
.mp-feedback p { display: flex; align-items: center; gap: 8px; margin: 0; padding: 11px 12px; border: 1px solid #d7e5e9; border-radius: 12px; background: #fff; color: #59727d; opacity: .66; transition: .2s ease; }
.mp-feedback p.active { border-color: #65b7a3; background: #e9f7f2; color: #1f6456; opacity: 1; transform: translateX(3px); }
.mp-live-rom-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
.mp-live-rom-table article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #d9e6e9; border-radius: 13px; background: #f8fbfc; }
.mp-live-rom-table span { color: #506f7c; font-weight: 850; }
.mp-live-rom-table strong { color: #1f7462; font-family: "Plus Jakarta Sans", sans-serif; font-size: 1.45rem; }
.mp-live-rom-workspace { display: grid; gap: 14px; margin-top: 18px; }
.mp-live-rom-workspace .mp-live-rom-table { margin-top: 0; }
.mp-live-rom-workspace .mp-live-rom-table article { position: relative; overflow: hidden; min-height: 64px; background: linear-gradient(135deg, #fff, #f7fbfb); }
.mp-live-rom-workspace .mp-live-rom-table article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #0f766e; }
.mp-live-rom-workspace .mp-live-rom-table article:nth-child(2)::before { background: #2563eb; }
.mp-live-rom-workspace .mp-live-rom-table article:nth-child(3)::before { background: #e11d48; }
.mp-live-rom-workspace .mp-live-rom-table article:nth-child(4)::before { background: #d97706; }
.mp-live-rom-workspace .mp-live-rom-table article:nth-child(5)::before { background: #7c3aed; }
.mp-live-rom-workspace .mp-live-rom-table article:nth-child(6)::before { background: #0891b2; }
.mp-live-rom-workspace .mp-live-rom-table article:nth-child(7)::before { background: #65a30d; }
.mp-live-rom-workspace .mp-live-rom-table article:nth-child(8)::before { background: #be123c; }
.mp-live-rom-chart { overflow: hidden; border: 1px solid #d9e6e9; border-radius: 18px; background: #fff; box-shadow: 0 10px 26px rgba(28, 68, 86, .06); }
.mp-live-rom-chart > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px 6px; color: #244f63; }
.mp-live-rom-chart > header strong { font-size: 1.05rem; }
.mp-live-rom-chart > header span { color: #24745f; font-size: .84rem; font-weight: 850; }
.mp-live-rom-chart canvas { display: block; width: 100%; height: auto; min-height: 220px; }
.mp-stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.mp-stats-grid article { min-height: 134px; }.mp-stats-grid article > span,.mp-stats-grid article > small { display: block; color: #5c7682; }
.mp-stats-grid article > strong { display: block; margin: 8px 0 5px; color: #173f53; font-size: 1.75rem; }
.mp-safety-panel { height: 100%; }
.mp-safety-list { display: grid; gap: 9px; }.mp-safety-list label { display: flex; align-items: flex-start; gap: 11px; padding: 11px; border: 1px solid #d9e7eb; border-radius: 13px; background: #fff; cursor: pointer; }
.mp-safety-list input { width: 22px; height: 22px; accent-color: #328f78; }.mp-safety-list span { display: grid; gap: 2px; }.mp-safety-list strong { color: #244f63; }.mp-safety-list small { color: #69808a; line-height: 1.45; }
.mp-timeline { display: grid; }.mp-timeline article { display: grid; grid-template-columns: 54px 10px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid #e2ecef; }
.mp-timeline article:last-child { border: 0; }.mp-timeline time { color: #617b87; font-weight: 750; }.mp-timeline i { width: 10px; height: 10px; border-radius: 50%; background: #3eaa8d; }.mp-timeline i.warning { background: #e9a338; }.mp-timeline small { display: block; margin-top: 3px; color: #6c838d; }
.mp-action-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }.mp-action-footer > div:first-child { max-width: 680px; }.mp-action-footer p { margin: 4px 0 0; color: #5d7782; line-height: 1.6; }
.mp-setting-form .form-grid { margin-top: 12px; }.mp-module-checks { display: flex; flex-wrap: wrap; gap: 9px; }.mp-module-checks label { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 1px solid #d4e4e8; border-radius: 12px; background: #f8fbfc; }
.mp-validation-list { display: grid; gap: 10px; margin: 14px 0 20px; }.mp-validation-list span { display: flex; align-items: center; gap: 9px; padding: 11px; border-radius: 12px; background: #eaf7f2; color: #286e5f; font-weight: 700; }.mp-validation-list span.warning { background: #fff6e7; color: #95631f; }
.mp-review-summary { display: grid; gap: 14px; }.mp-review-frame { display: grid; place-items: center; min-height: 190px; padding: 20px; border-radius: 17px; background: #173f53; color: #fff; text-align: center; }.mp-review-frame span { color: #66d6b8; }.mp-review-frame small { color: #c8dce4; }
.mp-review-summary dl { display: grid; gap: 8px; margin: 0; }.mp-review-summary dl div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #e2ecef; }.mp-review-summary dt { color: #627c87; }.mp-review-summary dd { margin: 0; color: #214c60; font-weight: 800; }
.mp-side-bars { display: grid; gap: 16px; margin: 24px 0; }.mp-side-bars div { display: grid; gap: 7px; }.mp-side-bars span { color: #345c6c; font-weight: 800; }.mp-side-bars i { position: relative; height: 14px; overflow: hidden; border-radius: 99px; background: #e4edef; }.mp-side-bars i::after { content:""; position:absolute; inset:0 auto 0 0; width:var(--value); border-radius:inherit; background:linear-gradient(90deg,#328f78,#59bda4); }
.mp-participant-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }.mp-participant-grid article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 13px; border: 1px solid #d8e7eb; border-radius: 15px; background: #fbfdfe; }.mp-participant-grid small { display: block; margin-top: 2px; color: #6d838c; }.mp-participant-grid button { grid-column: 2 / -1; min-height: 40px; border: 0; border-radius: 10px; background: #e7f3f1; color: #276858; font: inherit; font-weight: 800; cursor: pointer; }
.mp-threshold-form { display: grid; gap: 13px; }.mp-threshold-form > label:not(.checkbox-label) { display: grid; grid-template-columns: 1fr 82px auto; gap: 8px; align-items: center; color: #315b6d; font-weight: 750; }.mp-threshold-form input[type=number] { min-height: 46px; width: 100%; border: 1px solid #cadde3; border-radius: 10px; padding: 8px; font: inherit; }
@keyframes mp-tracking-pulse { 0%,100% { opacity:.82; } 50% { opacity:1; } }

@media (max-width: 1100px) {
  .mp-camera-grid { grid-template-columns: 1fr; }
  .mp-camera-stage,.mp-camera-stage video,.mp-camera-stage [data-mp-canvas] { min-height: 430px; }
  .mp-live-rom-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mp-participant-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .mediapipe-page-head,.mp-action-footer { align-items: stretch; flex-direction: column; }
  .mediapipe-page-head { padding: 21px; border-radius: 19px; }.mp-head-badges { justify-content: flex-start; }.mp-head-badges span { white-space: normal; }
  .mp-camera-stage,.mp-camera-stage video,.mp-camera-stage [data-mp-canvas] { min-height: 340px; }.mp-live-readout { position: static; border: 0; border-radius: 0; background: #0e3041; }
  .mp-live-rom-table { grid-template-columns: 1fr 1fr; }.mp-live-rom-table article { padding: 10px; }.mp-live-rom-table strong { font-size: 1.25rem; }
  .mp-live-rom-chart > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .mp-live-rom-chart canvas { min-height: 190px; }
  .mp-stats-grid,.mp-participant-grid { grid-template-columns: 1fr; }.mp-stats-grid article { min-height: auto; }
  .mp-action-footer .button-row { display: grid; width: 100%; }.mp-action-footer .btn { width: 100%; }
  .mp-timeline article { grid-template-columns: 48px 9px minmax(0,1fr); }.mp-timeline .status-badge { grid-column: 3; justify-self: start; }
  .mp-participant-grid article { grid-template-columns: auto minmax(0,1fr); }.mp-participant-grid .status-badge { grid-column: 2; justify-self: start; }.mp-participant-grid button { grid-column: 1 / -1; min-height: 48px; }
  .mp-primary-reading strong { font-size: 2.5rem; }
}

/* Distinct role and task workspaces */
.special-workspace { margin-top: 18px; padding: 24px; border: 1px solid #d1e2e8; border-radius: 24px; background: #fff; box-shadow: 0 16px 38px rgba(28,68,86,.07); }
.special-workspace > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.special-workspace > header h2,.special-workspace h2,.special-workspace h3 { margin:0; color:#173f53; }
.special-workspace p { color:#5c7580; line-height:1.55; }
.special-workspace button { font-family:inherit; }
.sw-progress-card { padding:14px; border:1px solid #dce8ec; border-radius:14px; background:#fbfdfe; }
.sw-progress-card > div { display:flex; align-items:end; justify-content:space-between; gap:10px; }.sw-progress-card strong { color:#173f53; font-size:1.35rem; }.sw-progress-card > i { display:block; height:8px; margin:9px 0; overflow:hidden; border-radius:99px; background:#e5edef; }.sw-progress-card > i b { display:block; height:100%; border-radius:inherit; background:#3b9b7d; }.sw-progress-card > i b.blue { background:#3a83a3; }.sw-progress-card > i b.warm,.sw-progress-card > i b.warning,.sw-progress-card > i b.danger { background:#dc9330; }.sw-progress-card small { color:#6a818b; }

.sw-task-columns { display:grid; grid-template-columns:1.2fr 1fr .8fr; gap:16px; }.sw-task-columns > section { padding:18px; border-radius:18px; background:#f7fafb; }.sw-task-columns h3 { margin-bottom:14px; font-size:1rem; }.sw-task-columns article { display:grid; grid-template-columns:58px minmax(0,1fr) auto; gap:12px; align-items:start; margin-bottom:10px; padding:14px; border:1px solid #dce8ec; border-radius:14px; background:#fff; }.sw-task-columns article.done { border-left:4px solid #3a9b7e; }.sw-task-columns article.next { grid-template-columns:58px 1fr; border:2px solid #4a9c87; }.sw-task-columns time { color:#2d7180; font-weight:900; }.sw-task-columns p { margin:4px 0 0; }.sw-task-columns article > span { color:#358c74; }.sw-readiness { display:flex; align-items:center; gap:12px; margin:16px 0; }.sw-readiness .progress-ring { width:92px; height:92px; }.sw-readiness p span { display:block; margin-top:5px; font-size:.8rem; }
.sw-rehab-ready { display:grid; grid-template-columns:1.2fr .8fr; gap:24px; background:linear-gradient(140deg,#fff,#edf7f4); }.sw-ready-main h2 { margin:7px 0 16px; font-size:1.6rem; }.sw-ready-checks { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:20px; }.sw-ready-checks button { display:grid; grid-template-columns:auto 1fr; gap:9px; min-height:78px; padding:12px; border:1px solid #d4e5e9; border-radius:14px; background:#fff; color:#224d60; text-align:left; cursor:pointer; }.sw-ready-checks button strong,.sw-ready-checks button small { grid-column:2; }.sw-ready-checks button small.warning { color:#a66a1d; }.sw-camera-guide { position:relative; display:grid; place-items:center; min-height:280px; overflow:hidden; border-radius:20px; background:#163e52; color:#fff; text-align:center; }.sw-camera-guide > span { color:#54cfad; }.guide-person { width:70px; height:120px; border:3px solid #7ce1c5; border-radius:38px 38px 25px 25px; }.sw-camera-guide small { color:#bed3dc; }
.sw-progress-dashboard > header { align-items:center; }.sw-period-tabs { display:flex; gap:6px; padding:5px; border-radius:12px; background:#eef4f6; }.sw-period-tabs button { min-height:40px; border:0; border-radius:9px; padding:7px 12px; background:transparent; color:#53707d; font-weight:800; cursor:pointer; }.sw-period-tabs button.active { background:#fff; color:#226452; box-shadow:0 3px 10px rgba(29,68,84,.1); }.sw-progress-layout { display:grid; grid-template-columns:1.5fr .65fr; gap:16px; }.sw-progress-chart,.sw-calendar-streak { padding:18px; border:1px solid #dbe8ec; border-radius:18px; }.sw-progress-layout > aside { display:grid; gap:10px; }.sw-calendar-streak { grid-column:1 / -1; }.sw-calendar-streak > div { display:flex; gap:10px; margin:15px 0; }.sw-calendar-streak > div span { display:grid; place-items:center; width:54px; height:58px; border-radius:14px; background:#eef3f5; color:#607a85; }.sw-calendar-streak > div span.checked { background:#e3f4ee; color:#2c816b; }.sw-calendar-streak small { font-size:.65rem; }
.sw-message-center { display:grid; grid-template-columns:330px 1fr; padding:0; overflow:hidden; }.sw-conversation-list { border-right:1px solid #dce7eb; background:#f7fafb; }.sw-conversation-list header,.sw-chat-thread header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:18px; border-bottom:1px solid #dce7eb; }.sw-conversation-list header button { border:0; background:transparent; color:#476b7b; }.sw-conversation-list > button { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; width:100%; padding:14px 16px; border:0; border-bottom:1px solid #e1ebee; background:transparent; color:#234e61; text-align:left; cursor:pointer; }.sw-conversation-list > button.active { background:#fff; box-shadow:inset 4px 0 #3b9b7d; }.sw-conversation-list small { display:block; margin-top:3px; color:#71868e; }.sw-conversation-list > button i { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#d94a4a; color:#fff; font-style:normal; }.sw-chat-thread { min-width:0; }.sw-chat-thread header span { display:block; color:#68818b; font-size:.78rem; }.sw-chat-messages { display:grid; gap:12px; min-height:360px; padding:22px; background:#fbfdfe; }.sw-chat-messages article { max-width:72%; padding:12px 14px; border-radius:15px; }.sw-chat-messages article p { margin:0; color:inherit; }.sw-chat-messages .incoming { justify-self:start; border:1px solid #d8e6ea; background:#fff; }.sw-chat-messages .outgoing { justify-self:end; background:#dff2ec; color:#235e50; }.sw-chat-messages .priority { border-left:4px solid #e2a23b; }.sw-chat-messages time { display:block; margin-top:5px; color:#78909a; font-size:.68rem; }.sw-chat-compose { display:grid; grid-template-columns:1fr auto; gap:10px; padding:16px; border-top:1px solid #dce7eb; }.sw-chat-compose textarea { resize:none; }

.sw-family-card-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; }.sw-family-card-grid > article { padding:18px; border:1px solid #d9e7eb; border-radius:18px; background:#fbfdfe; }.sw-family-person { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; margin-bottom:12px; }.sw-family-person small { display:block; color:#6d838d; }.sw-permission-chips { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }.sw-permission-chips span { display:flex; align-items:center; gap:5px; padding:7px 9px; border-radius:99px; background:#e8f5f1; color:#2e7462; font-size:.75rem; font-weight:800; }.sw-invite-code,.sw-key-vault { display:flex; align-items:center; gap:14px; margin-top:15px; padding:16px; border:1px dashed #92b9b0; border-radius:16px; background:#f0f8f5; }.sw-invite-code div,.sw-key-vault div { flex:1; }.sw-invite-code p { margin:3px 0; }
.sw-family-alerts > header { align-items:center; }.sw-alert-filter { display:flex; gap:6px; }.sw-alert-filter button { min-height:42px; padding:8px 12px; border:1px solid #d5e4e8; border-radius:10px; background:#fff; color:#506e7a; font-weight:800; }.sw-alert-filter button.active { border-color:#d96a5f; color:#a83c34; background:#fff0ee; }.sw-alert-layout { display:grid; grid-template-columns:1.4fr .6fr; gap:18px; }.sw-alert-timeline article { display:grid; grid-template-columns:70px auto 1fr; gap:12px; padding:18px 0; border-bottom:1px solid #dfe9ec; }.sw-alert-timeline article > span { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:#e9f5f1; color:#32866f; }.sw-alert-timeline article.danger > span { background:#feeae8; color:#c34239; }.sw-alert-timeline article.warning > span { background:#fff4df; color:#b87419; }.sw-alert-timeline p { margin:4px 0 10px; }.sw-alert-guide { padding:18px; border-radius:18px; background:#f7fafb; }.sw-alert-guide ol { display:grid; gap:12px; padding:0; list-style:none; }.sw-alert-guide li { display:flex; align-items:center; gap:9px; color:#405f6d; }.sw-alert-guide li span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#173f53; color:#fff; }
.sw-family-report { max-width:1040px; margin-right:auto; margin-left:auto; background:#fffdf9; }.sw-family-report > header { padding-bottom:18px; border-bottom:2px solid #dbe7ea; }.sw-report-summary { display:grid; grid-template-columns:auto repeat(3,1fr); gap:18px; align-items:center; padding:22px 0; }.sw-report-summary > div:not(.progress-ring) { padding-left:18px; border-left:1px solid #dce7eb; }.sw-report-summary span,.sw-report-summary small { display:block; color:#687f89; }.sw-report-summary strong { display:block; margin:4px 0; color:#173f53; font-size:1.35rem; }.sw-report-sections { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.sw-report-sections > article { padding:18px; border:1px solid #dce7eb; border-radius:16px; }.sw-report-sections li { margin:8px 0; color:#506d79; }.sw-report-sections .therapist-note { grid-column:1 / -1; display:flex; gap:12px; background:#eaf6f2; }
.sw-contact-log { display:grid; grid-template-columns:320px 1fr; padding:0; overflow:hidden; }.sw-contact-directory { padding:18px; border-right:1px solid #dce7eb; background:#f7fafb; }.sw-contact-directory header,.sw-contact-timeline header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }.sw-contact-directory > button { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; width:100%; margin-bottom:7px; padding:11px; border:1px solid #dbe8ec; border-radius:13px; background:#fff; color:#274f61; text-align:left; }.sw-contact-directory small { display:block; color:#72878f; }.sw-contact-timeline { padding:20px; }.sw-contact-timeline article { display:grid; grid-template-columns:92px 8px minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:14px 0; border-bottom:1px solid #e0eaed; }.sw-contact-timeline article > i { width:8px; height:8px; border-radius:50%; background:#3e9b80; }.sw-contact-timeline article span:first-child { color:#6d838d; }.sw-contact-timeline article button { min-height:38px; border:0; border-radius:10px; background:#eaf4f3; color:#2d6d5c; font-weight:800; }

.sw-patient-registry { display:grid; grid-template-columns:240px 1fr; padding:0; overflow:hidden; }.sw-patient-registry > aside { display:grid; align-content:start; gap:8px; padding:18px; border-right:1px solid #dce7eb; background:#f7fafb; }.sw-patient-registry > aside label { display:grid; gap:6px; margin-bottom:10px; color:#2e5668; font-weight:800; }.sw-patient-registry > aside > button:not(.btn) { display:flex; justify-content:space-between; min-height:44px; border:0; border-radius:10px; padding:10px; background:transparent; color:#4b6875; font-weight:800; }.sw-patient-registry > aside > button.active { background:#e6f2ef; color:#286c5b; }.sw-registry-table { min-width:0; padding:20px; }.sw-registry-table > header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.sw-risk-kanban .sw-kanban-columns { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.sw-kanban-columns > section { padding:14px; border-radius:16px; background:#f6f9fa; }.sw-kanban-columns > section h3 { display:flex; align-items:center; gap:7px; margin-bottom:12px; }.sw-kanban-columns h3 > span { width:10px; height:10px; border-radius:50%; background:#4d91aa; }.sw-kanban-columns section.danger h3 > span { background:#d85149; }.sw-kanban-columns section.warning h3 > span { background:#df9b31; }.sw-kanban-columns h3 b { margin-left:auto; }.sw-kanban-columns article { margin-bottom:10px; padding:14px; border:1px solid #dbe7ea; border-radius:13px; background:#fff; }.sw-kanban-columns article p { margin:6px 0; }.sw-kanban-columns article small { display:block; color:#71868e; }.sw-kanban-columns article button { width:100%; min-height:40px; margin-top:10px; border:0; border-radius:9px; background:#e8f3f1; color:#286b5a; font-weight:800; }
.sw-assignment-builder { display:grid; grid-template-columns:230px minmax(0,1fr) 250px; padding:0; overflow:hidden; }.sw-assignment-builder > aside,.sw-assignment-form { padding:18px; }.sw-assignment-builder > aside:first-child { border-right:1px solid #dce7eb; background:#f7fafb; }.sw-assignment-builder > aside:first-child header { display:flex; justify-content:space-between; margin-bottom:12px; }.sw-assignment-builder > aside:first-child > button { display:grid; grid-template-columns:auto 1fr; gap:9px; width:100%; margin-bottom:7px; padding:10px; border:1px solid transparent; border-radius:12px; background:transparent; color:#315a6b; text-align:left; }.sw-assignment-builder > aside:first-child > button.active { border-color:#b9d7cf; background:#fff; }.sw-assignment-builder aside small { display:block; color:#71858e; }.sw-assignment-form { border-right:1px solid #dce7eb; }.sw-assignment-form > header { display:flex; justify-content:space-between; margin-bottom:14px; }.sw-assignment-preview { background:#f0f8f5; text-align:center; }.sw-assignment-preview .progress-ring { margin:18px auto; }.sw-assignment-preview p { padding:12px; border-radius:12px; background:#fff; }
.sw-report-queue { display:grid; grid-template-columns:260px minmax(0,1fr) 260px; padding:0; overflow:hidden; }.sw-report-queue > aside { padding:18px; background:#f7fafb; }.sw-report-queue > aside:first-child { border-right:1px solid #dce7eb; }.sw-report-queue > aside:first-child header { display:flex; justify-content:space-between; margin-bottom:12px; }.sw-report-queue > aside:first-child > button { display:grid; grid-template-columns:auto 1fr; gap:9px; width:100%; margin-bottom:8px; padding:11px; border:1px solid transparent; border-radius:12px; background:transparent; color:#315768; text-align:left; }.sw-report-queue > aside:first-child > button.active { border-color:#bfd8d2; background:#fff; }.sw-report-queue > aside:first-child > button i { grid-column:2; justify-self:start; }.sw-report-document { padding:24px; }.sw-report-document > header,.sw-clinical-document > header { display:flex; justify-content:space-between; gap:15px; padding-bottom:16px; border-bottom:2px solid #dce7eb; }.sw-report-document > section,.sw-clinical-document > section { display:grid; grid-template-columns:40px 1fr auto; gap:12px; padding:16px 0; border-bottom:1px solid #e0eaed; }.sw-report-document > section > span,.sw-clinical-document > section > span { color:#3b8b76; font-weight:900; }.sw-report-document > section p,.sw-clinical-document > section p { margin:4px 0 0; }.sw-report-document > section button,.sw-clinical-document > section button { border:0; background:transparent; color:#367c68; font-weight:800; }.sw-report-document footer,.sw-clinical-document footer { display:flex; justify-content:flex-end; gap:9px; margin-top:16px; }.sw-report-outline { border-left:1px solid #dce7eb; }

.sw-ot-function-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.sw-ot-function-grid > article { padding:17px; border:1px solid #d8e6ea; border-radius:17px; background:#fbfdfe; }.sw-ot-function-grid article > header { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; }.sw-ot-function-grid h3 { margin:15px 0 10px; }.sw-goal-stages { display:flex; align-items:center; gap:5px; margin:14px 0; }.sw-goal-stages span { padding:6px 8px; border-radius:99px; background:#edf2f4; color:#6a8089; font-size:.7rem; font-weight:800; }.sw-goal-stages span.done { background:#e3f3ee; color:#2d7865; }.sw-goal-stages span.current { background:#dcebf3; color:#2c657f; }.sw-goal-stages i { flex:1; height:2px; background:#d7e3e7; }
.sw-adl-layout { display:grid; grid-template-columns:1.35fr .65fr; gap:18px; }.sw-adl-layout > section,.sw-adl-layout > aside { padding:18px; border:1px solid #dce8eb; border-radius:17px; }.sw-adl-matrix { display:grid; grid-template-columns:120px repeat(4,1fr); gap:7px; align-items:center; margin-top:15px; }.sw-adl-matrix b,.sw-adl-matrix strong { font-size:.72rem; color:#4e6b77; }.sw-adl-matrix i { display:grid; place-items:center; height:34px; border-radius:9px; background:#edf2f4; color:transparent; font-size:.65rem; font-style:normal; }.sw-adl-matrix i.before { outline:2px solid #dda044; color:#9a6211; }.sw-adl-matrix i.after { background:#dff2eb; color:#246a57; }.sw-matrix-legend { display:flex; gap:14px; margin-top:12px; }.sw-matrix-legend span { display:flex; align-items:center; gap:6px; font-size:.75rem; }.sw-matrix-legend i { width:12px; height:12px; border-radius:3px; }.sw-matrix-legend i.before { border:2px solid #dda044; }.sw-matrix-legend i.after { background:#5eb59a; }
.sw-motion-review { display:grid; grid-template-columns:1.45fr .55fr; padding:0; overflow:hidden; }.sw-motion-player,.sw-event-review { padding:20px; }.sw-motion-player { border-right:1px solid #dce7eb; }.sw-motion-player > header,.sw-event-review > header { display:flex; justify-content:space-between; margin-bottom:14px; }.sw-playback-stage { position:relative; display:grid; place-items:center; min-height:360px; overflow:hidden; border-radius:18px; background:#173f53; color:#67d7b9; }.sw-playback-stage > button { position:absolute; display:grid; place-items:center; width:64px; height:64px; border:0; border-radius:50%; background:rgba(255,255,255,.92); color:#173f53; font-size:1.25rem; }.sw-angle-curve { position:absolute; right:10px; bottom:10px; left:10px; height:90px; padding:8px; border-radius:12px; background:rgba(8,34,47,.72); }.sw-angle-curve svg { width:100%; height:100%; }.sw-video-timeline { position:relative; height:12px; margin-top:14px; border-radius:99px; background:#e1eaed; }.sw-video-timeline > i { display:block; width:var(--progress); height:100%; border-radius:inherit; background:#409c83; }.sw-video-timeline button { position:absolute; top:50%; width:15px; height:15px; padding:0; border:3px solid #fff; border-radius:50%; background:#d88728; transform:translate(-50%,-50%); }.sw-event-review > button { display:grid; grid-template-columns:55px 1fr auto; gap:8px; align-items:center; width:100%; padding:11px 0; border:0; border-bottom:1px solid #e0eaed; background:transparent; color:#315868; text-align:left; }.sw-event-review > button.active { background:#fff8ed; }.sw-event-review label { display:grid; gap:6px; margin:15px 0; color:#315868; font-weight:800; }
.sw-home-plan { display:grid; grid-template-columns:1fr 300px; }.sw-home-plan > header { grid-column:1 / -1; }.sw-day-schedule { position:relative; padding:0 8px; }.sw-day-line { position:absolute; top:18px; bottom:18px; left:85px; width:3px; background:#dce8eb; }.sw-day-schedule article { position:relative; z-index:1; display:grid; grid-template-columns:68px 12px minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:14px 0; }.sw-day-schedule article > i { width:12px; height:12px; border:3px solid #fff; border-radius:50%; background:#3e9a80; box-shadow:0 0 0 2px #8fc8b8; }.sw-day-schedule small { display:block; color:#738890; }.sw-day-schedule article button { min-height:38px; border:0; border-radius:9px; background:#e7f2f0; color:#2d6c5b; font-weight:800; }.sw-home-guidance { padding:18px; border-radius:18px; background:#eff7f4; }.sw-home-guidance > div { display:grid; gap:7px; margin:15px 0; }.sw-home-guidance > div span { display:flex; align-items:center; gap:7px; color:#3e6659; }
.sw-education-library { display:grid; grid-template-columns:230px minmax(0,1fr) 260px; padding:0; overflow:hidden; }.sw-education-library > aside,.sw-education-article { padding:18px; }.sw-education-library > aside:first-child { border-right:1px solid #dce7eb; background:#f7fafb; }.sw-education-library > aside:first-child > button { display:flex; align-items:center; gap:8px; width:100%; min-height:44px; border:0; border-radius:10px; padding:9px; background:transparent; color:#486876; text-align:left; }.sw-education-library > aside:first-child > button.active { background:#e5f2ee; color:#286b59; }.sw-education-library > aside:first-child span { margin-left:auto; }.sw-education-article { border-right:1px solid #dce7eb; }.sw-education-article > header { padding-bottom:14px; border-bottom:1px solid #dce7eb; }.sw-do-dont { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:15px 0; }.sw-do-dont section { padding:14px; border-radius:14px; background:#eaf6f2; }.sw-do-dont section:last-child { background:#fff0ed; }.sw-do-dont li { margin:8px 0; color:#4d6b76; }.sw-family-delivery { display:grid; align-content:start; gap:12px; background:#fbfdfe; }.sw-family-delivery label:not(.checkbox-label) { display:grid; gap:5px; color:#31596a; font-weight:800; }
.sw-ot-report-builder { display:grid; grid-template-columns:260px minmax(0,1fr) 260px; padding:0; overflow:hidden; }.sw-ot-report-builder > aside,.sw-report-editor { padding:18px; }.sw-ot-report-builder > aside:first-child { border-right:1px solid #dce7eb; background:#f7fafb; }.sw-ot-report-builder > aside:first-child header { display:flex; justify-content:space-between; margin-bottom:10px; }.sw-ot-report-builder > aside:first-child > button { display:grid; grid-template-columns:32px 1fr; gap:7px; width:100%; padding:10px; border:0; border-radius:10px; background:transparent; color:#345d6e; text-align:left; }.sw-ot-report-builder > aside:first-child > button.active { background:#e5f2ef; }.sw-ot-report-builder > aside:first-child > button i { grid-column:2; justify-self:start; }.sw-report-editor { border-right:1px solid #dce7eb; }.sw-report-editor > header { display:flex; justify-content:space-between; margin-bottom:14px; }.sw-report-editor label { display:grid; gap:6px; margin-bottom:12px; color:#315969; font-weight:800; }

.sw-doctor-triage { display:grid; grid-template-columns:minmax(0,1fr) 330px; padding:0; overflow:hidden; }.sw-triage-table,.sw-triage-case { padding:20px; }.sw-triage-table { min-width:0; border-right:1px solid #dce7eb; }.sw-triage-table > header { display:flex; justify-content:space-between; margin-bottom:14px; }.sw-priority { display:inline-grid; place-items:center; min-width:34px; min-height:28px; border-radius:8px; background:#e7eef1; color:#4b6c79; font-weight:900; }.sw-priority.danger { background:#fee7e4; color:#b73630; }.sw-priority.warning { background:#fff2dc; color:#9a6317; }.sw-triage-case { background:#f8fbfc; }.sw-triage-case > header { padding-bottom:13px; border-bottom:1px solid #dce7eb; }.sw-clinical-vitals { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:15px 0; }.sw-clinical-vitals span { padding:10px; border-radius:12px; background:#fff; border:1px solid #dce7eb; }.sw-clinical-vitals small,.sw-clinical-vitals strong { display:block; }.sw-clinical-vitals strong { margin-top:4px; color:#963d35; font-size:1.25rem; }
.sw-clinical-course { display:grid; grid-template-columns:260px 1fr; padding:0; overflow:hidden; }.sw-patient-search { padding:18px; border-right:1px solid #dce7eb; background:#f7fafb; }.sw-patient-search label { display:grid; gap:6px; margin-bottom:14px; color:#31596a; font-weight:800; }.sw-patient-search button { display:grid; grid-template-columns:auto 1fr; gap:9px; width:100%; margin-bottom:7px; padding:10px; border:1px solid transparent; border-radius:12px; background:transparent; color:#31596a; text-align:left; }.sw-patient-search button.active { border-color:#b9d5ce; background:#fff; }.sw-patient-search small { display:block; color:#748991; }.sw-course-timeline { padding:22px; }.sw-course-timeline > header { display:flex; justify-content:space-between; margin-bottom:18px; }.sw-course-stages { display:flex; align-items:center; gap:6px; padding:16px; border-radius:15px; background:#f3f7f8; }.sw-course-stages > span { min-width:120px; padding:10px; border-radius:10px; background:#e4ecef; color:#56727e; font-weight:800; }.sw-course-stages > span.done { background:#dff1eb; color:#2b715e; }.sw-course-stages > span.current { background:#dcebf3; color:#2a647f; box-shadow:0 0 0 2px #7aafc4; }.sw-course-stages small { display:block; margin-top:3px; }.sw-course-stages > i { flex:1; height:3px; background:#cfdde2; }.sw-course-events { margin-top:16px; }.sw-course-events article { display:grid; grid-template-columns:62px 10px minmax(0,1fr) auto; gap:10px; align-items:center; padding:13px 0; border-bottom:1px solid #e0eaed; }.sw-course-events article > i { width:10px; height:10px; border-radius:50%; background:#3c9b80; }.sw-course-events article > i.warning { background:#da972f; }.sw-course-events article > i.info { background:#3f88a7; }.sw-course-events button { border:0; background:transparent; color:#2b735e; font-weight:800; }
.sw-doctor-rom > header { align-items:center; }.sw-rom-filters { display:flex; gap:8px; }.sw-rom-filters select { min-height:44px; }.sw-rom-layout { display:grid; grid-template-columns:190px minmax(0,1fr) 260px; gap:15px; }.sw-joint-selector { display:grid; align-content:start; gap:5px; }.sw-joint-selector button { display:flex; justify-content:space-between; min-height:42px; border:0; border-radius:9px; padding:9px; background:#f3f7f8; color:#456673; font-weight:800; }.sw-joint-selector button.active { background:#dcecf2; color:#225e77; }.sw-rom-chart,.sw-rom-outliers { padding:17px; border:1px solid #dce8eb; border-radius:17px; }.sw-rom-chart { position:relative; }.sw-target-band { position:absolute; right:18px; bottom:62px; display:flex; gap:6px; align-items:center; color:#617b86; font-size:.72rem; }.sw-target-band i { width:22px; height:8px; background:rgba(66,153,128,.28); }.sw-rom-outliers { display:grid; align-content:start; gap:8px; }.sw-rom-outliers > button:not(.btn) { display:flex; align-items:center; justify-content:space-between; gap:9px; padding:11px 0; border:0; border-bottom:1px solid #e0eaed; background:transparent; color:#31596a; text-align:left; }.sw-rom-outliers small { display:block; color:#71868e; }.sw-rom-outliers b.danger { color:#c13e36; }.sw-rom-outliers b.warning { color:#b9771d; }
.sw-doctor-report-review { display:grid; grid-template-columns:240px minmax(0,1fr) 250px; padding:0; overflow:hidden; }.sw-doctor-report-review > aside,.sw-clinical-document { padding:18px; }.sw-doctor-report-review > aside:first-child { border-right:1px solid #dce7eb; background:#f7fafb; }.sw-doctor-report-review > aside:first-child header { display:flex; justify-content:space-between; margin-bottom:10px; }.sw-doctor-report-review > aside:first-child button { display:grid; grid-template-columns:auto 1fr; gap:8px; width:100%; padding:10px; border:1px solid transparent; border-radius:10px; background:transparent; color:#31596a; text-align:left; }.sw-doctor-report-review > aside:first-child button.active { border-color:#b9d5ce; background:#fff; }.sw-clinical-document { border-right:1px solid #dce7eb; }.sw-clinical-document label { display:grid; gap:6px; margin-top:15px; color:#31596a; font-weight:800; }.sw-review-gutter { display:grid; align-content:start; gap:10px; background:#fbfdfe; }.sw-review-gutter > span { display:flex; align-items:center; gap:7px; padding:9px; border-radius:10px; background:#eaf6f2; color:#2d715e; }.sw-review-gutter > span.warning { background:#fff3df; color:#966017; }
.sw-doctor-orders { display:grid; grid-template-columns:minmax(0,1fr) 330px; padding:0; overflow:hidden; }.sw-order-form,.sw-active-orders { padding:20px; }.sw-order-form { border-right:1px solid #dce7eb; }.sw-order-form > header { display:flex; justify-content:space-between; margin-bottom:14px; }.sw-order-form fieldset { display:flex; flex-wrap:wrap; gap:10px; margin:15px 0; padding:14px; border:1px solid #dce7eb; border-radius:14px; }.sw-order-form fieldset label { display:flex; align-items:center; gap:6px; min-height:40px; padding:7px 10px; border-radius:10px; background:#f3f7f8; }.sw-active-orders { background:#f8fbfc; }.sw-active-orders > header { display:flex; justify-content:space-between; }.sw-active-orders article { display:grid; grid-template-columns:1fr auto; gap:8px; padding:13px 0; border-bottom:1px solid #dce7eb; }.sw-active-orders article p { margin:4px 0; }.sw-active-orders article button { grid-column:1 / -1; min-height:38px; border:0; border-radius:9px; background:#e6f2ef; color:#2d6c5b; font-weight:800; }
.sw-team-members { display:flex; gap:8px; margin-bottom:16px; overflow:auto; }.sw-team-members button { position:relative; display:flex; align-items:center; gap:8px; min-width:170px; padding:10px; border:1px solid #dce7eb; border-radius:13px; background:#fff; color:#31596a; text-align:left; }.sw-team-members small { display:block; color:#748991; }.sw-team-members i { position:absolute; top:8px; right:8px; width:8px; height:8px; border-radius:50%; background:#bbc9ce; }.sw-team-members i.online { background:#3aa17f; }.sw-team-columns { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.sw-team-columns > section { padding:14px; border-radius:15px; background:#f5f8f9; }.sw-team-columns h3 { display:flex; justify-content:space-between; }.sw-team-columns article { display:grid; grid-template-columns:auto 1fr; gap:9px; margin-top:10px; padding:13px; border:1px solid #dce7eb; border-radius:13px; background:#fff; }.sw-team-columns article.danger { border-left:4px solid #d44a42; }.sw-team-columns article.warning { border-left:4px solid #d9982f; }.sw-team-columns article p { margin:4px 0; }.sw-team-columns article button { grid-column:2; min-height:38px; border:0; border-radius:9px; background:#e7f2ef; color:#2d6c5b; font-weight:800; }

.sw-tenant-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.sw-tenant-grid > article { padding:17px; border:1px solid #dce7eb; border-radius:17px; background:#fbfdfe; }.sw-tenant-grid article > header { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; }.sw-tenant-grid dl { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.sw-tenant-grid dl div { padding:10px; border-radius:10px; background:#f0f5f6; }.sw-tenant-grid dt,.sw-tenant-grid dd { margin:0; }.sw-tenant-grid dd { margin-top:3px; color:#183f53; font-weight:900; }
.sw-account-review { display:grid; grid-template-columns:210px minmax(0,1fr) 250px; padding:0; overflow:hidden; }.sw-account-review > aside,.sw-identity-file { padding:18px; }.sw-account-review > aside:first-child { border-right:1px solid #dce7eb; background:#f7fafb; }.sw-account-review > aside:first-child header { display:flex; justify-content:space-between; margin-bottom:10px; }.sw-account-review > aside:first-child button { display:flex; justify-content:space-between; width:100%; min-height:44px; border:0; border-radius:10px; padding:10px; background:transparent; color:#426473; font-weight:800; }.sw-account-review > aside:first-child button.active { background:#e7f2ef; color:#286b59; }.sw-identity-file { border-right:1px solid #dce7eb; }.sw-identity-file > header { display:flex; justify-content:space-between; margin-bottom:14px; }.sw-identity-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.sw-identity-grid section { padding:14px; border:1px solid #dce7eb; border-radius:13px; }.sw-identity-grid dl div { display:flex; justify-content:space-between; gap:8px; padding:7px 0; border-bottom:1px solid #e2ebee; }.sw-identity-grid dt,.sw-identity-grid dd { margin:0; }.sw-identity-grid section > span { display:flex; gap:7px; padding:8px 0; color:#2c715e; }.sw-identity-grid section > span.warning { color:#a76c1b; }.sw-identity-file > label { display:grid; gap:6px; margin-top:14px; color:#31596a; font-weight:800; }.sw-identity-file footer { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }.sw-review-file { background:#fbfdfe; }.sw-review-file > div { display:grid; place-items:center; margin-top:12px; min-height:140px; padding:14px; border:1px dashed #b8ccd3; border-radius:13px; color:#3f6979; text-align:center; }.sw-review-file small { color:#758990; }
.sw-permission-matrix { overflow:hidden; }.sw-permission-matrix table { width:100%; border-collapse:collapse; }.sw-permission-matrix th,.sw-permission-matrix td { padding:11px; border:1px solid #dce7eb; text-align:center; }.sw-permission-matrix thead th { background:#173f53; color:#fff; font-size:.72rem; }.sw-permission-matrix tbody th { min-width:150px; text-align:left; color:#31596a; }.role-dot { display:inline-block; width:10px; height:10px; margin-right:8px; border-radius:50%; background:#3b8d77; }.permission-toggle.critical { box-shadow:0 0 0 3px rgba(207,62,54,.18); }
.sw-system-logs { display:grid; grid-template-columns:260px 1fr; padding:0; overflow:hidden; }.sw-system-logs > aside { display:grid; align-content:start; gap:12px; padding:18px; border-right:1px solid #dce7eb; background:#f7fafb; }.sw-system-logs > aside label { display:grid; gap:5px; color:#31596a; font-weight:800; }.sw-log-stream { padding:20px; min-width:0; }.sw-log-stream > header { display:flex; justify-content:space-between; margin-bottom:12px; }.sw-log-stream article { display:grid; grid-template-columns:82px 160px minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:12px 0; border-bottom:1px solid #e0eaed; }.sw-log-stream code { color:#2e7087; font-weight:800; }.sw-log-stream small { display:block; color:#758991; }.sw-log-stream article button { min-height:36px; border:0; border-radius:8px; background:#e7f1f3; color:#315f70; font-weight:800; }
.sw-api-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.sw-api-grid > article { overflow:hidden; border:1px solid #dce7eb; border-radius:17px; background:#fbfdfe; }.sw-api-grid article > header { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; padding:15px; }.sw-api-grid code { display:block; margin-top:3px; color:#5f7b86; }.sw-api-grid dl { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0 15px; }.sw-api-grid dl div { padding:10px; border-radius:10px; background:#eef4f5; }.sw-api-grid dt,.sw-api-grid dd { margin:0; }.sw-api-grid dd { margin-top:3px; color:#173f53; font-weight:900; }.sw-api-spark { height:100px; padding:8px 15px; }.sw-api-spark svg { width:100%; height:100%; }.sw-api-grid footer { display:flex; gap:8px; padding:15px; border-top:1px solid #dce7eb; }.sw-key-vault { grid-column:1 / -1; }
.sw-audit-layout { display:grid; grid-template-columns:1fr .7fr; gap:15px; }.sw-audit-layout > section,.sw-audit-layout > aside { padding:17px; border:1px solid #dce7eb; border-radius:16px; }.sw-audit-heatmap { display:grid; grid-template-columns:130px repeat(6,1fr); gap:6px; align-items:center; margin-top:14px; }.sw-audit-heatmap b,.sw-audit-heatmap strong { color:#4f6d79; font-size:.7rem; }.sw-audit-heatmap i { height:34px; border-radius:7px; background:#e8eff1; }.sw-audit-heatmap i.level-0 { background:#dff2eb; }.sw-audit-heatmap i.level-1 { background:#abdacb; }.sw-audit-heatmap i.level-2 { background:#ffe1ab; }.sw-audit-heatmap i.level-3 { background:#f6aaa4; }.sw-audit-layout aside article { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; padding:10px 0; border-bottom:1px solid #e0eaed; }.sw-audit-layout aside small { display:block; color:#758991; }.sw-audit-layout aside button { min-height:36px; border:0; border-radius:8px; background:#e7f2ef; color:#2b6b59; font-weight:800; }.sw-audit-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:15px; }

.mp-compensation-console { display:grid; grid-template-columns:.75fr 1.25fr; gap:16px; }.mp-body-map { display:grid; grid-template-columns:1fr 1fr; gap:15px; align-items:center; min-height:380px; }.mp-body-figure { position:relative; width:180px; height:320px; margin:auto; }.mp-body-figure i { position:absolute; display:block; border-radius:99px; background:#92b9c4; }.mp-body-figure .head { top:0; left:65px; width:52px; height:52px; border-radius:50%; }.mp-body-figure .shoulder { top:66px; left:25px; width:132px; height:24px; }.mp-body-figure .trunk { top:84px; left:65px; width:52px; height:110px; }.mp-body-figure .pelvis { top:188px; left:52px; width:78px; height:28px; }.mp-body-figure .left-leg,.mp-body-figure .right-leg { top:212px; width:24px; height:105px; }.mp-body-figure .left-leg { left:57px; transform:rotate(8deg); }.mp-body-figure .right-leg { left:102px; transform:rotate(-8deg); }.mp-body-figure i.hot,.mp-heat-legend i.hot { background:#dc4d44; box-shadow:0 0 0 8px rgba(220,77,68,.14); }.mp-body-figure i.warm,.mp-heat-legend i.warm { background:#e39a31; box-shadow:0 0 0 7px rgba(227,154,49,.14); }.mp-heat-legend { display:grid; gap:12px; }.mp-heat-legend span { display:flex; align-items:center; gap:8px; color:#4c6b77; }.mp-heat-legend i { width:12px; height:12px; border-radius:50%; background:#72b7a3; }.mp-compensation-events article { display:grid; grid-template-columns:auto 1fr auto auto; gap:10px; align-items:center; padding:12px 0; border-bottom:1px solid #e0eaed; }.mp-event-type { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:#e9f4f1; color:#32816b; }.mp-event-type.danger { background:#fee8e5; color:#c13e37; }.mp-event-type.warning { background:#fff2dc; color:#a96d18; }.mp-compensation-events small { display:block; color:#758991; }.mp-compensation-events article > button { min-height:38px; border:0; border-radius:9px; background:#e7f2ef; color:#2d6b5a; font-weight:800; }
.mp-adl-review-console { display:grid; grid-template-columns:280px minmax(0,1fr) 250px; gap:16px; }.mp-adl-cases > button,.mp-review-queue > button { display:grid; grid-template-columns:auto 1fr; gap:9px; width:100%; padding:11px; border:1px solid transparent; border-radius:11px; background:transparent; color:#31596a; text-align:left; }.mp-adl-cases > button.active,.mp-review-queue > button.active { border-color:#bdd7d0; background:#eef7f4; }.mp-adl-cases > button i,.mp-review-queue > button i { grid-column:2; justify-self:start; }.mp-video-thumb { display:grid; place-items:center; width:44px; height:44px; border-radius:11px; background:#173f53; color:#6bd7b9; }.mp-adl-cases small,.mp-review-queue small { display:block; color:#748991; }.mp-adl-steps header { display:flex; justify-content:space-between; }.mp-step-checklist { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:16px 0; }.mp-step-checklist button { display:grid; gap:6px; padding:12px; border:1px solid #dce7eb; border-radius:12px; background:#fbfdfe; color:#31596a; text-align:left; }.mp-step-checklist button > span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#dff2eb; color:#2a715d; font-weight:900; }.mp-step-checklist small.warning { color:#a86d1b; }.mp-adl-steps label,.mp-event-inspector label { display:grid; gap:6px; color:#31596a; font-weight:800; }.mp-object-check { display:grid; align-content:start; gap:10px; }.mp-object-check > span { display:flex; align-items:center; gap:7px; padding:9px; border-radius:10px; background:#eaf6f2; color:#2d715e; }.mp-object-check > span.warning { background:#fff3df; color:#966017; }
.mp-motion-review-console { display:grid; grid-template-columns:260px minmax(0,1fr) 260px; gap:16px; }.mp-review-player header { display:flex; justify-content:space-between; }.mp-playback-screen { position:relative; display:grid; place-items:center; min-height:350px; overflow:hidden; border-radius:18px; background:#173f53; color:#65d4b6; }.mp-playback-screen > button { display:grid; place-items:center; width:64px; height:64px; border:0; border-radius:50%; background:#fff; color:#173f53; font-size:1.2rem; }.mp-joint-overlay { position:absolute; inset:18%; }.mp-joint-overlay i { position:absolute; width:15px; height:15px; border:3px solid #fff; border-radius:50%; background:#45c7a2; }.mp-joint-overlay i:nth-child(1) { top:10%; left:45%; }.mp-joint-overlay i:nth-child(2) { top:35%; left:30%; }.mp-joint-overlay i:nth-child(3) { top:35%; right:30%; }.mp-joint-overlay i:nth-child(4) { bottom:10%; left:48%; }.mp-angle-timeline { position:relative; height:120px; margin-top:12px; }.mp-angle-timeline svg { width:100%; height:100%; }.mp-angle-timeline button { position:absolute; top:45%; width:14px; height:14px; border:3px solid #fff; border-radius:50%; background:#da8b2d; }.mp-event-inspector dl div { display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid #e0eaed; }.mp-event-inspector dt,.mp-event-inspector dd { margin:0; }.mp-event-inspector dd { color:#173f53; font-weight:900; }
.mp-capture-specific { display:grid; grid-template-columns:.7fr 1.3fr; gap:16px; margin:18px 0; }.mp-capture-specific label { display:grid; gap:6px; margin-bottom:12px; color:#31596a; font-weight:800; }.mp-side-toggle { display:grid; grid-template-columns:1fr 1fr; gap:6px; }.mp-side-toggle button { min-height:44px; border:1px solid #d4e3e8; border-radius:10px; background:#fff; color:#4b6a77; font-weight:800; }.mp-side-toggle button.active { border-color:#4a9e86; background:#e5f3ee; color:#286c59; }.mp-rom-measurement > article svg { width:100%; height:220px; }
.mp-hand-map { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:center; }.mp-palm { position:relative; width:190px; height:260px; margin:auto; }.mp-palm b { position:absolute; bottom:25px; left:52px; width:92px; height:112px; border:4px solid #59b99c; border-radius:48% 48% 36% 36%; background:#e4f5ef; }.mp-palm i { position:absolute; bottom:115px; left:calc(42px + var(--finger) * 27px); width:18px; height:calc(82px + (var(--finger) % 2) * 28px); border:4px solid #59b99c; border-radius:99px; background:#f4fbf8; transform:rotate(calc((var(--finger) - 2) * 5deg)); transform-origin:bottom; }.mp-hand-map dl div { display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid #e0eaed; }.mp-hand-map dt,.mp-hand-map dd { margin:0; }.mp-hand-map dd { color:#173f53; font-weight:900; }.mp-hand-session > aside > button,.mp-face-session > aside > button:not(.btn) { display:grid; grid-template-columns:32px 1fr; gap:8px; width:100%; padding:11px; border:0; border-bottom:1px solid #e0eaed; background:transparent; color:#31596a; text-align:left; }.mp-hand-session > aside > button span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#e3f3ed; color:#2d725f; font-weight:900; }.mp-hand-session > aside small,.mp-face-session > aside small { display:block; color:#748991; }
.mp-balance-session { grid-template-columns:1.15fr .85fr; }.mp-balance-target { position:relative; display:grid; place-items:center; min-height:360px; overflow:hidden; border-radius:18px; background:radial-gradient(circle,#f9fcfd,#e6f0f2); }.mp-balance-target i { position:absolute; border:2px solid #80bbae; border-radius:50%; }.mp-balance-target .ring-1 { width:120px; height:120px; }.mp-balance-target .ring-2 { width:240px; height:240px; opacity:.55; }.mp-balance-target .center { width:12px; height:12px; background:#2e846d; }.mp-balance-target b { position:absolute; top:var(--y); left:var(--x); width:24px; height:24px; border:5px solid rgba(255,255,255,.85); border-radius:50%; background:#df9130; box-shadow:0 0 0 3px rgba(223,145,48,.32); }.mp-balance-target span { position:absolute; bottom:14px; color:#4d6b77; font-weight:800; }.mp-balance-timer { padding:20px; border-radius:17px; background:#173f53; color:#fff; text-align:center; }.mp-balance-timer span { display:block; font-size:2.7rem; font-weight:900; }.mp-balance-timer small { color:#c8dce4; }
.mp-adl-session { grid-template-columns:1.35fr .65fr; }.mp-adl-live-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; margin-top:15px; }.mp-adl-live-steps button { display:grid; gap:6px; padding:13px; border:1px solid #dce7eb; border-radius:12px; background:#fbfdfe; color:#31596a; text-align:left; }.mp-adl-live-steps button span { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#dff2eb; color:#2c725e; font-weight:900; }.mp-adl-live-steps button.warning { border-color:#e7bd79; background:#fff8ec; }.mp-adl-live-steps small { color:#71868e; }.mp-object-live { display:grid; align-content:start; gap:10px; }.mp-object-live > span { display:flex; align-items:center; gap:7px; padding:10px; border-radius:10px; background:#eaf6f2; color:#2d715e; }.mp-object-live > span.warning { background:#fff3df; color:#966017; }
.mp-face-session { grid-template-columns:1fr .7fr; }.mp-face-map { position:relative; width:320px; height:360px; margin:10px auto; border:4px solid #66b69f; border-radius:48% 48% 44% 44%; background:#f0faf6; }.mp-face-map i { position:absolute; border:4px solid #4d9c87; }.mp-face-map .eye { top:105px; width:58px; height:22px; border-top:0; border-radius:0 0 50% 50%; }.mp-face-map .eye.left { left:55px; }.mp-face-map .eye.right { right:55px; }.mp-face-map .nose { top:130px; left:142px; width:30px; height:72px; border-top:0; border-radius:0 0 50% 50%; }.mp-face-map .mouth { bottom:72px; left:92px; width:128px; height:50px; border-radius:10% 10% 50% 50%; }.mp-face-map .midline { position:absolute; top:28px; bottom:28px; left:50%; width:2px; border-left:2px dashed #82bcb0; }.mp-face-map span { position:absolute; bottom:20px; color:#31596a; font-weight:900; }.mp-face-map .left-score { left:28px; }.mp-face-map .right-score { right:28px; }.mp-face-session > aside > button:not(.btn) { grid-template-columns:1fr auto; }.mp-face-session > aside > button.active { background:#eaf6f2; }

@media (max-width: 1180px) {
  .sw-assignment-builder,.sw-report-queue,.sw-education-library,.sw-ot-report-builder,.sw-doctor-report-review,.sw-account-review,.mp-adl-review-console,.mp-motion-review-console { grid-template-columns:220px minmax(0,1fr); }
  .sw-assignment-builder > aside:last-child,.sw-report-queue > aside:last-child,.sw-education-library > aside:last-child,.sw-ot-report-builder > aside:last-child,.sw-doctor-report-review > aside:last-child,.sw-account-review > aside:last-child,.mp-adl-review-console > aside:last-child,.mp-motion-review-console > aside:last-child { grid-column:1 / -1; border-top:1px solid #dce7eb; }
  .sw-rom-layout { grid-template-columns:170px 1fr; }.sw-rom-outliers { grid-column:1 / -1; }
  .sw-api-grid,.sw-tenant-grid,.sw-ot-function-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 820px) {
  .special-workspace { padding:18px; border-radius:19px; }.special-workspace > header { flex-direction:column; }
  .sw-task-columns,.sw-progress-layout,.sw-alert-layout,.sw-adl-layout,.sw-doctor-triage,.sw-doctor-orders,.sw-home-plan,.sw-audit-layout,.mp-compensation-console,.mp-capture-specific { grid-template-columns:1fr; }
  .sw-rehab-ready,.sw-message-center,.sw-contact-log,.sw-patient-registry,.sw-clinical-course,.sw-system-logs,.sw-motion-review { grid-template-columns:1fr; padding:0; }
  .sw-conversation-list,.sw-contact-directory,.sw-patient-registry > aside,.sw-patient-search,.sw-system-logs > aside { border-right:0; border-bottom:1px solid #dce7eb; }
  .sw-risk-kanban .sw-kanban-columns,.sw-team-columns,.sw-family-card-grid,.sw-report-sections,.sw-api-grid,.sw-tenant-grid,.sw-ot-function-grid,.sw-audit-summary { grid-template-columns:1fr; }
  .sw-assignment-builder,.sw-report-queue,.sw-education-library,.sw-ot-report-builder,.sw-doctor-report-review,.sw-account-review,.mp-adl-review-console,.mp-motion-review-console { grid-template-columns:1fr; padding:0; }
  .sw-assignment-builder > aside:last-child,.sw-report-queue > aside:last-child,.sw-education-library > aside:last-child,.sw-ot-report-builder > aside:last-child,.sw-doctor-report-review > aside:last-child,.sw-account-review > aside:last-child,.mp-adl-review-console > aside:last-child,.mp-motion-review-console > aside:last-child { grid-column:auto; }
  .sw-assignment-builder > aside:first-child,.sw-report-queue > aside:first-child,.sw-education-library > aside:first-child,.sw-ot-report-builder > aside:first-child,.sw-doctor-report-review > aside:first-child,.sw-account-review > aside:first-child { border-right:0; border-bottom:1px solid #dce7eb; }
  .sw-report-summary { grid-template-columns:1fr 1fr; }.sw-report-summary .progress-ring { margin:auto; }.sw-rom-layout { grid-template-columns:1fr; }.sw-joint-selector { grid-template-columns:1fr 1fr; }.sw-rom-outliers { grid-column:auto; }
  .sw-day-schedule article { grid-template-columns:58px 12px 1fr; }.sw-day-schedule .status-badge,.sw-day-schedule article button { grid-column:3; justify-self:start; }.sw-day-line { left:75px; }
  .sw-log-stream article { grid-template-columns:72px 1fr auto; }.sw-log-stream code { grid-column:2; }.sw-log-stream article > div { grid-column:2; }.sw-log-stream article button { grid-column:3; grid-row:1 / span 3; }
}

@media (max-width: 560px) {
  .sw-ready-checks,.sw-report-summary,.sw-do-dont,.sw-identity-grid { grid-template-columns:1fr; }
  .sw-report-summary > div:not(.progress-ring) { padding:12px 0 0; border-top:1px solid #dce7eb; border-left:0; }
  .sw-chat-messages article { max-width:90%; }.sw-chat-compose { grid-template-columns:1fr; }
  .sw-contact-timeline article { grid-template-columns:70px 8px 1fr; }.sw-contact-timeline .status-badge { grid-column:3; justify-self:start; }.sw-contact-timeline article button { grid-column:3; justify-self:start; }
  .sw-adl-matrix { grid-template-columns:82px repeat(4,1fr); }.sw-adl-matrix b { writing-mode:vertical-rl; min-height:70px; }
  .sw-course-timeline > header,.sw-triage-table > header,.sw-motion-player > header,.sw-rom-filters { flex-direction:column; }
  .sw-course-stages { align-items:stretch; flex-direction:column; }.sw-course-stages > i { width:3px; height:18px; margin:auto; }.sw-course-stages > span { min-width:0; }
  .sw-clinical-vitals,.sw-audit-summary { grid-template-columns:1fr; }.sw-team-members { padding-bottom:6px; }
  .sw-permission-matrix th,.sw-permission-matrix td { min-width:82px; }.sw-permission-matrix tbody th { position:sticky; left:0; z-index:1; min-width:130px; background:#fff; }
  .mp-step-checklist,.mp-adl-live-steps { grid-template-columns:1fr 1fr; }.mp-compensation-events article { grid-template-columns:auto 1fr auto; }.mp-compensation-events article > button { grid-column:2 / -1; }.mp-hand-map { grid-template-columns:1fr; }.mp-face-map { width:260px; height:310px; }.mp-face-map .mouth { left:72px; width:110px; }.mp-face-map .nose { left:112px; }
}

/* NOVATERA form system v2 — consistent, readable clinical data entry */
:root {
  --field-ink: #173f52;
  --field-muted: #66808b;
  --field-line: #b9cfd7;
  --field-line-hover: #82adba;
  --field-accent: #2f8b73;
  --field-accent-soft: #e9f6f1;
  --field-danger: #b84843;
  --field-danger-soft: #fff0ee;
  --field-surface: #ffffff;
  --field-canvas: #f7fafb;
  --field-shadow: 0 7px 18px rgba(29, 69, 85, .07), inset 0 1px 0 rgba(255,255,255,.9);
}

.ui-form { color: var(--field-ink); }
.ui-field-group { position: relative; }
.ui-field {
  position: relative;
  display: grid !important;
  min-width: 0;
  gap: 8px !important;
  color: var(--field-ink) !important;
  font-size: .78rem !important;
  font-weight: 800 !important;
  line-height: 1.45;
}
.ui-field-caption {
  display: flex;
  min-height: 20px;
  align-items: center;
  gap: 7px;
  color: #294f60;
  letter-spacing: .01em;
}
.ui-field.is-required .ui-field-caption::after,
.ui-field-group.is-required .ui-field-caption::after {
  content: "必填";
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: #eef4f6;
  color: #6d8490;
  font-size: .6rem;
  font-weight: 800;
}
.ui-field:focus-within .ui-field-caption,
.ui-field-group:focus-within .ui-field-caption { color: var(--field-accent); }
.ui-field.has-value .ui-field-caption::before,
.ui-field-group.has-value .ui-field-caption::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ca58b;
  content: "";
  box-shadow: 0 0 0 4px rgba(76,165,139,.11);
}

#app .ui-control,
.interaction-dialog .ui-control {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border: 1.5px solid var(--field-line);
  border-radius: 14px;
  padding: 12px 15px;
  background-color: var(--field-surface);
  color: var(--field-ink);
  font: inherit;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.45;
  outline: none;
  box-shadow: var(--field-shadow);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, transform .18s ease;
}
#app .ui-control:hover,
.interaction-dialog .ui-control:hover { border-color: var(--field-line-hover); }
#app .ui-control:focus,
.interaction-dialog .ui-control:focus {
  border-color: var(--field-accent);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(47,139,115,.14), 0 10px 24px rgba(29,69,85,.08);
}
#app .ui-control::placeholder,
.interaction-dialog .ui-control::placeholder { color: #91a2aa; font-weight: 500; }
#app .ui-control:disabled,
.interaction-dialog .ui-control:disabled {
  border-color: #d8e3e7;
  background: #eef3f5;
  color: #7c9099;
  box-shadow: none;
  cursor: not-allowed;
}
#app textarea.ui-control,
.interaction-dialog textarea.ui-control { min-height: 118px; resize: vertical; line-height: 1.7; }
#app select.ui-control,
.interaction-dialog select.ui-control {
  appearance: none;
  padding-right: 46px;
  background-image: linear-gradient(45deg, transparent 50%, #587987 50%), linear-gradient(135deg, #587987 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
#app input[type="date"].ui-control,
#app input[type="time"].ui-control,
.interaction-dialog input[type="date"].ui-control,
.interaction-dialog input[type="time"].ui-control { color-scheme: light; cursor: pointer; }
#app input[type="number"].ui-control { font-variant-numeric: tabular-nums; }
#app input[type="search"].ui-control { border-radius: 999px; padding-inline: 18px; }
#app input[type="file"].ui-control,
.interaction-dialog input[type="file"].ui-control { padding: 6px; color: var(--field-muted); }
#app input[type="file"].ui-control::file-selector-button,
.interaction-dialog input[type="file"].ui-control::file-selector-button {
  min-height: 40px;
  margin-right: 12px;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--field-accent-soft);
  color: #246c59;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.ui-field.is-invalid .ui-control,
.ui-field-group.is-invalid .ui-control {
  border-color: var(--field-danger) !important;
  background-color: #fffafa !important;
  box-shadow: 0 0 0 4px rgba(184,72,67,.11) !important;
}
.ui-field.is-invalid::after,
.ui-field-group.is-invalid::after {
  content: attr(data-ui-error);
  color: var(--field-danger);
  font-size: .68rem;
  font-weight: 800;
}

.ui-choice { color: #355c6a; font-size: .76rem; font-weight: 750; cursor: pointer; }
.ui-choice-control {
  appearance: none;
  position: relative;
  display: inline-grid;
  width: 24px !important;
  min-width: 24px;
  height: 24px !important;
  min-height: 24px;
  flex: 0 0 24px;
  margin: 0;
  place-items: center;
  border: 2px solid #9bb5bf;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(27,68,84,.08);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ui-choice-control:hover { border-color: var(--field-accent); }
.ui-choice-control:focus-visible { outline: 3px solid rgba(47,139,115,.22); outline-offset: 3px; }
.ui-choice-control[type="checkbox"]::after {
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  content: "";
  transform: translateY(-1px) rotate(45deg) scale(0);
  transition: transform .16s ease;
}
.ui-choice-control[type="checkbox"]:checked {
  border-color: var(--field-accent);
  background: var(--field-accent);
  box-shadow: 0 0 0 4px rgba(47,139,115,.12);
}
.ui-choice-control[type="checkbox"]:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.ui-choice-control[type="radio"] { border-radius: 50%; }
.ui-choice-control[type="radio"]:checked {
  border-color: var(--field-accent);
  background: var(--field-accent);
  box-shadow: inset 0 0 0 5px #fff, 0 0 0 4px rgba(47,139,115,.12);
}
.ui-choice:has(.ui-choice-control:checked) { color: #286e5b; }
.assignment-option-grid .ui-choice,
.delivery-settings-grid .ui-choice,
.form-toggle-grid .ui-choice,
.recipient-mode-grid .ui-choice,
.fill-role-grid .ui-choice,
.mp-module-checks .ui-choice {
  border: 1px solid #d4e2e6;
  background: #f8fbfc;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.assignment-option-grid .ui-choice:hover,
.delivery-settings-grid .ui-choice:hover,
.form-toggle-grid .ui-choice:hover,
.recipient-mode-grid .ui-choice:hover,
.fill-role-grid .ui-choice:hover { border-color: #8ab6aa; transform: translateY(-1px); }
.assignment-option-grid .ui-choice:has(input:checked),
.delivery-settings-grid .ui-choice:has(input:checked),
.form-toggle-grid .ui-choice:has(input:checked),
.recipient-mode-grid .ui-choice:has(input:checked),
.fill-role-grid .ui-choice:has(input:checked),
.mp-module-checks .ui-choice:has(input:checked) {
  border-color: #71aa99;
  background: #eaf6f2;
  box-shadow: 0 7px 16px rgba(47,139,115,.09);
}

.ui-range {
  appearance: none;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #54a990 0 55%, #dce7ea 55% 100%);
  outline: none;
}
.ui-range::-webkit-slider-thumb {
  appearance: none;
  width: 25px;
  height: 25px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--field-accent);
  box-shadow: 0 2px 10px rgba(30,77,91,.25);
  cursor: grab;
}

.ui-fieldset {
  min-width: 0;
  border: 1px solid #d3e2e6 !important;
  border-radius: 18px !important;
  padding: 20px !important;
  background: linear-gradient(145deg, #fff, #f8fbfc) !important;
  box-shadow: 0 8px 22px rgba(29,69,85,.055);
}
.ui-fieldset > legend {
  border: 1px solid #d3e4e1;
  border-radius: 999px;
  padding: 6px 12px !important;
  background: #eef7f4;
  color: #2d6e5c !important;
  font-size: .75rem;
  font-weight: 900 !important;
  letter-spacing: .02em;
}

.panel.has-ui-fields,
.assignment-section.has-ui-fields,
.form-settings-card.has-ui-fields,
.question-settings-panel.has-ui-fields {
  border-color: #d1e1e5;
  background: linear-gradient(155deg, #fff 65%, #f6fafb);
}
.panel.has-ui-fields { box-shadow: 0 14px 34px rgba(25,64,79,.075); }
.task-form-grid,
.ot-goal-form,
.form-settings-grid,
.dispatch-form-grid,
.isp-form-grid,
.interaction-field-grid { gap: 16px !important; }
.interaction-fields {
  gap: 19px;
  background: linear-gradient(145deg, #f9fbfc, #f2f8f7);
}
.interaction-fields.has-ui-fields { padding: 27px; }
.interaction-form > footer { box-shadow: 0 -8px 24px rgba(24,60,76,.055); }

/* Replace cramped builder controls and utility panels with readable working surfaces. */
.form-settings-grid label,
.question-settings-panel label,
.dispatch-form-grid label,
.review-decision label,
.ot-compact-form label,
.doctor-order-form label,
.isp-form-grid label { font-size: .75rem !important; }
.question-toolbox > button {
  min-height: 64px;
  border: 1px solid #d9e6e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(27,67,82,.055);
}
.question-toolbox > button:hover { border-color: #91b9ad; box-shadow: 0 9px 20px rgba(36,105,87,.09); transform: translateY(-1px); }
.question-toolbox strong { font-size: .73rem; }
.question-toolbox small { font-size: .63rem; line-height: 1.45; }
.form-canvas {
  border: 1px solid #d5e3e7;
  padding: 20px;
  background: radial-gradient(circle at top right, rgba(79,169,194,.09), transparent 32%), #edf3f5;
}
.form-settings-card { padding: 20px; box-shadow: 0 8px 22px rgba(27,67,82,.06); }
.builder-question {
  border-color: #d8e5e8;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(26,67,86,.065);
}
.builder-question.selected { border-color: #61a38f; box-shadow: 0 0 0 3px rgba(51,136,115,.11), 0 12px 26px rgba(26,67,86,.08); }
.question-content > span { font-size: .65rem; }
.question-content h3 { font-size: .86rem; }
.choice-preview span,
.text-preview { min-height: 40px; font-size: .66rem; }
.question-actions button { width: 40px; min-width: 40px; height: 40px; border-radius: 10px; }
.analytics-filter-bar,
.motion-filter-tabs,
.task-library-toolbar { border-color: #d4e2e6; background: rgba(255,255,255,.94); box-shadow: 0 7px 18px rgba(27,67,82,.055); }

@media (max-width: 760px) {
  .ui-field { font-size: .82rem !important; }
  #app .ui-control,
  .interaction-dialog .ui-control { min-height: 56px; font-size: .92rem; }
  .ui-choice-control { width: 26px !important; min-width: 26px; height: 26px !important; min-height: 26px; }
  .ui-fieldset { padding: 16px !important; }
  .interaction-fields.has-ui-fields { padding: 20px 18px; }
  .form-canvas { padding: 14px; }
  .builder-question { grid-template-columns: 30px 1fr; }
  .builder-question .drag-handle { display: none; }
  .builder-question .question-actions { grid-column: 1 / -1; }
}

/* Brunnstrom Recovery Stage clinical assessment */
.brs-page { display: grid; gap: 18px; }
.brs-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 30px; border: 1px solid #cadfe6; border-radius: 26px; background: linear-gradient(135deg, #fbfdff 0%, #edf7fb 52%, #edf9f4 100%); box-shadow: var(--shadow-sm); }
.brs-page-head h1 { margin: 7px 0 9px; color: var(--navy-900); font-size: clamp(2rem, 3.3vw, 2.7rem); line-height: 1.16; }
.brs-page-head p { max-width: 850px; margin: 0; color: #587180; font-size: 1.05rem; line-height: 1.72; }
.brs-page-head > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.brs-safety-banner { display: flex; align-items: flex-start; gap: 14px; padding: 17px 20px; border: 1px solid #efd49a; border-radius: 17px; background: linear-gradient(135deg, #fffaf0, #fffdf9); color: #81561c; }
.brs-safety-banner > .icon { flex: 0 0 auto; width: 23px; height: 23px; margin-top: 2px; }
.brs-safety-banner strong { display: block; margin-bottom: 3px; color: #754814; font-size: 1.04rem; }
.brs-safety-banner p { margin: 0; font-size: .94rem; line-height: 1.65; }
.brs-patient-context { display: grid; grid-template-columns: 1.05fr 1.6fr .8fr 1fr 1fr; gap: 12px; padding: 17px; border: 1px solid #d8e6ea; border-radius: 19px; background: #fff; box-shadow: 0 8px 22px rgba(26, 72, 92, .05); }
.brs-patient-context label { display: grid; gap: 7px; min-width: 0; color: #617887; font-size: .8rem; font-weight: 850; }
.brs-patient-context input, .brs-patient-context select { width: 100%; min-height: 50px; padding: 0 13px; border: 1px solid #ccdce1; border-radius: 12px; outline: none; background: #fafdfe; color: #1f4356; font: 750 .93rem var(--font-sans); transition: border .2s ease, box-shadow .2s ease, background .2s ease; }
.brs-patient-context input:focus, .brs-patient-context select:focus { border-color: #3b947e; background: #fff; box-shadow: 0 0 0 4px rgba(59, 148, 126, .13); }
.brs-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.brs-type-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 132px; padding: 18px; border: 1px solid #d6e5e9; border-radius: 20px; background: #fff; color: #244b5e; text-align: left; box-shadow: 0 9px 22px rgba(27, 73, 94, .05); cursor: pointer; transition: transform .2s ease, border .2s ease, box-shadow .2s ease; }
.brs-type-card:hover { transform: translateY(-2px); border-color: #8bcbb8; box-shadow: 0 14px 30px rgba(31, 101, 91, .11); }
.brs-type-card.active { border-color: #55a990; background: linear-gradient(135deg, #f7fcfa, #eef8fb); box-shadow: 0 0 0 3px rgba(65, 154, 129, .11), 0 14px 30px rgba(31, 101, 91, .1); }
.brs-type-card .icon-box { width: 48px; height: 48px; border-radius: 14px; background: #e8f5f1; color: #2f826d; }
.brs-type-card > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.brs-type-card small { color: #3a8b78; font: 850 .75rem var(--font-display); letter-spacing: .08em; }
.brs-type-card strong { font-size: 1.12rem; }
.brs-type-card em { color: #647c88; font-size: .8rem; font-style: normal; line-height: 1.45; }
.brs-type-card b { align-self: start; padding: 6px 9px; border-radius: 999px; background: #eaf2f8; color: #336b8c; font-size: .76rem; white-space: nowrap; }
.brs-dynamic { overflow: hidden; border: 1px solid #d5e4e8; border-radius: 24px; background: #fff; box-shadow: 0 13px 36px rgba(23, 68, 91, .07); }
.brs-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; }
.brs-workspace-head h2 { margin: 6px 0; color: var(--navy-900); font-size: 1.58rem; }
.brs-workspace-head p { max-width: 780px; margin: 0; color: #637987; line-height: 1.6; }
.brs-stage-selector { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 0 26px 22px; }
.brs-stage-selector button { display: grid; align-content: start; gap: 5px; min-height: 90px; padding: 13px; border: 1px solid #d8e5e8; border-radius: 14px; background: #f9fcfd; color: #647b87; text-align: left; cursor: pointer; }
.brs-stage-selector button span { color: #214f64; font: 900 1.2rem var(--font-display); }
.brs-stage-selector button small { line-height: 1.35; }
.brs-stage-selector button:hover, .brs-stage-selector button.active { border-color: #4f9f89; background: #eaf7f2; color: #276b5a; box-shadow: inset 0 0 0 1px #4f9f89; }
.brs-assessment-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .7fr); border-top: 1px solid #e0eaed; }
.brs-observation-panel { padding: 24px 26px 27px; }
.brs-observation-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.brs-observation-panel h3, .brs-decision-panel h3, .brs-live-metrics h3 { margin: 0 0 4px; color: #1f4a5e; font-size: 1.2rem; }
.brs-observation-panel header p { margin: 0; color: #6c818b; font-size: .88rem; }
.brs-observation-panel header > span { padding: 6px 9px; border-radius: 999px; background: #edf6f8; color: #3c7386; font-size: .77rem; font-weight: 850; white-space: nowrap; }
.brs-observation-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(350px, auto); align-items: center; gap: 16px; padding: 15px 0; border-top: 1px solid #e7eef0; }
.brs-observation-row > div:first-child { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; }
.brs-observation-row > div:first-child span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #e8f5f1; color: #2e816b; font-weight: 900; }
.brs-observation-row strong { color: #345565; font-size: .92rem; line-height: 1.5; }
.brs-response-group { display: flex; gap: 6px; }
.brs-response-group button { min-height: 40px; padding: 0 11px; border: 1px solid #d6e2e5; border-radius: 10px; background: #fff; color: #647a85; font: 800 .77rem var(--font-sans); cursor: pointer; }
.brs-response-group button:hover { border-color: #79ad9e; }
.brs-response-group button.active.complete { border-color: #43947c; background: #e7f5ef; color: #25705c; }
.brs-response-group button.active.partial { border-color: #d19b50; background: #fff2de; color: #905b19; }
.brs-response-group button.active.unable { border-color: #cb7772; background: #fdebea; color: #9d4545; }
.brs-response-group button.active.untested { border-color: #879aa3; background: #edf1f3; color: #50656e; }
.brs-note-field { display: grid; gap: 7px; margin-top: 17px; color: #4e6c79; font-size: .84rem; font-weight: 850; }
.brs-note-field textarea { width: 100%; min-height: 110px; resize: vertical; padding: 13px 14px; border: 1px solid #d0dfe3; border-radius: 13px; outline: none; background: #fbfdfe; color: #284c5e; font: 500 .93rem/1.6 var(--font-sans); }
.brs-note-field textarea:focus { border-color: #438f7b; box-shadow: 0 0 0 4px rgba(67, 143, 123, .12); }
.brs-decision-panel { padding: 24px; border-left: 1px solid #dce8eb; background: linear-gradient(160deg, #f7fbfc, #f1f8f5); }
.brs-decision-panel > strong { display: block; margin: 12px 0 5px; color: #1f745f; font: 900 1.9rem var(--font-display); }
.brs-decision-panel > p { margin: 0 0 17px; color: #657c87; font-size: .84rem; line-height: 1.55; }
.brs-decision-panel dl { display: grid; gap: 0; margin: 0 0 18px; border: 1px solid #d6e5e8; border-radius: 13px; background: #fff; }
.brs-decision-panel dl div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 0 12px; border-bottom: 1px solid #e5edef; }
.brs-decision-panel dl div:last-child { border-bottom: 0; }
.brs-decision-panel dt { color: #6b818b; font-size: .81rem; }
.brs-decision-panel dd { margin: 0; color: #294f61; font-weight: 900; text-align: right; }
.brs-decision-panel > label { display: grid; gap: 6px; margin: 12px 0; color: #506e7b; font-size: .8rem; font-weight: 850; }
.brs-decision-panel select { width: 100%; min-height: 49px; padding: 0 12px; border: 1px solid #cbdde1; border-radius: 11px; background: #fff; color: #224c5f; font: 750 .9rem var(--font-sans); }
.brs-decision-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
.brs-decision-actions .btn { min-height: 50px; }
.brs-camera-panel { padding: 24px 26px 27px; border-top: 1px solid #dfeaed; background: #f8fbfc; }
.brs-camera-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.brs-camera-panel h2 { margin: 5px 0; color: #183f53; font-size: 1.45rem; }
.brs-camera-panel header p { margin: 0; color: #647c88; line-height: 1.58; }
.brs-camera-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr); gap: 14px; }
.brs-camera-stage { position: relative; min-height: 390px; overflow: hidden; border: 1px solid #31596c; border-radius: 18px; background: radial-gradient(circle at 50% 35%, #22495a, #0e2836 75%); }
.brs-camera-stage video, .brs-camera-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brs-camera-stage canvas { z-index: 2; }
.brs-camera-overlay { position: absolute; z-index: 3; right: 12px; bottom: 12px; left: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.brs-camera-overlay span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(9, 29, 40, .72); color: #dff8f0; font-size: .74rem; font-weight: 800; backdrop-filter: blur(8px); }
.brs-camera-overlay .icon { width: 15px; }
.brs-live-metrics { display: flex; flex-direction: column; padding: 18px; border: 1px solid #d4e3e7; border-radius: 18px; background: #fff; }
.brs-live-metrics [data-brs-metrics] { display: grid; gap: 8px; margin: 10px 0 16px; }
.brs-live-metrics article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 9px; padding: 11px 12px; border: 1px solid #e0e9ec; border-radius: 11px; background: #f9fcfd; }
.brs-live-metrics article span { color: #637b87; font-size: .78rem; font-weight: 800; }
.brs-live-metrics article strong { color: #1f6f5c; font: 900 1.12rem var(--font-display); }
.brs-live-metrics article small { grid-column: 1 / -1; color: #83939b; font-size: .72rem; }
.brs-camera-safety { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 12px; border: 1px solid #efd8aa; border-radius: 12px; background: #fffaf0; cursor: pointer; }
.brs-camera-safety input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #33866f; }
.brs-camera-safety span { display: grid; gap: 2px; }
.brs-camera-safety strong { color: #704c1d; font-size: .85rem; }
.brs-camera-safety small { color: #8a704d; font-size: .74rem; line-height: 1.45; }
.brs-camera-actions { display: grid; gap: 8px; margin-top: 11px; }
.brs-camera-actions .btn { min-height: 50px; }
.brs-history { padding: 22px; }
.brs-stage-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #e7f4ef; color: #26705c; font-weight: 900; white-space: nowrap; }
.brs-empty-history { display: grid; place-items: center; min-height: 150px; padding: 25px; border: 1px dashed #cbdde2; border-radius: 15px; background: #f9fcfd; text-align: center; }
.brs-empty-history span { color: #345b6d; font-size: 1.05rem; font-weight: 900; }
.brs-empty-history p { margin: 5px 0 0; color: #728792; }

@media (max-width: 1180px) {
  .brs-patient-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brs-assessment-layout { grid-template-columns: 1fr; }
  .brs-decision-panel { border-top: 1px solid #dce8eb; border-left: 0; }
  .brs-decision-actions { grid-template-columns: repeat(2, 1fr); }
  .brs-camera-layout { grid-template-columns: 1fr; }
  .brs-camera-stage { min-height: 460px; }
}

@media (max-width: 800px) {
  .brs-page-head { flex-direction: column; padding: 22px; }
  .brs-page-head > div:last-child { justify-content: flex-start; }
  .brs-patient-context { grid-template-columns: 1fr 1fr; }
  .brs-patient-context label:nth-child(2) { grid-column: 1 / -1; }
  .brs-type-grid { grid-template-columns: 1fr; }
  .brs-type-card { min-height: 112px; }
  .brs-stage-selector { display: flex; overflow-x: auto; padding-right: 18px; padding-left: 18px; scroll-snap-type: x mandatory; }
  .brs-stage-selector button { flex: 0 0 130px; scroll-snap-align: start; }
  .brs-workspace-head { flex-direction: column; padding: 21px 18px 16px; }
  .brs-observation-panel, .brs-decision-panel, .brs-camera-panel { padding: 19px 18px; }
  .brs-observation-row { grid-template-columns: 1fr; }
  .brs-response-group { display: grid; grid-template-columns: repeat(2, 1fr); }
  .brs-response-group button { min-height: 48px; }
  .brs-camera-panel > header { flex-direction: column; }
  .brs-camera-stage { min-height: 330px; }
}

@media (max-width: 520px) {
  .brs-page-head { padding: 19px 16px; border-radius: 20px; }
  .brs-page-head h1 { font-size: 1.85rem; }
  .brs-page-head p { font-size: .95rem; }
  .brs-safety-banner { padding: 14px; }
  .brs-patient-context { grid-template-columns: 1fr; padding: 13px; }
  .brs-patient-context label:nth-child(2) { grid-column: auto; }
  .brs-patient-context input, .brs-patient-context select { min-height: 54px; font-size: 1rem; }
  .brs-type-card { grid-template-columns: 45px minmax(0, 1fr); padding: 15px; }
  .brs-type-card b { grid-column: 2; justify-self: start; }
  .brs-observation-panel > header { flex-direction: column; }
  .brs-response-group { grid-template-columns: 1fr; }
  .brs-decision-actions { grid-template-columns: 1fr; }
  .brs-camera-stage { min-height: 270px; }
  .brs-camera-overlay { align-items: flex-start; flex-direction: column; }
  .brs-camera-actions .btn { min-height: 56px; font-size: 1rem; }
  .brs-history .panel-header { align-items: stretch; flex-direction: column; }
  .brs-history .button-row { display: grid; grid-template-columns: 1fr; }
  .brs-history .btn { min-height: 52px; }
}

/* Semantic buttons that retain the visual treatment of text links. */
.button-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}
.button-link:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.28);
  outline-offset: 4px;
  border-radius: 6px;
}

/* Keep every operational control comfortably tappable; primary actions remain 52px+. */
#app button:not(.mobile-sidebar-toggle) { min-height: 40px; }
#app .button-link { display: inline-flex; min-height: 44px; align-items: center; }
#app .permission-toggle { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
@media (max-width: 760px) {
  #app button:not(.mobile-sidebar-toggle) { min-height: 44px; }
}

/* 2026 care-experience refresh: role imagery, patient and family workspaces */
:focus-visible { outline:3px solid #1e86b6; outline-offset:3px; }
.role-artwork-section { max-width:1180px; margin:0 auto; padding:0 24px 72px; }
.role-artwork-card,.dashboard-role-banner { position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(360px,.82fr); gap:34px; align-items:center; overflow:hidden; border:1px solid #dbe8eb; border-radius:28px; background:linear-gradient(135deg,#f8fcfd 0%,#eaf5f3 100%); box-shadow:0 20px 50px rgba(28,69,83,.09); }
.role-artwork-card > div,.dashboard-role-banner > div { padding:38px; }
.role-artwork-card h2,.dashboard-role-banner h2 { margin:8px 0 12px; color:#173f52; font-size:clamp(1.65rem,2.6vw,2.45rem); line-height:1.22; }
.role-artwork-card p,.dashboard-role-banner p { margin:0; color:#57717c; font-size:1.05rem; line-height:1.8; }
.role-artwork-card ul,.dashboard-role-banner ul { display:flex; flex-wrap:wrap; gap:9px; margin:20px 0 0; padding:0; list-style:none; }
.role-artwork-card li,.dashboard-role-banner li { display:flex; gap:7px; align-items:center; min-height:38px; padding:7px 11px; border:1px solid #cfe1df; border-radius:999px; background:rgba(255,255,255,.82); color:#315f61; font-weight:800; }
.role-artwork-card li svg,.dashboard-role-banner li svg { width:17px; color:#2d8b73; }
.role-artwork-card figure,.dashboard-role-banner figure { align-self:stretch; min-height:320px; margin:0; }
.role-artwork-card img,.dashboard-role-banner img { width:100%; height:100%; object-fit:cover; }
.dashboard-role-banner { margin-bottom:22px; grid-template-columns:minmax(0,1fr) minmax(300px,.62fr); border-radius:22px; }
.dashboard-role-banner > div { padding:30px; }
.dashboard-role-banner figure { min-height:250px; }

.patient-home-v2,.family-home-v2 { display:grid; gap:20px; color:#173f52; }
.patient-home-v2 button,.patient-home-v2 a,.family-home-v2 button,.family-home-v2 a { min-height:48px; }
.patient-welcome-v2,.family-welcome-v2 { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr); overflow:hidden; border:1px solid #d8e8e9; border-radius:26px; background:linear-gradient(135deg,#f9fdfd 15%,#e9f5f1); box-shadow:0 18px 46px rgba(32,75,88,.09); }
.patient-welcome-v2 > div,.family-welcome-v2 > div { padding:38px; }
.patient-welcome-v2 h1,.family-welcome-v2 h1 { margin:7px 0 12px; font-size:clamp(2rem,3.2vw,3.1rem); line-height:1.14; color:#123e53; }
.patient-welcome-v2 > div > p,.family-welcome-v2 > div > p { margin:0 0 22px; max-width:670px; color:#526f7a; font-size:1.1rem; line-height:1.75; }
.patient-welcome-v2 figure,.family-welcome-v2 figure { position:relative; min-height:410px; margin:0; background:#dbece9; }
.patient-welcome-v2 figure img,.family-welcome-v2 figure img { width:100%; height:100%; object-fit:cover; }
.patient-welcome-v2 figcaption,.family-welcome-v2 figcaption { position:absolute; right:18px; bottom:18px; left:18px; display:grid; gap:3px; padding:14px 16px; border:1px solid rgba(255,255,255,.55); border-radius:15px; background:rgba(15,50,63,.88); color:#fff; backdrop-filter:blur(9px); }
.patient-welcome-v2 figcaption span { display:flex; gap:7px; align-items:center; color:#bfebe0; font-size:.86rem; font-weight:800; }
.patient-next-task { display:grid; grid-template-columns:1fr auto; gap:18px; align-items:center; margin:22px 0 14px; padding:18px; border:1px solid #cfe2de; border-radius:18px; background:rgba(255,255,255,.9); box-shadow:0 9px 24px rgba(43,89,96,.07); }
.patient-next-task span,.patient-next-task small { display:block; color:#64808a; }
.patient-next-task strong { display:block; margin:5px 0; font-size:1.26rem; }
.patient-next-task small { display:flex; gap:8px; align-items:center; }
.care-source-badge { display:inline-flex; align-items:center; min-height:27px; padding:3px 8px; border-radius:999px; background:#e5f1f4; color:#27637b; font-size:.75rem; font-weight:900; vertical-align:middle; }
.care-source-badge.ot { background:#e4f3ec; color:#267058; }.care-source-badge.pt { background:#e4eef8; color:#2a658d; }.care-source-badge.doctor { background:#e8eaf6; color:#475494; }.care-source-badge.institution { background:#f1ebdf; color:#79602a; }

.patient-function-block,.family-function-block { content-visibility:auto; contain-intrinsic-size:300px; padding:24px; border:1px solid #dce9eb; border-radius:22px; background:#fff; box-shadow:0 10px 28px rgba(32,71,83,.06); }
.patient-function-block > header,.family-function-block > header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.patient-function-block > header > div,.family-function-block > header > div { display:flex; gap:13px; align-items:flex-start; }
.patient-function-block h2,.family-function-block h2 { margin:1px 0 5px; font-size:1.4rem; color:#173f52; }
.patient-function-block header p,.family-function-block header p { margin:0; color:#6a818a; font-size:.98rem; }
.section-number { display:grid; place-items:center; flex:0 0 43px; width:43px; height:43px; border-radius:13px; background:#e4f2ee; color:#25745d; font-family:"Plus Jakarta Sans",sans-serif; font-weight:900; }
.readiness-choice-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.readiness-choice-grid button { display:grid; grid-template-columns:auto 1fr auto; gap:11px; align-items:center; padding:15px; border:1px solid #dce8ea; border-radius:16px; background:#f9fbfc; color:#254f5e; text-align:left; transition:.2s ease; }
.readiness-choice-grid button:hover { border-color:#82b7aa; background:#f0f8f5; transform:translateY(-2px); }
.readiness-choice-grid button.is-alert { border-color:#e3a59f; background:#fff1ef; }
.readiness-choice-grid small,.readiness-choice-grid strong,.readiness-choice-grid em { display:block; }
.readiness-choice-grid small { color:#6b828b; }.readiness-choice-grid strong { margin:3px 0; font-size:1.14rem; }.readiness-choice-grid em { color:#6a8088; font-size:.79rem; font-style:normal; line-height:1.35; }
.care-plan-timeline { display:grid; gap:9px; }
.care-plan-timeline article { display:grid; grid-template-columns:68px 34px minmax(0,1fr) auto auto; gap:12px; align-items:center; min-height:74px; padding:12px 14px; border:1px solid #e1ebed; border-radius:15px; background:#fbfcfd; }
.care-plan-timeline article.next { border-color:#78ad9f; background:#f0f8f5; box-shadow:0 0 0 2px rgba(58,145,119,.09); }
.care-plan-timeline article.done { opacity:.76; }
.care-plan-timeline article > i { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:#dfecee; color:#3e6976; font-style:normal; font-weight:900; }
.care-plan-timeline article.next > i { background:#287d65; color:#fff; }.care-plan-timeline article.done > i { background:#dcefe8; color:#287b63; }
.care-plan-timeline time { color:#466875; font-weight:900; }.care-plan-timeline p { margin:5px 0 0; color:#667e87; }.care-plan-timeline button,.care-plan-block footer button { border:0; border-radius:10px; background:#e6f2ee; color:#286d5a; font-weight:900; padding:8px 13px; }
.care-plan-block footer,.shared-care-preview footer,.family-contact-block footer { display:flex; align-items:center; justify-content:space-between; gap:13px; margin-top:15px; padding-top:15px; border-top:1px solid #e1eaec; color:#58737e; }
.patient-module-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:13px; }
.patient-module-grid a { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:16px; border:1px solid #dce8ea; border-radius:16px; background:#fbfcfd; color:#244f5e; text-decoration:none; }
.patient-module-grid a:hover { border-color:#7fb6aa; background:#f1f8f6; }.patient-module-grid strong,.patient-module-grid small { display:block; }.patient-module-grid small { margin-top:4px; color:#71868e; line-height:1.4; }
.patient-dual-blocks,.family-secondary-grid,.family-primary-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.patient-forms-block article,.family-docs-block article { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:13px 0; border-bottom:1px solid #e4ecee; }
.patient-forms-block article:last-child,.family-docs-block article:last-child { border-bottom:0; }.patient-forms-block article small,.family-docs-block article small { display:block; margin-top:4px; color:#6d838c; }
.appointment-block .next-appointment,.family-calendar-block .next-appointment { display:grid; grid-template-columns:70px 1fr; gap:14px; align-items:center; padding:16px; border-radius:16px; background:#f1f7f8; }
.next-appointment time { display:grid; place-items:center; min-height:68px; border-radius:13px; background:#fff; color:#275f73; }.next-appointment time strong,.next-appointment time span { display:block; }.next-appointment time strong { font-size:1.65rem; }
.patient-progress-bars { display:grid; gap:12px; }.patient-progress-bars article { display:grid; grid-template-columns:140px 1fr auto; gap:13px; align-items:center; }.patient-progress-bars i,.home-room-checks i { display:block; overflow:hidden; height:9px; border-radius:99px; background:#e3ecee; }.patient-progress-bars b,.home-room-checks b { display:block; height:100%; border-radius:inherit; background:#3b977d; }
.care-team-people,.patient-health-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }.care-team-people article { display:grid; grid-template-columns:auto 1fr; gap:11px; align-items:center; padding:14px; border:1px solid #e0eaec; border-radius:15px; }.care-team-people small { display:block; color:#6d838b; }.care-team-people button { grid-column:1/-1; border:0; border-radius:10px; background:#edf5f3; color:#2b6d5c; font-weight:900; }
.patient-health-grid a,.patient-health-grid button { display:grid; grid-template-columns:auto 1fr; gap:12px; align-items:center; padding:17px; border:1px solid #dce8ea; border-radius:16px; background:#fafcfc; color:#284f5e; text-align:left; text-decoration:none; }.patient-health-grid small { grid-column:2; color:#6e838c; }

.family-person-switcher { display:flex; flex-wrap:wrap; gap:9px; margin-top:20px; }.family-person-switcher > button,.family-person-switcher > a { position:relative; display:flex; align-items:center; gap:10px; min-height:62px; padding:8px 12px; border:1px solid #d6e5e7; border-radius:15px; background:#fff; color:#315a68; text-decoration:none; text-align:left; }.family-person-switcher button.active { border-color:#3d947b; background:#edf8f4; box-shadow:0 0 0 2px rgba(61,148,123,.13); }.family-person-switcher small { display:block; color:#6f858d; }.family-person-switcher i { display:grid; place-items:center; position:absolute; top:-6px; right:-6px; width:23px; height:23px; border-radius:50%; background:#c84a40; color:#fff; font-style:normal; font-weight:900; }
.family-status-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:11px; }.family-status-grid article { display:flex; gap:11px; align-items:center; padding:14px; border-radius:15px; background:#f5f9fa; }.family-status-grid span,.family-status-grid strong,.family-status-grid small { display:block; }.family-status-grid strong { margin:3px 0; font-size:1.2rem; }.family-care-summary { display:flex; gap:12px; align-items:center; margin-top:14px; padding:14px 16px; border-radius:14px; background:#edf7f4; }.family-care-summary p { flex:1; margin:0; line-height:1.6; }.family-care-summary button { border:0; background:transparent; color:#26705c; font-weight:900; }
.family-today-care > article { display:grid; grid-template-columns:70px minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:13px 0; border-bottom:1px solid #e2ebed; }.family-today-care time { color:#416776; font-weight:900; }.family-today-care p { margin:5px 0 0; color:#647d87; }.family-today-care article button,.shared-care-board article button { border:0; border-radius:9px; background:#e9f3f0; color:#2f725f; font-weight:900; }
.family-alert-card { border-color:#edc2bd; background:linear-gradient(145deg,#fff 40%,#fff4f2); }.family-alert-focus { display:flex; gap:13px; align-items:center; padding:15px; border-radius:15px; background:#fff; }.family-alert-focus small,.family-alert-focus strong { display:block; }.family-alert-focus strong { margin:4px 0; font-size:1.18rem; }.family-alert-focus p { margin:0; color:#657c85; }.family-alert-card ol { padding-left:24px; color:#5b737d; line-height:1.7; }
.block-footer-link { display:flex; align-items:center; justify-content:space-between; margin-top:15px; padding-top:13px; border-top:1px solid #efd8d5; color:#a54840; font-weight:900; text-decoration:none; }
.shared-care-board { display:grid; gap:8px; }.shared-care-board article { display:grid; grid-template-columns:auto 1fr auto auto; gap:11px; align-items:center; padding:12px; border:1px solid #e1eaec; border-radius:14px; }.shared-care-board small { display:block; color:#6b828b; }.action-complete { opacity:.72; background:#f4faf7!important; }
.progress-highlight { display:flex; gap:18px; align-items:center; }.therapist-family-note { display:flex; gap:11px; margin-top:15px; padding:13px; border-radius:14px; background:#f1f6f8; }.therapist-family-note p { margin:0; line-height:1.55; }
.home-safety-preview > button { display:grid; grid-template-columns:auto 1fr auto auto; gap:11px; align-items:center; width:100%; padding:11px 0; border:0; border-bottom:1px solid #e2eaec; background:transparent; color:#315866; text-align:left; }.home-safety-preview small { color:#4c7c6d; }.home-safety-preview small.warning { color:#b56f1a; }
.family-contact-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; }.family-contact-grid > button { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:center; padding:14px; border:1px solid #dfe9eb; border-radius:15px; background:#fafcfc; color:#315866; text-align:left; }.family-contact-grid small { display:block; margin-top:4px; color:#6a8089; line-height:1.45; }.family-contact-grid em { grid-column:2; justify-self:start; }

/* New focused workspaces reached from every role menu */
.patient-forms-workspace,.patient-health-workspace,.patient-appointments-workspace,.patient-help-workspace,.family-tasks-workspace,.family-shared-care-workspace,.family-safety-workspace,.family-appointments-workspace,.family-documents-workspace,.role-workflow-workspace { min-height:560px; }
.form-response-list,.patient-health-cards,.patient-help-grid,.workflow-kpi-grid,.role-workflow-grid,.care-circle-members,.document-list,.schedule-list,.referral-board,.secure-inbox-list,.equipment-grid,.inventory-grid,.backup-grid { display:grid; gap:12px; }
.form-response-list article,.document-list article,.schedule-list article,.secure-inbox-list article { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:15px; border:1px solid #dfe9eb; border-radius:15px; background:#fff; }
.patient-health-cards,.patient-help-grid,.workflow-kpi-grid { grid-template-columns:repeat(3,1fr); }.patient-health-cards article,.patient-help-grid article,.workflow-kpi-grid article,.role-workflow-grid article,.equipment-grid article,.inventory-grid article,.backup-grid article { padding:17px; border:1px solid #dfe9eb; border-radius:16px; background:#fff; }.patient-health-cards strong,.patient-help-grid strong,.workflow-kpi-grid strong { display:block; margin:7px 0; }.patient-health-cards p,.patient-help-grid p { margin:0; color:#687f88; line-height:1.6; }
.patient-appointment-layout,.family-calendar-layout,.role-workflow-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:17px; }.appointment-timeline,.role-workflow-main { display:grid; gap:10px; }.appointment-timeline article,.role-workflow-main article { display:grid; grid-template-columns:90px 1fr auto; gap:12px; align-items:center; padding:15px; border:1px solid #dfe9eb; border-radius:15px; background:#fff; }
.family-task-columns,.care-circle-board,.referral-board { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.family-task-columns > section,.care-circle-board > section,.referral-board > section { padding:15px; border:1px solid #dfe9eb; border-radius:16px; background:#f7fafb; }.family-task-columns article,.care-circle-board article { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; margin-top:10px; padding:13px; border-radius:13px; background:#fff; }.care-circle-members { grid-template-columns:repeat(3,1fr); }.care-circle-members article { display:grid; grid-template-columns:auto 1fr auto; gap:11px; align-items:center; padding:14px; border:1px solid #dfe9eb; border-radius:15px; }.care-circle-board { grid-template-columns:1.2fr 1fr; margin-top:16px; }.care-circle-board article { grid-template-columns:auto minmax(0,1fr) auto auto; }
.home-safety-overview { display:flex; gap:18px; align-items:center; margin-bottom:16px; padding:17px; border-radius:16px; background:#edf6f4; }.home-room-checks { display:grid; grid-template-columns:1fr 1fr; gap:11px; }.home-room-checks button { display:grid; grid-template-columns:auto minmax(0,1fr) 100px auto; gap:12px; align-items:center; padding:14px; border:1px solid #dfe9eb; border-radius:15px; background:#fff; color:#315866; text-align:left; }.home-room-checks aside,.family-safety-workspace aside { margin-top:16px; padding:15px; border-left:5px solid #d69730; border-radius:12px; background:#fff5e5; }
.permission-summary { display:grid; grid-template-columns:auto 1fr auto; gap:13px; align-items:center; margin-bottom:16px; padding:16px; border-radius:16px; background:#edf5f7; }
.role-workflow-grid,.equipment-grid,.inventory-grid,.backup-grid { grid-template-columns:repeat(3,1fr); }.role-workflow-grid article footer,.equipment-grid article footer,.inventory-grid article footer,.backup-grid article footer { display:flex; gap:8px; margin-top:13px; }.role-workflow-side { padding:17px; border:1px solid #dfe9eb; border-radius:16px; background:#f7fafb; }.role-workflow-side article { padding:12px 0; border-bottom:1px solid #dfe9eb; }

@media (max-width:1180px) {
  .patient-module-grid,.care-team-people { grid-template-columns:repeat(2,1fr); }
  .readiness-choice-grid,.family-status-grid { grid-template-columns:repeat(2,1fr); }
  .family-contact-grid { grid-template-columns:1fr; }
  .role-workflow-grid,.equipment-grid,.inventory-grid,.backup-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:900px) {
  .role-artwork-card,.dashboard-role-banner,.patient-welcome-v2,.family-welcome-v2 { grid-template-columns:1fr; }
  .role-artwork-card figure,.dashboard-role-banner figure { min-height:280px; order:-1; }.dashboard-role-banner figure { min-height:220px; }
  .patient-welcome-v2 figure,.family-welcome-v2 figure { min-height:340px; order:-1; }
  .patient-dual-blocks,.family-primary-grid,.family-secondary-grid,.patient-appointment-layout,.family-calendar-layout,.role-workflow-layout { grid-template-columns:1fr; }
  .care-plan-timeline article { grid-template-columns:56px 32px minmax(0,1fr) auto; }.care-plan-timeline article > button { grid-column:3/-1; justify-self:start; }
  .patient-health-grid { grid-template-columns:1fr 1fr; }
  .family-task-columns,.referral-board { grid-template-columns:1fr; }.care-circle-board { grid-template-columns:1fr; }
  .home-room-checks { grid-template-columns:1fr; }
}
@media (max-width:680px) {
  .role-artwork-section { padding:0 14px 46px; }.role-artwork-card,.dashboard-role-banner,.patient-welcome-v2,.family-welcome-v2,.patient-function-block,.family-function-block { border-radius:18px; }
  .role-artwork-card > div,.dashboard-role-banner > div,.patient-welcome-v2 > div,.family-welcome-v2 > div { padding:22px; }
  .patient-welcome-v2 figure,.family-welcome-v2 figure { min-height:270px; }.patient-welcome-v2 figcaption,.family-welcome-v2 figcaption { right:10px; bottom:10px; left:10px; }
  .patient-function-block,.family-function-block { padding:18px; }
  .patient-function-block > header,.family-function-block > header { flex-direction:column; }.patient-function-block > header > a,.family-function-block > header > a { width:100%; text-align:center; }
  .patient-next-task { grid-template-columns:1fr; }.patient-next-task .btn { width:100%; }
  .readiness-choice-grid,.patient-module-grid,.family-status-grid,.patient-health-grid,.care-team-people,.patient-health-cards,.patient-help-grid,.workflow-kpi-grid,.role-workflow-grid,.equipment-grid,.inventory-grid,.backup-grid,.care-circle-members { grid-template-columns:1fr; }
  .care-plan-timeline article { grid-template-columns:50px 30px 1fr; }.care-plan-timeline article > .status-badge { grid-column:3; justify-self:start; }.care-plan-timeline article > button { grid-column:3; width:100%; }
  .care-plan-block footer,.shared-care-preview footer,.family-contact-block footer { align-items:stretch; flex-direction:column; }
  .patient-progress-bars article { grid-template-columns:1fr auto; }.patient-progress-bars i { grid-column:1/-1; grid-row:2; }
  .family-person-switcher { flex-direction:column; }.family-person-switcher > button,.family-person-switcher > a { width:100%; }
  .family-status-grid article { padding:12px; }.family-care-summary { align-items:flex-start; flex-wrap:wrap; }.family-care-summary button { width:100%; text-align:left; }
  .family-today-care > article { grid-template-columns:1fr auto; }.family-today-care time { grid-column:1/-1; }.family-today-care article > div { grid-column:1/-1; }.family-today-care article > button { grid-column:1/-1; width:100%; }
  .shared-care-board article { grid-template-columns:auto 1fr auto; }.shared-care-board article button { grid-column:2/-1; width:100%; }
  .form-response-list article,.document-list article,.schedule-list article,.secure-inbox-list article,.appointment-timeline article,.role-workflow-main article { grid-template-columns:1fr; }.form-response-list article .btn,.document-list article .btn { width:100%; }
  .care-circle-board article { grid-template-columns:auto 1fr; }.care-circle-board article .status-badge,.care-circle-board article button { grid-column:2; }.home-room-checks button { grid-template-columns:auto 1fr auto; }.home-room-checks button i { grid-column:2/-1; width:100%; }
  .permission-summary { grid-template-columns:auto 1fr; }.permission-summary .btn { grid-column:1/-1; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}

/* NOVATERA public showcase */
.showcase-home {
  --showcase-ink: #092532;
  --showcase-teal: #83e3c1;
  --showcase-mint: #ccf6e7;
  --showcase-coral: #ffb88c;
  overflow: hidden;
  background: #fbfcf9;
}

.showcase-home .hero-cinematic {
  min-height: calc(100svh - 82px);
  padding: clamp(76px, 9vw, 132px) 0 clamp(90px, 10vw, 148px);
  background:
    radial-gradient(circle at 76% 18%, rgba(48, 184, 149, .2), transparent 25%),
    radial-gradient(circle at 8% 78%, rgba(69, 133, 166, .2), transparent 28%),
    linear-gradient(135deg, #061a24 0%, #0a2d3a 54%, #092a32 100%);
  isolation: isolate;
}

.showcase-home .hero-cinematic::before {
  inset: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .72;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.hero-aurora {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.aurora-one {
  top: -25%;
  right: -8%;
  width: 48vw;
  height: 48vw;
  border: 1px solid rgba(141, 235, 204, .13);
  box-shadow: inset 0 0 120px rgba(116, 227, 191, .07), 0 0 120px rgba(44, 165, 144, .04);
}

.aurora-two {
  bottom: -38%;
  left: -16%;
  width: 52vw;
  height: 52vw;
  background: rgba(42, 107, 133, .12);
}

.showcase-home .hero-grid {
  min-height: 590px;
  grid-template-columns: minmax(0, .9fr) minmax(500px, 1.1fr);
  gap: clamp(42px, 7vw, 100px);
}

.showcase-home .hero-copy { position: relative; z-index: 2; }

.showcase-home .hero-copy .eyebrow {
  border-color: rgba(170, 235, 214, .22);
  background: rgba(168, 235, 215, .08);
  color: #a8ead4;
  letter-spacing: .16em;
}

.showcase-home .hero-copy h1 {
  max-width: 760px;
  margin: 0 0 26px;
  color: #f7fcfa;
  font-size: clamp(3rem, 5.4vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .98;
}

.showcase-home .hero-copy h1 span { color: var(--showcase-teal); }

.showcase-home .hero-copy > p {
  max-width: 620px;
  margin-bottom: 34px;
  color: #bdd0d5;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.9;
}

.showcase-home .hero-copy .btn-primary {
  border-color: var(--showcase-teal);
  background: var(--showcase-teal);
  color: #08252c;
  box-shadow: 0 16px 40px rgba(91, 218, 177, .18);
}

.showcase-home .hero-copy .btn-primary:hover { background: #a0ecd2; }

.showcase-home .hero-copy .btn-secondary {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.055);
  color: #edf8f6;
  backdrop-filter: blur(12px);
}

.showcase-home .hero-copy .trust-row { color: #9ab2b8; }
.showcase-home .hero-copy .trust-dot { background: rgba(131, 227, 193, .12); color: var(--showcase-teal); }

.care-constellation {
  min-height: 570px;
  perspective: 1000px;
}

.care-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(500px, 88%);
  overflow: hidden;
  border: 1px solid rgba(200, 247, 232, .16);
  border-radius: 34px;
  background: linear-gradient(160deg, rgba(19, 64, 76, .93), rgba(8, 37, 47, .88));
  color: #eefbf7;
  box-shadow: 0 42px 90px rgba(0, 9, 16, .44), inset 0 1px rgba(255,255,255,.08);
  transform: translate(-47%, -50%) rotateY(-5deg) rotateX(2deg);
  backdrop-filter: blur(20px);
}

.care-stage::before {
  position: absolute;
  top: -110px;
  right: -90px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(91, 216, 180, .12);
  filter: blur(8px);
  content: "";
}

.care-stage-head,
.care-stage-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  color: #95b6bc;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.care-stage-head { border-bottom: 1px solid rgba(220, 252, 242, .1); }
.care-live { display: inline-flex; align-items: center; gap: 9px; color: #bdf3df; }
.care-live i { width: 7px; height: 7px; border-radius: 50%; background: #75e3bd; box-shadow: 0 0 0 6px rgba(117, 227, 189, .1); animation: care-live 2s ease-in-out infinite; }

.care-stage-body {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 300px;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 16px;
  padding: 30px 28px 20px;
}

.motion-orb {
  position: relative;
  display: grid;
  width: 220px;
  height: 220px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 234, 197, .12), transparent 64%);
}

.motion-orb::before,
.motion-orb::after,
.motion-orb-ring {
  position: absolute;
  border: 1px solid rgba(157, 238, 213, .18);
  border-radius: 50%;
  content: "";
}

.motion-orb::before { inset: 18px; }
.motion-orb::after { inset: 46px; border-style: dashed; animation: slow-spin 18s linear infinite; }
.motion-orb-ring.ring-a { inset: 2px 38px; transform: rotate(38deg); }
.motion-orb-ring.ring-b { inset: 38px 2px; transform: rotate(-38deg); }

.motion-core {
  position: relative;
  z-index: 3;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid rgba(196, 251, 232, .36);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(143, 239, 207, .28), rgba(91, 193, 169, .08));
  color: #bff8e5;
  box-shadow: 0 0 45px rgba(101, 226, 187, .18);
}

.motion-node { position: absolute; width: 9px; height: 9px; border: 2px solid #b7f1dd; border-radius: 50%; background: #174b55; box-shadow: 0 0 0 6px rgba(143, 233, 203, .08); }
.node-a { top: 34px; left: 53px; }
.node-b { top: 76px; right: 21px; }
.node-c { right: 59px; bottom: 26px; }

.care-progress-copy span { color: #9cb9be; font-size: .72rem; font-weight: 700; }
.care-progress-copy strong { display: block; margin: 7px 0 0; font-family: var(--font-display); font-size: clamp(3.2rem, 5vw, 4.75rem); letter-spacing: -.08em; line-height: 1; }
.care-progress-copy strong small { color: var(--showcase-teal); font-size: .38em; }
.care-progress-copy p { margin: 11px 0 0; color: #85d4bb; font-size: .73rem; font-weight: 700; }

.care-wave { display: flex; height: 58px; align-items: center; gap: 7px; padding: 0 28px; }
.care-wave i { width: 100%; height: var(--wave); border-radius: 99px; background: linear-gradient(to top, rgba(95, 212, 180, .22), rgba(145, 237, 208, .8)); transform-origin: bottom; animation: wave-breathe 2.8s ease-in-out infinite alternate; }
.care-wave i:nth-child(3n) { animation-delay: -.8s; }
.care-wave i:nth-child(4n) { animation-delay: -1.4s; }

.care-stage-foot { margin-top: 15px; border-top: 1px solid rgba(220, 252, 242, .1); }
.care-stage-foot span { display: inline-flex; align-items: center; gap: 7px; }
.care-stage-foot .icon { width: 14px; color: var(--showcase-teal); }

.orbit { position: absolute; z-index: 0; border: 1px solid rgba(163, 234, 212, .1); border-radius: 50%; pointer-events: none; }
.orbit-one { inset: 2% 0 4% 5%; animation: slow-spin 34s linear infinite; }
.orbit-two { inset: 18% -10% 18% 15%; border-style: dashed; animation: slow-spin 25s linear infinite reverse; }
.orbit-dot { position: absolute; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: var(--showcase-teal); box-shadow: 0 0 24px rgba(131, 227, 193, .7); }
.dot-one { top: 14%; right: 14%; }
.dot-two { bottom: 13%; left: 19%; width: 6px; height: 6px; }

.floating-insight {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 180px;
  border: 1px solid rgba(220, 252, 242, .2);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(10, 39, 49, .78);
  color: #eefbf7;
  box-shadow: 0 18px 42px rgba(0, 11, 18, .28);
  backdrop-filter: blur(18px);
  animation: insight-float 5s ease-in-out infinite;
}

.floating-insight > span:first-child { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: rgba(131, 227, 193, .12); color: var(--showcase-teal); }
.floating-insight small, .floating-insight strong { display: block; }
.floating-insight small { margin-bottom: 3px; color: #91adb3; font-size: .65rem; }
.floating-insight strong { font-size: .82rem; }
.insight-top { top: 8%; right: -3%; }
.insight-bottom { bottom: 8%; left: -2%; animation-delay: -2s; }
.insight-bottom strong { font-family: var(--font-display); font-size: 1.45rem; }
.insight-meter { width: 64px; height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.insight-meter i { display: block; width: 86%; height: 100%; border-radius: inherit; background: var(--showcase-teal); }
.care-caption { position: absolute; right: 5%; bottom: 0; color: rgba(221, 248, 239, .24); font-family: var(--font-display); font-size: .66rem; font-weight: 800; letter-spacing: .28em; writing-mode: vertical-rl; }

.home-proof-strip {
  position: relative;
  z-index: 4;
  border-top: 1px solid rgba(255,255,255,.07);
  background: #071d27;
  color: #eaf7f3;
}

.home-proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.home-proof-grid > div { display: grid; min-height: 132px; align-content: center; gap: 7px; border-right: 1px solid rgba(255,255,255,.08); padding: 24px 34px; }
.home-proof-grid > div:first-child { border-left: 1px solid rgba(255,255,255,.08); }
.home-proof-grid strong { color: var(--showcase-teal); font-family: var(--font-display); font-size: 1.7rem; letter-spacing: -.04em; }
.home-proof-grid span { color: #9fb7bc; font-size: .78rem; font-weight: 600; }

.home-manifesto { padding-block: clamp(94px, 12vw, 170px); background: #f6f4ed; }
.home-manifesto-grid { display: grid; grid-template-columns: .84fr 1.16fr; align-items: start; gap: clamp(60px, 10vw, 150px); }
.manifesto-copy { position: sticky; top: 130px; }
.manifesto-copy h2 { max-width: 570px; margin: 18px 0 28px; color: var(--showcase-ink); font-size: clamp(2.45rem, 4.2vw, 4.5rem); letter-spacing: -.055em; line-height: 1.08; }
.manifesto-copy p { max-width: 540px; color: #64767a; font-size: 1.03rem; line-height: 1.9; }
.manifesto-path { display: grid; }
.manifesto-path article { display: grid; min-height: 180px; grid-template-columns: 68px 1fr; gap: 24px; border-top: 1px solid #cfd8d5; padding: 30px 0; }
.manifesto-path article:last-child { border-bottom: 1px solid #cfd8d5; }
.manifesto-path article > span { color: #4b9a82; font-family: var(--font-display); font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.manifesto-path small { color: #879590; font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.manifesto-path h3 { margin: 11px 0 9px; color: var(--showcase-ink); font-size: clamp(1.4rem, 2.2vw, 2rem); }
.manifesto-path p { margin: 0; color: #6c7a7c; }

.home-problem-section { background: #fff; }
.showcase-home .section-heading { margin-bottom: 58px; }
.showcase-home .section-heading h2 { color: var(--showcase-ink); font-size: clamp(2.2rem, 3.7vw, 3.65rem); letter-spacing: -.045em; }
.showcase-home .pain-card { min-height: 310px; border-color: #dde6e2; border-radius: 28px; padding: 36px; box-shadow: none; }
.showcase-home .pain-card:nth-child(2) { background: #0c303b; color: #fff; transform: translateY(28px); }
.showcase-home .pain-card:nth-child(2) h3 { color: #fff; }
.showcase-home .pain-card:nth-child(2) p { color: #adc2c6; }
.showcase-home .pain-card:nth-child(2) .pain-number { color: var(--showcase-teal); }

.home-feature-section { background: #edf5f0; }
.showcase-home .feature-card { min-height: 245px; border: 0; border-radius: 26px; padding: 32px; box-shadow: 0 14px 40px rgba(26, 68, 56, .055); }
.showcase-home .feature-card:hover { box-shadow: 0 24px 55px rgba(26, 68, 56, .11); }
.showcase-home .role-card { border-radius: 28px; box-shadow: none; }

.home-workflow { background: #092b34; }
.home-workflow .section-heading h2 { color: #f4fbf8; }
.home-workflow .section-heading p { color: #a8bec1; }
.home-workflow .section-heading .eyebrow { color: var(--showcase-teal); }
.home-workflow .data-flow-card { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #eff9f6; }
.home-workflow .data-flow-card h3 { color: #eff9f6; }
.home-workflow .flow-index { color: #8fe2c6; }

.showcase-home .final-cta { border-radius: 42px; padding-block: 90px; background: linear-gradient(135deg, #082832, #0f4a4b 62%, #216d5a); }
.showcase-home .final-cta .eyebrow { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #b9efdc; }
.showcase-home .final-cta .btn-ghost { border: 1px solid rgba(255,255,255,.28); color: #fff; }
.showcase-home .final-cta .btn-ghost:hover { background: rgba(255,255,255,.08); }

@keyframes care-live { 50% { box-shadow: 0 0 0 9px rgba(117, 227, 189, 0); } }
@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes wave-breathe { to { transform: scaleY(.54); opacity: .5; } }
@keyframes insight-float { 50% { transform: translateY(-9px); } }

@media (max-width: 1080px) {
  .showcase-home .hero-grid { grid-template-columns: 1fr; }
  .showcase-home .hero-copy { max-width: 760px; text-align: left; }
  .showcase-home .hero-copy .eyebrow, .showcase-home .hero-copy > p { margin-inline: 0; }
  .showcase-home .hero-copy .button-row { justify-content: flex-start; }
  .care-constellation { width: min(720px, 100%); min-height: 600px; margin-inline: auto; }
  .home-manifesto-grid { grid-template-columns: 1fr; gap: 54px; }
  .manifesto-copy { position: static; }
}

@media (max-width: 760px) {
  .showcase-home .hero-cinematic { padding-top: 64px; }
  .showcase-home .hero-copy h1 { font-size: clamp(2.75rem, 13vw, 4.2rem); }
  .showcase-home .hero-copy .button-row { display: grid; }
  .showcase-home .hero-copy .btn { width: 100%; }
  .care-constellation { min-height: 470px; margin-top: 8px; }
  .care-stage { width: 96%; border-radius: 25px; transform: translate(-50%, -50%); }
  .care-stage-body { min-height: 245px; grid-template-columns: 1fr .76fr; padding: 22px 18px 10px; }
  .motion-orb { width: 165px; height: 165px; }
  .care-progress-copy strong { font-size: 3rem; }
  .care-wave { height: 44px; gap: 5px; padding-inline: 20px; }
  .floating-insight { min-width: 155px; padding: 11px 13px; }
  .insight-top { top: 1%; right: -2%; }
  .insight-bottom { bottom: 2%; left: -2%; }
  .care-caption, .orbit { display: none; }
  .home-proof-grid { grid-template-columns: 1fr 1fr; }
  .home-proof-grid > div { min-height: 110px; border-bottom: 1px solid rgba(255,255,255,.08); padding: 20px; }
  .manifesto-path article { grid-template-columns: 48px 1fr; gap: 14px; }
  .showcase-home .pain-card:nth-child(2) { transform: none; }
  .showcase-home .final-cta { border-radius: 28px; padding: 64px 24px; }
}

/* Clinical task templates and assignment workflow */
.clinical-template-workspace,.clinical-assignment-workspace { --task-line:#d9e6e9; --task-ink:#173f52; --task-muted:#687f89; padding:0; overflow:hidden; background:#f5f9fa; }
.clinical-template-workspace > header,.clinical-assignment-workspace > header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:26px 28px; border-bottom:1px solid var(--task-line); background:linear-gradient(135deg,#fff 30%,#eaf5f2); }
.clinical-template-workspace > header h2,.clinical-assignment-workspace > header h2 { max-width:850px; margin:5px 0 8px; color:var(--task-ink); font-size:1.65rem; line-height:1.3; }
.clinical-template-workspace > header p,.clinical-assignment-workspace > header p { max-width:900px; margin:0; color:var(--task-muted); line-height:1.7; }
.task-library-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) auto auto; gap:12px; align-items:center; padding:15px 20px; border-bottom:1px solid var(--task-line); background:#fff; }
.task-library-toolbar > label { display:flex; gap:9px; align-items:center; min-height:48px; padding:0 13px; border:1px solid #ccdce0; border-radius:12px; }
.task-library-toolbar input { width:100%; min-height:44px; border:0; outline:0; background:transparent; }
.task-library-toolbar > div { display:flex; gap:6px; }
.task-library-toolbar button { min-height:44px; padding:8px 13px; border:1px solid #d5e3e6; border-radius:10px; background:#f8fbfb; color:#456572; font-weight:800; }
.task-library-toolbar button.active { border-color:#79b2a4; background:#e5f3ee; color:#246d59; }
.clinical-template-layout { display:grid; grid-template-columns:310px minmax(0,1fr) 265px; min-height:690px; }
.clinical-template-list { overflow:auto; max-height:760px; padding:14px; border-right:1px solid var(--task-line); background:#f1f6f7; }
.clinical-template-card { display:grid; grid-template-columns:auto 1fr; gap:7px 9px; width:100%; margin-bottom:10px; padding:15px; border:1px solid transparent; border-radius:15px; background:#fff; color:#2c5665; text-align:left; box-shadow:0 5px 16px rgba(39,75,87,.04); }
.clinical-template-card:hover,.clinical-template-card.active { border-color:#75af9f; box-shadow:0 0 0 2px rgba(55,142,116,.09),0 9px 22px rgba(39,75,87,.08); }
.clinical-template-card.active { background:#f4fbf8; }
.clinical-template-card.draft { border-style:dashed; border-color:#77a8bc; }
.clinical-template-card > .status-badge { justify-self:end; }.clinical-template-card > strong,.clinical-template-card > small,.clinical-template-card > p,.clinical-template-card > footer { grid-column:1/-1; }
.clinical-template-card > strong { margin-top:3px; color:#163f51; font-size:1.06rem; }.clinical-template-card > small { color:#6d838c; }.clinical-template-card > p { margin:3px 0; color:#516e79; line-height:1.5; }
.clinical-template-card > footer { display:flex; gap:7px; flex-wrap:wrap; padding-top:8px; border-top:1px solid #e5edef; }.clinical-template-card > footer span { padding:3px 7px; border-radius:7px; background:#edf3f4; color:#5e7680; font-size:.73rem; font-weight:800; }
.task-discipline { display:inline-flex; align-items:center; justify-content:center; min-width:48px; min-height:28px; padding:4px 8px; border-radius:8px; font-size:.76rem; font-weight:900; }.task-discipline.ot { background:#e2f4ed; color:#20705a; }.task-discipline.pt { background:#e3eef8; color:#2b668e; }.task-discipline.shared { background:#eee9f7; color:#66538d; }
.clinical-template-detail { padding:26px; background:#fff; }
.clinical-template-detail > header { display:flex; justify-content:space-between; gap:15px; align-items:center; }.clinical-template-detail > header > div { display:flex; gap:8px; align-items:center; }
.clinical-template-detail h2 { margin:8px 0; color:#173f52; font-size:1.72rem; }.task-template-purpose { margin:0 0 19px; color:#4f6c77; font-size:1.04rem; line-height:1.7; }
.task-template-specs { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.task-template-specs article { padding:14px; border:1px solid #dce8ea; border-radius:13px; background:#f8fbfb; }.task-template-specs span,.task-template-specs strong { display:block; }.task-template-specs span { color:#6d838c; font-size:.78rem; }.task-template-specs strong { margin-top:5px; line-height:1.45; }
.task-safety-definition,.task-recipient-copy { margin-top:15px; padding:16px; border-radius:15px; }.task-safety-definition { border:1px solid #edc8a2; background:#fff8ed; }.task-recipient-copy { border:1px solid #cfe3df; background:#f1f8f6; }.task-safety-definition h3,.task-recipient-copy h3 { margin:0 0 9px; font-size:1rem; }.task-safety-definition p,.task-recipient-copy p { margin:7px 0; color:#536f79; line-height:1.6; }
.clinical-template-detail > footer { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-top:18px; padding-top:17px; border-top:1px solid #dfe9eb; }.clinical-template-detail > footer > div { display:flex; gap:8px; flex-wrap:wrap; }.clinical-template-detail > footer span { color:#5c7680; font-size:.8rem; font-weight:800; }
.template-governance-panel { padding:20px; border-left:1px solid var(--task-line); background:#f7fafb; }.template-governance-panel h3 { margin:0 0 15px; }.template-governance-panel > div { display:grid; grid-template-columns:auto 1fr; gap:9px; align-items:center; padding:10px 0; border-bottom:1px solid #dfe8eb; color:#34735f; }.template-governance-panel p,.template-governance-panel strong,.template-governance-panel small { display:block; margin:0; }.template-governance-panel strong { color:#315866; }.template-governance-panel small { margin-top:3px; color:#72878f; }.template-governance-panel .btn { margin-top:12px; }
.template-version-compare { display:grid; grid-template-columns:1fr 1fr; gap:13px; }.template-version-compare article { padding:16px; border:1px solid #dce7ea; border-radius:14px; background:#f8fbfb; }.template-version-compare strong,.template-version-compare p { display:block; margin-top:9px; }

.assignment-header-status { display:grid; justify-items:end; gap:5px; }.assignment-header-status small { color:#68808a; }
.assignment-stepper { position:sticky; top:0; z-index:8; display:grid; grid-template-columns:repeat(5,1fr); gap:0; padding:0 22px; border-bottom:1px solid var(--task-line); background:rgba(255,255,255,.96); backdrop-filter:blur(8px); }
.assignment-stepper button { position:relative; display:flex; gap:9px; align-items:center; justify-content:center; min-height:66px; border:0; border-bottom:3px solid transparent; background:transparent; color:#637c86; font-weight:800; }.assignment-stepper button::after { content:""; position:absolute; right:-12px; width:24px; height:1px; background:#cfdde0; }.assignment-stepper button:last-child::after { display:none; }.assignment-stepper button.active { border-bottom-color:#2e8a70; color:#1f6d58; }.assignment-stepper span { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#e9f0f2; }.assignment-stepper button.active span { background:#2e8a70; color:#fff; }
.clinical-assignment-workspace form { display:grid; gap:16px; padding:18px; }
.assignment-section { scroll-margin-top:82px; padding:22px; border:1px solid #dbe7ea; border-radius:18px; background:#fff; box-shadow:0 7px 22px rgba(35,74,87,.05); }
.assignment-section > header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:17px; }.assignment-section > header > div { display:flex; gap:12px; align-items:flex-start; }.assignment-section > header > div > span { display:grid; place-items:center; flex:0 0 39px; width:39px; height:39px; border-radius:11px; background:#e4f2ee; color:#23715b; font-weight:900; }.assignment-section h3 { margin:0 0 4px; color:#1b4556; }.assignment-section header p { margin:0; color:#6a818a; }
.recipient-safety-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; }.recipient-safety-card { position:relative; display:grid; grid-template-columns:auto auto minmax(0,1fr); gap:10px; align-items:center; padding:15px; border:1px solid #dce7ea; border-radius:15px; background:#fbfcfd; cursor:pointer; }.recipient-safety-card:has(input:checked) { border-color:#70ab9b; background:#f1f9f6; box-shadow:0 0 0 2px rgba(57,145,118,.1); }.recipient-safety-card.warning:has(input:checked) { border-color:#dc9a3b; background:#fff8ec; }.recipient-safety-card input { width:20px; height:20px; }.recipient-safety-card > span:nth-of-type(2) { display:grid; gap:3px; }.recipient-safety-card small,.recipient-safety-card em,.recipient-safety-card i { color:#667f88; font-size:.78rem; font-style:normal; }.recipient-safety-card em { color:#94621f; }.recipient-safety-card b { grid-column:3; justify-self:start; }
.assignment-conflict-note { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; margin-top:13px; padding:14px 16px; border:1px solid #ebbd8c; border-radius:14px; background:#fff7e9; color:#8f5a17; }.assignment-conflict-note p { margin:4px 0 0; color:#765f43; }.assignment-conflict-note button { min-height:44px; border:0; border-radius:10px; padding:8px 12px; background:#fff; color:#8b5c1b; font-weight:900; }.assignment-conflict-note.resolved { border-color:#9bcaba; background:#eef8f4; color:#2a765f; }
.assignment-template-choices { display:grid; grid-template-columns:repeat(5,1fr); gap:9px; }.assignment-template-choices button { display:grid; grid-template-columns:auto 1fr; gap:9px; align-items:center; min-height:84px; padding:12px; border:1px solid #dce7ea; border-radius:14px; background:#fafcfc; color:#315967; text-align:left; }.assignment-template-choices button.active { border-color:#69a994; background:#eef8f4; box-shadow:0 0 0 2px rgba(51,139,113,.1); }.assignment-template-choices small { display:block; margin-top:4px; color:#71868e; line-height:1.35; }.assignment-template-choices em { grid-column:1/-1; color:#6a818a; font-size:.75rem; font-style:normal; }
.selected-template-summary { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; margin-top:12px; padding:13px 15px; border-radius:14px; background:#edf6f3; }.selected-template-summary p { margin:4px 0 0; color:#5c7680; }.selected-template-summary button { min-height:42px; border:0; background:transparent; color:#27745e; font-weight:900; }
.assignment-dose-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:15px; }.task-prescription-fields { display:grid; gap:13px; }.task-prescription-fields fieldset,.delivery-settings-grid fieldset { min-width:0; padding:15px; border:1px solid #dce7e9; border-radius:14px; }.task-prescription-fields legend,.delivery-settings-grid legend { padding:0 7px; color:#315967; font-weight:900; }.form-grid.four { grid-template-columns:repeat(4,1fr); }.assignment-option-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:12px; }.assignment-option-grid label,.delivery-settings-grid fieldset > label:has(input[type=checkbox]) { display:grid; grid-template-columns:auto 1fr; gap:8px; align-items:center; min-height:48px; padding:10px; border-radius:10px; background:#f3f7f8; color:#365e6c; font-weight:800; }.assignment-option-grid small { grid-column:2; color:#71868e; }
.clinical-safety-editor { align-self:start; position:sticky; top:84px; padding:18px; border:1px solid #e2bd95; border-radius:16px; background:#fff8ee; }.clinical-safety-editor h3 { display:flex; gap:8px; align-items:center; margin-bottom:14px; color:#814f16; }.clinical-safety-editor label { display:grid; gap:6px; margin-bottom:11px; color:#5d6f76; font-weight:800; }.safety-source { margin:13px 0; padding:12px; border-radius:12px; background:#fff; }.safety-source p { margin:7px 0 0; color:#697d84; line-height:1.5; }
.delivery-settings-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; }.delivery-settings-grid fieldset { display:grid; align-content:start; gap:11px; }.delivery-settings-grid fieldset > label:not(:has(input[type=checkbox])) { display:grid; gap:6px; color:#456674; font-weight:800; }
.assignment-review-layout { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(240px,.7fr) minmax(230px,.65fr); gap:13px; }.cross-end-preview,.assignment-validation,.assignment-audit-summary { padding:17px; border:1px solid #dce7e9; border-radius:15px; background:#f9fbfc; }.preview-mode-tabs { display:flex; gap:5px; margin:-5px -5px 15px; }.preview-mode-tabs button { min-height:42px; padding:8px 13px; border:0; border-radius:9px; background:transparent; color:#667e87; font-weight:900; }.preview-mode-tabs button.active { background:#dff0ea; color:#25705b; }.cross-end-preview h3 { margin:7px 0; font-size:1.35rem; }.cross-end-preview > div > p { color:#5c7680; line-height:1.6; }.preview-dose { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin:13px 0; }.preview-dose span { padding:11px; border-radius:11px; background:#fff; color:#6a8089; }.preview-dose strong { display:block; margin-top:4px; color:#274f5f; }.preview-safety { display:flex; gap:10px; margin:12px 0; padding:12px; border-radius:12px; background:#fff3e1; color:#965e14; }.preview-safety p,.preview-safety strong,.preview-safety span { display:block; margin:0; }.preview-safety span { margin-top:3px; color:#745e42; }.family-task-guidance,.staff-task-preview { padding:13px; border-radius:12px; background:#eef7f4; }.family-task-guidance p { margin:5px 0 0; }.staff-task-preview div { display:grid; grid-template-columns:100px 1fr; gap:8px; padding:8px 0; border-bottom:1px solid #d7e5e2; }.staff-task-preview div:last-child { border:0; }.staff-task-preview dt { color:#668089; }.staff-task-preview dd { margin:0; font-weight:800; }
.assignment-validation { display:grid; align-content:start; gap:8px; }.assignment-validation h3,.assignment-audit-summary h3 { margin:0 0 7px; }.assignment-validation > div { display:flex; gap:8px; align-items:center; padding:9px; border-radius:9px; background:#edf6f3; color:#2b725f; font-weight:800; line-height:1.4; }.assignment-validation > div.invalid { background:#fff0ee; color:#aa3f38; }.assignment-validation .btn { margin-top:7px; }
.assignment-audit-summary ul { margin:8px 0 14px; padding-left:20px; color:#55717c; line-height:1.75; }.assignment-audit-summary > span { display:flex; gap:8px; padding:11px; border-radius:10px; background:#edf3f5; color:#526e78; font-size:.8rem; line-height:1.5; }
.assignment-submit-bar { position:sticky; bottom:0; z-index:7; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 18px; border:1px solid #cfe0e2; border-radius:15px; background:rgba(255,255,255,.97); box-shadow:0 -8px 28px rgba(31,68,82,.09); backdrop-filter:blur(8px); }.assignment-submit-bar > div { display:flex; align-items:center; gap:9px; }.assignment-submit-bar span { color:#58727d; font-weight:900; }
.assignment-final-review { padding:15px; border-radius:14px; background:#f3f7f8; }.assignment-final-review > strong { font-size:1.2rem; }.assignment-final-review > p { color:#5d7781; }.assignment-final-review dl { display:grid; grid-template-columns:1fr 1fr; gap:9px; }.assignment-final-review dl div { padding:10px; border-radius:10px; background:#fff; }.assignment-final-review dt { color:#6c828a; }.assignment-final-review dd { margin:4px 0 0; font-weight:800; }

@media (max-width:1250px) {
  .clinical-template-layout { grid-template-columns:280px minmax(0,1fr); }.template-governance-panel { grid-column:1/-1; border-top:1px solid var(--task-line); border-left:0; }.template-governance-panel { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }.template-governance-panel h3 { grid-column:1/-1; }.template-governance-panel .btn { margin:0; }
  .assignment-template-choices { grid-template-columns:repeat(3,1fr); }.assignment-review-layout { grid-template-columns:1.2fr .8fr; }.assignment-audit-summary { grid-column:1/-1; }
}
@media (max-width:960px) {
  .task-library-toolbar { grid-template-columns:1fr; }.task-library-toolbar > div { overflow:auto; padding-bottom:3px; }.clinical-template-layout { grid-template-columns:1fr; }.clinical-template-list { display:flex; gap:10px; overflow-x:auto; max-height:none; border-right:0; border-bottom:1px solid var(--task-line); }.clinical-template-card { flex:0 0 280px; margin:0; }.template-governance-panel { grid-template-columns:1fr 1fr; }
  .assignment-stepper { overflow-x:auto; grid-template-columns:repeat(5,minmax(150px,1fr)); }.recipient-safety-grid { grid-template-columns:1fr; }.assignment-dose-layout { grid-template-columns:1fr; }.clinical-safety-editor { position:static; }.form-grid.four { grid-template-columns:1fr 1fr; }.delivery-settings-grid { grid-template-columns:1fr; }.assignment-review-layout { grid-template-columns:1fr; }.assignment-audit-summary { grid-column:auto; }
}
@media (max-width:620px) {
  .clinical-template-workspace > header,.clinical-assignment-workspace > header { align-items:stretch; flex-direction:column; padding:20px; }.clinical-template-workspace > header .btn { width:100%; }.task-library-toolbar { padding:12px; }.clinical-template-detail { padding:18px; }.clinical-template-detail > header,.clinical-template-detail > footer { align-items:stretch; flex-direction:column; }.task-template-specs,.template-version-compare,.template-governance-panel { grid-template-columns:1fr; }.template-governance-panel h3 { grid-column:auto; }
  .clinical-assignment-workspace form { padding:10px; }.assignment-section { padding:16px; }.assignment-section > header { align-items:stretch; flex-direction:column; }.assignment-conflict-note { grid-template-columns:auto 1fr; }.assignment-conflict-note button { grid-column:1/-1; }.assignment-template-choices { grid-template-columns:1fr; }.form-grid.four,.assignment-option-grid { grid-template-columns:1fr; }.selected-template-summary { grid-template-columns:auto 1fr; }.selected-template-summary button { grid-column:1/-1; width:100%; }.preview-dose,.assignment-final-review dl { grid-template-columns:1fr; }.assignment-submit-bar { position:static; align-items:stretch; flex-direction:column; }.assignment-submit-bar > div { align-items:stretch; flex-direction:column; }.assignment-submit-bar .btn { width:100%; }
}

/* OT / PT integrated therapist workspace */
.therapist-scope-switch { margin:18px 0; overflow:hidden; border:1px solid #cfe0e6; border-radius:20px; background:#fff; box-shadow:0 12px 30px rgba(27,67,85,.07); }
.therapist-scope-tabs { display:flex; gap:7px; padding:8px; border-bottom:1px solid #dce8ec; background:#f4f8fa; }
.therapist-scope-tabs button { min-height:48px; padding:10px 18px; border:0; border-radius:12px; background:transparent; color:#526f7d; font-weight:900; cursor:pointer; }
.therapist-scope-tabs button.active { background:#173f53; color:#fff; box-shadow:0 6px 14px rgba(23,63,83,.18); }
.therapist-scope-switch > article { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:center; min-height:92px; padding:16px 18px; animation:workspace-pop-in .3s ease both; }
.therapist-scope-switch > article strong { color:#173f53; font-size:1rem; }.therapist-scope-switch > article p { margin:4px 0 0; color:#617b86; }
.therapy-owner { display:inline-grid; place-items:center; min-width:38px; min-height:30px; margin-right:6px; padding:4px 8px; border-radius:9px; font-size:.7rem; font-weight:950; letter-spacing:.04em; }
.therapy-owner.shared { background:#173f53; color:#fff; }.therapy-owner.ot { background:#dff3ea; color:#236e59; }.therapy-owner.pt { background:#e0edf7; color:#275f89; }
.table-sub { display:block; margin-top:4px; color:#82949b; }.therapist-shared-patients { border-top:5px solid #3b8e78; }
.therapist-case-filters { display:flex; gap:8px; align-items:center; margin-bottom:16px; padding:10px; border-radius:15px; background:#f3f7f8; }
.therapist-case-filters label { display:flex; flex:1; align-items:center; gap:8px; min-width:260px; padding:0 12px; border:1px solid #d4e3e7; border-radius:11px; background:#fff; }
.therapist-case-filters label .icon { width:18px; color:#6c8791; }.therapist-case-filters input { width:100%; min-height:44px; border:0; outline:0; background:transparent; }
.therapist-case-filters > button { min-height:44px; padding:8px 12px; border:1px solid #d5e3e7; border-radius:10px; background:#fff; color:#55717d; font-weight:850; cursor:pointer; }
.therapist-case-filters > button.active { border-color:#2f806b; background:#e6f4ef; color:#286f5c; }
.therapist-permission-note { display:flex; gap:8px; align-items:center; margin-top:14px; padding:13px 15px; border-radius:12px; background:#edf4f6; color:#456775; font-weight:750; }.therapist-permission-note .icon { flex:0 0 20px; }

.therapist-pt-mobility { display:grid; grid-template-columns:210px minmax(0,1fr) 250px; gap:0; padding:0; overflow:hidden; border-top:5px solid #3978a1; }
.pt-case-rail,.pt-mobility-alerts { padding:20px; background:#f4f8fb; }.pt-case-rail { border-right:1px solid #d7e5eb; }.pt-mobility-alerts { border-left:1px solid #d7e5eb; }
.pt-case-rail header { display:flex; justify-content:space-between; align-items:center; margin-bottom:13px; }.pt-case-rail header span { padding:5px 8px; border-radius:99px; background:#dceaf4; color:#2e678d; font-weight:900; }
.pt-case-rail > button { display:flex; gap:9px; align-items:center; width:100%; min-height:62px; margin:7px 0; padding:9px; border:1px solid transparent; border-radius:13px; background:transparent; color:#375a6a; text-align:left; cursor:pointer; }
.pt-case-rail > button.active { border-color:#b8d2e2; background:#fff; box-shadow:0 6px 16px rgba(45,91,120,.1); }.pt-case-rail small { display:block; color:#78909a; }
.pt-mobility-board { min-width:0; padding:22px; }.pt-mobility-board > header { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }.pt-mobility-board > header p { margin:6px 0; }
.pt-mobility-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:18px 0; }.pt-mobility-kpis > div { padding:15px; border:1px solid #d7e5ea; border-radius:14px; background:#f9fcfd; }.pt-mobility-kpis > div.warning { border-color:#efd1a0; background:#fff8ec; }
.pt-mobility-kpis span,.pt-mobility-kpis small { display:block; color:#718791; }.pt-mobility-kpis strong { display:block; margin:5px 0; color:#173f53; font-size:1.18rem; }
.pt-mobility-matrix { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.pt-mobility-matrix > section { padding:16px; border:1px solid #d9e6ea; border-radius:16px; }
.pt-mobility-matrix > section > button { display:grid; grid-template-columns:1fr auto auto; gap:8px; align-items:center; width:100%; min-height:48px; padding:8px 0; border:0; border-bottom:1px solid #e3ecef; background:transparent; color:#426473; text-align:left; cursor:pointer; }.pt-mobility-matrix strong.warning { color:#a96a1f; }.pt-mobility-matrix strong.danger { color:#bd4e45; }
.pt-dose-editor label { display:grid; gap:5px; margin:9px 0; color:#436573; font-size:.78rem; font-weight:800; }.pt-dose-editor input,.pt-dose-editor select { min-width:0; padding:9px; }
.pt-mobility-alerts > div,.hand-ai-feedback > div { margin:10px 0; padding:13px; border-radius:13px; background:#fff; color:#476a78; }.pt-mobility-alerts > div.danger,.hand-ai-feedback > div.warning { background:#fff4e5; }.pt-mobility-alerts .icon,.hand-ai-feedback .icon { width:20px; margin-bottom:7px; }.pt-mobility-alerts strong,.pt-mobility-alerts p,.hand-ai-feedback strong,.hand-ai-feedback p { display:block; margin:3px 0; }

.therapist-gait-balance { border-top:5px solid #3978a1; }.gait-balance-layout { display:grid; grid-template-columns:1.25fr .75fr .65fr; gap:15px; }.gait-track,.balance-map-card,.fall-risk-panel { padding:18px; border:1px solid #d8e6eb; border-radius:18px; background:#fbfdfe; }
.gait-track-head { display:flex; justify-content:space-between; align-items:center; }.footstep-track { position:relative; height:160px; margin:18px 0; overflow:hidden; border-radius:18px; background:linear-gradient(90deg,#e9f0f4 1px,transparent 1px),linear-gradient(#e9f0f4 1px,transparent 1px),#f7fafc; background-size:36px 36px; }
.footstep-track::after { content:"行進方向 →"; position:absolute; right:12px; bottom:10px; color:#77909a; font-size:.72rem; font-weight:800; }.footstep-track i { position:absolute; left:calc(6% + var(--step) * 12%); top:calc(58px + (var(--step) % 2) * 32px); display:grid; place-items:center; width:34px; height:62px; border-radius:50% 50% 45% 45%; background:#357aa2; color:#fff; font-style:normal; font-size:.65rem; font-weight:900; transform:rotate(-10deg); }.footstep-track i.right { background:#52a38a; transform:rotate(10deg); }
.gait-phase-bars span { display:block; width:var(--value); margin:8px 0; padding:7px 10px; border-radius:99px; background:#dcecf5; color:#315f7b; }.gait-phase-bars span + span { background:#dff1eb; color:#2c6e5a; }.gait-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:16px; }.gait-metrics > div { padding:10px; border-radius:11px; background:#edf3f5; }.gait-metrics span,.gait-metrics small { display:block; color:#6e858e; }.gait-metrics strong { display:block; margin:4px 0; color:#173f53; }
.balance-map { position:relative; min-height:260px; margin:15px 0; border-radius:50%; background:radial-gradient(circle,#fff 10%,#e7f0f3 11% 12%,#fff 13% 38%,#d9e7ec 39% 40%,#f7fafb 41%); }.balance-map::before,.balance-map::after { content:""; position:absolute; background:#b8ccd4; }.balance-map::before { top:50%; left:10%; width:80%; height:1px; }.balance-map::after { top:10%; left:50%; width:1px; height:80%; }.balance-map b { position:absolute; left:var(--x); top:var(--y); width:18px; height:18px; border:5px solid #fff; border-radius:50%; background:#d97745; box-shadow:0 0 0 3px rgba(217,119,69,.25); }.balance-map small { position:absolute; bottom:8px; left:50%; translate:-50%; color:#8a5b33; font-weight:850; }.balance-scores { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.balance-scores span { padding:10px; border-radius:10px; background:#edf4f6; color:#667f8a; }.balance-scores strong { display:block; color:#173f53; }
.fall-risk-panel > div { margin:15px 0; }.fall-risk-panel > div span { display:flex; justify-content:space-between; color:#486a78; }.fall-risk-panel > div i { display:block; height:8px; margin-top:6px; border-radius:99px; background:#e6edef; }.fall-risk-panel b { display:block; height:100%; border-radius:inherit; background:#4e9b87; }.fall-risk-panel b.warning { background:#e0a044; }.fall-risk-panel b.danger { background:#cc5c4e; }

.therapist-rom-strength { border-top:5px solid #536fa1; }.rom-strength-grid { display:grid; grid-template-columns:180px minmax(0,1fr) 230px; gap:14px; }.joint-region-list,.strength-protocol { padding:15px; border-radius:16px; background:#f4f7fa; }.joint-region-list button,.strength-protocol > button:not(.btn) { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:46px; padding:8px 10px; border:0; border-radius:10px; background:transparent; color:#4a6977; text-align:left; cursor:pointer; }.joint-region-list button.active { background:#fff; color:#294f73; box-shadow:0 4px 12px rgba(44,79,104,.11); }.joint-region-list button span { padding:3px 7px; border-radius:99px; background:#e0ebf1; }.rom-strength-main { min-width:0; }.rom-strength-chart { display:grid; grid-template-columns:1fr 160px; gap:12px; margin-top:14px; padding:14px; border:1px solid #dbe7eb; border-radius:15px; }.rom-strength-chart aside { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.rom-strength-chart aside span { padding:9px; border-radius:9px; background:#eef3f6; color:#6b818b; }.rom-strength-chart aside strong { display:block; color:#173f53; }.strength-protocol small { display:block; color:#78909a; }.strength-protocol b { color:#294f73; }

.therapist-upper-hand { border-top:5px solid #4b9a80; }.upper-hand-layout { display:grid; grid-template-columns:1fr 1fr 250px; gap:15px; }.hand-function-map,.hand-task-board,.hand-ai-feedback { padding:18px; border:1px solid #d9e7ea; border-radius:18px; background:#fbfdfe; }.hand-function-map { display:grid; grid-template-columns:150px 1fr; gap:14px; }.upper-limb-figure { position:relative; min-height:360px; border-radius:80px; background:linear-gradient(#e2f1ec,#eef5f7); }.upper-limb-figure b { position:absolute; left:67px; top:34px; width:18px; height:240px; border-radius:99px; background:#74aab7; transform:rotate(10deg); }.upper-limb-figure i { position:absolute; z-index:1; left:67px; width:20px; height:20px; border:4px solid #fff; border-radius:50%; background:#3b8e78; box-shadow:0 0 0 3px rgba(59,142,120,.16); }.upper-limb-figure .shoulder { top:30px; }.upper-limb-figure .elbow { top:120px; left:82px; }.upper-limb-figure .wrist { top:215px; left:92px; }.upper-limb-figure .hand { top:265px; left:93px; width:34px; height:45px; border-radius:40% 40% 50% 50%; }.hand-measures { display:grid; gap:7px; }.hand-measures button { display:grid; grid-template-columns:1fr auto; gap:4px; padding:10px; border:1px solid #dbe7eb; border-radius:10px; background:#fff; color:#4d6c78; text-align:left; }.hand-measures small { grid-column:2; color:#2e8a70; }.hand-task-board > div { display:grid; grid-template-columns:30px 1fr auto auto; gap:9px; align-items:center; padding:12px 0; border-bottom:1px solid #e0eaed; }.hand-task-board > div > span:first-child { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#e1f1eb; color:#27705b; font-weight:900; }.hand-task-board small { display:block; color:#78909a; }.hand-task-board button { min-height:38px; border:1px solid #d4e2e6; border-radius:8px; background:#fff; color:#456a77; }.hand-ai-feedback .good { background:#e7f5ef; }

.therapist-integrated-plan { border-top:5px solid #335f7b; }.integrated-goal-flow { display:grid; grid-template-columns:1.3fr auto 1fr 1fr; gap:10px; align-items:stretch; margin-bottom:18px; }.integrated-goal-flow article { display:flex; flex-direction:column; justify-content:center; min-height:120px; padding:17px; border:1px solid #d9e6ea; border-radius:16px; background:#f7fafb; }.integrated-goal-flow article.ot { background:#e9f6f1; }.integrated-goal-flow article.pt { background:#e9f1f7; }.integrated-goal-flow > i { display:grid; place-items:center; color:#63808c; }.integrated-goal-flow strong,.integrated-goal-flow small { display:block; margin-top:5px; color:#173f53; }.integrated-goal-flow small { color:#6d838d; }
.therapy-plan-lanes { display:grid; grid-template-columns:1fr 1fr 260px; gap:14px; }.therapy-plan-lanes > section,.therapy-plan-lanes > aside { padding:17px; border:1px solid #d9e6ea; border-radius:17px; }.therapy-plan-lanes > section.ot { background:#f5fbf8; }.therapy-plan-lanes > section.pt { background:#f5f9fc; }.therapy-plan-lanes section > header { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; margin-bottom:10px; }.therapy-plan-lanes section > header p { margin:3px 0; }.therapy-plan-lanes section > header button,.therapy-plan-lanes section article button { min-height:38px; border:1px solid #cedfe4; border-radius:8px; background:#fff; color:#426978; }.therapy-plan-lanes section article { display:grid; grid-template-columns:1fr auto; gap:4px 10px; padding:13px 0; border-bottom:1px solid #dce7e9; }.therapy-plan-lanes section article span,.therapy-plan-lanes section article small { color:#6c828c; }.therapy-plan-lanes section article button { grid-column:2; grid-row:1 / span 3; }.therapy-plan-lanes aside > div { display:flex; gap:8px; margin:10px 0; padding:12px; border-radius:12px; background:#fff4e3; }.therapy-plan-lanes aside > div.good { background:#e8f5ef; }.therapy-plan-lanes aside .icon { flex:0 0 20px; }.therapy-plan-lanes aside p { margin:0; }.therapy-plan-lanes aside strong { display:block; color:#173f53; }.therapy-plan-lanes aside label { display:grid; gap:6px; margin:14px 0; color:#466774; font-weight:800; }
.therapy-detail-split { display:grid; grid-template-columns:1fr 330px; gap:16px; }.therapist-patient-mobility { border-top:4px solid #3978a1; }

@media (max-width: 1180px) {
  .therapist-pt-mobility { grid-template-columns:180px 1fr; }.pt-mobility-alerts { grid-column:1 / -1; border-top:1px solid #d7e5eb; border-left:0; display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }.pt-mobility-alerts h2,.pt-mobility-alerts .btn { grid-column:1 / -1; }
  .gait-balance-layout,.upper-hand-layout { grid-template-columns:1fr 1fr; }.fall-risk-panel,.hand-ai-feedback { grid-column:1 / -1; }
  .rom-strength-grid { grid-template-columns:160px 1fr; }.strength-protocol { grid-column:1 / -1; display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }.strength-protocol h3,.strength-protocol .btn { grid-column:1 / -1; }
  .therapy-plan-lanes { grid-template-columns:1fr 1fr; }.therapy-plan-lanes > aside { grid-column:1 / -1; }
}
@media (max-width: 820px) {
  .therapist-scope-switch > article { grid-template-columns:auto 1fr; }.therapist-scope-switch > article .button-row { grid-column:1 / -1; }
  .therapist-case-filters { align-items:stretch; flex-wrap:wrap; }.therapist-case-filters label { flex-basis:100%; }
  .therapist-pt-mobility,.gait-balance-layout,.upper-hand-layout,.rom-strength-grid,.therapy-plan-lanes,.therapy-detail-split { grid-template-columns:1fr; }.pt-case-rail { border-right:0; border-bottom:1px solid #d7e5eb; }.pt-case-rail > button { display:inline-flex; width:calc(33.333% - 7px); }.pt-mobility-alerts,.fall-risk-panel,.hand-ai-feedback,.strength-protocol,.therapy-plan-lanes > aside { grid-column:auto; }
  .pt-mobility-kpis,.gait-metrics,.strength-protocol { grid-template-columns:1fr 1fr; }.pt-mobility-matrix,.hand-function-map,.integrated-goal-flow { grid-template-columns:1fr; }.integrated-goal-flow > i { rotate:90deg; }.rom-strength-chart { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .therapist-scope-tabs { overflow-x:auto; }.therapist-scope-tabs button { min-width:max-content; }.therapist-scope-switch > article { grid-template-columns:1fr; }.therapist-scope-switch > article .button-row { grid-column:auto; }
  .therapist-case-filters > button { flex:1 1 45%; }.pt-case-rail > button { width:100%; }.pt-mobility-kpis,.gait-metrics,.strength-protocol,.balance-scores { grid-template-columns:1fr; }.pt-mobility-board,.pt-case-rail,.pt-mobility-alerts { padding:15px; }.pt-mobility-alerts { display:block; }.hand-function-map { grid-template-columns:110px 1fr; }.therapy-plan-lanes section > header { grid-template-columns:auto 1fr; }.therapy-plan-lanes section > header button { grid-column:1 / -1; }.therapy-detail-split { grid-template-columns:1fr; }
}

/* MediaPipe rehabilitation motion rule studio */
.motion-settings-page { --motion-navy:#173f53; --motion-green:#318a72; --motion-blue:#397f9e; --motion-line:#d8e6ea; }
.motion-settings-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:18px; padding:26px 28px; border:1px solid #d7e7eb; border-radius:24px; background:linear-gradient(135deg,#fff 0%,#eef7f5 68%,#e7f1f5 100%); box-shadow:0 16px 38px rgba(24,64,82,.08); }
.motion-settings-head h1 { margin:7px 0 8px; color:var(--motion-navy); font-size:clamp(1.55rem,2.4vw,2.25rem); }
.motion-settings-head p { max-width:780px; margin:0; color:#58727e; font-size:1rem; }
.motion-settings-head .status-badge { display:flex; align-items:center; gap:7px; min-height:40px; padding:9px 13px; white-space:nowrap; }
.motion-subnav { position:sticky; top:0; z-index:8; display:flex; gap:6px; margin-bottom:18px; padding:7px; overflow-x:auto; border:1px solid var(--motion-line); border-radius:15px; background:rgba(255,255,255,.94); box-shadow:0 8px 24px rgba(25,63,81,.07); backdrop-filter:blur(12px); }
.motion-subnav a { min-height:44px; padding:11px 15px; border-radius:10px; color:#54717d; font-weight:800; white-space:nowrap; }
.motion-subnav a.active { background:var(--motion-navy); color:#fff; }
.motion-overview-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.motion-module-card { position:relative; display:flex; flex-direction:column; min-height:330px; padding:24px; overflow:hidden; border:1px solid var(--motion-line); border-radius:22px; background:#fff; color:#355b6b; box-shadow:0 12px 30px rgba(24,64,82,.08); transition:.25s ease; }
.motion-module-card::after { content:""; position:absolute; right:-65px; bottom:-85px; width:190px; height:190px; border-radius:50%; background:rgba(53,140,116,.08); }
.motion-module-card.fine::after { background:rgba(58,127,157,.09); }.motion-module-card.hybrid::after { background:rgba(78,102,162,.1); }
.motion-module-card:hover { transform:translateY(-4px); border-color:#9bc6bb; box-shadow:0 18px 40px rgba(24,64,82,.13); }
.motion-module-icon,.motion-rule-type { display:grid; place-items:center; flex:0 0 auto; border-radius:15px; background:#e4f4ef; color:#2d8069; }
.motion-module-icon { width:58px; height:58px; margin-bottom:18px; }.motion-module-icon .icon { width:28px; height:28px; }
.motion-module-card.fine .motion-module-icon,.motion-rule-type.fine { background:#e8f1f6; color:#367b99; }.motion-module-card.hybrid .motion-module-icon,.motion-rule-type.hybrid { background:#eceef9; color:#5869a4; }
.motion-module-card small { color:#71868f; font-size:.7rem; font-weight:900; letter-spacing:.08em; }.motion-module-card h2 { margin:7px 0; color:var(--motion-navy); font-size:1.45rem; }.motion-module-card p { flex:1; margin:0 0 18px; }
.motion-module-card dl { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0 0 18px; }.motion-module-card dl div { padding:11px; border-radius:12px; background:#f3f7f8; }.motion-module-card dt { font-size:.72rem; }.motion-module-card dd { margin:4px 0 0; color:var(--motion-navy); font-size:1.2rem; font-weight:900; }
.motion-module-card > span:last-child { position:relative; z-index:1; display:flex; align-items:center; gap:7px; color:#2d7865; font-weight:900; }
.motion-overview-lower { display:grid; grid-template-columns:1.5fr .65fr; gap:16px; margin-top:16px; }
.motion-rule-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:13px 0; border-bottom:1px solid #e1eaed; }.motion-rule-row:last-child { border:0; }.motion-rule-row small { display:block; margin-top:3px; color:#71868e; }
.motion-rule-type { width:44px; height:44px; }.motion-rule-type.gross { background:#e5f4ef; color:#2e806a; }.motion-rule-type .icon { width:21px; height:21px; }
.motion-coverage .panel-header > strong { color:var(--motion-green); font-size:1.35rem; }.motion-coverage > div:not(.panel-header) { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:16px 0; }.motion-coverage > div span { display:flex; align-items:center; gap:6px; color:#3b6573; font-size:.8rem; font-weight:800; }.motion-coverage > div span .icon { color:#2f8b72; }
.motion-module-workspace { display:grid; grid-template-columns:210px minmax(360px,1fr) 340px; min-height:650px; overflow:hidden; border:1px solid var(--motion-line); border-radius:22px; background:#fff; box-shadow:0 14px 35px rgba(24,64,82,.07); }
.motion-category-rail { padding:20px 14px; border-right:1px solid var(--motion-line); background:#f6f9fa; }.motion-category-rail h2 { padding:0 8px; font-size:1rem; }.motion-category-rail > button { display:flex; justify-content:space-between; width:100%; min-height:44px; margin-bottom:5px; padding:10px 11px; border:0; border-radius:10px; background:transparent; color:#496a77; text-align:left; font-weight:800; cursor:pointer; }.motion-category-rail > button.active { background:#e1f1ec; color:#286e5b; }.motion-category-rail > button span { display:grid; place-items:center; min-width:24px; height:24px; border-radius:99px; background:#fff; font-size:.7rem; }.motion-category-rail > div { margin-top:20px; padding:14px; border-radius:13px; background:#eaf3f5; color:#3c6574; }.motion-category-rail > div .icon { color:#34866f; }.motion-category-rail > div p { margin:7px 0 0; font-size:.78rem; }
.motion-template-column { min-width:0; padding:20px; }.motion-template-column > header,.motion-library > header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:15px; }.motion-template-column h2 { margin:0; }.motion-template-column header p { margin:3px 0 0; }
.motion-search { display:flex; align-items:center; gap:7px; min-height:44px; padding:0 11px; border:1px solid #cddfe4; border-radius:11px; background:#fff; color:#67818c; }.motion-search input { min-width:0; border:0; padding:8px 0; outline:0; background:transparent; }
.motion-template-list { display:grid; gap:8px; max-height:560px; overflow:auto; }.motion-template-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:10px; align-items:center; width:100%; padding:12px; border:1px solid #dce8eb; border-radius:13px; background:#fbfdfe; color:#31596a; text-align:left; cursor:pointer; }.motion-template-row.active { border-color:#73ad9c; background:#edf7f3; box-shadow:0 0 0 2px rgba(49,138,114,.1); }.motion-template-row small { display:block; margin-top:3px; color:#71868e; }
.motion-rule-summary { padding:20px; border-left:1px solid var(--motion-line); background:#fbfdfe; }.motion-rule-summary header { display:flex; gap:11px; align-items:center; }.motion-rule-summary header h2 { margin:2px 0 0; font-size:1.2rem; }.motion-rule-summary dl { margin:18px 0; }.motion-rule-summary dl div,.motion-assign-summary dl div { padding:10px 0; border-bottom:1px solid #e0eaed; }.motion-rule-summary dt,.motion-assign-summary dt { color:#71868e; font-size:.75rem; }.motion-rule-summary dd,.motion-assign-summary dd { margin:4px 0 0; color:#234d5f; font-weight:800; }.motion-summary-safety { display:flex; flex-wrap:wrap; gap:7px; padding:13px; border-radius:12px; background:#fff4df; }.motion-summary-safety strong { display:flex; align-items:center; gap:6px; width:100%; color:#8c5b18; }.motion-summary-safety span { padding:6px 8px; border-radius:99px; background:#fff; color:#8c5b18; font-size:.7rem; font-weight:800; }.motion-summary-actions { display:grid; gap:8px; margin-top:15px; }
.motion-hybrid-strip { margin-top:16px; }.motion-hybrid-strip > div:last-child { display:flex; gap:8px; overflow-x:auto; }.motion-hybrid-strip > div:last-child span { display:flex; align-items:center; gap:7px; min-width:max-content; padding:12px; border-radius:12px; background:#eef1fa; color:#4d619b; font-weight:800; }.motion-hybrid-strip i { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#596ba6; color:#fff; font-style:normal; }
.motion-library { padding:20px; }.motion-filter-tabs { display:flex; gap:6px; flex-wrap:wrap; }.motion-filter-tabs button { min-height:42px; padding:8px 12px; border:1px solid #d7e5e9; border-radius:10px; background:#fff; color:#516f7b; font-weight:800; cursor:pointer; }.motion-filter-tabs button.active { background:var(--motion-navy); color:#fff; }
.motion-library-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.motion-library-card { display:flex; flex-direction:column; min-width:0; padding:17px; border:1px solid #d9e7eb; border-radius:17px; background:#fbfdfe; }.motion-library-card[hidden] { display:none; }.motion-library-card header { display:flex; justify-content:space-between; }.motion-library-card > small { margin-top:12px; color:#667f89; }.motion-library-card h2 { margin:5px 0; color:var(--motion-navy); font-size:1.12rem; }.motion-library-card > p { margin:0 0 12px; color:#477080; }.motion-library-card dl { flex:1; margin:0; }.motion-library-card dl div { padding:8px 0; border-top:1px solid #e0eaed; }.motion-library-card dt { font-size:.7rem; }.motion-library-card dd { margin:3px 0 0; color:#254f61; font-weight:800; }.motion-library-card footer { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; margin-top:14px; }.motion-library-card footer .btn { padding:8px; }
.motion-builder { display:grid; grid-template-columns:180px minmax(430px,1fr) 250px; overflow:hidden; border:1px solid var(--motion-line); border-radius:22px; background:#fff; box-shadow:0 14px 35px rgba(24,64,82,.08); }.motion-builder-steps { padding:14px; border-right:1px solid var(--motion-line); background:#f5f8f9; }.motion-builder-steps button { display:grid; grid-template-columns:34px 1fr auto; gap:8px; align-items:center; width:100%; min-height:48px; padding:8px; border:0; border-radius:10px; background:transparent; color:#57727d; text-align:left; cursor:pointer; }.motion-builder-steps button > span { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#e4ecef; font-size:.68rem; font-weight:900; }.motion-builder-steps button i { display:none; color:#2f8a71; }.motion-builder-steps button.active { background:#e3f2ed; color:#286e5a; }.motion-builder-steps button.active > span { background:#318a72; color:#fff; }
.motion-builder-canvas { min-width:0; padding:22px; }.motion-builder-title { display:grid; gap:6px; margin-bottom:18px; color:#30596a; font-weight:900; }.motion-builder-title input { font-size:1.08rem; font-weight:800; }.motion-builder-panel { display:none; min-height:570px; }.motion-builder-panel.active { display:block; animation:workspace-pop-in .35s ease both; }.motion-builder-panel > header { display:flex; gap:12px; align-items:center; margin-bottom:18px; }.motion-builder-panel > header > span { display:grid; place-items:center; width:48px; height:48px; border-radius:15px; background:#e4f3ee; color:#2d7b66; font-weight:900; }.motion-builder-panel h2 { margin:2px 0 0; color:var(--motion-navy); }.motion-builder-panel header small { color:#6c838d; }
.motion-module-choices { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }.motion-module-choice input,.motion-check-card input { position:absolute; opacity:0; pointer-events:none; }.motion-module-choice > span,.motion-check-card > span { display:flex; flex-direction:column; min-height:190px; padding:18px; border:2px solid #dce8eb; border-radius:17px; background:#fbfdfe; cursor:pointer; }.motion-module-choice input:checked + span,.motion-check-card input:checked + span { border-color:#4e9d87; background:#eaf6f2; box-shadow:0 0 0 3px rgba(49,138,114,.1); }.motion-module-choice .icon { width:30px; height:30px; margin-bottom:12px; color:#34846e; }.motion-module-choice strong { color:#224e60; }.motion-module-choice small { margin-top:7px; color:#6b818a; }
.motion-detector-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }.motion-check-card > span { min-height:150px; }.motion-check-card .icon { margin-bottom:8px; color:#377d96; }.motion-check-card small { margin-top:5px; color:#71868f; }.motion-config-note { display:flex; gap:8px; margin-top:14px; padding:14px; border-radius:13px; background:#eaf3f5; color:#3f6574; }
.motion-landmark-layout { display:grid; grid-template-columns:240px 1fr; gap:20px; }.motion-landmark-map { position:relative; min-height:450px; border-radius:20px; background:radial-gradient(circle,#edf8f5,#e5eff2); }.motion-landmark-map span { position:absolute; padding:5px 7px; border-radius:8px; background:#173f53; color:#fff; font-size:.65rem; font-weight:800; }.motion-landmark-map span::after { content:""; position:absolute; width:12px; height:12px; border:3px solid #fff; border-radius:50%; background:#44b792; }.motion-landmark-map .head { top:7%; left:38%; }.motion-landmark-map .shoulder { top:22%; left:48%; }.motion-landmark-map .elbow { top:38%; left:68%; }.motion-landmark-map .wrist { top:53%; left:75%; }.motion-landmark-map .hip { top:51%; left:36%; }.motion-landmark-map .knee { top:70%; left:46%; }.motion-landmark-map .ankle { top:88%; left:34%; }
.motion-phase-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }.motion-phase-toolbar small { display:block; margin-top:3px; color:#70858e; }.motion-phase-list { display:grid; gap:10px; }.motion-phase-card { border:1px solid #d8e6ea; border-radius:15px; background:#fbfdfe; }.motion-phase-card > header { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; padding:12px; border-bottom:1px solid #e0eaed; }.motion-phase-number { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#596ba6; color:#fff; font-weight:900; }.motion-phase-card header input { border:0; padding:2px 0; background:transparent; color:#224d60; font-weight:900; }.motion-phase-card header button { min-width:36px; min-height:36px; border:1px solid #d6e3e7; border-radius:8px; background:#fff; color:#456775; cursor:pointer; }.motion-phase-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:12px; }.motion-phase-fields label { display:grid; gap:5px; color:#466674; font-size:.76rem; font-weight:800; }.motion-phase-fields .full { grid-column:1 / -1; }.motion-phase-fields select,.motion-phase-fields input { min-width:0; padding:9px; }.motion-add-phase { width:100%; min-height:48px; margin-top:10px; border:2px dashed #9bbeb6; border-radius:13px; background:#f0f8f5; color:#2d765f; font-weight:900; cursor:pointer; }
.motion-rule-check-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:16px; }.motion-rule-check-grid label { display:flex; align-items:center; gap:8px; padding:11px; border:1px solid #dce7eb; border-radius:12px; background:#fbfdfe; }.motion-rule-check-grid span { color:#31596a; font-weight:800; }.motion-rule-check-grid small { display:block; color:#71868e; font-weight:500; }.motion-stop-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }.motion-stop-grid label { display:grid; grid-template-columns:1fr auto; gap:6px; padding:14px; border:1px solid #ead7b8; border-radius:14px; background:#fffaf1; }.motion-stop-grid label > span { grid-column:1 / -1; color:#78511c; font-weight:800; }.motion-stop-grid input { width:84px; }.motion-symptom-rules,.motion-report-fields { display:flex; flex-wrap:wrap; gap:10px 18px; margin-top:18px; padding:16px; border:1px solid #dce7eb; border-radius:14px; }.motion-symptom-rules legend,.motion-report-fields legend { padding:0 6px; color:#31596a; font-weight:900; }
.motion-feedback-list { display:grid; gap:9px; }.motion-feedback-list label { display:grid; grid-template-columns:120px 1fr auto; gap:8px; align-items:center; }.motion-feedback-list label > span { color:#31596a; font-weight:800; }.motion-feedback-list button { min-height:44px; border:1px solid #ccdfe4; border-radius:10px; background:#eef5f6; color:#356779; font-weight:800; }.motion-preview-ready { display:grid; grid-template-columns:1fr .8fr; gap:18px; }.motion-preview-ready > div { display:grid; place-items:center; min-height:360px; padding:25px; border-radius:20px; background:#173f53; color:#fff; text-align:center; }.motion-preview-ready > div > span { color:#65d3b5; }.motion-preview-ready > div small { color:#c5dae2; }.motion-preview-ready section { display:grid; align-content:start; gap:10px; padding:20px; border:1px solid #dce7eb; border-radius:17px; }.motion-preview-ready section > span { display:flex; gap:7px; color:#2e725f; }.motion-preview-ready section .btn { margin-top:10px; }
.motion-publish-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }.motion-publish-grid article { display:flex; flex-direction:column; padding:18px; border:1px solid #dce7eb; border-radius:16px; }.motion-publish-grid article > .icon { width:30px; height:30px; color:#34836e; }.motion-publish-grid p { flex:1; }.motion-builder-nav { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; margin-top:20px; padding-top:16px; border-top:1px solid #e0eaed; }.motion-builder-nav > span { text-align:center; }.motion-builder-nav small { display:block; color:#71868e; }
.motion-builder-inspector { padding:20px; border-left:1px solid var(--motion-line); background:#f7fafb; }.motion-builder-inspector h2 { margin:18px 0 10px; }.motion-builder-inspector .progress-ring { margin:12px auto; }.motion-builder-inspector dl div { display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid #dfe9ec; }.motion-builder-inspector dt,.motion-builder-inspector dd { margin:0; }.motion-builder-inspector dd { color:#234e60; font-weight:900; }.motion-builder-inspector pre { max-width:100%; margin-top:14px; padding:12px; overflow:auto; border-radius:11px; background:#173f53; color:#b8f2df; font-size:.68rem; white-space:pre-wrap; }
.motion-preview-page { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(300px,.6fr); gap:16px; }.motion-preview-controls { display:flex; gap:8px; margin-top:14px; }.motion-preview-console { display:grid; gap:12px; }.motion-preview-console .panel { margin:0; }.motion-primary-reading { padding:18px; border-radius:15px; background:#173f53; color:#fff; text-align:center; }.motion-primary-reading span,.motion-primary-reading small { display:block; color:#bfd6de; }.motion-primary-reading strong { display:block; margin:5px; font-size:2.4rem; }.motion-live-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-top:8px; }.motion-live-metrics span { padding:8px; border-radius:9px; background:#eef4f5; color:#627d87; font-size:.7rem; }.motion-live-metrics strong { display:block; color:#244e60; font-size:1rem; }.motion-preview-phases { display:grid; gap:6px; }.motion-preview-phases button { display:grid; grid-template-columns:auto 1fr; gap:8px; align-items:center; width:100%; padding:9px; border:1px solid #dce7eb; border-radius:10px; background:#fff; color:#486a77; text-align:left; }.motion-preview-phases button.active { border-color:#579f8b; background:#eaf6f2; }.motion-preview-phases i { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#e6edef; font-style:normal; font-weight:900; }.motion-preview-phases small { display:block; }.motion-target-zone { position:absolute; right:12%; top:35%; display:grid; place-items:center; width:100px; height:100px; border:3px dashed #e2ad4e; border-radius:20px; color:#ffe0a7; font-weight:900; }
.motion-assign-layout { display:grid; grid-template-columns:230px minmax(430px,1fr) 250px; padding:0; overflow:hidden; }.motion-assign-patients { padding:18px; border-right:1px solid #dce7eb; background:#f7fafb; }.motion-assign-patients header { display:flex; justify-content:space-between; }.motion-assign-patients > label { display:grid; grid-template-columns:auto auto 1fr; gap:8px; align-items:center; padding:11px 0; border-bottom:1px solid #dce7eb; }.motion-assign-patients small { display:block; color:#71868e; }.motion-assign-form { padding:20px; }.motion-assign-form > header { display:flex; justify-content:space-between; }.motion-assign-form fieldset { display:flex; flex-wrap:wrap; gap:12px; margin-top:14px; padding:14px; border:1px solid #dce7eb; border-radius:13px; }.motion-assign-summary { padding:20px; border-left:1px solid #dce7eb; background:#fbfdfe; }.motion-assign-summary > div { display:flex; gap:7px; margin-top:15px; padding:12px; border-radius:12px; background:#fff3df; color:#8e5d18; }
.motion-result-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }.motion-result-kpis article { padding:17px; border:1px solid #dce7eb; border-radius:16px; background:#fff; }.motion-result-kpis span,.motion-result-kpis small { display:block; color:#6a828c; }.motion-result-kpis strong { display:block; margin:5px 0; color:#173f53; font-size:1.55rem; }.motion-results-layout { display:grid; grid-template-columns:1.35fr .65fr; gap:16px; margin-bottom:16px; }.motion-event-breakdown > div { margin:14px 0; }.motion-event-breakdown > div span { display:flex; justify-content:space-between; }.motion-event-breakdown i { display:block; height:8px; margin-top:6px; border-radius:99px; background:#e7edef; }.motion-event-breakdown b { display:block; height:100%; border-radius:inherit; background:#df9a34; }
.motion-version-layout { display:grid; grid-template-columns:1fr 320px; gap:16px; }.motion-version-item { display:grid; grid-template-columns:auto 1fr; gap:12px; padding:16px 0; border-bottom:1px solid #e0eaed; }.motion-version-item > span { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:#e5edef; color:#5a7580; }.motion-version-item.current > span { background:#dff2eb; color:#2e7a65; }.motion-version-item header { display:flex; align-items:center; gap:8px; }.motion-version-item header small { margin-left:auto; }.motion-version-item p { margin:7px 0 10px; }.motion-version-item div > div { display:flex; gap:7px; }.motion-version-diff > div { margin:10px 0; padding:12px; border-left:4px solid #93a8b0; border-radius:8px; background:#f4f7f8; }.motion-version-diff .added { border-color:#3a967d; background:#eaf6f2; }.motion-version-diff .changed { border-color:#dc9832; background:#fff5e4; }.motion-version-diff p { margin:5px 0 0; font-family:ui-monospace,monospace; font-size:.74rem; }

@media (max-width: 1200px) {
  .motion-module-workspace { grid-template-columns:180px 1fr; }.motion-rule-summary { grid-column:1 / -1; border-top:1px solid var(--motion-line); border-left:0; }.motion-rule-summary > div { display:grid; grid-template-columns:1fr 1.1fr; gap:18px; }.motion-rule-summary header,.motion-rule-summary .motion-summary-actions { align-self:start; }.motion-rule-summary dl { margin:0; }
  .motion-library-grid { grid-template-columns:1fr 1fr; }.motion-builder { grid-template-columns:160px 1fr; }.motion-builder-inspector { grid-column:1 / -1; border-top:1px solid var(--motion-line); border-left:0; }.motion-builder-inspector dl { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }.motion-builder-inspector dl div { display:block; padding:10px; border-radius:10px; background:#eef4f5; }.motion-builder-inspector .progress-ring { display:none; }
  .motion-assign-layout { grid-template-columns:200px 1fr; }.motion-assign-summary { grid-column:1 / -1; border-top:1px solid #dce7eb; border-left:0; }
}
@media (max-width: 880px) {
  .motion-settings-head { flex-direction:column; }.motion-overview-grid,.motion-overview-lower,.motion-preview-page,.motion-results-layout,.motion-version-layout { grid-template-columns:1fr; }.motion-module-card { min-height:280px; }.motion-module-workspace { grid-template-columns:1fr; }.motion-category-rail { border-right:0; border-bottom:1px solid var(--motion-line); }.motion-category-rail > button { display:inline-flex; width:auto; margin-right:5px; }.motion-category-rail > div { display:none; }.motion-rule-summary > div { display:block; }.motion-library-grid { grid-template-columns:1fr; }.motion-builder { grid-template-columns:1fr; }.motion-builder-steps { display:flex; gap:5px; overflow-x:auto; border-right:0; border-bottom:1px solid var(--motion-line); }.motion-builder-steps button { flex:0 0 70px; grid-template-columns:1fr; justify-items:center; }.motion-builder-steps button strong { font-size:.72rem; }.motion-builder-steps button i { display:none; }.motion-builder-inspector dl { grid-template-columns:1fr 1fr; }.motion-module-choices,.motion-detector-grid,.motion-publish-grid { grid-template-columns:1fr; }.motion-module-choice > span { min-height:140px; }.motion-landmark-layout { grid-template-columns:1fr; }.motion-landmark-map { min-height:320px; }.motion-stop-grid { grid-template-columns:1fr 1fr; }.motion-rule-check-grid { grid-template-columns:1fr 1fr; }.motion-preview-ready { grid-template-columns:1fr; }.motion-assign-layout { grid-template-columns:1fr; }.motion-assign-patients { border-right:0; border-bottom:1px solid #dce7eb; }.motion-result-kpis { grid-template-columns:1fr 1fr; }
}
@media (max-width: 560px) {
  .motion-settings-head { padding:20px; }.motion-subnav { margin-right:-14px; margin-left:-14px; border-radius:0; }.motion-overview-grid { gap:12px; }.motion-rule-row { grid-template-columns:auto 1fr auto; }.motion-rule-row .status-badge { grid-column:2; justify-self:start; }.motion-rule-row .btn { grid-column:3; grid-row:1 / span 2; }.motion-template-column,.motion-rule-summary { padding:15px; }.motion-template-column > header,.motion-library > header { align-items:stretch; flex-direction:column; }.motion-template-row { grid-template-columns:auto 1fr auto; }.motion-template-row .status-badge { grid-column:2; justify-self:start; }.motion-library { padding:14px; }.motion-library-card footer { grid-template-columns:1fr; }.motion-builder-canvas,.motion-builder-inspector { padding:15px; }.motion-builder-panel { min-height:0; }.motion-builder-nav { grid-template-columns:1fr 1fr; }.motion-builder-nav > span { grid-column:1 / -1; grid-row:1; }.motion-phase-toolbar { align-items:flex-start; flex-direction:column; }.motion-phase-card > header { grid-template-columns:auto 1fr; }.motion-phase-card > header > div:last-child { grid-column:1 / -1; justify-self:end; }.motion-phase-fields { grid-template-columns:1fr; }.motion-phase-fields .full { grid-column:auto; }.motion-feedback-list label { grid-template-columns:1fr auto; }.motion-feedback-list label > span { grid-column:1 / -1; }.motion-rule-check-grid,.motion-stop-grid,.motion-result-kpis { grid-template-columns:1fr; }.motion-preview-controls { flex-direction:column; }.motion-version-item header { align-items:flex-start; flex-direction:column; }.motion-version-item header small { margin-left:0; }.motion-version-item div > div { flex-direction:column; }
}
/* Phase-aware MediaPipe motion engine */
.phase-motion-console {
  --phase-border: #cfe0e7;
  margin: 0 0 28px;
  padding: 24px;
  border: 1px solid var(--phase-border);
  border-radius: 26px;
  background: linear-gradient(150deg, #ffffff 0%, #f7fbfc 66%, #edf7f4 100%);
  box-shadow: 0 18px 42px rgba(24, 66, 88, .1);
  color: #18394d;
}

.phase-console-head,
.phase-stage-top,
.phase-console-head > div:last-child,
.phase-controls,
.phase-preview-note,
.phase-evidence-row {
  display: flex;
  align-items: center;
}

.phase-console-head { justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.phase-console-head h2 { margin: 5px 0 6px; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.22; color: #153e59; }
.phase-console-head p { max-width: 850px; margin: 0; color: #577181; font-size: 16px; line-height: 1.7; }
.phase-console-head > div:last-child { flex: 0 0 auto; gap: 8px; align-self: flex-start; }
.phase-source-chip { padding: 7px 11px; border: 1px solid #bed8e1; border-radius: 999px; background: #fff; color: #31586d; font-size: 13px; font-weight: 700; white-space: nowrap; }
.phase-workflow-sync { display: flex; align-items: center; gap: 10px; margin: -4px 0 16px; padding: 11px 14px; border: 1px solid #bfe0d4; border-radius: 13px; background: #eff9f5; color: #2b705d; }
.phase-workflow-sync span { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.phase-workflow-sync span i { width: 9px; height: 9px; border-radius: 50%; background: #2e9276; box-shadow: 0 0 0 5px rgba(46,146,118,.13); }
.phase-workflow-sync strong { margin-left: auto; color: #1f5862; }
.phase-workflow-sync small { color: #5a7777; font-weight: 700; }
.phase-origin { display: inline-flex; align-items: center; width: max-content; padding: 3px 7px; border-radius: 999px; font-style: normal; font-size: 9px; font-weight: 900; line-height: 1.2; }
.phase-origin.preset { background: #e7f1f6; color: #316a85; }
.phase-origin.custom { background: #fff0df; color: #a75e20; }

.phase-stage-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 18px; align-items: stretch; }
.phase-stage-card,
.phase-live-panel { min-width: 0; border: 1px solid #d4e2e8; border-radius: 20px; background: #fff; overflow: hidden; }
.phase-stage-card { padding: 16px; }
.phase-stage-top { justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.phase-stage-top strong { display: block; font-size: 20px; color: #163f59; }
.phase-stage-top small { display: block; margin-top: 3px; color: #68808e; }
.phase-stage-switch { display: flex; padding: 4px; border-radius: 12px; background: #edf4f6; }
.phase-stage-switch button { min-height: 38px; padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: #607987; font-weight: 700; cursor: pointer; }
.phase-stage-switch button.active { background: #fff; color: #196f78; box-shadow: 0 3px 10px rgba(26, 66, 86, .12); }
.phase-canvas-wrap { position: relative; overflow: hidden; border-radius: 17px; background: #e8f2f4; }
.phase-canvas-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scaleX(-1); transition: opacity .25s ease; }
.phase-canvas-wrap.camera-live video { opacity: 1; }
.phase-canvas-wrap canvas { position: relative; z-index: 1; display: block; width: 100%; height: auto; min-height: 310px; object-fit: cover; }
.phase-live-badges,
.phase-camera-label { z-index: 2; }
.phase-live-badges { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.phase-live-badges span,
.phase-camera-label { padding: 6px 9px; border-radius: 9px; background: rgba(13, 49, 68, .88); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(8px); }
.phase-live-badges .live { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #70d7b5; box-shadow: 0 0 0 4px rgba(112, 215, 181, .17); }
.phase-camera-label { position: absolute; top: 12px; left: 12px; background: rgba(44, 139, 115, .9); }
.phase-mediapipe-status { border: 1px solid rgba(255,255,255,.22); }
.phase-mediapipe-status.loading { color: #fff3c7; background: rgba(123, 87, 15, .88); }
.phase-mediapipe-status.running { color: #e9fff8; background: rgba(23, 115, 91, .92); box-shadow: 0 0 0 3px rgba(112, 215, 181, .16); }
.phase-mediapipe-status.error { color: #fff; background: rgba(172, 51, 51, .92); }
.phase-mediapipe-status.idle,
.phase-mediapipe-status.ready { color: #eaf5f9; background: rgba(39, 74, 94, .88); }
.phase-live-privacy { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 11px 13px; border: 1px solid #cfe3e1; border-radius: 14px; background: #f2faf7; color: #315363; }
.phase-live-privacy span { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: #d8f1e8; color: #1f6f59; font-size: 12px; font-weight: 900; }
.phase-live-privacy p { margin: 1px 0 0; font-size: 13px; line-height: 1.55; }
.phase-controls [data-phase-detect]:not(:disabled) { border-color: #2e9276; color: #1f6f59; background: #eefaf6; }
.phase-controls [data-phase-detect]:disabled { cursor: progress; opacity: .75; }
.phase-controls { flex-wrap: wrap; gap: 9px; padding-top: 14px; }
.phase-controls .btn { min-height: 48px; }
.phase-controls label { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 8px; color: #486878; font-weight: 700; }
.phase-controls input { width: 19px; height: 19px; accent-color: #2e9276; }

.phase-live-panel { display: flex; flex-direction: column; padding: 17px; gap: 13px; background: #f8fbfc; }
.phase-current-card { padding: 17px; border-radius: 16px; background: linear-gradient(145deg, #173f58, #235f75); color: #fff; }
.phase-current-card > span { color: #b8dbe6; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.phase-current-card > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.phase-current-card > div > span { color: #b8dbe6; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.phase-current-card .phase-origin.preset { background: rgba(208,235,245,.17); color: #d9f2fb; }
.phase-current-card .phase-origin.custom { background: rgba(255,209,155,.17); color: #ffdfb5; }
.phase-current-card strong { display: block; margin: 7px 0 9px; font-family: "Plus Jakarta Sans", sans-serif; font-size: 18px; }
.phase-current-card p { margin: 0; color: #fff; font-size: 16px; line-height: 1.55; }
.phase-current-animation { padding: 14px; border: 1px solid #cfe2e8; border-radius: 15px; background: #fff; }
.phase-current-animation > span { color: #2e9276; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.phase-current-animation > strong { display: block; margin: 4px 0 9px; color: #173f58; font-size: 17px; }
.phase-current-animation ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: animation-step; }
.phase-current-animation li { position: relative; min-height: 30px; padding: 6px 8px 6px 34px; border-radius: 9px; background: #f1f6f8; color: #607985; font-size: 11px; font-weight: 700; }
.phase-current-animation li::before { counter-increment: animation-step; content: counter(animation-step); position: absolute; left: 7px; top: 5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #dce9ed; color: #52717e; font-size: 10px; }
.phase-current-animation li.active { background: #e8f7f1; color: #216d59; box-shadow: inset 3px 0 #2e9276; }
.phase-current-animation li.active::before { background: #2e9276; color: #fff; }
.phase-current-animation li.complete { color: #397363; }
.phase-current-animation li.complete::before { content: "✓"; background: #d6eee5; color: #26745f; }
.phase-current-animation > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.phase-current-animation > div b { padding: 4px 7px; border-radius: 7px; background: #e9f3f7; color: #34687f; font-size: 9px; }
.phase-metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.phase-metric-grid article { padding: 12px; border: 1px solid #d9e6ea; border-radius: 13px; background: #fff; }
.phase-metric-grid span,
.phase-metric-grid small { display: block; color: #718791; font-size: 11px; }
.phase-metric-grid strong { display: block; margin: 4px 0; color: #1b506a; font-size: 21px; }
.phase-rule-result { padding: 13px; border: 1px solid #cde5dc; border-radius: 14px; background: #eef8f4; }
.phase-rule-result span,
.phase-rule-result strong { display: block; }
.phase-rule-result span { color: #23735f; font-weight: 800; }
.phase-rule-result strong { margin-top: 5px; color: #526f79; font-size: 12px; line-height: 1.45; }
.phase-rule-result > small { display: block; margin-top: 7px; color: #66808c; font-size: 11px; font-weight: 700; }
.phase-guard-meter { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #dbe9e7; }
.phase-guard-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3d8fb7, #2e9276); transition: width .16s ease; }

.phase-mode-guide { display: grid; gap: 9px; padding-top: 2px; }
.phase-mode-guide h3 { margin: 0 0 3px; font-size: 16px; color: #234e63; }
.phase-mode-guide > span,
.phase-mode-guide > label,
.phase-mode-guide > button:not(.btn) { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 9px 11px; border: 1px solid #d8e5e9; border-radius: 11px; background: #fff; color: #456572; font-size: 12px; font-weight: 700; }
.phase-mode-guide > label { justify-content: flex-start; cursor: pointer; }
.phase-mode-guide > label input { width: 18px; height: 18px; accent-color: #2e9276; }
.phase-mode-guide > button:not(.btn) { cursor: pointer; }
.phase-mode-guide textarea { width: 100%; margin-top: 7px; }
.phase-mode-guide ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.phase-mode-guide li { display: flex; align-items: center; gap: 9px; color: #456572; font-size: 13px; }
.phase-mode-guide li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #dcefeb; color: #267864; font-weight: 800; }
.phase-stop-note { padding: 12px; border: 1px solid #f1d2c9; border-radius: 12px; background: #fff4ef; }
.phase-stop-note strong { color: #a34235; }
.phase-stop-note p { margin: 4px 0 0; color: #81564f; font-size: 12px; line-height: 1.5; }

.phase-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(90px, 1fr); gap: 8px; margin: 17px 0; overflow-x: auto; padding: 2px 0 5px; }
.phase-strip button { position: relative; display: flex; align-items: center; gap: 8px; min-width: 86px; min-height: 62px; padding: 9px; border: 1px solid #d5e3e8; border-radius: 13px; background: #fff; color: #516d7b; text-align: left; cursor: pointer; }
.phase-strip button::after { content: ""; position: absolute; right: -8px; top: 29px; width: 8px; height: 2px; background: #c9dce3; }
.phase-strip button:last-child::after { display: none; }
.phase-strip button i { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 50%; background: #e8f0f3; color: #5b7682; font-style: normal; font-size: 11px; font-weight: 800; }
.phase-strip button strong,
.phase-strip button small { display: block; }
.phase-strip button strong { color: #234d62; font-size: 17px; }
.phase-strip button small { margin-top: 1px; font-size: 10px; white-space: nowrap; }
.phase-strip button .phase-origin { margin-top: 4px; }
.phase-strip button.complete { border-color: #b7decf; background: #f0f9f5; }
.phase-strip button.complete i { background: #2e9276; color: #fff; }
.phase-strip button.active { border-color: #3d8fb7; background: #eaf6fb; box-shadow: 0 0 0 3px rgba(61, 143, 183, .12); }
.phase-strip button.active i { background: #3d8fb7; color: #fff; }

.phase-user-guide { margin: 0 0 17px; padding: 20px; }
.phase-user-guide .panel-header h3 { margin: 4px 0; color: #173f58; font-size: 22px; }
.phase-user-guide .panel-header p { max-width: 780px; margin: 0; color: #617b87; line-height: 1.55; }
.phase-user-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.phase-user-guide-grid > article { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid #d8e6ea; border-radius: 16px; background: linear-gradient(150deg, #fff, #f7fbfc); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.phase-user-guide-grid > article.active { border-color: #50a68c; box-shadow: 0 10px 24px rgba(46,146,118,.14); transform: translateY(-2px); }
.phase-user-guide-grid header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.phase-user-guide-grid header > span { color: #3d8fb7; font-family: "Plus Jakarta Sans", sans-serif; font-size: 11px; font-weight: 900; }
.phase-user-guide-grid h4 { margin: 10px 0; color: #1e4b61; font-size: 18px; }
.phase-user-guide-grid ol { display: grid; gap: 7px; margin: 0 0 12px; padding-left: 23px; color: #4e6b78; font-size: 13px; line-height: 1.45; }
.phase-user-detection { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; border-radius: 11px; background: #eef6f8; }
.phase-user-detection strong { flex-basis: 100%; color: #285c72; font-size: 11px; }
.phase-user-detection span { padding: 4px 7px; border-radius: 7px; background: #fff; color: #447080; font-size: 10px; font-weight: 800; }
.phase-user-safety { flex: 1; margin: 10px 0; padding-left: 10px; border-left: 3px solid #e8b84d; color: #745c31; font-size: 12px; line-height: 1.5; }
.phase-user-guide-grid .btn { min-height: 48px; }

.phase-source-manifest { margin: 0 0 17px; padding: 18px; }
.phase-source-manifest .panel-header h3 { margin: 4px 0; color: #173f58; font-size: 21px; }
.phase-source-manifest .panel-header p { max-width: 780px; margin: 0; color: #627c88; line-height: 1.55; }
.phase-source-list { display: grid; gap: 10px; margin-top: 15px; }
.phase-source-list > article { padding: 13px; border: 1px solid #d8e6ea; border-radius: 14px; background: #fbfdfd; }
.phase-source-list > article > header { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; }
.phase-source-list > article > header > span { color: #4f7484; font-family: "Plus Jakarta Sans", sans-serif; font-size: 11px; font-weight: 900; }
.phase-source-list > article > header > strong { color: #1f4e64; font-size: 15px; }
.phase-source-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.phase-source-pair section { min-width: 0; padding: 11px; border: 1px solid #d9e7eb; border-radius: 11px; background: #fff; }
.phase-source-pair section.active { border-color: #efcf9f; background: #fff9f0; }
.phase-source-pair section.empty { border-style: dashed; background: #f8fafb; }
.phase-source-label { display: inline-flex; margin-bottom: 6px; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; }
.phase-source-label.preset { background: #e7f1f6; color: #316a85; }
.phase-source-label.custom { background: #fff0df; color: #a75e20; }
.phase-source-pair strong,
.phase-source-pair small { display: block; }
.phase-source-pair strong { color: #234f63; font-size: 13px; }
.phase-source-pair small { margin-top: 2px; color: #728994; font-size: 10px; }
.phase-source-pair p { margin: 7px 0 0; color: #56727f; font-family: "Plus Jakarta Sans", sans-serif; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.phase-animation-architecture { margin-top: 9px; padding: 11px; border: 1px solid #cfe4de; border-radius: 11px; background: #eff8f5; }
.phase-animation-architecture span,
.phase-animation-architecture strong,
.phase-animation-architecture small { display: block; }
.phase-animation-architecture span { color: #2b7a64; font-size: 9px; font-weight: 900; letter-spacing: .06em; }
.phase-animation-architecture strong { margin-top: 3px; color: #1f5262; font-size: 13px; }
.phase-animation-architecture p { margin: 5px 0; color: #4f716d; font-size: 10px; line-height: 1.5; }
.phase-animation-architecture small { color: #66808a; font-size: 9px; }
.phase-source-list > article > footer { display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; }
.phase-source-list > article > footer button { min-height: 40px; padding: 7px 10px; border: 1px solid #cadde4; border-radius: 9px; background: #fff; color: #326377; font-size: 11px; font-weight: 800; cursor: pointer; }
.phase-source-list > article > footer button:disabled { opacity: .45; cursor: not-allowed; }
.phase-source-list > article > footer button[data-phase-source-action="customize"]:not(:disabled) { border-color: #efc992; background: #fff8ed; color: #9a591f; }
.motion-phase-sync-toolbar { margin-bottom: 14px; padding: 14px; border: 1px solid #bfe0d4; border-radius: 14px; background: #eff9f5; }

.phase-lower-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 17px; }
.phase-event-panel,
.phase-detection-panel { padding: 18px; }
.phase-event-list { display: grid; max-height: 315px; overflow-y: auto; }
.phase-event-list article { display: grid; grid-template-columns: 76px 12px 1fr auto; gap: 10px; align-items: center; padding: 11px 3px; border-bottom: 1px solid #e5edf0; }
.phase-event-list time { color: #557381; font-family: "Plus Jakarta Sans", sans-serif; font-size: 11px; }
.phase-event-list i { width: 9px; height: 9px; border-radius: 50%; background: #3d8fb7; box-shadow: 0 0 0 4px rgba(61, 143, 183, .12); }
.phase-event-list i.success { background: #2e9276; box-shadow: 0 0 0 4px rgba(46, 146, 118, .12); }
.phase-event-list i.warning { background: #e8b84d; box-shadow: 0 0 0 4px rgba(232, 184, 77, .14); }
.phase-event-list i.danger { background: #d65353; box-shadow: 0 0 0 4px rgba(214, 83, 83, .14); }
.phase-event-list strong,
.phase-event-list small { display: block; }
.phase-event-list strong { color: #244e63; font-size: 13px; }
.phase-event-list small { margin-top: 2px; color: #6f858f; font-size: 11px; }
.phase-detection-list { display: grid; gap: 9px; }
.phase-detection-list span { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 9px; padding: 11px; border-radius: 12px; background: #f3f8f9; color: #55717e; font-size: 12px; }
.phase-detection-list i { width: 9px; height: 9px; border-radius: 50%; background: #3d8fb7; }
.phase-detection-list i.hand { background: #7a83c7; }
.phase-detection-list i.object { background: #e4873b; }
.phase-detection-list i.risk { background: #2e9276; }
.phase-detection-list strong { color: #214d63; text-align: right; }
.phase-detection-list strong.warning { color: #b26128; }
.phase-evidence-row { gap: 8px; margin-top: 13px; }
.phase-evidence-row button { flex: 1; min-height: 44px; padding: 8px; border: 1px solid #cbdfe6; border-radius: 11px; background: #fff; color: #285a70; font-weight: 800; cursor: pointer; }

.phase-algorithm-editor { margin-top: 18px; padding: 19px; }
.phase-algorithm-editor > .panel-header h3,
.phase-trigger-settings h3 { margin: 4px 0; color: #173f58; font-size: 21px; }
.phase-algorithm-editor > .panel-header p,
.phase-trigger-settings .panel-header p { margin: 0; color: #657f8b; line-height: 1.55; }
.phase-preset-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 17px 0; padding: 12px 14px; border: 1px solid #d8e7eb; border-radius: 14px; background: #f5fafb; }
.phase-preset-row strong { margin-right: 3px; color: #345d70; }
.phase-preset-row button,
.phase-block-filters button,
.phase-composer-workflow header button { min-height: 40px; padding: 7px 12px; border: 1px solid #c8dce3; border-radius: 10px; background: #fff; color: #315d70; font-weight: 800; cursor: pointer; }
.phase-preset-row button:hover,
.phase-block-filters button.active { border-color: #4c9b8a; background: #eaf7f2; color: #216d5a; }
.phase-composer-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 16px; }
.phase-block-library,
.phase-composer-workflow,
.phase-trigger-settings { min-width: 0; padding: 16px; border: 1px solid #d8e6ea; border-radius: 17px; background: #fff; }
.phase-block-library > header,
.phase-composer-workflow > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.phase-block-library h4,
.phase-composer-workflow h4 { margin: 0; color: #1d4b62; font-size: 18px; }
.phase-block-library header p,
.phase-composer-workflow header p { margin: 3px 0 0; color: #6b838e; font-size: 12px; }
.phase-block-library input { width: min(230px, 100%); min-height: 44px; padding: 9px 12px; border: 1px solid #cbdde4; border-radius: 11px; background: #fbfdfd; }
.phase-block-filters { display: flex; gap: 6px; margin: 13px 0; padding-bottom: 3px; overflow-x: auto; }
.phase-block-filters button { min-height: 36px; white-space: nowrap; font-size: 12px; }
.phase-block-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-height: 650px; overflow-y: auto; padding-right: 4px; }
.phase-block-cards article { padding: 12px; border: 1px solid #dce8ec; border-radius: 13px; background: linear-gradient(150deg, #fff, #f8fbfc); }
.phase-block-cards article[hidden] { display: none; }
.phase-block-cards article > div { display: flex; justify-content: space-between; gap: 7px; }
.phase-block-cards article > div span,
.phase-block-cards article > div b { padding: 4px 7px; border-radius: 7px; background: #eaf5f2; color: #28735f; font-size: 10px; }
.phase-block-cards article > div b { background: #eaf3f8; color: #326b87; }
.phase-block-cards h5 { margin: 9px 0 5px; color: #214d62; font-size: 15px; }
.phase-block-cards p { min-height: 35px; margin: 0; color: #627b87; font-size: 11px; line-height: 1.5; }
.phase-block-animation { display: grid !important; justify-content: stretch !important; gap: 2px !important; margin-top: 9px; padding: 9px; border: 1px solid #cfe4de; border-radius: 10px; background: #eff8f5; }
.phase-block-animation span { width: max-content; padding: 0 !important; background: transparent !important; color: #2c765f !important; font-size: 9px !important; }
.phase-block-animation strong { color: #214f60; font-size: 12px; }
.phase-block-animation small { color: #5f7b7d; font-size: 9px; line-height: 1.45; }
.phase-block-cards dl { margin: 9px 0; }
.phase-block-cards dl div { display: grid; grid-template-columns: 42px 1fr; gap: 5px; padding: 4px 0; border-top: 1px dashed #e1eaed; font-size: 10px; }
.phase-block-cards dt { color: #78909a; }
.phase-block-cards dd { margin: 0; color: #405f6e; overflow-wrap: anywhere; }
.phase-block-cards article > button { width: 100%; min-height: 40px; border: 1px solid #aad8c8; border-radius: 10px; background: #edf8f4; color: #21725c; font-weight: 800; cursor: pointer; }
.phase-composer-workflow > header > div:last-child { display: flex; gap: 6px; }
.phase-composer-lane { display: grid; gap: 8px; max-height: 650px; margin-top: 13px; overflow-y: auto; padding-right: 4px; }
.phase-composer-block { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid #d4e4e8; border-radius: 13px; background: #fbfdfd; box-shadow: 0 4px 12px rgba(27, 67, 87, .05); }
.phase-composer-block.is-custom { border-color: #e6c599; background: linear-gradient(150deg, #fffdf9, #fff7ed); }
.phase-composer-index { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #2e9276, #3d8fb7); color: #fff; font-weight: 900; }
.phase-composer-copy > span { color: #6c8791; font-size: 10px; font-weight: 800; }
.phase-composer-copy > span .phase-origin { margin-left: 5px; vertical-align: middle; }
.phase-composer-copy > strong,
.phase-composer-copy > small { display: block; }
.phase-composer-copy > strong { margin: 2px 0; color: #214d62; font-size: 14px; }
.phase-composer-copy > small { color: #607985; font-size: 10px; overflow-wrap: anywhere; }
.phase-composer-animation { min-height: 0 !important; margin: 5px 0 0 !important; color: #28735f !important; font-size: 10px !important; font-weight: 800; }
.phase-composer-copy > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.phase-composer-copy b { padding: 3px 6px; border-radius: 6px; background: #eaf4f6; color: #52717f; font-size: 9px; }
.phase-composer-actions { display: grid; grid-template-columns: repeat(2, auto); gap: 4px; }
.phase-composer-actions button { min-height: 34px; padding: 5px 7px; border: 1px solid #d2e1e6; border-radius: 8px; background: #fff; color: #416878; font-size: 10px; font-weight: 800; cursor: pointer; }
.phase-composer-link { position: absolute; left: 26px; bottom: -13px; z-index: 2; color: #3d8fb7; font-style: normal; font-weight: 900; transform: rotate(90deg); }
.phase-composer-validation { margin-top: 12px; padding: 13px; border: 1px solid #bfe0d4; border-radius: 13px; background: #eff9f5; }
.phase-composer-validation strong { color: #246e5b; }
.phase-composer-validation strong.danger { color: #b64747; }
.phase-composer-validation p { margin: 5px 0 9px; color: #57756f; font-size: 11px; line-height: 1.55; }
.phase-composer-validation ul { margin: 7px 0 0; padding-left: 19px; color: #7d4b45; font-size: 12px; }
.phase-composer-validation div { display: flex; flex-wrap: wrap; gap: 6px; }
.phase-composer-validation div span { padding: 4px 7px; border-radius: 7px; background: #dbeee7; color: #2c725f; font-size: 10px; font-weight: 800; }
.phase-trigger-settings { margin-top: 16px; padding: 0; border: 0; }
.phase-rule-table { overflow-x: auto; border: 1px solid #d9e6eb; border-radius: 14px; }
.phase-rule-head,
.phase-rule-table article { display: grid; grid-template-columns: 1fr .65fr 1fr .8fr .9fr 1.3fr; gap: 12px; align-items: center; min-width: 1280px; }
.phase-rule-head { padding: 10px 13px; background: #eaf2f5; color: #55727e; font-size: 11px; font-weight: 800; }
.phase-rule-table article { padding: 11px 13px; border-top: 1px solid #e2ebee; background: #fff; color: #52707d; font-size: 12px; }
.phase-rule-table article > span:first-child { display: flex; align-items: center; gap: 8px; }
.phase-rule-table article > span:first-child i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #e5f2ef; color: #24765f; font-style: normal; font-weight: 800; }
.phase-rule-table article label { display: flex; align-items: center; gap: 5px; }
.phase-rule-table article input { width: 65px; min-height: 40px; padding: 7px; }
.phase-rule-table .phase-animation-select select { width: 100%; min-height: 42px; padding: 8px 32px 8px 10px; border: 1px solid #c9dce3; border-radius: 10px; background: #f8fbfc; color: #285c71; font-weight: 800; }
.phase-rule-table article em { color: #78909a; font-style: normal; white-space: nowrap; }
.phase-rule-table .phase-guard-inputs { display: flex; flex-wrap: wrap; gap: 5px; }
.phase-rule-table .phase-guard-inputs span { display: inline-flex; align-items: center; gap: 4px; color: #607a86; white-space: nowrap; }
.phase-rule-table .phase-guard-inputs input { width: 72px; }
.phase-rule-table .phase-trigger-copy { display: grid; gap: 5px; }
.phase-rule-table .phase-trigger-copy span { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 5px; color: #627c87; font-size: 10px; font-weight: 800; }
.phase-rule-table .phase-trigger-copy input { width: 100%; min-height: 36px; font-family: "Plus Jakarta Sans", sans-serif; font-size: 10px; }
.phase-preview-note { justify-content: space-between; gap: 18px; margin-top: 18px; padding: 18px; }
.phase-preview-note p { margin: 4px 0 0; color: #627b87; }
.phase-assignment-summary { display: grid; gap: 10px; margin: 14px 0 17px; }
.phase-assignment-summary span { padding: 10px 12px; border-radius: 11px; background: #f1f7f8; color: #58727d; font-size: 13px; }
.phase-assignment-summary strong { display: block; margin-bottom: 3px; color: #234d62; }
.phase-patient-support { margin-top: 18px; }
.phase-mode-patient .phase-current-card { background: linear-gradient(145deg, #246f70, #318b75); }
.phase-mode-patient .phase-console-head h2 { font-size: clamp(27px, 2.6vw, 38px); }
.phase-mode-patient .phase-controls .btn { min-height: 54px; font-size: 16px; }
.patient-motion-screen { padding: 22px; border-color: #cfe1e5; background: linear-gradient(180deg, #f7fbfc 0, #eef7f6 100%); box-shadow: 0 20px 60px rgba(31, 73, 92, .12); }
.patient-session-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 17px; }
.patient-session-head h2 { margin: 5px 0 7px; color: #173f56; font-size: clamp(29px, 3vw, 42px); letter-spacing: -.035em; }
.patient-session-head p { max-width: 760px; margin: 0; color: #58727e; font-size: 17px; line-height: 1.7; }
.patient-session-head > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.patient-assignment-bar { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid #d6e5e8; border-radius: 16px; background: #d6e5e8; }
.patient-assignment-bar span { display: grid; gap: 3px; padding: 14px 16px; background: #fff; }
.patient-assignment-bar small { color: #6b828c; font-size: 12px; font-weight: 800; }
.patient-assignment-bar strong { color: #234f63; font-size: 15px; }
.patient-live-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .72fr); gap: 17px; align-items: stretch; }
.patient-camera-card { padding: 14px; }
.patient-camera-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 2px 12px; }
.patient-camera-head > div { display: grid; gap: 3px; }
.patient-camera-head span { color: #6b828c; font-size: 13px; font-weight: 800; }
.patient-camera-head strong { color: #153e59; font-size: 23px; }
.patient-camera-head > b { padding: 8px 11px; border-radius: 999px; background: #e2f3ed; color: #24735e; font-size: 13px; }
.patient-camera-card .phase-canvas-wrap canvas { min-height: 430px; }
.patient-camera-note { display: flex; align-items: center; gap: 10px; margin-top: 11px; padding: 10px 12px; border-radius: 12px; background: #f0f8f6; color: #486b73; }
.patient-camera-note span { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: #d8f1e8; color: #1f6f59; font-size: 12px; font-weight: 900; }
.patient-camera-note p { margin: 0; font-size: 13px; line-height: 1.5; }
.patient-controls { display: grid; grid-template-columns: 1fr 1.2fr 1fr 1fr; gap: 9px; }
.patient-controls .btn { min-height: 54px; font-size: 15px; }
.patient-help-button { border: 1px solid #d65353; background: #fff3f2; color: #b53737; font-weight: 900; }
.patient-loop-setting { grid-column: 1 / -1; min-height: 32px !important; justify-content: flex-start !important; font-size: 13px; }
.patient-coach-card { display: flex; flex-direction: column; gap: 13px; padding: 19px; border: 1px solid #d1e3e6; border-radius: 20px; background: #fff; box-shadow: 0 12px 28px rgba(31, 73, 92, .08); }
.patient-coach-label { width: max-content; padding: 5px 9px; border-radius: 999px; background: #dff3ec; color: #24745d; font-size: 12px; font-weight: 900; }
.patient-coach-card h3 { margin: -2px 0 0; color: #163f56; font-size: 26px; line-height: 1.25; }
.patient-coach-feedback { margin: 0; padding: 13px 14px; border-left: 4px solid #3d8fb7; border-radius: 8px 13px 13px 8px; background: #edf6fa; color: #21566f; font-size: 18px; font-weight: 900; line-height: 1.55; }
.patient-coach-card ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.patient-coach-card ol li { display: flex; align-items: center; gap: 9px; min-height: 47px; padding: 9px 11px; border: 1px solid #e1eaed; border-radius: 12px; color: #617983; font-size: 15px; font-weight: 700; }
.patient-coach-card ol li i { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #edf3f5; color: #55717d; font-style: normal; }
.patient-coach-card ol li.active { border-color: #79b9a5; background: #eff9f5; color: #205e4d; }
.patient-coach-card ol li.active i { background: #2e9276; color: #fff; }
.patient-coach-card ol li.complete { color: #3e7565; }
.patient-detection-guide { display: grid; gap: 8px; padding-top: 4px; }
.patient-detection-guide > strong { color: #375c6d; font-size: 13px; }
.patient-detection-guide > div { display: flex; flex-wrap: wrap; gap: 6px; }
.patient-detection-guide b { padding: 5px 8px; border-radius: 8px; background: #f1f6f7; color: #58747f; font-size: 12px; }
.patient-next-action { display: grid; gap: 3px; padding: 11px 12px; border-radius: 12px; background: #f6f9fa; }
.patient-next-action small { color: #71858d; font-weight: 800; }
.patient-next-action strong { color: #234f63; line-height: 1.45; }
.patient-safe-stop { margin-top: auto; padding: 12px 13px; border: 1px solid #f0caca; border-radius: 13px; background: #fff5f4; }
.patient-safe-stop strong { color: #b53d3d; }
.patient-safe-stop p { margin: 4px 0 0; color: #845a5a; font-size: 13px; line-height: 1.55; }
.patient-rom-panel { margin-top: 18px; padding: 20px; border: 1px solid #cfe1e5; border-radius: 21px; background: #fff; box-shadow: 0 13px 34px rgba(31, 73, 92, .08); }
.patient-rom-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.patient-rom-panel h3 { margin: 4px 0; color: #153e59; font-size: 26px; }
.patient-rom-panel header p { margin: 0; color: #657d87; }
.patient-rom-filter { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #eef4f5; }
.patient-rom-filter button { min-height: 40px; border: 0; border-radius: 9px; padding: 0 13px; background: transparent; color: #55717d; font-weight: 900; }
.patient-rom-filter button.active { background: #fff; color: #1f6f59; box-shadow: 0 3px 9px rgba(31, 73, 92, .1); }
.patient-rom-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.patient-rom-table article { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; min-width: 0; padding: 12px 13px; border: 1px solid #dce8eb; border-radius: 14px; background: #f9fbfc; }
.patient-rom-table article > span { color: #466777; font-size: 14px; font-weight: 900; }
.patient-rom-table article > span small { display: block; margin-top: 2px; color: #809099; font-size: 11px; }
.patient-rom-table article > strong { color: #1c6f62; font-family: "Plus Jakarta Sans", sans-serif; font-size: 27px; letter-spacing: -.04em; }
.patient-rom-table article > em { grid-column: 1 / -1; color: #7a8d95; font-size: 11px; font-style: normal; }
.patient-rom-table article > em b { color: #446675; }
.patient-rom-chart-wrap { margin-top: 14px; overflow: hidden; border: 1px solid #dce8eb; border-radius: 16px; background: #fbfdfd; }
.patient-rom-chart-head { display: flex; justify-content: space-between; gap: 15px; padding: 13px 16px 6px; color: #365d6e; }
.patient-rom-chart-head span { color: #2b8068; font-size: 13px; font-weight: 800; }
.patient-rom-chart-wrap canvas { display: block; width: 100%; height: auto; min-height: 220px; }
.patient-rom-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 6px 16px 13px; color: #617983; font-size: 11px; font-weight: 800; }
.patient-rom-legend span::before { content: ""; display: inline-block; width: 14px; height: 4px; margin-right: 5px; border-radius: 4px; vertical-align: middle; background: #78909a; }
.patient-rom-legend .ls::before { background:#d65353; }.patient-rom-legend .rs::before { background:#e8b84d; }.patient-rom-legend .le::before { background:#2e9276; }.patient-rom-legend .re::before { background:#34b8bd; }.patient-rom-legend .lh::before { background:#4656c9; }.patient-rom-legend .rh::before { background:#bf4fc2; }.patient-rom-legend .lk::before { background:#2672a5; }.patient-rom-legend .rk::before { background:#e4873b; }
.patient-rom-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 15px; }
.patient-rom-panel > footer strong { color: #355b6c; }
.patient-rom-panel > footer p { margin: 4px 0 0; color: #748991; font-size: 12px; }
.patient-journey { margin-top: 18px; padding: 19px; }
.patient-journey > div:last-child { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.patient-journey article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid #e0eaed; border-radius: 13px; background: #fafcfc; }
.patient-journey article > i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #edf3f5; color: #57727d; font-style: normal; font-weight: 900; }
.patient-journey article div { min-width: 0; }
.patient-journey article strong,.patient-journey article small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patient-journey article strong { color: #355d6e; font-size: 13px; }.patient-journey article small { margin-top: 2px; color: #809099; font-size: 11px; }
.patient-journey article > span { color: #82939a; font-size: 11px; font-weight: 900; }
.patient-journey article.active { border-color: #72b9a2; background: #eff9f5; }.patient-journey article.active > i { background: #2e9276; color: #fff; }.patient-journey article.active > span { color: #25735e; }
.patient-journey article.complete { background: #f5faf8; }.patient-journey article.complete > i { background: #d9f0e8; color: #24735e; }.patient-journey article.complete > span { color: #24735e; }
.patient-technical-mirror,.patient-live-summary { display: none !important; }
.phase-mode-care { border-left: 5px solid #2e9276; }
.phase-mode-review { border-left: 5px solid #3d8fb7; }
.motion-builder-panel .phase-motion-console { margin-top: 22px; padding: 16px; }
.motion-builder-panel .phase-stage-layout { grid-template-columns: 1fr; }
.motion-builder-panel .phase-live-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.motion-builder-panel .phase-mode-guide { grid-column: 1 / -1; }
.motion-builder-panel .phase-lower-grid { grid-template-columns: 1fr; }

@media (max-width: 1180px) {
  .patient-live-layout { grid-template-columns: 1fr; }
  .patient-coach-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-coach-card > h3,.patient-coach-card > .patient-coach-label,.patient-coach-card > .patient-coach-feedback,.patient-coach-card > .patient-safe-stop { grid-column: 1 / -1; }
  .patient-rom-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-journey > div:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-stage-layout { grid-template-columns: 1fr; }
  .phase-live-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-mode-guide { grid-column: 1 / -1; }
  .phase-user-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-strip { grid-auto-columns: 92px; }
  .phase-composer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .patient-motion-screen { margin-inline: -3px; padding: 12px; }
  .patient-session-head { flex-direction: column; gap: 12px; }
  .patient-session-head h2 { font-size: 28px; line-height: 1.22; }
  .patient-session-head p { font-size: 16px; }
  .patient-session-head > div:last-child { justify-content: flex-start; }
  .patient-assignment-bar { grid-template-columns: 1fr; }
  .patient-assignment-bar span { padding: 12px 13px; }
  .patient-camera-head { align-items: flex-start; }
  .patient-camera-head strong { font-size: 20px; }
  .patient-camera-head > b { padding: 6px 8px; font-size: 11px; }
  .patient-camera-card .phase-canvas-wrap canvas { min-height: 260px; }
  .patient-camera-note { align-items: flex-start; flex-direction: column; }
  .patient-controls { grid-template-columns: 1fr; }
  .patient-controls .btn,.patient-controls [data-phase-detect] { grid-column: auto; min-height: 56px; font-size: 16px; }
  .patient-loop-setting { grid-column: auto; }
  .patient-coach-card { display: flex; padding: 16px; }
  .patient-coach-card h3 { font-size: 24px; }
  .patient-coach-feedback { font-size: 17px; }
  .patient-rom-panel { padding: 14px; }
  .patient-rom-panel > header,.patient-rom-panel > footer { align-items: stretch; flex-direction: column; }
  .patient-rom-filter { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .patient-rom-filter button { padding: 0 8px; }
  .patient-rom-table { grid-template-columns: 1fr 1fr; gap: 7px; }
  .patient-rom-table article { grid-template-columns: 1fr; padding: 10px; }
  .patient-rom-table article > strong { font-size: 25px; }
  .patient-rom-table article > em { grid-column: auto; }
  .patient-rom-chart-wrap canvas { min-height: 180px; }
  .patient-rom-legend { gap: 7px 10px; }
  .patient-rom-panel > footer .button-row { display: grid; grid-template-columns: 1fr; }
  .patient-rom-panel > footer .btn { min-height: 52px; }
  .patient-journey { padding: 14px; }
  .patient-journey > div:last-child { grid-template-columns: 1fr; }
  .phase-motion-console { margin: 0 0 18px; padding: 14px; border-radius: 19px; }
  .phase-console-head { align-items: flex-start; flex-direction: column; margin-bottom: 14px; }
  .phase-console-head > div:last-child { align-self: stretch; justify-content: space-between; }
  .phase-console-head h2 { font-size: 25px; }
  .phase-console-head p { font-size: 15px; line-height: 1.6; }
  .phase-workflow-sync { align-items: flex-start; flex-wrap: wrap; }
  .phase-workflow-sync strong { margin-left: 0; }
  .phase-workflow-sync small { flex-basis: 100%; }
  .phase-stage-card { padding: 10px; border-radius: 15px; }
  .phase-stage-top { align-items: flex-start; flex-direction: column; }
  .phase-stage-switch { width: 100%; }
  .phase-stage-switch button { flex: 1; }
  .phase-canvas-wrap canvas { min-height: 250px; }
  .phase-camera-label { top: 8px; left: 8px; }
  .phase-live-badges { right: 8px; bottom: 8px; }
  .phase-live-badges span:nth-child(3) { display: none; }
  .phase-live-privacy { flex-direction: column; gap: 7px; padding: 12px; }
  .phase-live-privacy p { font-size: 14px; }
  .phase-controls { display: grid; grid-template-columns: repeat(2, 1fr); }
  .phase-controls .btn:first-child,
  .phase-controls [data-phase-detect] { grid-column: 1 / -1; min-height: 54px; }
  .phase-controls label { justify-content: center; }
  .phase-live-panel,
  .motion-builder-panel .phase-live-panel { display: flex; }
  .phase-user-guide { padding: 14px; }
  .phase-user-guide-grid { grid-template-columns: 1fr; }
  .phase-user-guide-grid > article { padding: 15px; }
  .phase-user-guide-grid h4 { font-size: 19px; }
  .phase-user-guide-grid ol { font-size: 15px; }
  .phase-user-detection span { font-size: 12px; }
  .phase-current-animation li { min-height: 36px; padding-top: 9px; font-size: 13px; }
  .phase-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-strip { margin-inline: -14px; padding-inline: 14px; }
  .phase-lower-grid { grid-template-columns: 1fr; }
  .phase-event-panel,
  .phase-detection-panel { padding: 13px; }
  .phase-event-list article { grid-template-columns: 68px 10px 1fr; }
  .phase-event-list .status-badge { grid-column: 3; justify-self: start; }
  .phase-evidence-row { flex-direction: column; }
  .phase-evidence-row button { width: 100%; }
  .phase-preview-note { align-items: stretch; flex-direction: column; }
  .phase-algorithm-editor { padding: 12px; }
  .phase-preset-row { align-items: stretch; }
  .phase-preset-row strong { flex-basis: 100%; }
  .phase-preset-row button { flex: 1 1 140px; min-height: 48px; }
  .phase-block-library,
  .phase-composer-workflow { padding: 12px; }
  .phase-block-library > header,
  .phase-composer-workflow > header { align-items: stretch; flex-direction: column; }
  .phase-block-library input { width: 100%; min-height: 48px; }
  .phase-block-filters button { min-height: 44px; }
  .phase-block-cards { grid-template-columns: 1fr; max-height: 560px; }
  .phase-block-cards article > button { min-height: 48px; }
  .phase-composer-workflow > header > div:last-child { width: 100%; }
  .phase-composer-workflow header button { flex: 1; min-height: 48px; }
  .phase-composer-block { grid-template-columns: 36px minmax(0, 1fr); }
  .phase-composer-actions { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .phase-composer-actions button { min-height: 44px; }
  .phase-source-manifest { padding: 13px; }
  .phase-source-manifest .panel-header { align-items: flex-start; flex-direction: column; }
  .phase-source-list > article > header { grid-template-columns: 72px 1fr; }
  .phase-source-list > article > header .phase-origin { grid-column: 2; justify-self: start; }
  .phase-source-pair { grid-template-columns: 1fr; }
  .phase-source-list > article > footer { display: grid; grid-template-columns: repeat(2, 1fr); }
  .phase-source-list > article > footer button { min-height: 48px; }
  .phase-source-list > article > footer button:last-child { grid-column: 1 / -1; }
}

/* Patient-only Brunnstrom MediaPipe analysis */
.patient-assigned-only-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 15px; padding: 14px 16px; border: 1px solid #cfe1e6; border-radius: 14px; background: #f5fafb; color: #58727f; }
.patient-assigned-only-note .icon { flex: 0 0 auto; width: 22px; color: #34836e; }
.patient-assigned-only-note p { margin: 0; font-size: .9rem; line-height: 1.62; }
.patient-brs-page { display: grid; gap: 18px; }
.patient-brs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding: 29px 31px; border: 1px solid #c9e1df; border-radius: 26px; background: linear-gradient(135deg, #fbfefe 0%, #e9f8f2 58%, #edf6fb 100%); box-shadow: 0 14px 34px rgba(25, 77, 87, .08); }
.patient-brs-head h1 { margin: 7px 0 10px; color: #153f54; font-size: clamp(2rem, 3.5vw, 2.8rem); line-height: 1.15; }
.patient-brs-head p { max-width: 800px; margin: 0; color: #587481; font-size: 1.08rem; line-height: 1.72; }
.patient-brs-head > div:last-child { display: grid; gap: 8px; min-width: 205px; }
.patient-brs-head > div:last-child span { display: flex; align-items: center; gap: 8px; min-height: 45px; padding: 0 12px; border: 1px solid #cde2df; border-radius: 12px; background: rgba(255,255,255,.78); color: #326c64; font-size: .85rem; font-weight: 850; }
.patient-brs-head > div:last-child .icon { width: 19px; }
.patient-brs-selector, .patient-brs-plan, .patient-brs-analysis, .patient-brs-result, .patient-brs-history { padding: 22px; }
.patient-brs-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.patient-brs-type { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 13px; min-height: 128px; padding: 17px; border: 2px solid #d8e5e8; border-radius: 19px; background: #fff; color: #284f61; text-align: left; cursor: pointer; transition: border .2s ease, transform .2s ease, box-shadow .2s ease; }
.patient-brs-type:hover { transform: translateY(-2px); border-color: #78bca8; }
.patient-brs-type.active { border-color: #389178; background: linear-gradient(135deg, #f5fcf9, #edf8fb); box-shadow: 0 0 0 4px rgba(56,145,120,.1); }
.patient-brs-type .icon-box { width: 54px; height: 54px; border-radius: 16px; background: #e5f4ef; color: #2d8069; }
.patient-brs-type > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.patient-brs-type small { color: #3a8c77; font: 900 .78rem var(--font-display); letter-spacing: .08em; }
.patient-brs-type strong { font-size: 1.15rem; }
.patient-brs-type em { color: #6a808a; font-size: .83rem; font-style: normal; line-height: 1.45; }
.patient-brs-type b { grid-column: 2; justify-self: start; padding: 5px 9px; border-radius: 999px; background: #edf4f6; color: #50717d; font-size: .76rem; }
.patient-brs-type.active b { background: #dff2eb; color: #26725d; }
.patient-brs-plan > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.patient-brs-plan h2 { margin: 5px 0; color: #1b485c; font-size: 1.45rem; }
.patient-brs-plan header p { max-width: 780px; margin: 0; color: #647c87; font-size: .96rem; line-height: 1.6; }
.patient-brs-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.patient-brs-steps article { display: grid; grid-template-columns: 38px minmax(0,1fr); align-content: start; gap: 10px; min-height: 170px; padding: 15px; border: 1px solid #dae6e9; border-radius: 16px; background: #f9fcfd; }
.patient-brs-steps article > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #e9f1f4; color: #426a7c; font-weight: 900; }
.patient-brs-steps article > div { display: grid; align-content: start; gap: 5px; }
.patient-brs-steps strong { color: #2a5264; font-size: 1rem; }
.patient-brs-steps p { margin: 0; color: #647c87; font-size: .86rem; line-height: 1.52; }
.patient-brs-steps small { color: #82939a; font-size: .75rem; }
.patient-brs-steps i { grid-column: 2; justify-self: start; padding: 5px 9px; border-radius: 999px; background: #edf2f4; color: #667c85; font-size: .72rem; font-style: normal; font-weight: 850; }
.patient-brs-steps article.active { border-color: #4d9d86; background: #eff9f5; box-shadow: inset 0 0 0 1px #4d9d86; }
.patient-brs-steps article.active > span { background: #33876f; color: #fff; }
.patient-brs-steps article.done { border-color: #a7d5c7; background: #f5fbf8; }
.patient-brs-steps article.done i { background: #dff2eb; color: #26725d; }
.patient-brs-setup-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; padding: 14px 16px; border: 1px solid #ebd29c; border-radius: 14px; background: #fffaf0; color: #805e2b; }
.patient-brs-setup-note .icon { flex: 0 0 auto; width: 23px; }
.patient-brs-setup-note p { margin: 0; font-size: .9rem; line-height: 1.6; }
.patient-brs-analysis-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.6fr); gap: 15px; }
.patient-brs-camera { position: relative; min-height: 500px; overflow: hidden; border: 1px solid #214c5f; border-radius: 20px; background: radial-gradient(circle at 50% 35%, #255267, #102b39 76%); }
.patient-brs-camera video, .patient-brs-camera canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.patient-brs-camera canvas { z-index: 2; }
.patient-brs-camera-badges { position: absolute; z-index: 3; top: 12px; right: 12px; left: 12px; display: flex; justify-content: space-between; gap: 9px; pointer-events: none; }
.patient-brs-camera-badges span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(7,28,38,.72); color: #e0f8f1; font-size: .75rem; font-weight: 850; backdrop-filter: blur(8px); }
.patient-brs-camera-badges i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #38d6a9; box-shadow: 0 0 0 4px rgba(56,214,169,.16); }
.patient-brs-live-cue { position: absolute; z-index: 3; right: 16px; bottom: 16px; left: 16px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(7,31,43,.82); color: #fff; backdrop-filter: blur(12px); }
.patient-brs-live-cue small { display: block; color: #8ce3cb; font-weight: 900; }
.patient-brs-live-cue strong { display: block; margin: 3px 0; font-size: clamp(1.15rem,2vw,1.5rem); }
.patient-brs-live-cue p { margin: 0; color: #d7e8ed; font-size: .9rem; }
.patient-brs-controls { display: flex; flex-direction: column; padding: 17px; border: 1px solid #d4e3e7; border-radius: 19px; background: #f9fcfd; }
.patient-brs-live-metrics { display: grid; gap: 8px; }
.patient-brs-live-metrics article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; padding: 11px 12px; border: 1px solid #dce8eb; border-radius: 12px; background: #fff; }
.patient-brs-live-metrics span { color: #66808b; font-size: .79rem; font-weight: 850; }
.patient-brs-live-metrics strong { color: #206f5b; font: 900 1.08rem var(--font-display); }
.patient-brs-live-metrics small { grid-column: 1 / -1; color: #85959c; font-size: .73rem; }
.patient-brs-controls > label:not(.patient-brs-safety) { display: grid; gap: 6px; margin-top: 13px; color: #526f7b; font-size: .82rem; font-weight: 850; }
.patient-brs-controls select { min-height: 52px; padding: 0 13px; border: 1px solid #cbdde2; border-radius: 12px; background: #fff; color: #214b5d; font: 800 1rem var(--font-sans); }
.patient-brs-safety { display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 13px; border: 1px solid #e8cf9e; border-radius: 13px; background: #fff9ee; cursor: pointer; }
.patient-brs-safety input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: #31836d; }
.patient-brs-safety span { display: grid; gap: 3px; }
.patient-brs-safety strong { color: #725222; font-size: .9rem; }
.patient-brs-safety small { color: #8c7049; font-size: .76rem; line-height: 1.48; }
.patient-brs-primary-actions { display: grid; gap: 8px; margin-top: 13px; }
.patient-brs-primary-actions .btn { min-height: 52px; }
.patient-brs-emergency { min-height: 52px; border: 1px solid #d8958f; border-radius: 12px; background: #fff3f2; color: #a74d49; font: 900 .9rem var(--font-sans); cursor: pointer; }
.patient-brs-result { border-color: #aed8c9; background: linear-gradient(135deg,#fff,#f4fbf8); }
.patient-brs-result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.patient-brs-result-grid article { display: grid; gap: 5px; min-height: 122px; padding: 16px; border: 1px solid #d3e5df; border-radius: 15px; background: #fff; }
.patient-brs-result-grid span { color: #687f89; font-size: .82rem; font-weight: 850; }
.patient-brs-result-grid strong { color: #236f5d; font-size: 1.32rem; line-height: 1.25; }
.patient-brs-result-grid small { color: #83949b; }
.patient-brs-result-note { display: flex; align-items: flex-start; gap: 11px; margin: 13px 0; padding: 13px 15px; border-radius: 13px; background: #eaf4f8; color: #496c7c; }
.patient-brs-result-note .icon { flex: 0 0 auto; width: 21px; }
.patient-brs-result-note p { margin: 0; font-size: .88rem; line-height: 1.58; }
.patient-brs-history-list { display: grid; gap: 8px; }
.patient-brs-history-list article { display: grid; grid-template-columns: 45px minmax(130px,1fr) auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid #dce7ea; border-radius: 13px; background: #fff; }
.patient-brs-history-list .icon-box { width: 45px; height: 45px; border-radius: 13px; background: #e8f5f1; color: #2d7c68; }
.patient-brs-history-list article > div { display: grid; gap: 2px; }
.patient-brs-history-list strong { color: #2e5364; }
.patient-brs-history-list small { color: #7b8f98; }
.patient-brs-history-list b { color: #2a725f; }
.patient-brs-empty { display: grid; place-items: center; min-height: 130px; padding: 22px; border: 1px dashed #cbdde1; border-radius: 14px; background: #f9fcfd; text-align: center; }
.patient-brs-empty span { color: #365e70; font-size: 1.05rem; font-weight: 900; }
.patient-brs-empty p { margin: 4px 0 0; color: #778b94; }

@media (max-width: 1120px) {
  .patient-brs-analysis-layout { grid-template-columns: 1fr; }
  .patient-brs-camera { min-height: 470px; }
  .patient-brs-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .patient-brs-live-metrics, .patient-brs-safety, .patient-brs-primary-actions { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .patient-brs-head { flex-direction: column; padding: 22px; }
  .patient-brs-head > div:last-child { grid-template-columns: 1fr 1fr; width: 100%; }
  .patient-brs-type-grid, .patient-brs-steps, .patient-brs-result-grid { grid-template-columns: 1fr; }
  .patient-brs-steps article { min-height: 0; }
  .patient-brs-analysis > header, .patient-brs-plan > header { align-items: flex-start; flex-direction: column; }
  .patient-brs-camera { min-height: 360px; }
  .patient-brs-controls { display: flex; }
  .patient-brs-history-list article { grid-template-columns: 45px minmax(0,1fr); }
  .patient-brs-history-list article > b, .patient-brs-history-list article > .status-badge { grid-column: 2; justify-self: start; }
}

@media (max-width: 520px) {
  .patient-brs-selector, .patient-brs-plan, .patient-brs-analysis, .patient-brs-result, .patient-brs-history { padding: 15px; }
  .patient-brs-head { padding: 19px 16px; }
  .patient-brs-head h1 { font-size: 1.85rem; }
  .patient-brs-head p { font-size: .98rem; }
  .patient-brs-head > div:last-child { grid-template-columns: 1fr; }
  .patient-brs-type { min-height: 118px; }
  .patient-brs-camera { min-height: 300px; }
  .patient-brs-camera-badges { align-items: flex-start; flex-direction: column; }
  .patient-brs-live-cue { right: 9px; bottom: 9px; left: 9px; padding: 12px; }
  .patient-brs-primary-actions .btn, .patient-brs-emergency { min-height: 58px; font-size: 1rem; }
  .patient-brs-result .button-row { display: grid; grid-template-columns: 1fr; }
  .patient-brs-result .btn { min-height: 54px; }
}

/* OT / PT unified rehabilitation workspace */
.therapy-assessment-center { overflow:hidden; }
.therapy-center-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:26px 28px; border-bottom:1px solid #dbe7ea; background:linear-gradient(135deg,#fbfefe,#eef8f6 54%,#edf5fa); }
.therapy-center-head h2 { margin:5px 0 8px; color:#173f53; font-size:clamp(1.55rem,2.4vw,2.15rem); }
.therapy-center-head p { max-width:820px; margin:0; color:#617984; line-height:1.65; }
.therapy-patient-context { display:grid; grid-template-columns:minmax(240px,.9fr) minmax(520px,2fr) auto; align-items:center; gap:18px; margin:18px; padding:16px 18px; border:1px solid #d2e3e5; border-radius:18px; background:#fff; box-shadow:0 8px 22px rgba(32,77,88,.06); }
.therapy-patient-context > div:first-child { display:flex; align-items:center; gap:12px; }
.therapy-patient-context > div:first-child > span:last-child { display:grid; gap:3px; }
.therapy-patient-context small { color:#71858d; }
.therapy-patient-context dl { display:grid; grid-template-columns:1.35fr .7fr 1.1fr .7fr; gap:10px; margin:0; }
.therapy-patient-context dl div { padding:9px 11px; border-left:2px solid #d4e6e4; }
.therapy-patient-context dt { color:#789099; font-size:.72rem; font-weight:850; }
.therapy-patient-context dd { margin:3px 0 0; color:#294f61; font-size:.84rem; font-weight:850; }
.therapy-center-tabs { display:flex; gap:7px; margin:18px 18px 0; padding:5px; overflow-x:auto; border:1px solid #d7e4e7; border-radius:15px; background:#f1f6f7; }
.therapy-center-tabs button { min-height:45px; padding:9px 18px; border:0; border-radius:11px; background:transparent; color:#5b7480; font:850 .86rem var(--font-sans); white-space:nowrap; cursor:pointer; }
.therapy-center-tabs button:hover { color:#215b58; background:#e7f2f0; }
.therapy-center-tabs button.active { color:#fff; background:#276f68; box-shadow:0 5px 14px rgba(39,111,104,.2); }
.therapy-assessment-panel { padding:18px; animation:workspaceReveal .32s ease both; }
.therapy-assessment-panel[hidden], .therapy-task-center [hidden] { display:none !important; }
.therapy-baseline-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.therapy-baseline-grid article { display:grid; gap:5px; min-height:105px; padding:16px; border:1px solid #dbe7e9; border-radius:15px; background:#f9fcfc; }
.therapy-baseline-grid span { color:#718790; font-size:.78rem; font-weight:800; }
.therapy-baseline-grid strong { color:#1e5260; font-size:1.4rem; }
.therapy-baseline-grid small { color:#83949b; }
.therapy-shared-findings { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(270px,.65fr); gap:12px; }
.therapy-shared-findings > section, .therapy-shared-findings > aside { padding:18px; border:1px solid #dbe7e9; border-radius:17px; background:#fff; }
.therapy-shared-findings > section > article { display:grid; grid-template-columns:7px minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:12px 3px; border-bottom:1px solid #e7eef0; }
.therapy-shared-findings > section > article:last-child { border-bottom:0; }
.therapy-shared-findings > section > article > i { width:7px; height:38px; border-radius:99px; background:#56a58f; }
.therapy-shared-findings > section > article > i.warning { background:#d9a13c; }
.therapy-shared-findings > section > article > i.danger { background:#cc665c; }
.therapy-shared-findings > section > article > i.info { background:#4e8eae; }
.therapy-shared-findings > section > article div { display:grid; gap:3px; }
.therapy-shared-findings > section > article small { color:#71858e; }
.therapy-shared-findings > section > article button { min-height:38px; padding:6px 12px; border:1px solid #cedfe2; border-radius:10px; background:#f6fafb; color:#365f6e; font-weight:850; cursor:pointer; }
.therapy-shared-findings > aside { display:grid; align-content:start; gap:13px; }
.discipline-panel-head { display:flex; align-items:center; gap:14px; margin-bottom:12px; padding:16px 18px; border:1px solid #d9e6e8; border-radius:17px; background:#f9fcfc; }
.discipline-panel-head.ot { border-left:5px solid #3b947d; }
.discipline-panel-head.pt { border-left:5px solid #397ca3; }
.discipline-panel-head > div { flex:1; }
.discipline-panel-head h3 { margin:0 0 4px; color:#244d60; }
.discipline-panel-head p { margin:0; color:#6d828b; }
.ot-assessment-workbench, .pt-assessment-workbench { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr) minmax(250px,.6fr); gap:12px; }
.ot-assessment-workbench > section, .ot-assessment-workbench > aside, .pt-assessment-workbench > section, .pt-assessment-workbench > aside { padding:17px; border:1px solid #dbe7e9; border-radius:17px; background:#fff; }
.ot-assessment-workbench h3, .pt-assessment-workbench h3 { margin:0 0 13px; color:#2a5162; }
.ot-assessment-workbench > section:first-child > article { margin-bottom:10px; padding:13px; border:1px solid #e0eaec; border-radius:13px; background:#fafcfd; }
.ot-assessment-workbench > section:first-child > article > div { display:flex; justify-content:space-between; gap:10px; margin-bottom:8px; }
.ot-assessment-workbench > section:first-child button { min-height:38px; width:100%; border:1px solid #d6e3e5; border-radius:9px; background:#fff; color:#386577; font-weight:800; cursor:pointer; }
.assessment-comparison-row { display:grid; grid-template-columns:.75fr 1fr 24px 1fr .55fr; align-items:center; gap:7px; min-height:49px; padding:8px 0; border-bottom:1px solid #e5edef; }
.assessment-comparison-row span { color:#617983; font-size:.78rem; }
.assessment-comparison-row .icon { width:16px; color:#7d949d; }
.assessment-comparison-row b { color:#2d806a; font-size:.78rem; }
.ot-assessment-workbench > aside { display:grid; align-content:start; gap:8px; }
.ot-assessment-workbench > aside > button:not(.btn) { display:grid; grid-template-columns:1fr auto; gap:2px 8px; min-height:56px; padding:10px 11px; border:1px solid #dce8ea; border-radius:11px; background:#fbfdfd; color:#315c6b; text-align:left; cursor:pointer; }
.ot-assessment-workbench > aside > button:not(.btn) small { grid-column:1/-1; color:#2f8a70; }
.pt-assessment-workbench > section:first-child > article { display:grid; grid-template-columns:42px minmax(0,1fr) auto auto; align-items:center; gap:10px; min-height:68px; padding:10px 0; border-bottom:1px solid #e4ecee; }
.pt-assessment-workbench > section:first-child > article b { color:#2d7868; }
.pt-assessment-workbench > section:first-child > article b.warning { color:#a77422; }
.pt-assessment-workbench > section:first-child > article b.danger { color:#b65750; }
.pt-assessment-workbench > section:first-child > article button { min-height:36px; border:1px solid #d5e2e5; border-radius:9px; background:#fff; color:#3d6878; font-weight:800; cursor:pointer; }
.gait-phase-strip { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; margin-bottom:12px; }
.gait-phase-strip button { display:grid; gap:5px; min-height:78px; place-items:center; padding:8px 4px; border:1px solid #d9e6e8; border-radius:10px; background:#f7fafb; color:#58727e; font-size:.7rem; font-weight:800; cursor:pointer; }
.gait-phase-strip button span { display:grid; width:25px; height:25px; place-items:center; border-radius:50%; background:#e2eef1; }
.gait-phase-strip button.warning { border-color:#e3bf79; background:#fff9ed; color:#8a6424; }
.therapy-alert-stack { display:grid; gap:7px; margin-bottom:12px; }
.therapy-alert-stack article { display:flex; align-items:center; gap:9px; padding:10px; border-radius:11px; background:#f1f7f7; color:#356071; }
.therapy-alert-stack article.warning { background:#fff8e9; color:#88621f; }
.therapy-alert-stack article.danger { background:#fff1ef; color:#a64b46; }
.therapy-alert-stack .icon { flex:0 0 auto; width:20px; }
.therapy-alert-stack span { display:grid; gap:2px; }
.pt-assessment-workbench > aside > div:not(.security-note) { display:grid; grid-template-columns:1fr auto auto; gap:8px; padding:10px 0; border-bottom:1px solid #e4ecee; }
.pt-assessment-workbench > aside > div span { color:#667d86; font-size:.78rem; }
.therapy-task-center { display:grid; gap:14px; }
.therapy-task-center > .therapy-center-tabs { margin:0; }
.therapy-task-center > [data-therapy-task-panel] > .special-workspace { margin:0; }
.therapy-motion-center { overflow:hidden; }
.motion-center-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:18px; }
.motion-center-shortcuts > a, .motion-center-shortcuts > button { display:grid; grid-template-columns:48px minmax(0,1fr) 22px; align-items:center; gap:12px; min-height:84px; padding:14px; border:1px solid #d6e4e6; border-radius:15px; background:#fff; color:#315c6c; text-align:left; text-decoration:none; cursor:pointer; }
.motion-center-shortcuts > a:hover, .motion-center-shortcuts > button:hover { border-color:#78b3a8; box-shadow:0 7px 18px rgba(35,85,91,.08); transform:translateY(-1px); }
.motion-center-shortcuts .icon-box { width:48px; height:48px; background:#e7f4f1; color:#2e806c; }
.motion-center-shortcuts span:nth-child(2) { display:grid; gap:3px; }
.motion-center-shortcuts small { color:#71858e; }
.motion-center-shortcuts > * > .icon:last-child { width:19px; }
.therapy-motion-review-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(390px,.85fr); gap:12px; padding:0 18px 18px; }
.motion-evidence-player, .motion-dual-judgement { padding:16px; border:1px solid #d9e6e8; border-radius:17px; background:#fff; }
.motion-evidence-player > header { display:flex; justify-content:space-between; gap:12px; margin-bottom:12px; }
.motion-evidence-player h3 { margin:0 0 3px; color:#294f60; }
.motion-evidence-player p { margin:0; color:#71858d; }
.motion-dual-judgement { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.motion-dual-judgement > article { display:grid; align-content:start; gap:9px; padding:14px; border:1px solid #dce7e9; border-radius:14px; background:#fafcfd; }
.motion-dual-judgement > article.ot { border-top:4px solid #3b947d; }
.motion-dual-judgement > article.pt { border-top:4px solid #397ca3; }
.motion-dual-judgement h3, .motion-dual-judgement p { margin:0; }
.motion-dual-judgement p { color:#647b85; line-height:1.55; }
.motion-dual-judgement label { display:grid; gap:6px; color:#526f7b; font-size:.78rem; font-weight:800; }
.motion-dual-judgement textarea { width:100%; min-height:104px; padding:11px; border:1px solid #cbdde1; border-radius:11px; resize:vertical; font:inherit; }
.motion-dual-judgement > footer { grid-column:1/-1; display:grid; gap:7px; padding:14px; border-radius:13px; background:#edf7f4; color:#315f58; }
.motion-dual-judgement > footer span { display:flex; align-items:center; gap:7px; font-weight:850; }
.motion-dual-judgement > footer .icon { width:19px; }
.therapy-plan-center { overflow:hidden; }
.plan-shared-goal { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:18px; padding:18px 20px; border:1px solid #cde2de; border-radius:17px; background:#f1f9f7; }
.plan-shared-goal > div { display:grid; gap:4px; }
.plan-shared-goal span, .plan-shared-goal small { color:#5c777e; }
.plan-shared-goal strong { color:#245b58; font-size:1.12rem; }
.therapy-plan-center .therapy-plan-lanes { margin:0 18px; }
.plan-context-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 18px; }
.plan-context-grid article { display:grid; grid-template-columns:46px minmax(0,1fr); gap:11px; padding:15px; border:1px solid #d8e5e7; border-radius:15px; background:#fff; }
.plan-context-grid article > div { display:grid; gap:4px; }
.plan-context-grid h3, .plan-context-grid p { margin:0; }
.plan-context-grid p { color:#6b818a; font-size:.82rem; line-height:1.5; }
.plan-context-grid button { grid-column:2; justify-self:start; min-height:37px; padding:7px 12px; border:1px solid #d1e0e3; border-radius:9px; background:#f6fafb; color:#376374; font-weight:800; cursor:pointer; }
.therapy-plan-footer { display:flex; justify-content:flex-end; gap:9px; padding:17px 18px; border-top:1px solid #dee8ea; background:#f9fbfc; }
.therapy-report-center { display:grid; grid-template-columns:minmax(230px,.55fr) minmax(0,2fr); overflow:hidden; }
.report-case-queue { padding:16px; border-right:1px solid #dbe6e9; background:#f3f7f8; }
.report-case-queue header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.report-case-queue header h2 { margin:0; color:#294f60; }
.report-case-queue header span { display:grid; width:32px; height:32px; place-items:center; border-radius:50%; background:#dcecea; color:#2b7164; font-weight:900; }
.report-case-queue > button { display:grid; grid-template-columns:40px minmax(0,1fr); gap:9px; width:100%; margin-bottom:7px; padding:11px; border:1px solid transparent; border-radius:12px; background:transparent; color:#416371; text-align:left; cursor:pointer; }
.report-case-queue > button.active { border-color:#bdd7d3; background:#fff; box-shadow:0 5px 14px rgba(38,80,88,.07); }
.report-case-queue > button > span:nth-child(2) { display:grid; gap:2px; }
.report-case-queue > button > i { grid-column:2; justify-self:start; font-style:normal; }
.integrated-report-editor { padding:20px; }
.integrated-report-editor > header { display:flex; justify-content:space-between; gap:16px; padding-bottom:15px; border-bottom:1px solid #e0e9eb; }
.integrated-report-editor h2 { margin:4px 0; color:#244d60; }
.integrated-report-editor header p { margin:0; color:#70848d; }
.report-common-summary { display:grid; grid-template-columns:1fr auto; gap:8px 18px; margin:15px 0; padding:16px; border:1px solid #d3e6e2; border-radius:14px; background:#f2faf8; }
.report-common-summary h3, .report-common-summary p { margin:0; }
.report-common-summary p { color:#53736f; line-height:1.6; }
.report-common-summary button { grid-row:1/3; grid-column:2; align-self:center; min-height:40px; padding:8px 13px; border:1px solid #c5dad7; border-radius:10px; background:#fff; color:#33665e; font-weight:800; cursor:pointer; }
.report-discipline-columns { display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.report-discipline-columns > section { display:grid; gap:10px; padding:16px; border:1px solid #d9e5e8; border-radius:15px; background:#fff; }
.report-discipline-columns > section.ot { border-top:4px solid #3b947d; }
.report-discipline-columns > section.pt { border-top:4px solid #397ca3; }
.report-discipline-columns h3 { margin:0; color:#2a5162; }
.report-discipline-columns textarea { width:100%; min-height:150px; padding:12px; border:1px solid #cddde1; border-radius:11px; resize:vertical; color:#365866; font:inherit; line-height:1.55; }
.report-discipline-columns footer { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.report-discipline-columns footer button { min-height:38px; border:1px solid #cfdee1; border-radius:9px; background:#f7fafb; color:#376171; font-weight:800; cursor:pointer; }
.report-source-completeness { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.patient-workflow-nav a { display:inline-flex; align-items:center; min-height:46px; padding:9px 15px; border-radius:10px; color:#607984; font-weight:850; text-decoration:none; white-space:nowrap; }
.patient-workflow-nav a:hover { background:#edf5f5; color:#285e61; }
.patient-workflow-nav a.active { background:#276f68; color:#fff; }
.ot-summary-grid.compact { grid-template-columns:repeat(6,minmax(0,1fr)); }
.patient-integrated-overview { margin-top:14px; }
.patient-outcome-map { display:grid; grid-template-columns:1fr 34px 1fr 1fr; align-items:stretch; gap:9px; }
.patient-outcome-map article { display:grid; align-content:start; gap:7px; min-height:135px; padding:15px; border:1px solid #dce7e9; border-radius:14px; background:#fafcfd; }
.patient-outcome-map article.shared { border-top:4px solid #687f89; }
.patient-outcome-map article.ot { border-top:4px solid #3b947d; }
.patient-outcome-map article.pt { border-top:4px solid #397ca3; }
.patient-outcome-map article small { color:#70858e; line-height:1.5; }
.patient-outcome-map > i { display:grid; place-items:center; color:#799099; }
.patient-outcome-map > i .icon { width:20px; }
.patient-plan-summary { display:grid; gap:9px; }
.patient-plan-summary article { display:grid; grid-template-columns:52px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:74px; padding:12px; border:1px solid #dce7e9; border-radius:13px; background:#fafcfd; }
.patient-plan-summary article.ot { border-left:4px solid #3b947d; }
.patient-plan-summary article.pt { border-left:4px solid #397ca3; }
.patient-plan-summary article > div { display:grid; gap:3px; }
.patient-plan-summary small { color:#70858e; }
.team-record-grid.compact article { min-height:auto; }
.patient-next-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.patient-next-actions a { display:grid; grid-template-columns:7px minmax(0,1fr) 22px; align-items:center; gap:11px; min-height:76px; padding:13px; border:1px solid #d9e5e8; border-radius:13px; background:#fff; color:#315b6b; text-decoration:none; }
.patient-next-actions a:hover { border-color:#78b3a7; box-shadow:0 6px 16px rgba(34,79,87,.07); }
.patient-next-actions a > i { width:7px; height:42px; border-radius:99px; background:#778d96; }
.patient-next-actions a.warning > i { background:#d99f38; }
.patient-next-actions a.info > i { background:#4689aa; }
.patient-next-actions a > span { display:grid; gap:3px; }
.patient-next-actions small { color:#738790; }
.patient-next-actions .icon { width:19px; }

@media (max-width: 1240px) {
  .therapy-patient-context { grid-template-columns:1fr auto; }
  .therapy-patient-context dl { grid-column:1/-1; grid-row:2; }
  .ot-assessment-workbench, .pt-assessment-workbench { grid-template-columns:1fr 1fr; }
  .ot-assessment-workbench > aside, .pt-assessment-workbench > aside { grid-column:1/-1; }
  .therapy-motion-review-grid { grid-template-columns:1fr; }
  .ot-summary-grid.compact { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .patient-outcome-map { grid-template-columns:1fr 28px 1fr; }
  .patient-outcome-map article.pt { grid-column:3; }
}

@media (max-width: 900px) {
  .therapy-center-head, .plan-shared-goal { align-items:flex-start; flex-direction:column; }
  .therapy-baseline-grid, .motion-center-shortcuts, .plan-context-grid, .report-source-completeness { grid-template-columns:1fr 1fr; }
  .therapy-shared-findings, .ot-assessment-workbench, .pt-assessment-workbench, .therapy-report-center { grid-template-columns:1fr; }
  .report-case-queue { border-right:0; border-bottom:1px solid #dbe6e9; }
  .report-case-queue { display:grid; grid-template-columns:repeat(3,minmax(190px,1fr)); overflow-x:auto; }
  .report-case-queue header { grid-column:1/-1; }
  .therapy-plan-center .therapy-plan-lanes { grid-template-columns:1fr; }
  .patient-next-actions { grid-template-columns:1fr; }
}

@media (max-width: 640px) {
  .therapy-center-head { padding:20px 16px; }
  .therapy-patient-context { grid-template-columns:1fr; margin:12px; padding:14px; }
  .therapy-patient-context dl { grid-column:auto; grid-row:auto; grid-template-columns:1fr 1fr; }
  .therapy-center-tabs { margin:12px 12px 0; }
  .therapy-center-tabs button { min-height:50px; padding:10px 15px; }
  .therapy-assessment-panel { padding:12px; }
  .therapy-baseline-grid, .motion-center-shortcuts, .plan-context-grid, .report-source-completeness, .report-discipline-columns, .motion-dual-judgement { grid-template-columns:1fr; }
  .discipline-panel-head { align-items:flex-start; flex-wrap:wrap; }
  .discipline-panel-head .btn { width:100%; }
  .assessment-comparison-row { grid-template-columns:.72fr 1fr 20px 1fr; }
  .assessment-comparison-row b { grid-column:2/-1; }
  .gait-phase-strip { grid-template-columns:repeat(3,1fr); }
  .pt-assessment-workbench > section:first-child > article { grid-template-columns:42px 1fr auto; }
  .pt-assessment-workbench > section:first-child > article button { grid-column:2/-1; }
  .therapy-motion-review-grid { padding:0 12px 12px; }
  .motion-dual-judgement > footer { grid-column:1; }
  .plan-shared-goal, .therapy-plan-center .therapy-plan-lanes, .plan-context-grid { margin-right:12px; margin-left:12px; }
  .therapy-plan-footer { display:grid; grid-template-columns:1fr; }
  .therapy-plan-footer .btn { width:100%; min-height:50px; }
  .integrated-report-editor { padding:14px; }
  .integrated-report-editor > header, .report-discipline-columns footer { align-items:flex-start; flex-direction:column; }
  .report-common-summary { grid-template-columns:1fr; }
  .report-common-summary button { grid-row:auto; grid-column:auto; }
  .ot-summary-grid.compact { grid-template-columns:1fr 1fr; }
  .patient-outcome-map { grid-template-columns:1fr; }
  .patient-outcome-map > i { transform:rotate(90deg); }
  .patient-outcome-map article.pt { grid-column:auto; }
  .patient-plan-summary article { grid-template-columns:48px minmax(0,1fr); }
  .patient-plan-summary article > .status-badge { grid-column:2; justify-self:start; }
}

/* Doctor clinical workflow consolidation */
.doctor-triage-center, .doctor-evidence-center, .doctor-decision-center, .doctor-care-team-center { overflow:hidden; border:1px solid #d7e4e7; border-radius:18px; background:#fff; box-shadow:0 10px 28px rgba(35,75,87,.07); }
.doctor-home-v2 { display:grid; gap:18px; }
.doctor-kpi-grid-compact { grid-template-columns:repeat(6,minmax(0,1fr)); }
.doctor-decision-overview { margin-top:0; }
.doctor-signoff-list, .doctor-day-list { display:grid; gap:8px; }
.doctor-signoff-list a { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:66px; padding:10px; border:1px solid #dbe6e9; border-radius:13px; background:#fbfcfd; color:#315b6b; text-decoration:none; }
.doctor-signoff-list a > span:nth-child(2) { display:grid; gap:3px; }
.doctor-signoff-list small, .doctor-day-list small { color:#72868f; }
.doctor-day-list a { display:grid; grid-template-columns:54px minmax(0,1fr); gap:10px; padding:11px 4px; border-bottom:1px solid #e3ebed; color:#315b6b; text-decoration:none; }
.doctor-day-list time { color:#2c7280; font-weight:900; }
.doctor-day-list a > span { display:grid; gap:3px; }
.doctor-trend-summary { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(190px,.7fr); align-items:center; gap:20px; }
.doctor-trend-summary > div:last-child { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.doctor-trend-summary > div:last-child span { display:grid; gap:4px; padding:12px; border:1px solid #dbe7e9; border-radius:12px; background:#fafcfd; }
.doctor-trend-summary small { color:#70858e; }
.doctor-trend-summary strong { color:#315c6e; font-size:1.2rem; }
.doctor-trend-summary strong.danger { color:#b94f45; }
.doctor-trend-summary strong.warning { color:#b57a25; }
.doctor-center-tabs { display:flex; gap:7px; padding:12px 18px; overflow-x:auto; border-bottom:1px solid #dbe7e9; background:#f4f8f9; }
.doctor-center-tabs a { display:inline-flex; align-items:center; min-height:46px; padding:9px 16px; border:1px solid transparent; border-radius:11px; color:#58727e; font-weight:900; text-decoration:none; white-space:nowrap; }
.doctor-center-tabs a:hover { border-color:#c9dfe2; background:#fff; }
.doctor-center-tabs a.active { border-color:#2b657a; background:#2b5e73; color:#fff; box-shadow:0 5px 14px rgba(34,78,97,.15); }
.doctor-center-context, .doctor-evidence-head { display:flex; align-items:center; justify-content:space-between; gap:22px; padding:19px 20px; }
.doctor-center-context h2, .doctor-evidence-head h2 { margin:4px 0; color:#244f62; }
.doctor-center-context p, .doctor-evidence-head p { max-width:780px; margin:0; color:#6c818a; line-height:1.55; }
.doctor-triage-layout { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(330px,.72fr); gap:12px; padding:0 18px 18px; }
.doctor-case-queue, .doctor-case-decision { overflow:hidden; border:1px solid #d8e4e7; border-radius:17px; background:#fff; }
.doctor-case-queue > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 16px; border-bottom:1px solid #e1eaec; }
.doctor-case-queue h3, .doctor-case-queue p { margin:0; }
.doctor-case-queue p { color:#72868f; }
.doctor-case-queue tr.selected { background:#fff8f5; }
.doctor-case-decision { display:grid; align-content:start; gap:14px; padding:18px; }
.doctor-case-decision header h2 { margin:8px 0 2px; color:#294f60; }
.doctor-case-decision header p, .doctor-case-decision section p { margin:0; color:#6d818a; line-height:1.55; }
.doctor-case-decision section h3 { margin:0 0 6px; color:#325c6d; }
.doctor-decision-readiness { display:grid; gap:9px; }
.doctor-evidence-shortcuts { display:flex; gap:8px; }
.doctor-evidence-shortcuts a { display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:8px 12px; border:1px solid #cadde1; border-radius:10px; background:#fff; color:#356577; font-weight:850; text-decoration:none; }
.doctor-evidence-shortcuts .icon { width:19px; }
.doctor-rom-evidence { display:grid; grid-template-columns:minmax(170px,.4fr) minmax(0,1.45fr) minmax(240px,.55fr); gap:12px; padding:0 18px 18px; }
.doctor-rom-evidence > * { padding:15px; border:1px solid #d9e5e8; border-radius:16px; background:#fff; }
.rom-comparison-row.compact { grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:13px; }
.rom-comparison-row.compact > div { display:grid; gap:4px; padding:11px; border:1px solid #dce7e9; border-radius:11px; background:#fafcfd; }
.rom-comparison-row.compact small { color:#72868f; }
.doctor-motion-evidence { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(360px,.7fr); gap:12px; padding:0 18px 18px; }
.doctor-motion-judgement { display:grid; align-content:start; gap:9px; padding:16px; border:1px solid #d8e5e8; border-radius:16px; background:#fff; }
.doctor-motion-judgement > article { display:grid; grid-template-columns:7px minmax(0,1fr); gap:10px; padding:10px; border-radius:11px; background:#f8fafb; }
.doctor-motion-judgement > article > i { width:7px; border-radius:99px; background:#5c8b9e; }
.doctor-motion-judgement > article.danger > i { background:#c8584f; }
.doctor-motion-judgement > article.warning > i { background:#d69b35; }
.doctor-motion-judgement article span { display:grid; gap:2px; }
.doctor-motion-judgement small { color:#71858e; }
.doctor-motion-judgement label { display:grid; gap:6px; color:#496b78; font-weight:850; }
.doctor-motion-judgement textarea { width:100%; padding:11px; border:1px solid #cbdde1; border-radius:11px; resize:vertical; font:inherit; }
.doctor-symptom-evidence { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr); gap:12px; padding:0 18px 18px; }
.doctor-symptom-evidence > * { padding:17px; border:1px solid #d9e5e8; border-radius:16px; background:#fff; }
.doctor-symptom-evidence section > header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.doctor-symptom-evidence h3 { margin:0; color:#2a5364; }
.doctor-symptom-evidence aside { display:grid; align-content:start; gap:12px; }
.doctor-symptom-evidence aside p { margin:0; color:#687f88; line-height:1.6; }
.doctor-center-footer { display:flex; justify-content:flex-end; gap:9px; padding:16px 18px; border-top:1px solid #dfe8ea; background:#f8fafb; }
.doctor-decision-flow { display:flex; align-items:center; gap:9px; margin:17px 18px; padding:14px 16px; border:1px solid #d8e5e8; border-radius:14px; background:#f8fafb; }
.doctor-decision-flow span { flex:0 0 auto; padding:8px 11px; border-radius:9px; color:#70828a; font-weight:850; }
.doctor-decision-flow span.done { background:#e7f4ef; color:#347565; }
.doctor-decision-flow span.current { background:#2b6478; color:#fff; }
.doctor-decision-flow i { flex:1; height:2px; background:#d4e0e3; }
.doctor-decision-grid { display:grid; grid-template-columns:minmax(220px,.42fr) minmax(0,1.58fr); gap:0; margin:0 18px 18px; overflow:hidden; border:1px solid #d8e4e7; border-radius:17px; background:#fff; }
.doctor-report-queue { padding:15px; border-right:1px solid #dce7e9; background:#f4f8f9; }
.doctor-report-queue header { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.doctor-report-queue h3 { margin:0; color:#2d5868; }
.doctor-report-queue header span { display:grid; width:32px; height:32px; place-items:center; border-radius:50%; background:#dcebea; color:#2f6e62; font-weight:900; }
.doctor-report-queue > button { display:grid; grid-template-columns:34px minmax(0,1fr); gap:9px; width:100%; margin-bottom:7px; padding:11px; border:1px solid transparent; border-radius:11px; background:transparent; color:#416371; text-align:left; cursor:pointer; }
.doctor-report-queue > button.active { border-color:#c8dcdf; background:#fff; box-shadow:0 5px 14px rgba(35,79,88,.07); }
.doctor-report-queue > button > span:last-child { display:grid; gap:3px; }
.doctor-report-editor { padding:18px; }
.doctor-report-editor > header { display:flex; justify-content:space-between; gap:16px; padding-bottom:14px; border-bottom:1px solid #dfe9eb; }
.doctor-report-editor h2, .doctor-report-editor p { margin:3px 0; }
.doctor-report-editor header p { color:#71858e; }
.doctor-report-editor > section { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:10px; align-items:start; padding:12px 0; border-bottom:1px solid #e3ebed; }
.doctor-report-editor > section > span { color:#6f8993; font-weight:900; }
.doctor-report-editor > section h3, .doctor-report-editor > section p { margin:0; }
.doctor-report-editor > section p { color:#657d87; line-height:1.5; }
.doctor-report-editor > section button { min-height:36px; padding:7px 10px; border:1px solid #cfdee1; border-radius:8px; background:#f7fafb; color:#376171; font-weight:800; cursor:pointer; }
.doctor-report-editor > label { display:grid; gap:7px; margin-top:14px; color:#3e6676; font-weight:850; }
.doctor-report-editor textarea { width:100%; padding:12px; border:1px solid #cbdde1; border-radius:11px; font:inherit; line-height:1.55; }
.doctor-report-editor > footer { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.doctor-order-center { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.55fr); gap:12px; padding:0 18px 18px; }
.doctor-order-center > * { border:1px solid #d8e5e8; border-radius:16px; background:#fff; }
.doctor-order-center .sw-order-form { padding:18px; }
.doctor-signoff-checklist { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; padding:13px; border:1px solid #d8e6e8; border-radius:12px; background:#f7fafb; }
.doctor-signoff-checklist label { display:flex; align-items:center; gap:7px; min-height:38px; color:#496a77; font-weight:800; }
.doctor-active-orders { padding:16px; }
.doctor-active-orders > header { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.doctor-active-orders h3 { margin:0; color:#2d5667; }
.doctor-active-orders > article { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-top:9px; padding:12px; border:1px solid #dce7e9; border-radius:12px; }
.doctor-active-orders article div { display:grid; gap:3px; }
.doctor-active-orders article p, .doctor-active-orders article small { margin:0; color:#70848d; }
.doctor-active-orders article button { grid-column:1/-1; min-height:36px; border:1px solid #d2e0e3; border-radius:9px; background:#f6fafb; color:#386273; font-weight:800; cursor:pointer; }
.doctor-care-team-center { padding:0 18px 18px; }
.doctor-care-team-center > .therapy-center-head { margin:0 -18px; }
.doctor-care-context { display:grid; grid-template-columns:minmax(240px,.7fr) minmax(0,1fr) auto; align-items:center; gap:14px; margin:17px 0 12px; padding:14px; border:1px solid #d8e5e8; border-radius:15px; background:#f8fafb; }
.doctor-care-context > div:first-child { display:flex; align-items:center; gap:10px; }
.doctor-care-context > div:first-child > span:last-child { display:grid; gap:3px; }
.doctor-care-context > div:nth-child(2) { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.doctor-care-context > div:nth-child(2) span { display:grid; gap:3px; color:#71858e; }
.doctor-care-context > div:nth-child(2) strong { color:#315e6f; }
.doctor-care-board { display:grid; grid-template-columns:1fr 1fr minmax(240px,.65fr); gap:11px; }
.doctor-care-board > * { padding:15px; border:1px solid #d9e5e8; border-radius:15px; background:#fff; }
.doctor-care-board > section > header, .doctor-care-board > aside > header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:9px; }
.doctor-care-board h3 { margin:0; color:#2d5667; }
.doctor-care-board section article { display:grid; grid-template-columns:42px minmax(0,1fr); gap:9px; margin-top:8px; padding:11px; border:1px solid #dfe8ea; border-radius:12px; background:#fafcfd; }
.doctor-care-board section article.danger { border-left:4px solid #c55a50; }
.doctor-care-board section article.warning { border-left:4px solid #d49a35; }
.doctor-care-board section article div { display:grid; gap:3px; }
.doctor-care-board section article p, .doctor-care-board section article small { margin:0; color:#70848d; }
.doctor-care-board section article button { grid-column:2; justify-self:start; min-height:35px; border:1px solid #d1e0e3; border-radius:8px; background:#fff; color:#386273; font-weight:800; cursor:pointer; }
.doctor-care-board aside a { display:grid; gap:4px; margin-top:8px; padding:11px; border:1px solid #dfe8ea; border-radius:11px; color:#365f6f; text-decoration:none; }
.doctor-care-board aside small { color:#71858e; }
.doctor-care-timeline { margin-top:12px; padding:15px; border:1px solid #d8e5e8; border-radius:15px; background:#fff; }
.doctor-care-timeline > header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.doctor-care-timeline h3, .doctor-care-timeline p { margin:0; }
.doctor-care-timeline header p { color:#71858e; }
.doctor-care-timeline > article { display:grid; grid-template-columns:54px 44px minmax(0,1fr) auto; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid #e2eaec; }
.doctor-care-timeline > article:last-child { border-bottom:0; }
.doctor-care-timeline article div { display:grid; gap:3px; }
.doctor-care-timeline article p { color:#71858e; }
.doctor-patient-nav { margin:14px 0; }
.doctor-patient-overview { margin-top:14px; }
.doctor-clinical-synthesis { display:grid; gap:9px; }
.doctor-clinical-synthesis article { display:grid; grid-template-columns:44px minmax(0,1fr); gap:10px; padding:12px; border:1px solid #dce7e9; border-radius:12px; background:#fafcfd; }
.doctor-clinical-synthesis article.danger { border-left:4px solid #c55a50; }
.doctor-clinical-synthesis article.warning { border-left:4px solid #d49a35; }
.doctor-clinical-synthesis article > span { display:grid; width:42px; height:42px; place-items:center; border-radius:11px; background:#e7f1f4; color:#2c687c; }
.doctor-clinical-synthesis h3, .doctor-clinical-synthesis p { margin:0; }
.doctor-clinical-synthesis p { color:#657d87; line-height:1.55; }
.doctor-patient-overview .panel > footer { display:flex; justify-content:flex-end; gap:8px; margin-top:13px; }
.doctor-active-order { display:grid; gap:8px; }
.doctor-active-order h3, .doctor-active-order p { margin:0; }
.doctor-active-order p { color:#657d87; line-height:1.55; }
.doctor-active-order dl { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:5px 0 0; }
.doctor-active-order dl div { display:grid; gap:3px; padding:10px; border-radius:10px; background:#f4f8f9; }
.doctor-active-order dt { color:#71858e; font-size:.72rem; }
.doctor-active-order dd { margin:0; color:#315e6f; font-weight:850; }
.patient-next-actions a.danger > i { background:#c8584f; }

@media (max-width: 1240px) {
  .doctor-kpi-grid-compact { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .doctor-triage-layout, .doctor-motion-evidence, .doctor-symptom-evidence, .doctor-order-center { grid-template-columns:1fr; }
  .doctor-rom-evidence { grid-template-columns:190px minmax(0,1fr); }
  .doctor-rom-evidence > .sw-rom-outliers { grid-column:1/-1; }
  .doctor-care-board { grid-template-columns:1fr 1fr; }
  .doctor-care-board > aside { grid-column:1/-1; }
}

@media (max-width: 900px) {
  .doctor-center-context, .doctor-evidence-head { align-items:flex-start; flex-direction:column; }
  .doctor-evidence-shortcuts { flex-wrap:wrap; }
  .doctor-decision-grid { grid-template-columns:1fr; }
  .doctor-report-queue { display:grid; grid-template-columns:repeat(3,minmax(190px,1fr)); overflow-x:auto; border-right:0; border-bottom:1px solid #dce7e9; }
  .doctor-report-queue header { grid-column:1/-1; }
  .doctor-care-context { grid-template-columns:1fr auto; }
  .doctor-care-context > div:nth-child(2) { grid-column:1/-1; grid-row:2; }
  .doctor-trend-summary, .doctor-rom-evidence { grid-template-columns:1fr; }
  .doctor-rom-evidence > .sw-rom-outliers { grid-column:auto; }
}

@media (max-width: 640px) {
  .doctor-kpi-grid-compact { grid-template-columns:1fr 1fr; }
  .doctor-center-tabs { padding:10px 12px; }
  .doctor-center-tabs a { min-height:50px; }
  .doctor-center-context, .doctor-evidence-head { padding:16px 14px; }
  .doctor-triage-layout, .doctor-rom-evidence, .doctor-motion-evidence, .doctor-symptom-evidence, .doctor-order-center { padding-right:12px; padding-left:12px; }
  .doctor-case-queue .table-wrap { overflow-x:auto; }
  .doctor-case-queue table { min-width:760px; }
  .doctor-evidence-shortcuts { display:grid; width:100%; grid-template-columns:1fr; }
  .doctor-center-footer, .doctor-report-editor > footer, .doctor-patient-overview .panel > footer { display:grid; grid-template-columns:1fr; }
  .doctor-center-footer .btn, .doctor-report-editor > footer .btn, .doctor-patient-overview .panel > footer .btn { width:100%; min-height:50px; }
  .rom-comparison-row.compact, .doctor-signoff-checklist { grid-template-columns:1fr 1fr; }
  .doctor-decision-flow { overflow-x:auto; }
  .doctor-decision-flow span { min-width:max-content; }
  .doctor-report-queue { grid-template-columns:repeat(3,minmax(220px,1fr)); }
  .doctor-report-editor { padding:14px; }
  .doctor-report-editor > header { align-items:flex-start; flex-direction:column; }
  .doctor-report-editor > section { grid-template-columns:28px minmax(0,1fr); }
  .doctor-report-editor > section button { grid-column:2; justify-self:start; }
  .doctor-care-team-center { padding-right:12px; padding-left:12px; }
  .doctor-care-team-center > .therapy-center-head { margin-right:-12px; margin-left:-12px; }
  .doctor-care-context, .doctor-care-board { grid-template-columns:1fr; }
  .doctor-care-context > div:nth-child(2) { grid-template-columns:1fr; }
  .doctor-care-context > .btn, .doctor-care-board > aside { grid-column:auto; }
  .doctor-care-timeline > article { grid-template-columns:48px 42px minmax(0,1fr); }
  .doctor-care-timeline > article > .status-badge { grid-column:3; justify-self:start; }
  .doctor-active-order dl { grid-template-columns:1fr; }
  .doctor-patient-nav { overflow-x:auto; }
}

/* Static image pose and hand assessment */
.image-assessment-workspace { display:grid; gap:18px; }
.image-assessment-workspace [hidden] { display:none !important; }
.ia-page-head { position:relative; overflow:hidden; }
.ia-page-head::after { content:""; position:absolute; right:-90px; bottom:-110px; width:280px; height:280px; border:1px solid rgba(85,214,190,.24); border-radius:50%; box-shadow:0 0 0 42px rgba(85,214,190,.05),0 0 0 86px rgba(85,214,190,.03); pointer-events:none; }
.ia-layout { display:grid; grid-template-columns:minmax(0,1.48fr) minmax(300px,.52fr); gap:18px; align-items:start; }
.ia-stage-panel,.ia-context-panel,.ia-visibility-panel { padding:20px; }
.ia-panel-head,.ia-result-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:16px; }
.ia-panel-head h2,.ia-panel-head p,.ia-result-head h2,.ia-result-head p,.ia-control-column h2 { margin:3px 0 0; }
.ia-result-head p { color:#6a818a; }
.ia-control-column { display:grid; gap:14px; }
.ia-control-column section > header { margin-bottom:14px; }
.ia-control-column label:not(.checkbox-label) { display:grid; gap:7px; margin-top:12px; color:#365e6c; font-weight:800; }
.ia-control-column select { width:100%; min-height:46px; padding:9px 36px 9px 11px; border:1px solid #cbdde0; border-radius:10px; background:#fff; color:#244c5b; font:inherit; }
.ia-context-card { display:grid; gap:4px; padding:13px; border:1px solid #d6e7e7; border-radius:12px; background:linear-gradient(135deg,#f2faf8,#f6fafb); }
.ia-context-card span,.ia-context-card small { color:#70878f; }
.ia-context-card strong { color:#184f58; }
.ia-dropzone { display:grid; min-height:390px; place-items:center; align-content:center; gap:9px; padding:38px; border:2px dashed #a8cfca; border-radius:18px; background:radial-gradient(circle at 50% 0,rgba(80,207,182,.12),transparent 45%),#f7fbfa; color:#284f5d; text-align:center; cursor:pointer; transition:border-color .2s,background .2s,transform .2s; }
.ia-dropzone:hover,.ia-dropzone:focus-visible,.ia-dropzone.is-dragging { border-color:#229985; background:#effaf7; outline:none; transform:translateY(-2px); }
.ia-dropzone .ia-drop-icon { display:grid; width:76px; height:76px; place-items:center; margin-bottom:4px; border-radius:22px; background:#dff5ef; color:#168978; box-shadow:0 14px 34px rgba(26,113,101,.15); }
.ia-dropzone strong { font-size:1.05rem; }
.ia-dropzone p,.ia-dropzone small { margin:0; color:#6c848b; }
.ia-dropzone small { display:flex; align-items:center; gap:6px; }
.ia-canvas-shell { position:relative; overflow:hidden; min-height:390px; border-radius:18px; background:#061b23; box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); }
.ia-canvas-shell canvas { display:block; width:100%; height:auto; max-height:680px; object-fit:contain; background:#071d27; }
.ia-canvas-badges { position:absolute; top:12px; right:12px; left:12px; display:flex; justify-content:space-between; gap:8px; pointer-events:none; }
.ia-canvas-badges span { display:flex; align-items:center; gap:6px; padding:7px 10px; border:1px solid rgba(255,255,255,.18); border-radius:999px; background:rgba(4,25,33,.72); color:#eefdf9; font-size:.75rem; font-weight:800; backdrop-filter:blur(9px); }
.ia-canvas-badges i { width:7px; height:7px; border-radius:50%; background:#57e0c2; box-shadow:0 0 0 4px rgba(87,224,194,.16); }
.ia-primary-actions,.ia-result-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:16px; }
.ia-primary-actions .btn-primary { flex:1; }
.ia-primary-actions .btn:disabled { opacity:.48; cursor:not-allowed; }
.image-assessment-workspace.is-analyzing .ia-canvas-shell::after { content:""; position:absolute; inset:0; background:linear-gradient(110deg,transparent 15%,rgba(83,225,195,.17) 48%,transparent 78%); animation:ia-scan 1.35s linear infinite; }
@keyframes ia-scan { from { transform:translateX(-100%); } to { transform:translateX(100%); } }
.ia-visibility-panel .checkbox-label { display:flex; align-items:center; gap:9px; min-height:42px; color:#3e626f; font-weight:750; }
.ia-visibility-panel input[type="checkbox"] { width:18px; height:18px; accent-color:#188b7d; }
.ia-filter-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding-top:5px; }
.ia-model-panel { display:flex; align-items:center; gap:12px; padding:15px; border-color:#cfe5e2; background:linear-gradient(135deg,#eff9f6,#fff); }
.ia-model-panel .ia-model-mark { display:grid; flex:0 0 44px; width:44px; height:44px; place-items:center; border-radius:13px; background:#d8f1eb; color:#158475; }
.ia-model-panel div { display:grid; gap:3px; min-width:0; }
.ia-model-panel strong { color:#245360; }
.ia-model-panel small { overflow:hidden; color:#698089; text-overflow:ellipsis; }
.ia-results { display:grid; gap:14px; padding:22px; border:1px solid #d3e3e5; border-radius:20px; background:linear-gradient(180deg,#f7fbfb,#f3f8f8); box-shadow:0 18px 45px rgba(32,72,84,.08); }
.ia-result-head { margin:0 0 2px; }
.ia-result-grid { display:grid; grid-template-columns:1.08fr 1fr 1fr; gap:13px; }
.ia-result-grid > article { min-height:100%; padding:17px; }
.ia-result-grid header { margin-bottom:10px; }
.ia-result-grid h3,.ia-result-grid p { margin:3px 0 0; }
.ia-result-grid ul { display:grid; gap:9px; margin:0; padding-left:20px; color:#526f78; line-height:1.55; }
.ia-summary-card > header { display:flex; align-items:center; gap:10px; }
.ia-summary-card > header > span { display:grid; width:40px; height:40px; place-items:center; border-radius:12px; background:#ddf4ee; color:#168978; }
.ia-summary-card > p { color:#3d626d; line-height:1.65; }
.ia-summary-card .security-note { display:flex; gap:9px; margin-top:14px; padding:11px; border:1px solid #d8e7e7; border-radius:11px; background:#f4f9f8; color:#59747c; }
.ia-summary-card .security-note .icon { flex:0 0 auto; color:#188b7c; }
.ia-summary-card .security-note p { margin:0; font-size:.82rem; }
.ia-rom-panel { padding:18px; }
.ia-rom-panel .panel-header { margin-bottom:14px; }
.ia-rom-grid { display:grid; grid-template-columns:repeat(6,minmax(115px,1fr)); gap:9px; }
.ia-rom-card { display:grid; gap:2px; min-height:122px; align-content:center; padding:12px; border:1px solid #d7e5e6; border-radius:13px; background:#f9fcfc; }
.ia-rom-card small { color:#168877; font-size:.67rem; font-weight:900; letter-spacing:.12em; }
.ia-rom-card strong { color:#204f5d; font-family:"Plus Jakarta Sans",sans-serif; font-size:1.8rem; }
.ia-rom-card span { color:#3d626e; font-weight:800; }
.ia-rom-card i { margin-top:5px; color:#7b8e95; font-size:.7rem; font-style:normal; }
.ia-empty-rom { grid-column:1/-1; margin:0; padding:24px; border:1px dashed #cbdedf; border-radius:12px; color:#6e858d; text-align:center; }
.ia-result-actions { margin-top:2px; }
.ia-result-actions .btn-primary { margin-left:auto; }
.ia-method-note { display:flex; align-items:flex-start; gap:14px; padding:18px; border-color:#cfe1e3; background:#f6fafb; }
.ia-method-note > span { display:grid; flex:0 0 46px; width:46px; height:46px; place-items:center; border-radius:13px; background:#deefef; color:#267483; }
.ia-method-note p { margin:5px 0 0; color:#627b84; line-height:1.6; }

@media (max-width: 1180px) {
  .ia-layout { grid-template-columns:1fr; }
  .ia-control-column { grid-template-columns:1fr 1fr; }
  .ia-control-column .ia-model-panel { grid-column:1/-1; }
  .ia-result-grid { grid-template-columns:1fr 1fr; }
  .ia-summary-card { grid-column:1/-1; }
  .ia-rom-grid { grid-template-columns:repeat(4,minmax(115px,1fr)); }
}
@media (max-width: 720px) {
  .ia-page-head,.ia-panel-head,.ia-result-head { align-items:flex-start; flex-direction:column; }
  .ia-control-column,.ia-result-grid { grid-template-columns:1fr; }
  .ia-summary-card { grid-column:auto; }
  .ia-dropzone,.ia-canvas-shell { min-height:300px; }
  .ia-dropzone { padding:28px 18px; }
  .ia-canvas-badges { align-items:flex-start; flex-direction:column; }
  .ia-primary-actions,.ia-result-actions { display:grid; grid-template-columns:1fr; }
  .ia-primary-actions .btn,.ia-result-actions .btn { width:100%; min-height:48px; }
  .ia-result-actions .btn-primary { margin-left:0; }
  .ia-rom-grid { grid-template-columns:1fr 1fr; }
  .ia-method-note { flex-direction:column; }
}
@media (prefers-reduced-motion: reduce) {
  .image-assessment-workspace.is-analyzing .ia-canvas-shell::after { animation:none; }
  .ia-dropzone { transition:none; }
}

.local-motion { display:grid; gap:20px; margin-top:22px; }
.local-motion > .panel, .local-evidence { padding:clamp(20px,3vw,32px); border:1px solid #cfe4e7; border-radius:22px; background:#fff; box-shadow:0 12px 32px rgba(20,58,77,.06); }
.local-motion h2,.local-evidence h2 { font-size:clamp(22px,2vw,28px); color:#173e53; margin:0 0 14px; }
.local-motion p,.local-evidence p { font-size:18px; line-height:1.65; color:#4e6573; }
.local-form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:18px 0; }
.local-form-grid label { display:grid; gap:9px; font-size:18px; font-weight:700; color:#244e60; }
.local-form-grid input,.local-form-grid select { width:100%; min-height:52px; padding:10px 14px; border:2px solid #c7dcdf; border-radius:13px; background:#f9fcfc; color:#173e53; font:inherit; }
.local-form-grid input:focus-visible,.local-form-grid select:focus-visible,.local-evidence button:focus-visible { outline:3px solid #178c9d; outline-offset:2px; }
.local-camera { position:relative; overflow:hidden; min-height:320px; border-radius:20px; background:#102d3a; aspect-ratio:16/9; }
.local-camera video,.local-camera canvas { position:absolute; width:100%; height:100%; object-fit:contain; left:0; top:0; }
.local-camera canvas { pointer-events:none; }
.local-camera strong { position:absolute; left:18px; bottom:18px; max-width:calc(100% - 36px); padding:12px 16px; border-radius:12px; color:#fff; background:rgba(9,31,43,.84); font-size:18px; }
.local-motion .checkbox-label,.local-evidence .checkbox-label { display:flex; align-items:flex-start; gap:12px; padding:16px; margin:16px 0; border-radius:14px; background:#edf6f5; color:#234c5a; font-size:18px; line-height:1.5; }
.local-motion .checkbox-label input,.local-evidence .checkbox-label input { width:22px; height:22px; margin:4px 0 0; flex:none; }
.local-motion .button-row,.local-evidence .button-row { display:flex; flex-wrap:wrap; gap:12px; margin:18px 0; }
.local-motion button,.local-evidence button,.phase-manual-control button { min-height:48px; }
.local-primary { display:block; color:#087b68; font-size:clamp(44px,6vw,70px); line-height:1.2; }
.local-primary-reading { display:grid; gap:6px; padding:20px 22px; border:2px solid #9bd8cc; border-radius:18px; background:linear-gradient(135deg,#edf9f6,#f7fbff); }
.local-primary-reading > span { color:#15566a; font-size:18px; font-weight:850; }
.local-primary-reading > small { color:#4c6b76; font-size:16px; }
.local-angle-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:20px 0; }
.local-angle-grid > div { display:grid; gap:8px; padding:18px; border-radius:15px; background:#f0f7f7; }
.local-angle-grid > div.is-primary { border:2px solid #0d8b77; background:#e6f8f3; box-shadow:0 10px 22px rgba(13,139,119,.12); }
.local-angle-grid > div.is-primary strong { color:#087b68; font-size:29px; font-weight:950; }
.local-angle-grid span { color:#46616e; font-size:17px; }
.local-angle-grid strong { color:#17445a; font-size:23px; }
.local-chart-legend { display:flex; flex-wrap:wrap; gap:8px 14px; margin:4px 0 12px; }
.local-chart-legend span { display:inline-flex; align-items:center; gap:6px; color:#607782; font-size:14px; font-weight:700; }
.local-chart-legend i { width:18px; height:3px; border-radius:999px; background:var(--series-color); opacity:.55; }
.local-chart-legend span.is-primary { color:#123f50; font-weight:900; }
.local-chart-legend span.is-primary i { height:6px; opacity:1; }
.local-live-angle-panel canvas { width:100%; height:auto; border:1px solid #d8e7e9; border-radius:14px; background:#fff; }
.local-chart-note { margin:10px 0 0; color:#58717b; font-size:15px; }
.local-motion [data-local-chart] { display:block; width:100%; height:auto; border:1px solid #d3e3e6; border-radius:12px; }
.local-evidence { margin:22px 0; }
.local-evidence [data-local-message][data-error="true"] { color:#ac3e34; }
.local-evidence video { display:block; width:100%; max-height:500px; border-radius:16px; background:#102d3a; }
.local-evidence [data-local-seek] { width:100%; min-height:40px; }
.local-evidence [data-local-playback] { padding:16px 0; border-top:1px solid #d6e6e7; }
.local-events,.local-frames { display:flex; flex-wrap:wrap; gap:9px; margin:12px 0; }
.local-history-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:16px 0; border-bottom:1px solid #e0ebec; }
.local-history-row > div { display:grid; gap:5px; flex:1 1 240px; }
.phase-manual-control { margin:18px 0; padding:22px; background:#fff7ec; border:2px solid #e9b667; border-radius:16px; }
.phase-manual-control[hidden] { display:none; }
.phase-manual-control h3 { margin:0 0 8px; color:#673f20; }
.phase-manual-control label { display:flex; gap:10px; align-items:flex-start; margin:16px 0; font-size:18px; }
.phase-manual-control input { width:22px; height:22px; flex:none; }
@media (max-width:900px) { .local-form-grid,.local-angle-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .local-form-grid,.local-angle-grid { grid-template-columns:1fr 1fr; } .local-camera { min-height:240px; } .local-motion .button-row,.local-evidence .button-row { display:grid; grid-template-columns:1fr; } .local-motion .button-row button,.local-evidence .button-row button { width:100%; } .local-motion p,.local-evidence p { font-size:18px; } }

/* Formal role workspace */
.local-patient-home,.local-family-home,.local-unavailable-page { display:grid; gap:22px; }
.local-patient-home > header,.local-family-home > header,.local-unavailable-page > header { display:flex; align-items:flex-start; justify-content:space-between; gap:22px; padding:clamp(22px,4vw,38px); border:1px solid #cfe2e4; border-radius:24px; background:linear-gradient(135deg,#fff 40%,#eaf6f3); box-shadow:0 14px 38px rgba(22,61,80,.07); }
.local-patient-home > header h1,.local-family-home > header h1,.local-unavailable-page h1 { margin:7px 0 10px; color:#163f55; font-size:clamp(30px,4vw,46px); line-height:1.16; }
.local-patient-home > header p,.local-family-home > header p,.local-unavailable-page > header p { margin:0; max-width:760px; color:#4e6874; font-size:18px; line-height:1.65; }
.local-today-tasks,.local-feature-block,.family-function-block,.local-unavailable-page > section { padding:clamp(20px,3vw,30px); border:1px solid #d4e4e6; border-radius:20px; background:#fff; box-shadow:0 10px 28px rgba(20,58,77,.05); }
.local-today-tasks > header,.local-feature-block > header,.family-function-block > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.local-today-tasks h2,.local-feature-block h2,.family-function-block h2,.local-unavailable-page h2 { margin:0; color:#183f54; font-size:clamp(22px,2.5vw,29px); }
.local-today-tasks header p,.local-feature-block header p,.family-function-block header p { margin:5px 0 0; color:#607883; font-size:17px; }
.local-task-list,.local-record-list,.local-alert-list { display:grid; gap:12px; }
.local-task-list > article,.local-record-list > article,.local-alert-list > article { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:14px; padding:16px; border:1px solid #dbe8e9; border-radius:15px; background:#f9fcfc; }
.local-task-list strong,.local-record-list strong,.local-alert-list strong { color:#204b5b; font-size:18px; }
.local-task-list p,.local-record-list p,.local-alert-list p { margin:4px 0 0; color:#627984; line-height:1.5; }
.local-empty-state { padding:28px; border:2px dashed #cbdfe0; border-radius:16px; background:#fbfdfd; color:#607984; font-size:18px; line-height:1.6; text-align:center; }
.local-available-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.local-feature-launch { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:15px; min-height:90px; padding:16px; border:1px solid #d5e5e6; border-radius:16px; background:#f9fcfc; }
.local-feature-launch .icon-box { width:48px; height:48px; color:#137f72; background:#e4f3f0; }
.local-feature-launch strong { color:#1b485a; font-size:18px; }
.local-feature-launch p { margin:4px 0 0; color:#5c7480; line-height:1.5; }
.local-feature-launch .btn,.local-task-list .btn,.local-record-list .btn,.local-alert-list .btn { min-height:48px; }
.local-action-warning { display:flex; align-items:flex-start; gap:12px; padding:15px; border:1px solid #e8c982; border-radius:14px; background:#fff8e8; color:#744d17; font-size:17px; line-height:1.55; }
.local-unavailable-page > header .icon-box { flex:none; width:58px; height:58px; color:#1c7883; background:#e3f1f2; }
.local-unavailable-page ul { margin:14px 0 0; padding-left:22px; color:#496672; font-size:18px; line-height:1.8; }

@media (max-width:900px) {
  .local-available-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:640px) {
  .local-patient-home > header,.local-family-home > header,.local-unavailable-page > header { flex-direction:column; }
  .local-available-grid { grid-template-columns:1fr; }
  .local-feature-launch,.local-task-list > article,.local-record-list > article,.local-alert-list > article { grid-template-columns:auto minmax(0,1fr); }
  .local-feature-launch .btn,.local-task-list .btn,.local-record-list .btn,.local-alert-list .btn { grid-column:1/-1; width:100%; }
  .local-today-tasks > header,.local-feature-block > header,.family-function-block > header { flex-direction:column; }
}
