/* Therapeutic programming uses the existing AVNS semantic color tokens. */
.therapy-page{display:grid;gap:28px;min-width:0;max-width:1120px;margin:0 auto}
.therapy-page>*{min-width:0}.therapy-page p,.therapy-page span,.therapy-page strong,.therapy-page b{overflow-wrap:anywhere}
.therapy-page .therapy-heading{margin-bottom:0;align-items:flex-start}
.therapy-page .heading-actions,.therapy-page .section-heading{flex-wrap:wrap}
.therapy-page .section-heading>div{min-width:0;flex:1 1 220px}
.therapy-page .section-heading p{font-size:13px;color:var(--muted);margin-top:6px}
.therapy-page .heading-actions{justify-content:flex-end;flex-shrink:0}
.therapy-page button{white-space:normal;line-height:1.35}
.therapy-page .field{min-width:0}
.therapy-page input,.therapy-page select,.therapy-page textarea{max-width:100%;min-width:0;width:100%}
.therapy-page input[type=checkbox]{width:20px;min-width:20px;height:20px;accent-color:var(--action)}
.therapy-muted,.therapy-rule-note{color:var(--muted);font-size:13px;line-height:1.5}
.therapy-error:empty{display:none}.therapy-error{margin:12px 0}
.therapy-picker,.therapy-editor,.therapy-scheduler,.therapy-results{padding:26px}
.therapy-picker{max-width:880px;width:100%}
.therapy-patient-search{max-width:580px;width:100%;margin-bottom:18px}
.therapy-patient-results{display:grid}
.therapy-patient-result{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid var(--line)}
.therapy-patient-result:last-child{border-bottom:0}.therapy-patient-result>div{min-width:0}
.therapy-patient-result h2{font-size:17px}.therapy-patient-result p{font-size:13px;color:var(--muted);margin-top:5px}
.therapy-patient-result button{flex-shrink:0}
.therapy-context-banner{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;padding:18px 22px;background:var(--tint);border:1px solid var(--line);border-radius:var(--radius)}
.therapy-context-banner strong{display:block;font-size:18px;margin-top:5px}
.therapy-summary{padding:22px;border:1px solid var(--line);background:var(--surface);border-radius:var(--radius)}
.therapy-metrics,.therapy-plan-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.therapy-metric{display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px;background:var(--surface-alt);border-radius:9px}
.therapy-metric>span{font-size:13px;color:var(--muted)}
.therapy-metric>strong{font:600 27px/1.15 var(--avns-heading);font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.therapy-metric>small{font-size:12px;color:var(--muted)}
.therapy-plan-list,.therapy-appointment-list{display:grid;gap:18px}
.therapy-plan-card{padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.therapy-plan-card.is-historical{border-style:dashed}
.therapy-plan-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.therapy-plan-title>div{min-width:0}.therapy-plan-title h3{margin-top:7px;font-size:21px}
.therapy-chip{display:inline-block;padding:5px 9px;border:1px solid var(--line);border-radius:7px;font-size:12px;color:var(--muted);background:var(--surface-alt);max-width:100%}
.therapy-plan-title>.therapy-chip{flex-shrink:0;color:var(--action);background:var(--tint)}
.therapy-plan-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;color:var(--muted);font-size:13px;margin:16px 0 20px}
.therapy-plan-metrics{gap:8px}.therapy-plan-metrics .therapy-metric{padding:12px}
.therapy-plan-metrics .therapy-metric>strong{font-size:23px}
.therapy-plan-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;border-top:1px solid var(--line);margin-top:20px;padding-top:17px}
.therapy-rule-note{flex-basis:100%;max-width:75ch}
.therapy-empty{padding:28px;display:grid;justify-items:start;gap:14px}
.therapy-empty p{color:var(--muted);font-size:14px;max-width:65ch}
.therapy-appointment-card{display:grid;grid-template-columns:minmax(145px,.8fr) minmax(0,2fr);gap:16px 24px;padding:22px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.therapy-appointment-time{display:grid;align-content:start;gap:7px}.therapy-appointment-time strong{font-size:16px;font-variant-numeric:tabular-nums}.therapy-appointment-time span{font-size:14px;color:var(--action)}
.therapy-appointment-info{min-width:0;display:grid;gap:8px;font-size:14px}
.therapy-appointment-card>button{grid-column:2;justify-self:start}
.therapy-link-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-top:8px;padding-top:12px;border-top:1px solid var(--line)}
.therapy-link-controls .field{flex:1 1 230px;max-width:520px}
.therapy-history{border-top:1px solid var(--line);padding-top:24px}
.therapy-timeline{list-style:none;margin:0;padding:0;display:grid}
.therapy-timeline li{display:grid;grid-template-columns:150px minmax(0,1fr);gap:20px;padding:18px 0;border-bottom:1px solid var(--line)}
.therapy-timeline time{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.therapy-timeline li>div{display:grid;gap:6px;font-size:14px}.therapy-timeline li>div>span{color:var(--action)}.therapy-timeline p{font-size:13px;color:var(--muted)}.therapy-timeline button{justify-self:start}
.therapy-history-toggle{margin-top:15px}
.therapy-editor,.therapy-scheduler{width:100%;max-width:880px;scroll-margin-top:24px}
.therapy-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.therapy-full{grid-column:1/-1}.therapy-admin{display:grid;gap:18px;margin:20px 0}
.therapy-service-lines{display:grid;gap:16px;margin-top:20px}
.therapy-service-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--surface-alt);margin:16px 0}
.therapy-service-row>button{grid-column:1/-1;justify-self:start;padding:0}
.therapy-service-row small{font-size:12px;line-height:1.5}
.therapy-editor-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.therapy-review{display:grid;gap:18px;max-width:76ch;font-size:14px}
.therapy-review .therapy-editor-actions{margin-top:0}.therapy-review .notice{margin:0}
.therapy-impact-row{display:flex;justify-content:space-between;gap:20px;padding:13px 15px;background:var(--surface-alt);border:1px solid var(--line);border-radius:8px}
.therapy-impact-row>span{color:var(--muted);font-size:13px}.therapy-impact-row>b{text-align:right;max-width:60%;font-variant-numeric:tabular-nums}
.therapy-edit-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.therapy-edit-comparison>div{padding:16px;background:var(--surface-alt);border:1px solid var(--line);border-radius:9px}
.therapy-edit-comparison ul{padding-left:20px;margin:12px 0 0}.therapy-edit-comparison li{margin-top:8px}
.therapy-booking-date{display:flex;flex-wrap:wrap;gap:16px;align-items:center;margin-bottom:22px}
.therapy-booking-date>.date-field{flex:1 1 300px;max-width:420px}
.therapy-booking-services{display:grid;gap:16px}
.therapy-slot-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.therapy-booking-service{display:grid;gap:18px;padding:20px;border:1px solid var(--line);background:var(--surface-alt);border-radius:11px}
.therapy-service-select{display:flex;gap:12px;align-items:flex-start;cursor:pointer}
.therapy-service-select>input{margin-top:3px;flex-shrink:0}.therapy-service-select>span{min-width:0;display:grid;gap:5px}.therapy-service-select strong{font-size:16px}.therapy-service-select small{font-size:12px;color:var(--muted)}
.therapy-booking-service .field{background:var(--surface);padding:14px;border:1px solid var(--line);border-radius:8px}
.therapy-booking-review{padding-left:22px;display:grid;gap:12px;margin:0}
.therapy-booking-review li{padding:13px;background:var(--surface-alt);border-radius:8px}.therapy-booking-review strong,.therapy-booking-review span{display:block}.therapy-booking-review span{font-size:13px;color:var(--muted);margin-top:6px}
.therapy-results{display:grid;gap:22px}.therapy-results>.section-heading{margin:0}
.therapy-result-column{padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--surface-alt)}
.therapy-result-column h3{font-size:18px}.therapy-result-column+.therapy-result-column{border-left:4px solid var(--action)}
.therapy-result-column ol{padding-left:22px;margin:16px 0 0;display:grid;gap:14px}
.therapy-result-column li{padding:12px;border-radius:8px;background:var(--surface)}
.therapy-result-column li>strong,.therapy-result-column li>span{display:block}.therapy-result-column li>span{font-size:13px;color:var(--muted);margin-top:7px}.therapy-result-column li>span.error-text{color:var(--danger)}
.therapy-result-column .therapy-link-reason{margin-top:18px}
@media(min-width:1100px){.therapy-metrics{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:760px){
 .therapy-page{gap:23px}.therapy-page .therapy-heading{display:grid;gap:16px}.therapy-page .heading-actions{justify-content:flex-start;gap:12px}
 .therapy-picker,.therapy-editor,.therapy-scheduler,.therapy-results,.therapy-summary,.therapy-plan-card{padding:18px}
 .therapy-patient-result{display:grid;gap:13px}.therapy-patient-result button{justify-self:start}
 .therapy-page .section-heading{align-items:flex-start;gap:12px}.therapy-page .section-heading>div{flex-basis:100%}
 .therapy-metrics,.therapy-plan-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .therapy-metric{padding:12px}.therapy-metric>span{font-size:12px}.therapy-metric>strong{font-size:25px}
 .therapy-plan-title{flex-wrap:wrap;gap:12px}.therapy-plan-title h3{font-size:19px}.therapy-plan-meta{gap:8px 14px;margin:14px 0}
 .therapy-form-grid,.therapy-service-row,.therapy-edit-comparison{grid-template-columns:minmax(0,1fr)}
 .therapy-service-row{padding:14px;gap:16px}.therapy-form-grid{gap:18px}
 .therapy-appointment-card{grid-template-columns:minmax(0,1fr);padding:18px;gap:14px}.therapy-appointment-card>button{grid-column:1}
 .therapy-appointment-time{padding-bottom:12px;border-bottom:1px solid var(--line)}
 .therapy-link-controls{display:grid;grid-template-columns:minmax(0,1fr);align-items:start}.therapy-link-controls>button{justify-self:start}
 .therapy-timeline li{grid-template-columns:minmax(0,1fr);gap:8px;padding:16px 0}
 .therapy-impact-row{flex-direction:column;gap:8px}.therapy-impact-row>b{text-align:left;max-width:100%}
 .therapy-booking-date{display:grid;grid-template-columns:minmax(0,1fr)}.therapy-booking-date>.date-field{max-width:none}.therapy-booking-date>button{justify-self:start}
 .therapy-booking-service,.therapy-result-column{padding:14px}.therapy-booking-service .field{padding:12px}
 .therapy-slot-filters{grid-template-columns:minmax(0,1fr)}
 .therapy-editor-actions{align-items:stretch}.therapy-editor-actions>.primary{width:100%}.therapy-result-column ol{padding-left:18px}
 .therapy-empty{padding:22px}.therapy-context-banner{padding:16px}.therapy-page .date-input-row{gap:6px}.therapy-page .date-input-row button{padding:8px;font-size:12px}
}
