/* Scoped presentation only: the original task controls and handlers stay intact. */
.merchant-page #supervisor .supervisor-chat-card {
  box-sizing: border-box; height: var(--supervisor-chat-height, max(380px, calc(100dvh - 250px)));
  padding: 0; overflow: hidden; border: 1px solid #e4e6eb;
  border-radius: 16px; background: #fff; box-shadow: 0 4px 22px #26324a06;
}
.merchant-page #supervisor > .header { margin-bottom: 12px; }
.merchant-page #supervisor > .header .eyebrow, .merchant-page #supervisor > .header .section-subtitle { display: none; }
.merchant-page #supervisor > .header h2 { font-size: 22px; margin: 0; }
.merchant-page #supervisor .workspace-tabs { margin-bottom: 12px; padding: 4px; }
.merchant-page #supervisor .workspace-tabs button { padding: 9px 14px; }
.merchant-page #supervisor .supervisor-chat-card > .card-heading {
  flex: 0 0 auto; padding: 16px 22px; margin: 0;
  border-bottom: 1px solid #eceef2; gap: 8px 16px;
}
.merchant-page #supervisor .supervisor-chat-card .eyebrow { display: none; }
.merchant-page #supervisor .supervisor-chat-card h3 { font-size: 18px; color: #252b37; }
.merchant-page #supervisor .supervisor-chat-subtitle { font-size: 13px; margin-top: 4px; }
.merchant-page #supervisor .supervisor-chat-card > .card-heading > .soft-label { display: none; }
.merchant-page #supervisor .supervisor-workspace-controls { display: flex; gap: 8px; margin-left: auto; }
.merchant-page #supervisor .supervisor-workspace-body {
  display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; min-height: 0; position: relative;
}
.merchant-page #supervisor .supervisor-workspace-body:has(> .supervisor-task-drawer:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) 390px;
}
.merchant-page #supervisor .supervisor-conversation { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.merchant-page #supervisor .supervisor-messages {
  min-height: 0; max-height: none; overflow: auto; padding: 24px max(24px, calc((100% - 850px) / 2));
  flex: 1 1 0; scroll-padding-block: 20px;
}
.merchant-page #supervisor .supervisor-message { margin: 0 0 26px; gap: 12px; }
.merchant-page #supervisor .supervisor-bubble { max-width: 100%; padding: 0 4px; border: 0; border-radius: 0; background: none; color: #303642; font-size: 16px; line-height: 1.85; }
.merchant-page #supervisor .supervisor-message-author { color: #727888; font-size: 12px; margin-bottom: 8px; }
.merchant-page #supervisor .supervisor-message-content h4 { color: #242b38; font-size: 18px; margin-top: 24px; }
.merchant-page #supervisor .supervisor-message.user > .supervisor-avatar { display: none; }
.merchant-page #supervisor .supervisor-message.user .supervisor-bubble { max-width: 85%; padding: 12px 18px; border-radius: 18px; background: #f0f1f5; color: #303642; }
.merchant-page #supervisor .supervisor-message.user .supervisor-message-author { display: none; }
.merchant-page #supervisor .supervisor-chat-form {
  flex: 0 0 auto; box-sizing: border-box; width: calc(100% - 40px); max-width: 850px;
  margin: 0 auto 18px; padding: 12px 14px; border: 1px solid #dfe2e9; border-radius: 16px;
  box-shadow: 0 4px 16px #27344c06; background: #fafbfc;
}
.merchant-page #supervisor .supervisor-input-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.merchant-page #supervisor .supervisor-chat-form textarea {
  min-height: 64px; max-height: 140px; padding: 6px; border: 0; background: transparent; font-size: 16px; resize: vertical;
}
.merchant-page #supervisor .supervisor-chat-form textarea:focus { box-shadow: none; outline: 2px solid #c8c8f0; outline-offset: 2px; }
.merchant-page #supervisor .supervisor-composer-meta { margin: 4px 0; font-size: 12px; }
.merchant-page #supervisor .supervisor-chat-actions { flex-direction: row; align-items: center; margin-top: 8px; gap: 8px; }
.merchant-page #supervisor .supervisor-chat-actions select { min-width: 0; max-width: 210px; width: auto; padding: 7px 9px; font-size: 13px; }
.merchant-page #supervisor .supervisor-chat-actions .hint-inline { font-size: 12px; }
.merchant-page #supervisor #supervisorChatBtn { margin-left: auto; min-height: 38px; padding: 8px 15px; }
.merchant-page #supervisor .supervisor-task-drawer {
  box-sizing: border-box; min-height: 0; overflow: auto; overscroll-behavior: contain;
  border-left: 1px solid #e5e7ed; background: #f8f9fb; padding: 18px; font-size: 14px;
}
.merchant-page #supervisor .supervisor-drawer-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 16px; }
.merchant-page #supervisor .supervisor-drawer-hint, .merchant-page #supervisor .supervisor-context-empty { color: #777e8d; font-size: 13px; line-height: 1.7; }
.merchant-page #supervisor .supervisor-ordering-panel { background: none; margin: 0; padding: 0; border: 0; }
.merchant-page #supervisor .supervisor-ordering-actions { margin-bottom: 16px; }
.merchant-page #supervisor .supervisor-ordering-actions .btn { text-align: left; width: 100%; }
.merchant-page #supervisor .supervisor-context-section { border-top: 1px solid #e1e5ed; padding: 14px 0; }
.merchant-page #supervisor .supervisor-context-section > summary { cursor: pointer; font-weight: 600; color: #414958; padding: 5px 0; }
.merchant-page #supervisor .supervisor-context-section > .btn { margin-top: 8px; }
.merchant-page #supervisor .supervisor-task-card { padding: 12px; border-radius: 10px; font-size: 14px; line-height: 1.65; }
.merchant-page #supervisor .supervisor-task-card-head { flex-wrap: wrap; }
.merchant-page #supervisor .supervisor-task-summary { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 16px 0; }
.merchant-page #supervisor .supervisor-task-summary dt { color: #6b7280; font-size: 13px; margin-top: 8px; }
.merchant-page #supervisor .supervisor-task-summary dd { margin: 0; color: #202938; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.merchant-page #supervisor .supervisor-draft-notice { padding: 8px 10px; background: #eef4ff; border-radius: 8px; color: #42577b; }
.merchant-page #supervisor .supervisor-task-more { border-top: 1px solid #e3e7ee; padding-top: 10px; margin-top: 14px; }
.merchant-page #supervisor .supervisor-task-more summary, .merchant-page #supervisor .supervisor-plan-group summary { cursor: pointer; line-height: 1.7; }
.merchant-page #supervisor .supervisor-task-more p { overflow-wrap: anywhere; }
.merchant-page #supervisor .supervisor-plan-group { margin: 14px 0; }
.merchant-page #supervisor .supervisor-plan-group h4 { font-size: 15px; margin: 10px 0; }
.merchant-page #supervisor .supervisor-plan-group ul { padding: 0; }
.merchant-page #supervisor .supervisor-task-card-actions { gap: 8px; padding: 10px 0; }
.merchant-page #supervisor .supervisor-task-card-actions .btn { min-height: 38px; }
.merchant-page #supervisor .supervisor-missing-fields { padding: 10px; background: #fff8e8; border-radius: 8px; }
.merchant-page #supervisor .supervisor-plan-item { margin-bottom: 10px; list-style: none; font-size: 14px; }
.merchant-page #supervisor .supervisor-plan-item label { display: block; cursor: pointer; }
.merchant-page #supervisor .supervisor-daily-plan > ul { padding: 0; }
.merchant-page #supervisor .supervisor-task-card-meta { padding-left: 18px; }
.merchant-page #supervisor .supervisor-facts-strip { flex-direction: column; }
.merchant-page #supervisor .supervisor-fact-chip { border-radius: 8px; line-height: 1.5; }
.merchant-page #supervisor .supervisor-task-drawer [hidden], .merchant-page #supervisor .supervisor-task-drawer[hidden], .merchant-page #supervisor .supervisor-workspace-controls [hidden] { display: none !important; }
.merchant-page #supervisor .supervisor-chat-card.supervisor-expanded { position: fixed; inset: 12px; height: auto; z-index: 90; box-shadow: 0 0 0 20px #f3f5f9; }
@media (max-width: 1100px) {
  .merchant-page #supervisor .supervisor-workspace-body:has(> .supervisor-task-drawer:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .merchant-page #supervisor .supervisor-task-drawer { position: absolute; inset: 0 0 0 auto; width: min(390px, 100%); z-index: 3; box-shadow: -12px 0 32px #26324a12; }
  .merchant-page #supervisor .supervisor-chat-actions .hint-inline { display: none; }
}
@media (max-width: 640px) {
  .merchant-page #supervisor .supervisor-chat-card { height: var(--supervisor-chat-height, max(380px, calc(100dvh - 170px))); }
  .merchant-page #supervisor .supervisor-chat-card > .card-heading { padding: 12px; }
  .merchant-page #supervisor .supervisor-chat-subtitle { display: none; }
  .merchant-page #supervisor .supervisor-messages { padding: 18px 12px; }
  .merchant-page #supervisor .supervisor-chat-form { width: calc(100% - 20px); margin-bottom: 10px; padding: 10px; }
  .merchant-page #supervisor .supervisor-chat-actions select { max-width: 150px; }
  .merchant-page #supervisor .supervisor-chat-card.supervisor-expanded { inset: 0; border-radius: 0; }
}
