.technician-asr-card { min-inline-size:0; overflow-wrap:anywhere; }
.technician-lookup-preview { margin-block-start:20px; padding-block-start:20px; border-block-start:1px solid #d9e2ee; min-inline-size:0; }
.technician-lookup-preview .panel-head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; }
.technician-lookup-preview h3,.technician-lookup-preview p { margin-block:4px 12px; }
.technician-lookup-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:16px; }
.technician-lookup-fields div { min-inline-size:0; overflow-wrap:anywhere; }
.technician-lookup-fields dt { font-size:12px; color:#53647a; }
.technician-lookup-fields dd { margin:4px 0 0; font-weight:600; }
.technician-lookup-preview li { margin-block:8px; overflow-wrap:anywhere; }
.technician-asr-card .advisor-asr-description { white-space:pre-wrap; }
.technician-asr-card .estimate-field { margin-block-end:12px; }
.technician-asr-card textarea { inline-size:100%; min-block-size:120px; resize:vertical; }
.technician-asr-card .upload-button { cursor:pointer; }
.technician-asr-card .asr-attachment-previews { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr)); gap:12px; margin-block-end:12px; }
.technician-asr-card .asr-attachment-preview { margin:0; min-inline-size:0; }
.technician-asr-card .asr-attachment-preview img,.technician-asr-card .asr-attachment-preview video { inline-size:100%; block-size:180px; object-fit:contain; border-radius:10px; }
.technician-asr-head { display:flex; flex-wrap:wrap; align-items:start; justify-content:space-between; gap:12px; }
.technician-asr-head h3 { margin-block:4px 8px; }
.technician-asr-summary { padding:12px; background:#f5f8ff; border-radius:10px; }
.technician-asr-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; }
.technician-asr-grid > section { min-inline-size:0; }
.technician-asr-card h4 { margin-block:0 12px; }
.technician-asr-card .mobile-asr-media { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); gap:12px; margin-block-end:12px; }
.technician-asr-card .mobile-asr-media img,.technician-asr-card .mobile-asr-media video { inline-size:100%; max-block-size:280px; object-fit:contain; background:#f5f8ff; border-radius:10px; }
.technician-asr-footer { border-block-start:1px solid #e4eaf4; padding-block-start:16px; margin-block-start:20px; }
.mobile-screen-tech-asr { min-inline-size:0; box-sizing:border-box; }
.mobile-screen-tech-asr .mobile-tech-status:empty { display:none; }
.mobile-screen-tech-asr :is(#asr-comment-tools,#asr-operation-lookup) > [role="status"]:empty { display:none; }
.mobile-asr-draft-evidence { display:grid; gap:10px; min-inline-size:0; padding-block-start:12px; border-block-start:1px solid #d9e2ee; }
.mobile-asr-draft-previews { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); gap:12px; }
.mobile-asr-draft-previews figure { display:grid; gap:8px; min-inline-size:0; margin:0; }
.mobile-asr-draft-previews img { inline-size:100%; block-size:140px; object-fit:contain; border-radius:8px; background:#f5f8ff; }
.mobile-asr-create-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding-block-start:16px; margin-block-start:8px; border-block-start:1px solid #d9e2ee; }
.mobile-asr-create-actions #mobile-asr-send-advisor { grid-column:1 / -1; background:#1764c7; border-color:#1764c7; color:#fff; }
.mobile-asr-create-actions button { min-inline-size:0; white-space:normal; min-block-size:48px; }
.mobile-asr-create-actions button:focus-visible,.mobile-asr-draft-evidence button:focus-visible { outline:3px solid #1764c7; outline-offset:3px; }
.mobile-asr-create-actions + small { line-height:1.6; color:#53647a; }
.technician-story-row { display:grid; gap:10px; padding-block:16px; border-block-end:1px solid #e4eaf4; min-inline-size:0; }
.technician-story-row p { white-space:pre-wrap; overflow-wrap:anywhere; margin:0; max-block-size:200px; overflow:auto; }
.technician-story-row button { justify-self:start; }
.technician-line-story-dialog { inline-size:min(640px,calc(100% - 24px)); max-block-size:calc(100dvh - 32px); overflow:auto; box-sizing:border-box; }
.technician-line-story-dialog textarea { box-sizing:border-box; inline-size:100%; resize:vertical; min-block-size:160px; }
.tech-assignment-story-modal textarea { min-block-size:180px; }
.tech-assignment-story-modal [role=alert] { color:#a12323; }
.tech-history-prediction{min-inline-size:0;margin-block:16px;border:1px solid #d9e4f2;border-radius:14px;padding:20px;box-shadow:none}
.tech-history-prediction .quick-service-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:12px}
.tech-history-prediction .quick-service-button{display:grid;align-content:start;text-align:start;gap:8px;white-space:normal;overflow-wrap:anywhere;min-inline-size:0;min-block-size:44px;padding:16px}
.tech-history-prediction .panel-head{flex-wrap:wrap;gap:12px}
.tech-history-prediction .panel-head h2{font-size:20px;line-height:1.3}
.tech-history-prediction .support-text{overflow-wrap:anywhere}
.tech-vehicle-history { margin-block-start:24px; border-block-start:1px solid #d9e4f2; padding-block-start:16px; }
.tech-vehicle-history-list { display:grid; gap:12px; max-block-size:420px; overflow:auto; }
.tech-vehicle-history article { padding:12px; background:#f5f8ff; border-radius:10px; overflow-wrap:anywhere; }
.tech-vehicle-history p { margin-block:6px; }
.tech-vehicle-history ul { margin-block:8px 0; padding-inline-start:20px; }
.assignment-line-row .opt-code-story-actions { align-items:stretch; inline-size:130px; max-inline-size:45%; min-inline-size:0; }
.assignment-line-row .opt-code-story-actions > button { inline-size:100%; min-inline-size:0; box-sizing:border-box; white-space:normal; }
.tech-grid > .tech-diagnostic-predict { grid-column:1 / -1; grid-row:4; }
.tech-grid:has(> .tech-diagnostic-predict) > .tech-ai-card { grid-row:5; }
.tech-grid:has(> .tech-diagnostic-predict) > .tech-media-card { grid-row:6; }
.tech-diagnostic-predict .autospeech-assist-grid { grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr)); }
.tech-diagnostic-predict .details-card { overflow-wrap:anywhere; }
@media(max-width:980px) {
  .tech-grid > .tech-diagnostic-predict,
  .tech-grid:has(> .tech-diagnostic-predict) > .tech-ai-card,
  .tech-grid:has(> .tech-diagnostic-predict) > .tech-media-card { grid-column:auto; grid-row:auto; }
}
@media(min-width:900px) { .mobile-screen-tech-asr .technician-asr-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
@media(max-width:600px) {
  .technician-asr-card .advisor-asr-repair-grid { grid-template-columns:minmax(0,1fr); }
  .technician-asr-card .advisor-asr-repair-head { flex-wrap:wrap; }
  .technician-asr-card .estimate-part-row { grid-template-columns:minmax(0,1fr); }
  .technician-asr-card .panel-actions { flex-wrap:wrap; }
}

/* Let the recommended story fill the card alongside the work-order lines. */
.tech-grid > .tech-story-card { display:flex; flex-direction:column; align-self:stretch; min-inline-size:0; }
.tech-story-card > * { flex-shrink:0; }
.tech-story-card .tech-story-notes { min-inline-size:0; }
.tech-story-card .voice-control-row,
.tech-story-card .tech-story-action-row { display:flex; flex-direction:row; flex-wrap:wrap; gap:8px; }
.tech-story-card .panel-actions > button { min-inline-size:0; max-inline-size:100%; white-space:normal; }
.tech-story-card .tech-story-feedback { margin-block:0 8px; }
.tech-story-card .tech-story-feedback:empty { display:none; }
.tech-story-card > .tech-story-output { display:flex; flex-direction:column; flex:1 0 auto; min-block-size:220px; min-inline-size:0; }
.tech-story-output > .textarea-field { display:flex; flex-direction:column; flex:1; min-block-size:0; min-inline-size:0; }
.tech-story-card .tech-story-output textarea { flex:1; inline-size:100%; min-block-size:180px; max-block-size:none; resize:vertical; box-sizing:border-box; }
@media(max-width:600px) {
  .tech-story-card .panel-actions > button { flex:1 1 110px; inline-size:auto; margin-inline:0; }
}

/* Technician actions stay blue across themes; only the last clicked action is filled. */
#app .tech-grid { --technician-action-ink:var(--primary-dark,#0051d5); --technician-action-fill:var(--primary-dark,#0051d5); --technician-action-surface:#f7faff; --technician-action-on-fill:#fff; }
#app .tech-grid button,
#app .tech-grid button:hover,
#app .tech-grid button:active {
  color:var(--technician-action-ink); background:var(--technician-action-surface); background-image:none;
  border:1px solid var(--technician-action-ink); box-shadow:none; filter:none; transition:opacity .15s;
}
#app .tech-grid button[data-tech-clicked],
#app .tech-grid button[data-tech-clicked]:hover,
#app .tech-grid button[data-tech-clicked]:active {
  color:var(--technician-action-on-fill); background:var(--technician-action-fill);
  text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:3px; opacity:1;
}
#app .tech-grid button:disabled:not([data-tech-clicked]) { opacity:.55; }
#app .tech-grid button:focus-visible { outline:3px solid var(--technician-action-ink); outline-offset:3px; }

/* The dashboard now flows directly from work and recommendations to Story. */
.tech-grid > .tech-media-card { grid-row:3; }
.tech-history-prediction .quick-service-button { min-block-size:60px; align-content:center; }
@media(max-width:980px) { .tech-grid > .tech-media-card { grid-row:auto; } }

.asr-mpi-panel { container-type:inline-size; min-inline-size:0; }
.asr-mpi-panel .asr-mpi-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-block-end:20px; }
.asr-mpi-heading h2 { margin:0 0 4px; font-size:20px; }
.asr-mpi-count { color:var(--muted,#53647a); font-size:13px; }
.asr-mpi-list { display:grid; gap:20px; }
.asr-mpi-panel .asr-mpi-card { min-inline-size:0; padding:20px; border-radius:12px; box-shadow:none; }
.asr-mpi-card-heading { display:flex; justify-content:space-between; align-items:start; flex-wrap:wrap; gap:12px; margin-block-end:24px; }
.asr-mpi-card-heading h3 { margin:6px 0 0; font-size:18px; overflow-wrap:anywhere; }
.asr-mpi-card-heading .panel-chip { white-space:normal; }
.asr-mpi-body { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.asr-mpi-body > section { display:flex; flex-direction:column; min-inline-size:0; }
.asr-mpi-body h4 { margin:0 0 12px; font-size:14px; }
.asr-mpi-body .asr-mpi-video-preview { inline-size:100%; width:100%; max-block-size:300px; aspect-ratio:16/9; object-fit:contain; }
.asr-mpi-video-empty { display:grid; place-content:center; min-block-size:180px; padding:20px; background:var(--bg-soft,#f3f6fb); border-radius:10px; color:var(--muted,#53647a); text-align:center; }
.asr-mpi-readings { inline-size:100%; border-collapse:collapse; font-size:12px; font-variant-numeric:tabular-nums; }
.asr-mpi-readings th,.asr-mpi-readings td { padding:10px 4px; text-align:center; border-block-end:1px solid var(--theme-border,#dbe2ea); overflow-wrap:anywhere; }
.asr-mpi-readings th:first-child { text-align:start; }
.asr-mpi-readings thead { color:var(--muted,#53647a); }
.asr-mpi-notes { margin-block:20px; }
.asr-mpi-notes p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.6; }
.asr-mpi-asset-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-block-start:auto; padding-block-start:16px; }
.asr-mpi-asset-actions > button { min-inline-size:0; min-block-size:44px; max-inline-size:100%; margin:0; padding:10px; white-space:normal; }
.asr-mpi-text-status { grid-column:1/-1; margin:0; font-size:12px; overflow-wrap:anywhere; }
.asr-mpi-text-status:empty { display:none; }
@container (max-width:620px) {
  .asr-mpi-body { grid-template-columns:minmax(0,1fr); }
  .asr-mpi-panel .asr-mpi-card { padding:12px; }
}
