:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #25282d;
  background: #f6f7f8;
  font-size: 14px;
  letter-spacing: 0;
  --red: #ae2636;
  --line: #e4e7eb;
  --muted: #7a818b;
  --green: #187c62;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}
button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  background: white;
  color: #333b45;
  border: 1px solid #dce0e5;
  border-radius: 5px;
  white-space: nowrap;
}
button:hover {
  background: #f3f5f7;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
button.primary:hover {
  background: #90202c;
}
button.secondary {
  background: #fff;
}
button.compact {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}
.icon-button {
  padding: 6px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  background: transparent;
  border-radius: 4px;
}
svg {
  width: 18px;
  height: 18px;
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 18px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 14px;
}
small {
  font-size: 12px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8dde3;
  border-radius: 5px;
  background: #fff;
  color: #242932;
  padding: 10px 11px;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #a42b3c22;
  border-color: #ad5360;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--red);
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #58616e;
}
label.checkbox,
.switch {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.muted {
  color: var(--muted);
}
.danger {
  color: #b42638;
}
.block {
  display: block;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: #8b929c;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 3px 7px;
  background: #eef0f3;
  border-radius: 4px;
  color: #637080;
  white-space: nowrap;
}
.badge.green {
  background: #e7f4ed;
  color: var(--green);
}
.badge.red {
  background: #fcecee;
  color: #b32940;
}
#app {
  display: flex;
  min-height: 100dvh;
}
#sidebar {
  width: 224px;
  flex: none;
  height: 100dvh;
  position: sticky;
  top: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 15px 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #24262b;
  text-decoration: none;
  padding: 0 7px 26px;
  font-size: 18px;
  font-weight: 650;
  white-space: nowrap;
}
.brand img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}
.brand b {
  font-weight: 400;
  color: #8c929a;
}
.workspace {
  padding: 0 7px 21px;
}
.workspace-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 9px;
}
.workspace-row select {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 4px 8px 0;
  border: 0;
}
.workspace-row .icon-button {
  width: 25px;
  min-width: 25px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav button {
  border: 0;
  text-align: left;
  justify-content: flex-start;
  gap: 12px;
  min-height: 43px;
  color: #66707d;
  padding: 9px 13px;
  background: transparent;
  font-size: 13px;
}
nav button.active {
  background: #fbeced;
  color: var(--red);
  font-weight: 600;
}
nav button.active svg {
  color: var(--red);
}
.nav-count {
  margin-left: auto;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
}
.online {
  font-size: 11px;
  color: #828b93;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
}
.online span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #229d72;
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  width: 35px;
  height: 35px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #f1e5e7;
  color: #9c3e4c;
  font-weight: 600;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-name {
  min-width: 0;
  flex: 1;
}
.account-name b {
  font-size: 11px;
}
.account-name small {
  display: block;
  color: #959ba3;
  font-size: 10px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
header {
  height: 72px;
  min-height: 72px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.page-heading,
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-heading > .icon-button {
  display: none;
}
.page-heading > svg {
  width: 13px;
  color: #b1b7bf;
}
.crumb,
.today {
  color: #9299a2;
  font-size: 12px;
}
.today {
  margin-right: 8px;
}
#content {
  flex: 1;
  min-height: 0;
}
.stat-strip {
  display: flex;
  align-items: center;
  padding: 21px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  gap: 48px;
}
.stat-strip > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-strip span {
  font-size: 12px;
  color: #828a95;
}
.stat-strip b {
  font-size: 24px;
  font-weight: 600;
}
.stat-strip > button {
  margin-left: auto;
  font-size: 12px;
}
.inbox-grid {
  display: grid;
  grid-template-columns: 280px minmax(260px, 1fr) 320px;
  height: calc(100dvh - 154px);
}
.conversation-list {
  background: #fbfcfd;
  border-right: 1px solid var(--line);
  min-height: 0;
  overflow: auto;
}
.list-search {
  padding: 17px 14px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.list-search svg {
  position: absolute;
  left: 24px;
  top: 28px;
  width: 15px;
  color: #959ca5;
}
.list-search input {
  padding-left: 32px;
  font-size: 12px;
  background: #fff;
}
.conversation-item {
  display: flex;
  width: 100%;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #edf0f2;
  white-space: normal;
  text-align: left;
  justify-content: flex-start;
  padding: 18px 14px;
  gap: 11px;
  background: transparent;
  min-height: 108px;
  align-items: flex-start;
}
.conversation-item.selected {
  background: #fff3f2;
  border-left: 3px solid #ab293a;
  padding-left: 11px;
}
.conversation-preview {
  min-width: 0;
  flex: 1;
}
.conversation-preview > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.conversation-preview b {
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 120px;
}
.conversation-preview time {
  font-size: 9px;
  color: #969ca5;
  white-space: nowrap;
}
.conversation-preview p {
  font-size: 12px;
  color: #7f8792;
  margin: 7px 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 205px;
}
.conversation-preview small {
  font-size: 10px;
  color: #9aa2ac;
}
.chat-panel {
  background: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.chat-heading {
  min-height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  gap: 12px;
  flex-wrap: wrap;
}
.chat-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}
.chat-title h2 {
  font-size: 15px;
}
.chat-title small {
  display: block;
  color: #9aa1ab;
  margin-top: 6px;
  font-size: 10px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-title > .icon-button {
  display: none;
}
.chat-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.switch {
  font-size: 11px;
  white-space: nowrap;
}
.message-scroll {
  flex: 1;
  overflow: auto;
  min-height: 120px;
  padding: 22px;
}
.message {
  margin-bottom: 24px;
  max-width: 91%;
  scroll-margin: 18px;
  transition: background 0.2s;
}
.message-meta {
  font-size: 10px;
  color: #9199a5;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
.message-body {
  background: #f2f4f6;
  border: 1px solid #ebedf0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.agent,
.message.assistant {
  margin-left: auto;
}
.message.agent .message-body,
.message.assistant .message-body {
  background: #fdf1ef;
  border-color: #f5e5e1;
}
.message.event .message-body {
  background: #fff;
  font-size: 11px;
  color: #8c95a1;
}
.message.group-message .message-body {
  background: #f2f4f6;
  color: #303945;
  font-size: 13px;
}
.message-person {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.message-meta time { flex-shrink: 0; }
.person-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  overflow: hidden;
  background: #e8eef0;
  color: #405a63;
  font-size: 12px;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.group-directory-state { padding: 12px 16px; font-size: 12px; color: #737f8c; }
.group-directory-state small { display: block; margin-top: 5px; }
.member-search { padding: 0 16px 12px; }
.member-search input { width: 100%; min-width: 0; }
.member-list { flex: 1; min-height: 0; overflow: auto; padding: 0 16px; }
.member-row { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid #edf0f2; }
.member-info { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.member-info b, .member-info span, .member-info small { display: block; }
.member-info b { font-size: 12px; }
.member-info span, .member-info small { margin-top: 4px; font-size: 10px; color: #7a8490; }
.chat-title h2 { overflow-wrap: anywhere; }
.message.highlight .message-body {
  outline: 2px solid #d9ac46;
  background: #fffbea;
}
.message details {
  margin-top: 6px;
  font-size: 11px;
  color: #8791a0;
}
.message pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.draft-area {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  max-height: 240px;
  overflow: auto;
  flex: none;
}
.draft-label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #927244;
}
.draft-label svg {
  width: 15px;
}
.draft p {
  font-size: 12px;
  line-height: 1.7;
  color: #586372;
  margin: 10px 0;
  white-space: pre-wrap;
}
.draft + .draft {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
#profile-panel {
  background: #fff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 20px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.profile-scroll {
  flex: 1;
  overflow: auto;
  padding: 20px;
}
.profile-summary p {
  font-size: 12px;
  line-height: 1.8;
  color: #677180;
  margin-top: 9px;
}
.profile-fields {
  margin: 21px 0;
}
.profile-fields > div {
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr);
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f4;
  font-size: 12px;
}
.profile-fields dt {
  color: #929aa5;
}
.profile-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.profile-fields small {
  display: block;
  font-size: 9px;
  color: #a1a9b2;
  margin-top: 4px;
}
.profile-fields .icon-button {
  width: 19px;
  height: 19px;
  min-height: 19px;
  min-width: 19px;
  vertical-align: middle;
  padding: 2px;
}
.profile-fields svg {
  width: 11px;
  height: 11px;
}
.profile-section {
  margin: 18px 0;
}
.profile-section h3 {
  font-size: 12px;
  margin-bottom: 9px;
}
.profile-section p,
.profile-section li {
  font-size: 12px;
  line-height: 1.7;
  color: #77818e;
}
.profile-section ul {
  padding-left: 16px;
}
.version-note {
  font-size: 10px;
  line-height: 1.7;
  color: #a3aab3;
}
.profile-actions {
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-actions button {
  font-size: 11px;
  flex: 1;
}
.profile-actions svg {
  width: 14px;
}
.empty {
  padding: 44px 24px;
  text-align: center;
  color: #939ba5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-height: 200px;
}
.empty > svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.2;
  color: #b7bfc8;
}
.empty h2 {
  font-size: 15px;
  font-weight: 500;
  color: #757e8a;
}
.empty p {
  font-size: 12px;
  line-height: 1.8;
  max-width: 270px;
}
.conversation-list .empty {
  padding: 40px 15px;
}
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 28px;
}
.page-toolbar h2 {
  font-size: 18px;
  margin-bottom: 7px;
}
.page-toolbar .muted {
  font-size: 12px;
}
.table-wrap {
  margin: 0 28px;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #fff;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  text-align: left;
  color: #929ba7;
  font-weight: 500;
  background: #fafbfc;
  font-size: 11px;
}
th,
td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  max-width: 340px;
}
td b {
  font-weight: 550;
}
td small {
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
td code {
  font-size: 11px;
  white-space: normal;
  word-break: break-all;
}
.row-actions,
.copy-url {
  display: flex;
  gap: 5px;
  align-items: center;
}
.agent-list {
  margin: 0 28px;
  border-top: 1px solid var(--line);
}
.agent-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.agent-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #f6eaeb;
  color: var(--red);
  border-radius: 7px;
}
.agent-symbol svg {
  width: 23px;
  height: 23px;
}
.agent-row h3 {
  font-size: 14px;
}
.agent-row p {
  font-size: 11px;
  color: #959ea9;
  margin-top: 7px;
}
.agent-state {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.knowledge-list {
  margin: 0 28px;
  border-top: 1px solid var(--line);
}
.knowledge-list article {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 23px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.knowledge-list h3 {
  margin: 10px 0;
}
.knowledge-list p {
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #788390;
  max-width: 800px;
}
.knowledge-actions {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  flex: none;
}
.notice {
  padding: 11px 25px;
  background: #fff7e6;
  color: #927234;
  font-size: 12px;
}
.loading {
  padding: 60px;
  text-align: center;
  color: #a0a8b1;
}
.login {
  margin: auto;
  width: 380px;
  max-width: calc(100% - 40px);
  padding: 80px 0;
}
.login-brand {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 50px;
}
.login-brand img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}
.login-brand strong {
  font-size: 25px;
}
.login-brand span {
  display: block;
  font-size: 12px;
  color: #9199a4;
  margin-top: 6px;
}
.login form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.login h1 {
  font-size: 20px;
  margin-bottom: 7px;
}
.login form > button {
  margin-top: 10px;
  height: 42px;
}
.login footer {
  margin-top: 40px;
  color: #a0a8b0;
  font-size: 11px;
}
.form-error {
  color: #b2243b;
  font-size: 12px;
  line-height: 1.5;
}
.form-error:empty {
  display: none;
}
dialog {
  border: 1px solid #e0e4e8;
  padding: 0;
  border-radius: 8px;
  width: 520px;
  max-width: calc(100% - 32px);
  max-height: calc(100dvh - 48px);
  box-shadow: 0 20px 60px #17222e25;
  color: #303640;
}
dialog.wide {
  width: 900px;
}
dialog::backdrop {
  background: #1e293b66;
}
dialog form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 50px);
}
.modal-heading {
  padding: 18px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-heading h2 {
  font-size: 17px;
}
.modal-body {
  padding: 23px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 19px;
  min-height: 0;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 17px 23px;
  border-top: 1px solid var(--line);
}
.modal-footer .form-error {
  margin-right: auto;
  max-width: 280px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.settings-grid {
  grid-template-columns: 1fr 2fr;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}
.section-heading button {
  font-size: 11px;
  min-height: 28px;
}
.section-heading svg {
  width: 13px;
}
#field-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-row {
  display: grid;
  grid-template-columns: 125px 115px minmax(140px, 1fr) 53px 30px;
  gap: 8px;
  align-items: center;
}
.field-row input {
  padding: 8px;
  font-size: 11px;
}
.field-row label {
  font-size: 11px;
  white-space: nowrap;
}
.field-row input[type="checkbox"] {
  padding: 0;
}
.account-email {
  color: #7d8793;
}
.secret-value {
  white-space: pre-wrap;
  word-break: break-all;
  background: #f5f6f8;
  padding: 15px;
  font-size: 12px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  max-width: calc(100% - 30px);
  border-radius: 6px;
  background: #234b40;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: 0.15s;
  z-index: 10000;
  font-size: 13px;
  box-shadow: 0 5px 20px #0002;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #a12e42;
}
.padded {
  padding: 24px;
}
@media (min-width: 1650px) {
  .inbox-grid {
    grid-template-columns: 310px minmax(350px, 1fr) 370px;
  }
  .conversation-preview b {
    max-width: 150px;
  }
}
@media (max-width: 1200px) {
  #sidebar {
    width: 196px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .inbox-grid {
    grid-template-columns: 240px minmax(240px, 1fr);
  }
  #profile-panel {
    grid-column: 2;
    max-height: none;
    display: none;
  }
  .inbox-grid.has-selection {
    grid-template-columns: 230px minmax(240px, 1fr) 275px;
  }
  .stat-strip {
    gap: 23px;
    padding: 18px 22px;
  }
  .stat-strip > div {
    gap: 8px;
  }
  .stat-strip b {
    font-size: 21px;
  }
  .inbox-grid.has-selection #profile-panel {
    display: flex;
  }
  .brand {
    font-size: 16px;
  }
  .inbox-grid {
    height: calc(100dvh - 146px);
  }
  .chat-heading {
    padding: 15px;
  }
  .chat-title small {
    max-width: 165px;
  }
  .profile-scroll {
    padding: 15px;
  }
  .profile-fields > div {
    grid-template-columns: 65px 1fr;
  }
}
@media (max-width: 1050px) {
  .inbox-grid.has-selection {
    grid-template-columns: 210px minmax(250px, 1fr);
  }
  .inbox-grid.has-selection #profile-panel {
    display: flex;
    grid-column: 2;
    border-top: 1px solid var(--line);
    min-height: 450px;
  }
  .inbox-grid {
    height: auto;
    min-height: calc(100dvh - 145px);
  }
  .conversation-list {
    grid-row: span 2;
    max-height: calc(100dvh - 145px);
    position: sticky;
    top: 0;
  }
  .chat-panel {
    height: 600px;
  }
  .stat-strip {
    gap: 16px;
    flex-wrap: wrap;
  }
  .stat-strip b {
    font-size: 19px;
  }
  .stat-strip span {
    font-size: 10px;
  }
  .agent-row {
    flex-wrap: wrap;
  }
  .agent-state {
    margin-left: 0;
  }
  .main header {
    padding: 0 20px;
  }
  .profile-actions button {
    flex: 0 1 auto;
  }
}
@media (max-width: 760px) {
  #sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    z-index: 20;
    width: 224px;
    transition: left 0.2s;
    box-shadow: 10px 0 30px #1d293215;
  }
  #sidebar.open {
    left: 0;
  }
  .page-heading > .icon-button {
    display: inline-flex;
  }
  .page-heading {
    gap: 9px;
  }
  header {
    height: 59px;
    min-height: 59px;
    padding: 0 14px !important;
  }
  .crumb,
  .page-heading > svg,
  .today {
    display: none;
  }
  h1 {
    font-size: 16px;
  }
  .stat-strip {
    padding: 15px 17px;
    gap: 17px;
  }
  .stat-strip > div {
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
  }
  .stat-strip > button {
    padding: 8px;
    font-size: 11px;
  }
  .stat-strip > button svg {
    width: 14px;
  }
  .inbox-grid,
  .inbox-grid.has-selection {
    display: block;
    min-height: calc(100dvh - 145px);
  }
  .conversation-list {
    max-height: none;
    position: static;
    border-right: 0;
  }
  .chat-panel {
    display: none;
  }
  .inbox-grid.has-selection .conversation-list {
    display: none;
  }
  .inbox-grid.has-selection .chat-panel {
    display: flex;
    height: 620px;
    min-height: calc(100dvh - 155px);
  }
  .inbox-grid.has-selection #profile-panel {
    display: flex;
    min-height: 0;
    border-left: 0;
    max-height: none;
  }
  .chat-title > .icon-button {
    display: inline-flex;
  }
  .message-scroll {
    padding: 18px;
  }
  .conversation-item {
    min-height: 98px;
    padding: 17px;
  }
  .conversation-preview b {
    max-width: 200px;
  }
  .conversation-preview p {
    max-width: 80vw;
  }
  .profile-scroll {
    padding: 20px;
  }
  .profile-fields > div {
    grid-template-columns: 110px 1fr;
  }
  .page-toolbar {
    padding: 22px 17px;
  }
  .page-toolbar h2 {
    font-size: 17px;
  }
  .page-toolbar > button {
    font-size: 12px;
  }
  .table-wrap,
  .agent-list,
  .knowledge-list {
    margin: 0 17px;
  }
  .agent-row {
    gap: 12px;
    padding: 20px 14px;
  }
  .agent-state {
    width: 100%;
  }
  .knowledge-list article {
    padding: 18px;
    flex-direction: column;
  }
  .knowledge-actions {
    align-items: center;
  }
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr 1fr 55px 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }
  .field-row [data-description] {
    grid-column: 1/3;
    grid-row: 2;
  }
  .field-row .checkbox {
    grid-column: 3;
    grid-row: 1;
  }
  .field-row button {
    grid-column: 4;
    grid-row: 1;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-heading,
  .modal-footer {
    padding: 15px 18px;
  }
  dialog {
    max-width: calc(100% - 20px);
  }
  .login {
    padding: 50px 0;
  }
  .form-error {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
/* Original expense evidence keeps its own aspect ratio. */
.expense-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:16px 0}
.expense-images img{width:100%;height:220px;object-fit:contain;background:#f4f6f7;border:1px solid #dce1e5}
.conversation-panel-tabs{display:flex;flex-shrink:0;border-bottom:1px solid var(--line);padding:8px;gap:6px;background:#fff}
.conversation-panel-tabs button{display:flex;align-items:center;justify-content:center;gap:6px;flex:1;border:0;background:transparent;border-radius:4px;padding:8px;font-size:13px}
.conversation-panel-tabs button[aria-selected=true]{background:#edf3f7;color:#254f70;font-weight:600}
.conversation-panel-tabs svg{width:16px;height:16px}
.message-assets{display:grid;gap:10px;width:min(100%,380px);margin:8px 0}
.message-assets:has(.media-asset video){width:min(100%,460px)}
.media-asset{margin:0;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:#fff}
.media-thumbnail{display:block;padding:0;border:0;border-radius:0;width:100%;height:220px;background:#f1f4f5;cursor:zoom-in}
.media-thumbnail img{display:block;width:100%;height:100%;object-fit:contain}
.media-asset video{display:block;width:100%;aspect-ratio:16/9;max-height:300px;background:#15191b}
.media-asset audio{display:block;width:100%;height:54px;min-width:0}
.media-asset figcaption{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 6px;padding:10px;align-items:center}
.media-filename{font-size:12px;overflow-wrap:anywhere;grid-column:1}
.media-meta{font-size:11px;color:var(--muted);grid-column:1}
.media-actions{grid-column:2;grid-row:1/3;display:flex;gap:2px}
.media-actions a{display:inline-flex;text-decoration:none;color:inherit}
.media-placeholder{display:flex;gap:10px;align-items:center;min-height:70px;padding:14px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.media-placeholder svg{width:24px;height:24px;flex-shrink:0}
.media-full-image{display:block;width:100%;max-height:65dvh;object-fit:contain;margin-bottom:12px}
.resource-filters{padding:12px;border-bottom:1px solid var(--line);display:grid;gap:10px;flex-shrink:0}
.resource-filters label{font-size:12px;display:grid;gap:5px}
.resource-filters .switch{display:flex}
.resource-filters select,.resource-filters input:not([type=checkbox]){width:100%;min-width:0;font-size:12px}
#resource-search{display:flex;gap:5px;margin:0}
.resource-list{overflow:auto;padding:12px;display:flex;flex-direction:column;gap:12px;min-height:0;flex:1}
.resource-origin{display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between;padding:0 10px 10px;font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.resource-origin .badge{font-size:10px}
.resource-asset{flex-shrink:0}
.resource-asset .media-thumbnail{height:160px}
.resource-asset video{max-height:180px}
.modal-heading h2{overflow-wrap:anywhere;min-width:0}
@media(max-width:600px){.message-assets{width:100%}.media-thumbnail{height:200px}.resource-list{max-height:650px}.media-asset audio{max-width:100%}}
