/* Blue and white theme. Existing layout stays shared with the chat view. */
:root {
  --accent: #3370ff;
  --muted: #7c879c;
  --line: #e3e9f3;
  --soft: #f2f6ff;
  color: #1f293d;
  background: #f7f9fd;
}
body { background: #f7f9fd; }
.topbar { background: #fff; border-color: #e8edf5; }
.brand { gap: 11px; }
.brand strong { font-size: 19px; font-weight: 600; letter-spacing: 1px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: #3370ff; color: #fff; font-size: 25px; letter-spacing: 0; margin: 0;
}
.brand-label { color: #94a0b2; border-color: #e2e8f1; }
.account, .quiet { color: #6d7b91; }
.account i.connected { background: #3370ff; }
.quiet:hover { background: #f0f5ff; color: #3370ff; }
.welcome { padding-top: clamp(70px, 14vh, 130px); }
.welcome-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 20px; margin: 0;
  background: #e8efff; color: #3370ff; font-size: 41px; letter-spacing: 0;
}
h1 { color: #233552; font-size: 31px; letter-spacing: .2px; font-weight: 500; }
.welcome p { color: #8b98ac; }
.suggestions button { color: #64738b; border-color: #e0e7f3; }
.suggestions span { color: #829aca; }
.suggestions button:hover { background: #f0f5ff; border-color: #b9ccff; color: #3370ff; }
.composer-wrap { background: linear-gradient(transparent, #f7f9fd 18%); }
.composer {
  border-color: #dce5f6; border-radius: 18px;
  box-shadow: 0 8px 32px #355ba10b;
}
.composer.dragging { background: #f0f5ff; border-color: #3370ff; }
.composer textarea { color: #33435b; }
.composer textarea::placeholder { color: #a0aabc; }
.attach-button { color: #8292ab; }
.composer-note { color: #98a5b9; }
.primary, .send-button { background: #3370ff; }
.primary:hover, .send-button:hover { background: #245ee5; }
.secondary { color: #3370ff; background: #edf3ff; border-color: #dce7ff; }
.attachment { background: #f3f6fc; border-color: #e3eaf6; }
.attachment .file-icon { color: #638bdb; }
.attachment small, .attachment button { color: #92a0b8; }
.attachment select, .attachment input { border-color: #dce5f6; }
.attachment.error { background: #fff7f0; border-color: #f0d5bf; }
.attachment.error small { color: #ac754a; }
.user-bubble { background: #eaf1ff; color: #304563; }
.assistant-heading { color: #617492; }
.assistant-avatar { color: #3370ff; background: #e9f0ff; font-size: 19px; }
.reply { color: #52647e; }
.picker { border-color: #e3eaf5; }
.picker input, .roster-filter, .contact-query { background: #f8faff; border-color: #dfe7f4; }
.person-option { border-color: #edf1f8; }
.person-option small, .person-detail { color: #8998ae; }
.person-copy { flex: 1; min-width: 0; }
.person-name { display: flex; gap: 8px; align-items: center; color: #344763; }
.person-avatar { background: #e8efff; color: #6482b9; }
.person-option .person-avatar { width: 38px; height: 38px; flex-basis: 38px; }
.person-badge {
  display: inline-flex; color: #7090c0; background: #f0f5fe;
  border-radius: 5px; padding: 2px 6px; font-size: 9px; flex-shrink: 0;
}
.person-chip { color: #5477b1; background: #edf3ff; }
.person-chip button { color: #87a0c6; }
.chosen-person, .model-status { color: #7b93b8; }
.mapping-choice { color: #7f91ad; }
.mapping-choice select, .scope-picker select { border-color: #dce5f6; }
.scope-values label { background: #f1f5fd; }
.draft-card { border-color: #e0e8f5; }
.draft-top, .draft-bottom, .roster { border-color: #e9eef7; }
.draft-top small, .roster-tools, .draft-bottom span { color: #8fa0b8; }
.draft-top select { color: #7188ad; border-color: #dfe7f6; }
.am-row:hover { background: #f6f9ff; }
.am-row.active { background: #edf3ff; }
input[type=checkbox], .candidate-options input { accent-color: #3370ff; }
.am-row small { color: #92a2ba; }
.am-row .pending, .candidate-note, .warning { color: #b08459; }
.message-heading strong { color: #4e6da5; }
.message-heading small { color: #9ba9bf; }
.message-editor { background: #f7f9fd; color: #536781; }
.scope-summary { background: #f3f7ff; color: #7290bb; border-color: #e2eaf8; }
.scope-audit summary { color: #8fa5c6; }
.scope-audit td, .scope-audit th { border-color: #e4ebf8; }
.source-links { background: #f8faff; color: #8b9ebe; }
.source-links a { color: #6389c5; }
.result-row { border-color: #edf1f8; }
.result-row span, .result-note { color: #7c97bf; }
.result-row .failed { color: #b38357; }
.loading { color: #8c9bb1; }
.spinner { border-color: #e0e9fa; border-top-color: #3370ff; }
dialog { color: #506685; border-color: #dce5f6; box-shadow: 0 20px 90px #213c6724; }
dialog::backdrop { background: #1c305b32; }
dialog > p { color: #8798b3; }
dialog input[type=url] { border-color: #dce5f6; }
.confirm-message { border-color: #e5ecf8; }
.confirm-message pre { color: #728aaf; }
.first-test { background: #f1f6ff; color: #7c94b8; }
.first-test strong { color: #5575ab; }
.first-test blockquote { border-color: #bad0f8; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline-color: #8ab0ff; }
#directory-dialog[open] {
  width: 1080px; max-width: calc(100% - 48px); height: calc(100dvh - 48px);
  max-height: 900px; margin: 24px auto auto; padding: 22px 26px; overflow: hidden;
}
#directory-dialog .directory-title { gap: 18px; flex-shrink: 0; margin-bottom: 8px; }
.directory-hint { margin-right: auto; color: #94a1b6; font-size: 12px; }
.directory-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; flex-shrink: 0; }
#directory-actions { flex-shrink: 0; }
#directory-dialog .directory-status { color: #8498b8; margin: 0 0 5px; font-size: 11px; flex-shrink: 0; }
#directory-dialog .directory-note { color: #aa875f; font-size: 10px; margin: 0 0 4px; flex-shrink: 0; }
.directory-sync-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.directory-sync { padding: 4px 8px; font-size: 11px; flex-shrink: 0; }
.directory-categories { display: flex; gap: 5px; margin-top: 12px; flex-shrink: 0; }
.category-tab { background: transparent; color: #8b9bb4; padding: 6px 11px; font-size: 11px; border-radius: 7px; }
.category-tab[aria-pressed=true] { background: #eaf1ff; color: #3370ff; }
.fashion-navigation { display: flex; align-items: center; gap: 8px; padding: 10px 0 2px; min-height: 36px; flex-shrink: 0; }
.fashion-entry { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; padding: 7px 10px; font-size: 11px; border: 1px solid #dfe8f7; border-radius: 8px; color: #6084bd; background: #f7faff; }
.fashion-entry:hover { border-color: #bad0f9; background: #eef4ff; color: #3370ff; }
.fashion-entry span { font-size: 18px; line-height: 1; }
.fashion-back { padding: 6px 8px; font-size: 11px; color: #7e93b1; }
.fashion-current { margin-left: auto; font-size: 12px; font-weight: 500; color: #526f99; }
.fashion-category-note { font-size: 11px; line-height: 1.8; color: #94a3b9; margin: 5px 0 14px; }
.fashion-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fashion-category-card { display: flex; align-items: center; gap: 13px; padding: 18px 15px; border: 1px solid #e4ebf6; border-radius: 12px; background: #f9fbff; text-align: left; color: #4e6d9a; min-width: 0; }
.fashion-category-card:hover { border-color: #b8cdf4; background: #f0f5ff; }
.fashion-category-card[data-fashion-category=unclassified] { grid-column: 1 / -1; background: #fbfcfe; color: #8c9bb1; }
.fashion-category-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: #7194cd; background: #edf3ff; font-size: 16px; }
.fashion-category-copy { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.fashion-category-copy strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.fashion-category-copy small { font-size: 11px; color: #91a3bf; }
.fashion-category-arrow { font-size: 20px; color: #a6b7d0; }
.person-option .fashion-person-categories { color: #7193c5; }
.people-picker { display: flex; flex-direction: column; min-height: 0; }
.people-filterbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; margin-top: 10px; }
.people-filterbar .directory-categories, .people-filterbar .directory-tools { margin-top: 0; }
.people-filterbar .directory-tools { gap: 10px; }
.people-picker .directory-tools { align-items: center; flex-shrink: 0; }
.result-count { color: #8b9bb4; font-size: 11px; line-height: 1.5; }
.people-columns { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; min-height: 0; flex: 1; margin: 10px 0 16px; }
.people-picker .people-results { margin: 0; overflow: auto; min-height: 0; max-height: 420px; padding-right: 7px; overscroll-behavior: contain; scrollbar-gutter: stable; }
#directory-dialog .people-columns { overflow: hidden; }
#directory-dialog .people-results { min-height: 0; max-height: none; }
.people-picker .person-option { cursor: pointer; padding: 12px 10px; border-radius: 9px; margin: 2px 0; }
.people-picker .person-option:hover { background: #f7f9ff; }
.people-picker .person-option.is-selected { background: #edf3ff; border-color: #edf3ff; }
.people-picker .person-option input { width: 18px; height: 18px; padding: 0; margin: 0 2px 0 0; flex: 0 0 18px; }
.selected-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid #e9eef7; padding-left: 20px; }
.selected-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-shrink: 0; }
.selection-heading { font-size: 13px; font-weight: 500; color: #526d99; }
.selected-top .quiet { font-size: 11px; padding: 8px 0 8px 8px; }
.people-picker .selected-people, #directory-dialog .selected-people {
  display: flex; flex-direction: column; flex-wrap: nowrap; max-height: none; margin: 8px 0 0; overflow: auto; min-height: 0; gap: 8px; flex: 1;
}
.selection-empty { color: #a1aec2; font-size: 12px; line-height: 1.9; white-space: pre-line; margin: 14px 0; }
.people-picker .person-chip { display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 9px; flex-shrink: 0; }
.selected-copy { flex: 1; min-width: 0; }
.selected-copy b, .selected-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-copy b { font-size: 11px; font-weight: 500; }
.selected-copy small { font-size: 9px; color: #8c9ebc; margin-top: 3px; }
.person-chip button { padding: 4px; margin: 0; font-size: 16px; }
.people-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; border-top: 1px solid #e9eef7; padding-top: 14px; }
.selection-note { color: #8c9ebc; font-size: 11px; }
#directory-dialog .search-line input { padding: 12px 14px; font-size: 13px; }
@media(max-width:700px) {
  .fashion-navigation { gap: 3px; }
  .fashion-category-grid { gap: 8px; }
  .fashion-category-card { padding: 13px 9px; gap: 8px; }
  .fashion-category-mark { width: 27px; height: 27px; flex-basis: 27px; font-size: 12px; border-radius: 8px; }
  .fashion-category-copy strong { font-size: 12px; }
  .fashion-category-copy small { font-size: 10px; }
  .brand strong { font-size: 17px; }
  .welcome h1 { font-size: 25px; }
  .person-name { flex-wrap: wrap; gap: 4px; }
  .composer-actions { gap: 5px; }
  .roster .am-row .person-avatar { display: inline-flex; }
  #directory-dialog[open] { max-width: calc(100% - 20px); height: calc(100dvh - 20px); max-height: none; margin: 10px auto auto; padding: 16px; }
  #directory-dialog .directory-title { gap: 8px; margin-bottom: 6px; }
  #directory-dialog h2 { font-size: 18px; margin-right: auto; }
  .directory-hint { display: none; }
  .directory-meta { flex-wrap: wrap; gap: 2px; }
  .people-filterbar { flex-wrap: wrap; gap: 2px; }
  .people-filterbar .directory-tools { width: 100%; justify-content: space-between; }
  .directory-sync-tools { gap: 4px; justify-content: flex-start; padding-bottom: 8px; }
  .directory-sync { font-size: 10px; padding: 3px 6px; }
  .people-columns { grid-template-columns: 1fr; grid-template-rows: minmax(150px, 1fr) auto; gap: 10px; margin-bottom: 12px; }
  .selected-panel { border-left: 0; border-top: 1px solid #e9eef7; padding: 8px 0 0; max-height: 150px; }
  .people-picker .selected-people, #directory-dialog .selected-people { flex-direction: row; flex-wrap: wrap; max-height: 100px; flex: initial; }
  .people-picker .person-chip { max-width: 100%; padding: 7px; }
  .people-picker .selected-copy small { display: none; }
  .selection-empty { margin: 0; font-size: 11px; }
  .people-footer { gap: 6px; padding-top: 12px; }
  .people-footer .primary { flex-shrink: 0; }
  .selection-note { font-size: 10px; }
}
