#chatInbox { color: var(--ink); font-size: 14px; }
#chatInbox button, #chatInbox input, #chatInbox textarea { font: inherit; }
#chatInbox button:focus-visible, #chatInbox summary:focus-visible, #chatInbox input:focus-visible, #chatInbox textarea:focus-visible { outline: 3px solid #acbfff; outline-offset: 3px; }
.inbox-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.inbox-intro h2 { font-size: 19px; font-weight: 630; margin: 0 0 7px; letter-spacing: -.35px; }
.inbox-intro p { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.55; }
.inbox-top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.inbox-demo-note { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; border: 1px solid var(--line); background: #fff; border-radius: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.inbox-text-link { background: none; border: 0; padding: 4px 0; min-height: 44px; min-width: 156px; text-align: left; color: #315bd6; font-weight: 560; cursor: pointer; white-space: nowrap; }
.inbox-toolbar { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; }
.inbox-filters { display: flex; align-items: center; gap: 4px; }
.inbox-filters button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; padding: 9px 11px; border-radius: 8px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.inbox-filters button.active { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: 0 1px 2px #10182808; }
.inbox-filters button span { padding: 1px 6px; border-radius: 5px; background: #f0f2f5; font-size: 12px; }
.inbox-search { display: flex; align-items: center; gap: 8px; min-width: 180px; margin-left: auto; padding: 0 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.inbox-search input { min-width: 0; max-width: 190px; width: 100%; height: 38px; border: 0; background: none; color: var(--ink); }
.inbox-layout { display: grid; grid-template-columns: minmax(240px, .78fr) minmax(0, 1.65fr); background: white; border: 1px solid var(--line); border-radius: 14px; overflow: clip; align-items: start; }
.inbox-list { min-width: 0; max-height: 760px; overflow-y: auto; padding: 10px; }
.inbox-message { display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 13px; border: 1px solid transparent; border-bottom-color: #eff1f4; background: #fff; border-radius: 9px; text-align: left; color: var(--ink); cursor: pointer; transition: background 150ms, border-color 150ms; }
.inbox-message:hover { background: #f8faff; }
.inbox-message.selected { border-color: #cbd7f8; background: #f5f8ff; }
.inbox-message strong { font-size: 14px; line-height: 1.5; font-weight: 620; overflow-wrap: anywhere; }
.inbox-message-meta { width: 100%; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.inbox-message-meta > span { flex-shrink: 0; }
.inbox-message-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; color: var(--muted); font-size: 13px; }
.inbox-status { display: inline-flex; align-items: center; border-radius: 5px; background: #f1f3f6; color: #536176; font-size: 12px; font-weight: 560; padding: 4px 7px; line-height: 1.25; }
.inbox-status.new { background: #edf3ff; color: #345bcc; }
.inbox-status.review { background: #fff3df; color: #93600b; }
.inbox-status.assigned { background: #f0edfc; color: #6951a5; }
.inbox-status.done { background: #eaf5ee; color: #36704e; }
.inbox-detail { padding: 22px; min-width: 0; border-left: 1px solid var(--line); min-height: 520px; }
.inbox-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.inbox-detail-head h3 { font-size: 18px; line-height: 1.45; font-weight: 620; margin: 10px 0 4px; overflow-wrap: anywhere; }
.inbox-detail-head p { margin: 0; color: var(--muted); font-size: 12px; }
.inbox-detail .inbox-back { display: none; }
.inbox-source { border: 1px solid #e6eaf0; background: #f8f9fb; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.inbox-source-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #4b5769; font-size: 12px; font-weight: 600; }
.inbox-source-label span { color: var(--muted); font-weight: 400; }
.inbox-source p { white-space: pre-wrap; line-height: 1.65; font-size: 14px; margin: 10px 0 0; max-height: 260px; overflow-y: auto; overflow-wrap: anywhere; }
.inbox-notice { border: 1px solid var(--line); border-radius: 9px; padding: 13px 15px; margin: 14px 0; font-size: 13px; line-height: 1.6; }
.inbox-notice strong { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.inbox-notice p { margin: 5px 0 0; }
.inbox-notice ul { margin: 8px 0 0; padding-left: 18px; }
.inbox-notice.attention { background: #fffbf1; border-color: #ecdfbc; color: #785a1f; }
.inbox-notice.success { background: #f6faf7; border-color: #dce9df; color: #375f45; }
.inbox-notice button { margin-top: 12px; }
.inbox-form-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 14px; }
.inbox-form-head h4 { margin: 0; font-size: 15px; font-weight: 620; }
.inbox-form-head > span { color: var(--muted); font-size: 12px; }
.inbox-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 15px; }
.inbox-fields .input { font-size: 14px; padding: 10px 12px; min-height: 42px; width: 100%; }
.inbox-fields .field { min-width: 0; margin: 0; }
.inbox-fields .field > span, .inbox-dialog .field > span { font-size: 12px; font-weight: 500; color: #536176; }
.inbox-footnote { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 12px 0; }
.inbox-confirm { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.6; margin: 18px 0 13px; cursor: pointer; }
.inbox-confirm input { margin: 3px 0 0; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--primary); }
.inbox-existing, .inbox-history { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.inbox-existing summary, .inbox-history summary { font-size: 13px; font-weight: 550; cursor: pointer; padding: 4px 0; line-height: 1.5; }
.inbox-link-controls { display: flex; align-items: flex-end; gap: 10px; margin-top: 14px; }
.inbox-link-controls .field { flex: 1; min-width: 0; margin: 0; }
.inbox-link-controls .custom-select-trigger { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-link-controls button { flex-shrink: 0; }
.inbox-review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 18px; }
.inbox-save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inbox-assignment { padding: 12px 14px; color: #655388; background: #f7f4fc; border-radius: 9px; font-size: 13px; line-height: 1.6; }
.inbox-history ol { list-style: none; margin: 10px 0 0; padding: 0; }
.inbox-history li { font-size: 12px; line-height: 1.6; padding: 8px 0; display: flex; gap: 12px; color: #536176; }
.inbox-history time { color: var(--muted); flex-shrink: 0; }
.inbox-list-empty, .inbox-detail-empty { text-align: center; padding: 50px 20px; color: var(--muted); line-height: 1.6; }
.inbox-list-empty > .icon, .inbox-detail-empty > .icon { width: 32px; height: 32px; color: #94a4be; margin: 0 auto 15px; display: block; }
.inbox-list-empty strong, .inbox-detail-empty h3 { color: #49556a; display: block; font-size: 16px; font-weight: 550; }
.inbox-detail-empty { padding-top: 110px; }
.inbox-dialog { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 36px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 24px 90px #10182826; color: var(--ink); }
.inbox-dialog::backdrop { background: #17223955; backdrop-filter: blur(4px); }
.inbox-dialog header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.inbox-dialog header h3 { margin: 0 0 8px; font-size: 19px; font-weight: 620; }
.inbox-dialog header p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.inbox-dialog .dialog-close { position: static; flex-shrink: 0; }
.inbox-dialog textarea { resize: vertical; width: 100%; min-height: 140px; font-size: 14px; line-height: 1.7; }
.inbox-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.inbox-connection-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); padding: 12px; border-radius: 9px; }
.inbox-connection-row > span:first-child { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.inbox-setup-steps { padding-left: 20px; margin: 20px 0; }
.inbox-setup-steps li { margin: 14px 0; padding-left: 3px; font-size: 14px; line-height: 1.6; }
.inbox-setup-steps li strong { display: block; font-weight: 580; }
.inbox-setup-steps li span { color: var(--muted); font-size: 13px; }
.inbox-work p { max-width: 600px; color: var(--muted); line-height: 1.7; }
@media (max-width: 1100px) {
  .inbox-intro { flex-wrap: wrap; }
  .inbox-toolbar { flex-wrap: wrap; }
  .inbox-search { margin-left: 0; flex: 1; }
  .inbox-search input { max-width: none; }
  .inbox-layout { grid-template-columns: minmax(210px, .78fr) minmax(0, 1.65fr); }
  .inbox-detail { padding: 17px; }
}
@media (max-width: 850px) {
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-list { max-height: 265px; border-bottom: 1px solid var(--line); }
  .inbox-detail { border-left: 0; scroll-margin-top: 80px; }
  .inbox-detail .inbox-back { display: inline-flex; padding: 4px; font-size: 12px !important; min-width: 0; }
  .inbox-message { gap: 6px; padding: 12px; }
  .inbox-message-preview { -webkit-line-clamp: 1; }
  .inbox-intro h2 { font-size: 18px; }
}
@media (max-width: 520px) {
  .inbox-intro { gap: 12px; }
  .inbox-top-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .inbox-top-actions button { justify-content: center; padding: 10px 8px; font-size: 12px !important; min-height: 42px; }
  .inbox-top-actions .icon { display: none; }
  .inbox-demo-note { flex-direction: column; align-items: flex-start; gap: 5px; }
  .inbox-filters { width: 100%; justify-content: space-between; gap: 0; }
  .inbox-filters button { padding: 9px 7px; font-size: 12px !important; gap: 5px; }
  .inbox-toolbar { gap: 10px; margin-top: 12px; }
  .inbox-toolbar > .ghost span { display: none; }
  .inbox-detail { padding: 16px 12px; }
  .inbox-detail-head h3 { font-size: 16px; }
  .inbox-source { padding: 12px; }
  .inbox-fields { gap: 12px 10px; }
  .inbox-fields .input { padding: 9px; font-size: 16px; }
  .inbox-form-head > span { display: none; }
  .inbox-link-controls { flex-direction: column; align-items: stretch; }
  .inbox-dialog { padding: 20px 16px; }
  .inbox-dialog textarea { font-size: 16px; }
  .inbox-review-actions button { min-height: 40px; font-size: 12px !important; }
  .inbox-history li { display: block; }
  .inbox-history time { display: block; }
}
@media (prefers-reduced-motion: reduce) { #chatInbox *, .inbox-dialog { scroll-behavior: auto !important; transition: none !important; } }
