/* JD STR assistant: focused conversation, independent from application forms. */
#openAssistantButton.assistant-launch {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border: 1px solid #d1ae58; border-radius: 12px;
  background: #f8f2e3; color: #193441; font-size: 14px; font-weight: 750;
  white-space: nowrap; box-shadow: none;
}
#openAssistantButton[hidden] { display: none; }
dialog.assistant-panel {
  --assistant-ink: #173340; --assistant-muted: #627480;
  width: min(600px, calc(100vw - 40px)); height: min(850px, calc(100dvh - 40px));
  max-width: none; max-height: calc(100dvh - 40px); margin: auto 20px auto auto; padding: 0;
  border: 1px solid #d4c7a8; border-radius: 24px; background: #fbfaf7; color: var(--assistant-ink);
  box-shadow: 0 28px 100px #061c3352; overflow: hidden;
}
dialog.assistant-panel[open] { display: flex; flex-direction: column; }
dialog.assistant-panel::backdrop { background: #071d345c; backdrop-filter: blur(4px); }
.assistant-panel *, .assistant-panel *::before, .assistant-panel *::after { box-sizing: border-box; }
.assistant-panel [hidden] { display: none !important; }
.assistant-panel button { cursor: pointer; font-family: inherit; }
.assistant-panel button:disabled { cursor: default; opacity: .5; }
.assistant-panel button:focus-visible, .assistant-panel summary:focus-visible { outline: 3px solid #b08726; outline-offset: 3px; }
.assistant-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; padding: 22px 24px; gap: 12px; background: #102d3b; color: #fff; }
.assistant-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.assistant-mark { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border: 1px solid #d9b45e75; border-radius: 15px; color: #efd48b; font-size: 28px; background: #ffffff08; }
.assistant-header h2 { margin: 0; color: #fff; font-size: 20px; line-height: 1.25; letter-spacing: -.5px; }
.assistant-header .assistant-availability { margin: 5px 0 0; font-size: 12px; color: #ccdae1; line-height: 1.35; }
.assistant-close { width: 42px; min-width: 42px; min-height: 42px; padding: 0; border: 1px solid #ffffff2b; border-radius: 12px; background: transparent; color: #fff; font-size: 27px; box-shadow: none; }
.assistant-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 24px; border-bottom: 1px solid #e8e6de; background: #fff; }
.assistant-scope { font-size: 11px; font-weight: 650; color: #647581; }
.assistant-panel .assistant-text-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 5px 2px; border: 0; background: transparent; color: #244c65; font-size: 12px; font-weight: 700; box-shadow: none; }
.assistant-body { flex: 1 1 auto; min-height: 0; padding: 22px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.assistant-overview:empty { display: none; }
.assistant-overview { padding: 16px; border: 1px solid #e2ddd0; border-radius: 17px; background: linear-gradient(135deg, #fff 45%, #faf5e8); }
.assistant-overview-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.assistant-overview-heading h3 { margin: 0; font-size: 14px; }
.assistant-date { font-size: 11px; color: #627480; }
.assistant-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0 12px; }
.assistant-count { display: grid; gap: 4px; min-width: 0; }
.assistant-count + .assistant-count { padding-left: 14px; border-left: 1px solid #e4dfd2; }
.assistant-count strong { font-size: 26px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.assistant-count span { font-size: 11px; line-height: 1.35; color: #627480; }
.assistant-panel .assistant-source-note { margin: 0; font-size: 11px; line-height: 1.6; color: #627480; }
.assistant-activation { padding: 13px 15px; margin: 12px 0; border: 1px solid #e5d5a6; border-radius: 12px; background: #fff8e8; color: #755a1d; font-size: 12px; line-height: 1.6; }
.assistant-welcome { padding: 26px 2px 18px; }
.assistant-eyebrow { color: #96701e; font-size: 10px; letter-spacing: 1.4px; font-weight: 800; }
.assistant-welcome h3 { margin: 9px 0; font-size: 25px; line-height: 1.2; letter-spacing: -.8px; }
.assistant-welcome p { margin: 0; max-width: 420px; font-size: 13px; line-height: 1.65; color: #627480; }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.assistant-panel .assistant-prompt { min-height: 42px; padding: 10px 13px; border: 1px solid #dcdedc; border-radius: 12px; background: #fff; color: #244556; text-align: left; font-size: 12px; line-height: 1.4; font-weight: 550; box-shadow: none; overflow-wrap: anywhere; }
.assistant-panel .assistant-prompt:hover:enabled { border-color: #bc9c49; background: #fffaf0; }
.assistant-messages { display: grid; gap: 18px; margin-top: 18px; }
.assistant-message { min-width: 0; padding: 16px; border: 1px solid #e5e6e1; border-radius: 16px 16px 16px 4px; background: #fff; }
.assistant-message--user { margin-left: 34px; border-color: #dfe7e9; border-radius: 16px 16px 4px 16px; background: #edf3f5; }
.assistant-speaker { display: block; color: #547082; font-size: 10px; letter-spacing: .7px; font-weight: 800; text-transform: uppercase; }
.assistant-answer { margin: 9px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; color: #193542; }
.assistant-answer-footer { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 12px; }
.assistant-sources { margin-top: 7px; padding-top: 10px; border-top: 1px solid #edf0ed; }
.assistant-sources summary { cursor: pointer; color: #315d73; font-size: 11px; font-weight: 650; padding: 5px 0; }
.assistant-sources p { margin-top: 8px !important; }
.assistant-panel .assistant-source-link { display: block; width: 100%; min-height: 40px; margin-top: 5px; padding: 7px 10px; border: 1px solid #e2e8e9; border-radius: 8px; background: #f8fafb; color: #214d66; text-align: left; font-size: 11px; line-height: 1.45; font-weight: 550; overflow-wrap: anywhere; box-shadow: none; }
.assistant-footer { flex: 0 0 auto; padding: 14px 24px 12px; border-top: 1px solid #e7e6df; background: #fff; }
.assistant-notice { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: #365e6d; }
.assistant-notice[data-tone="error"] { color: #a43f34; }
.assistant-composer { display: block; }
.assistant-context { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; color: #627480; font-size: 11px; }
.assistant-context span { flex-shrink: 0; }
.assistant-panel .assistant-context select { min-height: 34px; min-width: 0; max-width: 100%; width: 100%; padding: 5px 8px; border: 1px solid #dfe4e5; border-radius: 8px; background: #fff; color: #304f61; font-size: 12px; }
.assistant-input-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.assistant-panel textarea { display: block; width: 100%; min-height: 76px; max-height: 140px; resize: vertical; padding: 12px 14px; border: 1px solid #d5dddf; border-radius: 13px; background: #fbfcfc; color: #183442; font: inherit; font-size: 14px; line-height: 1.6; }
.assistant-panel textarea:focus { border-color: #b89437; box-shadow: 0 0 0 3px #d8b45720; outline: 0; }
.assistant-compose-actions { display: flex; align-items: center; gap: 12px; margin-top: 9px; }
.assistant-counter { margin-right: auto; color: #627480; font-size: 10px; }
.assistant-panel .assistant-mic { min-height: 40px; padding: 8px 10px; border: 1px solid #dbe2e4; border-radius: 10px; background: #fff; color: #204458; font-size: 12px; font-weight: 650; box-shadow: none; }
.assistant-panel .assistant-mic[aria-pressed="true"] { border-color: #ca7973; color: #a13c35; background: #fff4f2; }
.assistant-panel .assistant-send { min-height: 42px; min-width: 93px; padding: 9px 14px; border: 1px solid #173e53; border-radius: 11px; color: #fff; background: #173e53; font-size: 13px; font-weight: 750; box-shadow: none; }
.assistant-bottom { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 7px; color: #76828b; font-size: 9px; line-height: 1.4; }
.assistant-bottom .assistant-text-button { font-size: 10px; flex-shrink: 0; }
@media (max-width: 760px) {
  #appShell #openAssistantButton { grid-column: 1 / -1; justify-self: start; min-height: 40px; padding: 8px 13px; font-size: 12px; }
}
@media (max-width: 600px) {
  dialog.assistant-panel { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .assistant-header { padding: max(16px, env(safe-area-inset-top)) 18px 16px; }
  .assistant-header h2 { font-size: 18px; }
  .assistant-mark { width: 40px; height: 40px; border-radius: 13px; font-size: 24px; }
  .assistant-toolbar { padding: 8px 18px; }
  .assistant-scope { max-width: 150px; line-height: 1.5; }
  .assistant-body { padding: 18px; }
  .assistant-footer { padding: 12px 18px max(8px, env(safe-area-inset-bottom)); }
  .assistant-panel textarea { font-size: 16px; min-height: 70px; }
  .assistant-welcome h3 { font-size: 24px; }
  .assistant-compose-actions { gap: 8px; }
  .assistant-message--user { margin-left: 22px; }
}
@media (max-height: 650px) {
  .assistant-header { padding-block: 12px; }
  .assistant-toolbar { padding-block: 2px; }
  .assistant-footer { padding-top: 9px; }
  .assistant-panel textarea { min-height: 58px; max-height: 80px; }
}
@media (prefers-reduced-motion: reduce) { .assistant-panel *, .assistant-panel::backdrop { scroll-behavior: auto !important; transition: none !important; } }

.assistant-voice-action { display: grid; justify-items: end; gap: 0; }
.assistant-voice-action .assistant-source-note { font-size: 9px; }

.assistant-assignment { margin-top: 15px; padding: 15px; border: 1px solid #c9b26c; border-radius: 13px; background: #fffcf3; overflow-wrap: anywhere; }
.assistant-assignment-title { margin: 0 0 12px; color: #244655; font-size: 14px; }
.assistant-assignment-details { display: grid; grid-template-columns: minmax(105px, 1fr) minmax(0, 1.6fr); gap: 8px 12px; margin: 0 0 12px; font-size: 12px; line-height: 1.5; }
.assistant-assignment-details dt { color: #5d6d71; }
.assistant-assignment-details dd { margin: 0; color: #173340; font-weight: 650; }
.assistant-assignment-warning { margin: 9px 0; color: #74551e; font-size: 11px; line-height: 1.55; }
.assistant-assignment-status { margin: 12px 0 0; color: #365c67; font-size: 12px; line-height: 1.5; font-weight: 600; }
.assistant-assignment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.assistant-panel .assistant-assignment-confirm, .assistant-panel .assistant-assignment-dismiss { min-height: 44px; margin: 0; padding: 10px 13px; border: 1px solid #173e53; border-radius: 10px; background: #173e53; color: #fff; font-size: 12px; line-height: 1.4; font-weight: 700; box-shadow: none; }
.assistant-panel .assistant-assignment-dismiss { border-color: #d1d7d5; background: #fff; color: #425e69; }
.assistant-assignment[data-state="confirmed"] { border-color: #9bbab0; background: #f3faf6; }
.assistant-assignment[data-state="conflict"], .assistant-assignment[data-state="expired"] { border-color: #d6b7a9; background: #fff8f4; }
@media (max-width: 380px) {
  .assistant-assignment-details { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .assistant-assignment-details dd { margin-bottom: 7px; }
  .assistant-assignment-actions button { width: 100%; }
}

/* Voice stays available while the dialog is minimized and the admin works. */
.assistant-voice-entry { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; padding: 12px 24px; border-bottom: 1px solid #e5dfcf; background: #f7f0df; }
.assistant-panel .assistant-converse { flex-shrink: 0; min-height: 44px; padding: 10px 19px; border: 1px solid #967020; border-radius: 13px; color: #203b47; background: #ecd391; font: inherit; font-size: 14px; font-weight: 750; box-shadow: none; }
.assistant-voice-intro { margin: 0; color: #536875; font-size: 11px; line-height: 1.5; }
.assistant-voice-entry:has(.assistant-converse[hidden]):has(.assistant-voice-intro[hidden]) { display: none; }
.assistant-voice-dock, .assistant-live-panel { box-sizing: border-box; color: #173340; font-family: inherit; text-align: left; }
.assistant-voice-dock { position: fixed; z-index: 1800; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: min(460px, calc(100vw - 36px)); padding: 16px 18px 12px; border: 1px solid #b3c8c5; border-radius: 20px; background: #f8fcfb; box-shadow: 0 10px 44px #102c3c35; }
.assistant-voice-dock[hidden], .assistant-voice-dock [hidden], .assistant-live-panel [hidden] { display: none !important; }
.assistant-live-panel { flex: 0 0 auto; margin: 0; padding: 14px 24px 10px; border-bottom: 1px solid #d5e3df; background: #edf6f2; }
.assistant-live-summary { min-width: 0; }
.assistant-live-state { display: block; font-size: 13px; line-height: 1.5; color: #173d47; }
.assistant-live-state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #2d8a6e; box-shadow: 0 0 0 4px #2d8a6e15; vertical-align: 1px; }
[data-state="muted"] .assistant-live-state::before, [data-state="ended"] .assistant-live-state::before { background: #7b868e; box-shadow: none; }
[data-state="connecting"] .assistant-live-state::before, [data-state="thinking"] .assistant-live-state::before { background: #a57a27; box-shadow: 0 0 0 4px #a57a2715; }
.assistant-live-disclosure { display: block; margin: 4px 0 0 16px; color: #607980; font-size: 10px; line-height: 1.5; }
.assistant-live-caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin: 9px 0 0; color: #43636e; font-size: 12px; line-height: 1.5; }
.assistant-live-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 11px; }
.assistant-voice-dock .assistant-live-button, .assistant-panel .assistant-live-button { min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid #c7d8d5; border-radius: 10px; background: #fff; color: #234f5b; font-family: inherit; font-size: 11px; line-height: 1.4; font-weight: 650; box-shadow: none; cursor: pointer; }
.assistant-voice-dock .assistant-live-button:disabled { opacity: .5; cursor: default; }
.assistant-voice-dock .assistant-live-button:focus-visible { outline: 3px solid #b08726; outline-offset: 3px; }
.assistant-voice-dock .assistant-live-end, .assistant-panel .assistant-live-end { margin-left: auto; border-color: #dfcac7; color: #92483e; background: #fff8f6; }
.assistant-voice-dock .assistant-live-restart, .assistant-panel .assistant-live-restart { background: #e9d092; border-color: #c3a44d; color: #173b47; }
@media (max-width: 600px) {
  .assistant-voice-entry { padding: 10px 18px; gap: 12px; }
  .assistant-live-panel { padding: 12px 18px 10px; }
  .assistant-voice-dock { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); padding: 13px 14px 10px; border-radius: 17px; }
  .assistant-live-state { font-size: 12px; }
}
