:root {
  color-scheme: light;
  --blue: #1677ff;
  --blue-soft: #eaf3ff;
  --green: #17a864;
  --orange: #f59e0b;
  --red: #ef4444;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e6e9ef;
  --surface: #ffffff;
  --canvas: #f6f7f9;
  --shadow: 0 12px 32px rgba(31, 41, 55, .12);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; min-width: 1080px; background: var(--canvas); color: var(--ink); overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-header { height: 62px; display: grid; grid-template-columns: 250px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand-block { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: linear-gradient(145deg, #4d9bff, #176fe7); border-radius: 9px; font-size: 12px; font-weight: 800; box-shadow: 0 5px 14px rgba(22, 119, 255, .24); }
.brand-block strong, .brand-block small { display: block; }
.brand-block strong { font-size: 15px; }
.brand-block small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.status-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.status-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: #475569; font-size: 12px; }
.status-item b { color: #334155; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 3px rgba(23, 168, 100, .11); }
.status-dot.error { background: var(--red); }
.mini-progress { width: 70px; height: 6px; border-radius: 999px; overflow: hidden; background: #e7ebf1; }
.mini-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .25s ease; }
.account-actions { display: flex; align-items: center; gap: 6px; color: #475569; font-size: 12px; }
.text-button { padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: #475569; }
.text-button:hover { background: #f1f5f9; color: var(--blue); }

.workbench { height: calc(100vh - 62px); display: grid; grid-template-columns: 360px minmax(560px, 1fr) 400px; background: var(--surface); }
.conversation-sidebar, .chat-column, .analysis-column { min-height: 0; background: var(--surface); }
.conversation-sidebar { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.sidebar-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 52px; border-bottom: 1px solid var(--line); }
.sidebar-tabs button { position: relative; border: 0; background: transparent; color: #64748b; font-weight: 600; }
.sidebar-tabs button span { margin-left: 3px; color: #94a3b8; font-size: 11px; }
.sidebar-tabs button.is-active { color: var(--blue); }
.sidebar-tabs button.is-active::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; background: var(--blue); border-radius: 999px; }
.sidebar-tools { display: grid; gap: 8px; padding: 12px 14px 9px; }
.search-box input, .sidebar-tools select, .chat-toolbar input { width: 100%; border: 1px solid #dfe3ea; border-radius: 7px; background: #fff; outline: none; color: var(--ink); }
.search-box input { height: 36px; padding: 0 11px; }
.sidebar-tools select { height: 30px; padding: 0 8px; color: #536174; font-size: 12px; }
.search-box input:focus, .sidebar-tools select:focus, .chat-toolbar input:focus { border-color: #8bbcff; box-shadow: 0 0 0 3px rgba(22, 119, 255, .08); }
.priority-hint { padding: 0 14px 9px; color: #8a94a3; font-size: 11px; }
.priority-hint i { display: inline-block; width: 7px; height: 7px; margin: 0 3px 0 7px; border-radius: 50%; vertical-align: 1px; }
.query-status { flex: none; padding: 9px 14px; border-bottom: 1px solid #e8edf3; background: #f5f7fa; color: #657487; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.query-status.is-current { color: #177c54; background: #f0faf5; }
.query-status.is-pending { color: #94621a; background: #fff9ed; }
.query-status.is-blocked { color: #a63e35; background: #fff3f1; }
.query-filters { font-size: 12px; color: #526174; }
.query-filters summary { padding: 5px 0; cursor: pointer; }
.query-filters p { margin: 7px 0 0; color: #7a8796; font-size: 11px; line-height: 1.5; }
.query-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; }
.query-filter-grid .wide { grid-column: 1 / -1; }
.query-filter-grid label { display: grid; gap: 4px; min-width: 0; }
.query-filter-grid input { width: 100%; min-width: 0; height: 30px; padding: 0 7px; border: 1px solid #dfe3ea; border-radius: 6px; font-size: 12px; }
.conversation-row.is-unsynced { background: #fafbfc; }
.message-query-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); color: #66778c; font-size: 11px; }
.message-query-tools input, .message-query-tools select { height: 28px; max-width: 130px; border: 1px solid #dfe3ea; border-radius: 5px; padding: 0 4px; color: #4b5b70; background: white; }
.message-attribution { max-width: 480px; margin-bottom: 5px; color: #8b662f; font-size: 10px; line-height: 1.5; }
.modal-dialog.relationships-dialog { width: min(740px, calc(100vw - 48px)); padding: 0; }
.relationship-options { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 24px; color: #526174; font-size: 12px; }
.relationships-dialog .relationship-options > label { display: flex; align-items: center; gap: 8px; }
.relationships-dialog .relationship-options select { width: auto; height: 32px; padding: 0 8px; border: 1px solid #dfe3ea; border-radius: 5px; }
.relationships-dialog .relationship-options input { width: 15px; height: 15px; margin: 0; padding: 0; }
.relationships-dialog .relationship-hint { margin: 10px 24px; font-size: 11px; }
.relationship-hint { margin: 10px 24px; color: #7b8797; font-size: 11px; line-height: 1.6; }
.relationship-rows { max-height: 55vh; overflow: auto; padding: 0 24px 12px; }
.relationship-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid #edf0f4; font-size: 12px; overflow-wrap: anywhere; }
.relationship-row > span { color: #7b8797; font-size: 11px; }
.relationship-actions { display: flex; gap: 8px; }
.p1 { background: var(--red); } .p2 { background: var(--orange); } .p3 { background: #42b983; } .p4 { background: #aeb5bf; }
.conversation-list { flex: 1; min-height: 0; overflow: auto; }
.conversation-row { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 9px; min-height: 78px; padding: 11px 11px 10px 14px; border: 0; border-bottom: 1px solid #eef0f4; background: #fff; text-align: left; }
.conversation-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--priority-color, #aeb5bf); }
.conversation-row.is-selected { background: var(--blue-soft); }
.conversation-row.is-disabled { background: #fafafa; color: #929aa7; }
.conversation-row.is-clickable:hover { background: #f5f8fc; }
.conversation-row.is-selected:hover { background: var(--blue-soft); }
.avatar { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; overflow: hidden; border-radius: 7px; background: #e9edf3; color: #697386; font-size: 13px; font-weight: 700; }
.avatar-fallback { grid-area: 1 / 1; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 48px; height: 48px; border-radius: 8px; }
.row-main { min-width: 0; }
.row-name-line, .row-status-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row-name { flex: 1; overflow: hidden; color: #263244; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.friend-group-marker { flex: none; min-width: 22px; padding: 0 4px; border: 1px solid #a9c9f5; border-radius: 8px; background: #edf5ff; color: #276eb8; cursor: pointer; font: 10px/15px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: center; white-space: nowrap; }
.friend-group-marker.is-history { border-color: #c7ccd4; background: #f5f6f8; color: #687282; }
.friend-group-marker:hover, .friend-group-marker:focus-visible { border-color: #1677ff; color: #1677ff; outline: none; }
.row-time { flex: none; color: #8b95a4; font-size: 10px; }
.row-preview { margin: 5px 0; overflow: hidden; color: #788394; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.row-status { color: var(--green); font-size: 11px; }
.row-status.syncing { color: var(--orange); }
.row-status.history { color: #64748b; }
.row-status.unsynced { color: #9aa2ae; }
.unread-badge { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; text-align: center; }
.row-action { align-self: center; min-width: 42px; padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--blue); font-size: 11px; }
.row-action:hover { background: rgba(22, 119, 255, .08); }
.row-action.sync { border: 1px solid #cbd5e1; background: #fff; color: #475569; }
.row-action:disabled { color: #a5acb7; background: transparent; }
.row-progress { flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: #e8ebef; }
.row-progress i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.sidebar-pagination { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sidebar-pagination button { border: 0; background: transparent; color: #526174; font-size: 11px; }
.sidebar-pagination button:disabled { color: #c4c9d0; }

.chat-column { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.chat-header { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.chat-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-person h1 { margin: 0 0 6px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.chat-person p { margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chat-header-actions { display: flex; flex: none; align-items: center; gap: 8px; max-width: 45%; }
.chat-header-actions button { flex: none; white-space: nowrap; }
.chat-header-actions .priority-pill { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-person > div:last-child { min-width: 0; }
.priority-pill { padding: 4px 8px; border-radius: 999px; background: #f2f5f9; color: #526174; font-size: 11px; }
.outline-button, .ghost-button, .primary-button { border-radius: 7px; font-weight: 600; }
.outline-button { padding: 7px 12px; border: 1px solid #d7dde6; background: #fff; color: #475569; font-size: 12px; }
.outline-button:hover { border-color: #86b9ff; color: var(--blue); }
.outline-button:disabled { color: #aab1bb; border-color: #e7e9ed; }
.chat-toolbar { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid #eef0f4; color: #788394; font-size: 11px; }
.chat-toolbar input { width: 170px; height: 28px; padding: 0 9px; font-size: 11px; }
.chat-toolbar { flex: none; gap: 8px; }
#messageSummary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-toolbar label, .message-query-tools { flex: none; }
.sidebar-tools { max-height: 48vh; flex: none; overflow: auto; }
.query-filter-grid small { color: #8a94a3; font-size: 10px; line-height: 1.4; }
.message-scroll { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 12px 28px 28px; background: #fbfbfc; }
.empty-stage { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; color: #9199a5; text-align: center; }
.empty-stage strong { color: #667085; font-size: 14px; }
.empty-stage span { max-width: 360px; font-size: 11px; line-height: 1.6; }
.load-older { display: block; margin: 2px auto 14px; padding: 6px 12px; border: 1px solid #dfe3e9; border-radius: 999px; background: #fff; color: #687386; font-size: 11px; }
.date-separator { display: flex; align-items: center; gap: 12px; margin: 12px 0 18px; color: #8a93a0; font-size: 11px; }
.date-separator::before, .date-separator::after { content: ""; flex: 1; height: 1px; background: #eceef2; }
.message-item { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 17px; }
.message-item.out { flex-direction: row-reverse; }
.message-item .avatar { width: 32px; height: 32px; border-radius: 6px; font-size: 10px; }
.message-stack { max-width: min(72%, 600px); }
.message-meta { margin: 0 0 5px; color: #8993a2; font-size: 10px; }
.message-item.out .message-meta { text-align: right; }
.message-bubble { padding: 9px 12px; border-radius: 4px 10px 10px 10px; background: #eef0f3; color: #2f3948; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-item.out .message-bubble { border-radius: 10px 4px 10px 10px; background: #dfeeff; }
.message-bubble.has-image { max-width: 340px; padding: 4px; overflow: hidden; white-space: normal; }
.message-image-button { display: block; min-width: 132px; min-height: 92px; padding: 0; overflow: hidden; border: 0; border-radius: 7px; background: #e5e9ef; color: #6b7280; }
.message-image-button:hover { background: #dce3eb; }
.message-image { display: block; width: auto; max-width: 332px; height: auto; max-height: 360px; margin: auto; object-fit: contain; }
.message-image-loading { display: grid; place-items: center; width: 220px; height: 140px; color: #7b8491; font-size: 11px; }
.message-image-caption { display: block; max-width: 324px; padding: 7px 7px 5px; color: #4b5563; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.message-image-error { white-space: pre-wrap; overflow-wrap: anywhere; }
.readonly-footer { height: 38px; display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--line); color: #8b94a2; font-size: 11px; }
.readonly-footer span { padding: 2px 7px; border-radius: 999px; background: #f1f4f7; color: #667085; }

.analysis-column { display: flex; flex-direction: column; min-width: 0; }
.analysis-header { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.analysis-header div { display: flex; align-items: center; gap: 8px; }
.analysis-header strong { font-size: 14px; }
.analysis-header > span { color: #8993a2; font-size: 10px; }
.analysis-online { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.analysis-scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px 17px 26px; }
.empty-analysis { display: grid; place-content: center; min-height: 300px; color: #8b94a2; text-align: center; }
.empty-analysis strong { color: #667085; font-size: 14px; }
.empty-analysis p { max-width: 250px; font-size: 11px; line-height: 1.7; }
.freshness-card { margin-bottom: 6px; padding: 11px 12px; border: 1px solid #dbe7f7; border-radius: 8px; background: #f7fbff; }
.freshness-card.current { border-color: #d3eddf; background: #f5fcf8; }
.freshness-card.behind { border-color: #f8d9a3; background: #fff9ef; }
.freshness-card strong, .freshness-card span { display: block; }
.freshness-card strong { font-size: 13px; }
.freshness-card span { margin-top: 4px; color: #697586; font-size: 10px; line-height: 1.55; }
.analysis-command { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0 4px; }
.analysis-command span { color: #7b8493; font-size: 10px; }
.analysis-command button { padding: 5px 8px; border: 0; border-radius: 6px; background: #f1f5f9; color: #526174; font-size: 10px; }
.analysis-section { padding: 13px 0; border-bottom: 1px solid #eceef2; }
.analysis-section:last-child { border-bottom: 0; }
.analysis-section h2 { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: #344054; font-size: 12px; }
.analysis-section h2::before { content: ""; width: 3px; height: 13px; border-radius: 3px; background: var(--blue); }
.analysis-section.warning h2::before { background: var(--orange); }
.analysis-section.risk h2::before { background: var(--red); }
.analysis-section p { margin: 0; color: #4b5565; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.analysis-grid { display: grid; grid-template-columns: 88px 1fr; gap: 8px 10px; font-size: 11px; }
.analysis-grid span { color: #7b8493; }
.analysis-grid strong { color: #3b4655; font-weight: 600; }
.analysis-list { margin: 0; padding-left: 17px; color: #4b5565; font-size: 11px; line-height: 1.7; }
.suggested-reply { padding: 11px; border: 1px solid #cfe1fa; border-radius: 7px; background: #f7fbff; color: #344054; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.human-note { margin-top: 7px; color: #8a94a3; font-size: 10px; }
.analysis-derived.is-stale { position: relative; opacity: .62; }
.analysis-derived.is-stale::after { content: "旧分析"; position: absolute; top: 12px; right: 0; padding: 2px 6px; border-radius: 999px; background: #fff1d6; color: #b66a00; font-size: 9px; }

.modal-dialog { width: min(430px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.modal-dialog::backdrop { background: rgba(15, 23, 42, .34); backdrop-filter: blur(2px); }
.modal-dialog form { display: grid; gap: 13px; padding: 24px; }
.modal-dialog h2 { margin: 0; font-size: 19px; }
.modal-dialog p { margin: 0; color: #697586; font-size: 12px; line-height: 1.65; }
.dialog-kicker { color: var(--blue); font-size: 11px; font-weight: 700; }
.modal-dialog label { display: grid; gap: 6px; color: #526174; font-size: 12px; }
.modal-dialog input, .modal-dialog select, .modal-dialog textarea { width: 100%; padding: 9px 10px; border: 1px solid #d9dee6; border-radius: 7px; outline: none; }
.modal-dialog textarea { min-height: 90px; resize: vertical; }
.media-preview-dialog { position: relative; width: min(1100px, calc(100vw - 40px)); max-width: none; height: min(900px, calc(100vh - 40px)); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 12px; background: rgba(15, 23, 42, .96); box-shadow: 0 24px 70px rgba(15, 23, 42, .42); }
.media-preview-dialog::backdrop { background: rgba(15, 23, 42, .72); backdrop-filter: blur(3px); }
.media-preview-toolbar { position: absolute; top: 12px; left: 50%; z-index: 2; display: flex; align-items: center; gap: 6px; transform: translateX(-50%); padding: 5px 7px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(15,23,42,.72); color: #fff; }
.media-preview-toolbar button { min-width: 32px; padding: 5px 9px; border: 0; border-radius: 999px; background: transparent; color: #fff; font-size: 12px; }
.media-preview-toolbar button:hover { background: rgba(255,255,255,.15); }
.media-preview-toolbar span { min-width: 48px; color: #e2e8f0; font-size: 11px; text-align: center; }
.media-preview-stage { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
.media-preview-canvas { display: flex; align-items: center; justify-content: center; width: max-content; min-width: 100%; height: max-content; min-height: 100%; padding: 64px 32px 56px; }
.media-preview-stage img { display: block; flex: none; width: auto; height: auto; max-width: none; max-height: none; cursor: zoom-in; object-fit: contain; }
.media-preview-close { position: absolute; top: 12px; right: 14px; z-index: 1; padding: 7px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(15,23,42,.65); color: #fff; }
.media-preview-close:hover { background: rgba(30,41,59,.92); }
.media-preview-caption { position: absolute; left: 24px; right: 90px; bottom: 14px; margin: 0; overflow: hidden; color: #e2e8f0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compact-dialog { width: min(390px, calc(100vw - 32px)); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.primary-button, .ghost-button { padding: 8px 13px; border: 0; }
.primary-button { background: var(--blue); color: #fff; }
.primary-button:hover { background: #0b69df; }
.ghost-button { background: #eef1f5; color: #526174; }
.form-error { min-height: 18px; color: var(--red) !important; }
.system-management-dialog { width: min(1000px, calc(100vw - 40px)); max-height: calc(100vh - 48px); overflow: auto; }
.management-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 14px; }
.management-heading h2 { margin-top: 5px; }
.management-description { padding: 0 24px; max-width: 870px; }
.management-toolbar { display: flex; align-items: center; gap: 10px; padding: 20px 24px 12px; }
.management-search { flex: 1; }
.management-toolbar select { width: 120px; }
.management-summary { padding: 0 24px; color: var(--muted); font-size: 12px; }
.management-error { padding: 6px 24px 10px; }
.management-table-scroll { max-height: min(55vh, 580px); overflow: auto; border-top: 1px solid var(--line); }
.client-account-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.client-account-table th { position: sticky; top: 0; z-index: 1; padding: 12px 16px; background: #f7f9fc; color: #617084; font-weight: 500; white-space: nowrap; }
.client-account-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.client-account-identity { max-width: 220px; overflow-wrap: anywhere; }
.client-account-identity strong, .client-account-identity small { display: block; }
.client-account-identity strong { margin-bottom: 5px; font-weight: 600; }
.client-account-identity small { color: var(--muted); }
.client-role-badge { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 7px; background: var(--blue-soft); color: #326daa; border-radius: 5px; white-space: nowrap; }
.client-account-status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.client-account-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.client-account-status.enabled { color: #17885b; }
.client-account-status.disabled { color: #7a8491; }
.account-disabled { background: #fafbfc; }
.client-account-actions { white-space: nowrap; }
.client-account-actions .text-button { color: #176ec9; }
.client-accounts-empty { height: 140px; text-align: center; color: var(--muted); }
.management-footer { padding: 16px 24px; color: var(--muted); background: #fafbfc; font-size: 11px; line-height: 1.65; }
.client-role-options { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 12px; border: 1px solid #dfe5ec; border-radius: 8px; }
.client-role-options legend { padding: 0 4px; color: #526174; font-size: 12px; }
.client-role-options label { display: flex; align-items: flex-start; gap: 9px; }
.client-role-options input { flex: none; width: 16px; height: 16px; margin: 2px 0; accent-color: var(--blue); }
.client-role-options strong { display: block; margin-bottom: 3px; font-weight: 600; }
.client-role-options small, #clientAccountPasswordHint, #clientAccountUsernameHint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.modal-dialog input[readonly] { color: #718096; background: #f4f6f8; }
.modal-dialog :focus-visible { outline: 2px solid #78abed; outline-offset: 2px; }
.modal-dialog button:disabled { opacity: .55; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translateX(-50%); padding: 9px 14px; border-radius: 8px; background: #172033; color: #fff; box-shadow: var(--shadow); font-size: 12px; }

@media (max-width: 1260px) {
  .app-header { grid-template-columns: 210px minmax(0, 1fr) auto; }
  .status-item:nth-of-type(2), .status-item:nth-of-type(5) { display: none; }
  .workbench { grid-template-columns: 320px minmax(500px, 1fr) 360px; }
}

@media (max-width: 1180px) {
  .workbench { grid-template-columns: 280px minmax(440px, 1fr) 300px; }
  .status-strip { justify-content: flex-start; gap: 16px; }
  .status-item:last-child { display: none; }
  .chat-header, .chat-toolbar { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
