:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --line: #e5e9ec;
  --text: #17212b;
  --muted: #75808a;
  --subtle: #9aa4ad;
  --green: #18b35a;
  --green-dark: #089342;
  --green-soft: #e9f8ef;
  --blue: #2f7df6;
  --amber: #f59e0b;
  --red: #ef3b2d;
  --nav: #152532;
  --nav-soft: #203645;
  --shadow: 0 10px 30px rgba(15, 30, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100vh;
  overflow: hidden;
  padding: 18px 14px;
  background: linear-gradient(180deg, var(--nav), #10202b);
  color: #dce7ee;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.25;
}

.brand strong {
  display: grid;
  gap: 2px;
}

.brand-logo {
  width: 48px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: white;
  object-fit: contain;
}

.nav-section {
  display: grid;
  gap: 8px;
}

.primary-nav {
  margin-top: 2px;
}

.nav-title {
  margin: 12px 8px 4px;
  color: #9fb0bc;
  font-size: 13px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 14px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: var(--nav-soft);
  color: #ffffff;
}

.nav-item.soft {
  background: rgba(24, 179, 90, 0.22);
}

.nav-item b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 12px;
}

.nav-item b.warn {
  background: var(--amber);
}

.nav-item b.muted {
  background: #5d6f7d;
}

.agent-list {
  display: grid;
  gap: 8px;
}

.agent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: transparent;
  color: #dce7ee;
  text-align: left;
}

.agent-row.active,
.agent-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.avatar.small {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.main {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 66px;
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
  background: var(--surface);
}

.top-tab {
  height: 66px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #4f5964;
  font-size: 15px;
}

.top-tab.active {
  border-bottom-color: var(--green);
  color: var(--green-dark);
  font-weight: 700;
}

.top-spacer {
  flex: 1;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.current-agent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 34px;
  border-radius: 17px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 700;
}

.agent-select,
.status-select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: white;
  color: #34404a;
  outline: none;
}

.agent-select:focus,
.status-select:focus {
  border-color: #b9dbc8;
}

.workspace {
  display: grid;
  grid-template-columns: 306px minmax(420px, 1fr) 340px;
  height: calc(100vh - 66px);
  min-height: 0;
  overflow: hidden;
}

.conversation-list,
.chat-panel,
.customer-panel {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.conversation-list {
  padding: 14px 10px;
  overflow: hidden;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.search-row input {
  height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 12px;
  background: #f1f3f5;
  outline: none;
}

.search-row input:focus {
  border-color: #b9dbc8;
  background: white;
}

.icon-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #52606b;
}

.icon-button.active {
  border-color: #9bd7b3;
  background: var(--green-soft);
  color: var(--green-dark);
}

.list-tabs {
  display: flex;
  gap: 18px;
  padding: 18px 10px 10px;
}

.list-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 0 10px;
  background: transparent;
  color: #596571;
}

.list-tabs .active {
  border-bottom-color: var(--green);
  color: var(--green-dark);
  font-weight: 700;
}

.conversation-items {
  display: grid;
  gap: 6px;
  overflow: auto;
  max-height: calc(100vh - 170px);
  padding-right: 2px;
}

.conversation-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 10px;
  background: white;
}

.conversation-card.active {
  border-color: #dcefe4;
  background: linear-gradient(90deg, #eef9f1, #ffffff);
}

.conversation-card:hover {
  border-color: var(--line);
}

.customer-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #dcefe6;
  color: var(--green-dark);
  font-weight: 800;
}

.conversation-main {
  min-width: 0;
}

.conversation-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.source-tag,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #ffd287;
  border-radius: 5px;
  padding: 0 6px;
  background: #fff9eb;
  color: #b56a00;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #c8dcff;
  border-radius: 5px;
  padding: 0 6px;
  background: #eef5ff;
  color: #1c63c7;
  font-size: 12px;
  font-weight: 500;
}

.status-pill.pending {
  border-color: #ffd287;
  background: #fff9eb;
  color: #b56a00;
}

.status-pill.closed {
  border-color: #d8dee4;
  background: #f3f5f6;
  color: #6b747d;
}

.tag.green {
  border-color: #bde8cb;
  background: #edf9f1;
  color: var(--green-dark);
}

.tag.blue {
  border-color: #c8dcff;
  background: #eef5ff;
  color: #1c63c7;
}

.conversation-preview {
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: grid;
  justify-items: end;
  gap: 12px;
  color: var(--subtle);
  font-size: 12px;
}

.unread {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 12px;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
}

.chat-title {
  display: grid;
  gap: 8px;
}

.chat-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.header-actions button,
.quick-actions button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: white;
  color: #3d4852;
}

.quick-actions button {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list {
  overflow: auto;
  min-height: 0;
  padding: 18px 24px;
  background: #fbfcfd;
}

.message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.message.outgoing {
  justify-content: flex-end;
}

.bubble {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(560px, 72%);
}

.message.outgoing .bubble {
  align-items: flex-end;
}

.bubble-body {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  box-shadow: 0 4px 12px rgba(20, 35, 50, 0.04);
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.outgoing .bubble-body {
  border-color: #cdeed9;
  background: #e8f8ee;
}

.message-meta {
  margin-top: 5px;
  color: var(--subtle);
  font-size: 12px;
}

.outgoing .message-meta {
  text-align: right;
}

.image-message {
  display: block;
  width: auto;
  max-width: min(280px, 54vw);
  max-height: 220px;
  object-fit: contain;
  border-radius: 7px;
}

.file-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-width: 230px;
  color: inherit;
  text-decoration: none;
}

.file-icon {
  display: grid;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #ef4444;
  color: white;
  font-weight: 800;
}

.file-name {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.file-size {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.composer {
  border-top: 1px solid var(--line);
  padding: 8px 14px 10px;
  background: white;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 30px;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 10px;
  color: #3d4852;
  cursor: pointer;
}

.tool-button:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.note-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #3d4852;
  font-size: 14px;
}

.note-toggle input {
  width: 38px;
  height: 20px;
  accent-color: var(--green);
}

.composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

textarea {
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 92px;
  resize: none;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 12px;
  outline: none;
}

textarea:focus {
  border-color: #b9dbc8;
  background: #fbfffc;
}

.send-button {
  align-self: end;
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: var(--green);
  color: white;
  font-weight: 700;
}

.send-button:hover {
  background: var(--green-dark);
}

.pending-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0;
  border: 1px dashed #b9dbc8;
  border-radius: 7px;
  padding: 8px 10px;
  background: #f3fbf6;
  color: #335443;
  font-size: 13px;
}

.pending-attachment button {
  border: 0;
  background: transparent;
  color: var(--red);
}

.hidden {
  display: none;
}

.customer-panel {
  overflow: auto;
  padding: 18px 22px;
}

.panel-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: -18px -22px 18px;
  padding: 0 22px;
}

.panel-tabs button {
  height: 52px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #52606b;
}

.panel-tabs .active {
  border-bottom-color: var(--green);
  color: var(--green-dark);
  font-weight: 700;
}

.panel-view {
  display: none;
}

.panel-view.active {
  display: block;
}

.section {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.section:first-of-type {
  padding-top: 0;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.profile-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #dcefe6;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 800;
}

.detail-list {
  display: grid;
  gap: 8px;
  color: #4c5661;
  font-size: 13px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.collab-list,
.timeline {
  display: grid;
  gap: 10px;
}

.collab-row,
.audit-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #4c5661;
  font-size: 13px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: #4c5661;
  font-size: 13px;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.timeline-dot.blue {
  background: var(--blue);
}

.timeline-dot.gray {
  background: #aab3ba;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-list,
.reply-list {
  display: grid;
  gap: 10px;
}

.note-card {
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 10px 11px;
  background: #ffffff;
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6d7a86;
  font-size: 12px;
}

.note-meta strong {
  color: #2f3d4a;
}

.note-card p {
  margin: 7px 0 0;
  color: #344453;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.reply-item {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: #263441;
  text-align: left;
}

.reply-item:hover {
  border-color: #9ed8b6;
  background: #f4fbf7;
}

.reply-item span {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.reply-item small {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .brand strong,
  .nav-title,
  .nav-item span,
  .agent-row span {
    display: none;
  }

  .workspace {
    grid-template-columns: 260px minmax(360px, 1fr);
  }

  .customer-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: 100vw;
    overflow: hidden;
  }

  .nav {
    display: none;
  }

  .main {
    width: 100vw;
    overflow: hidden;
  }

  .topbar {
    gap: 12px;
    max-width: 100vw;
    overflow-x: auto;
    padding: 0 14px;
  }

  .top-tab {
    min-width: 42px;
    font-size: 14px;
  }

  .workspace {
    grid-template-columns: 1fr;
    width: 100vw;
    height: auto;
    min-height: calc(100vh - 66px);
    overflow: hidden;
  }

  .conversation-list {
    display: none;
  }

  .message-list {
    min-height: 48vh;
    padding: 18px 12px;
  }

  .chat-panel {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
  }

  .bubble {
    max-width: 82vw;
  }

  .message.outgoing .bubble {
    max-width: 82vw;
  }

  .message.outgoing > .avatar {
    display: none;
  }

  .file-card {
    min-width: 0;
  }

  .chat-header {
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }

  .header-actions {
    flex-direction: column;
  }

  .composer-row {
    grid-template-columns: 1fr;
  }

  .current-agent {
    display: none;
  }
}

/* Visual polish pass: clearer hierarchy for a production service workbench. */
:root {
  --bg: #eef2f5;
  --surface-soft: #f6f8fa;
  --line: #dfe6eb;
  --text: #101924;
  --muted: #687685;
  --subtle: #9ba8b4;
  --green: #13a85a;
  --green-dark: #078443;
  --green-soft: #e9f7ef;
  --blue: #2f75e8;
  --amber: #f2a11f;
  --nav: #0f2330;
  --nav-soft: #183747;
  --shadow: 0 12px 30px rgba(24, 39, 52, 0.08);
}

body {
  background:
    linear-gradient(180deg, #f8fafb 0, #eef2f5 220px),
    var(--bg);
}

.nav {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(24, 179, 90, 0.12), transparent 170px),
    linear-gradient(180deg, #102938 0%, #0d1f2a 100%);
}

.brand {
  margin-bottom: 22px;
}

.brand-logo {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.nav-item {
  font-weight: 700;
}

.nav-item.soft {
  border: 1px solid rgba(55, 207, 126, 0.16);
  background: linear-gradient(90deg, rgba(19, 168, 90, 0.32), rgba(19, 168, 90, 0.16));
}

.main {
  background: var(--bg);
}

.topbar {
  height: 74px;
  border-bottom-color: #dbe3e9;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(16, 25, 36, 0.03);
}

.top-tab {
  height: 74px;
  color: #455361;
  font-weight: 600;
}

.top-tab.active {
  color: var(--green-dark);
}

.agent-select {
  min-width: 92px;
  border-color: #d6e0e7;
  background: #f8fafb;
  font-size: 14px;
}

.current-agent {
  min-width: 72px;
  border: 1px solid #ccebd8;
  background: #dcf6e7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.workspace {
  grid-template-columns: 312px minmax(520px, 1fr) 342px;
  height: calc(100vh - 74px);
  padding: 0;
  background: var(--bg);
}

.conversation-list,
.chat-panel,
.customer-panel {
  border-right-color: #dce4ea;
  background: rgba(255, 255, 255, 0.96);
}

.conversation-list {
  padding: 16px 12px;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.search-row input {
  height: 38px;
  border-color: #e4e9ee;
  background: #f2f5f7;
  font-size: 14px;
}

.search-row input:focus {
  border-color: #9ed8b6;
  box-shadow: 0 0 0 3px rgba(19, 168, 90, 0.08);
}

.icon-button {
  background: #fbfcfd;
  font-weight: 700;
}

.list-tabs {
  gap: 20px;
  padding: 16px 10px 10px;
}

.conversation-items {
  gap: 8px;
}

.conversation-card {
  position: relative;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  border-color: #e6edf1;
  border-radius: 8px;
  padding: 14px 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(20, 35, 50, 0.03);
}

.conversation-card::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.conversation-card.active {
  border-color: #c9ead6;
  background: linear-gradient(90deg, #edf9f2 0%, #ffffff 78%);
  box-shadow: 0 10px 22px rgba(15, 80, 45, 0.08);
}

.conversation-card.active::before {
  background: var(--green);
}

.conversation-name {
  min-height: 24px;
  font-size: 18px;
  line-height: 1.25;
}

.conversation-preview {
  margin-top: 7px;
  font-size: 13px;
}

.conversation-meta {
  font-size: 12px;
}

.customer-avatar,
.profile-avatar {
  background: linear-gradient(145deg, #dff4e8, #cfeadd);
}

.chat-panel {
  border-left: 1px solid #edf1f4;
  border-right: 1px solid #dce4ea;
}

.chat-header {
  min-height: 90px;
  padding: 15px 22px;
  background: #ffffff;
}

.chat-title h1 {
  font-size: 24px;
  letter-spacing: 0;
}

.chat-meta {
  gap: 10px;
  line-height: 1.9;
}

.header-actions {
  align-items: center;
}

.header-action-button,
.header-actions button,
.status-select {
  height: 36px;
  border-color: #dce4ea;
  background: #fbfcfd;
  color: #263441;
  font-size: 14px;
}

.header-action-button:hover,
.header-actions button:hover,
.status-select:hover {
  border-color: #badbc7;
  background: #f3fbf6;
}

.message-list {
  padding: 22px 28px;
  background:
    linear-gradient(180deg, #f8fafb 0, #f5f8fa 100%);
}

.bubble-body {
  border-color: #dfe7ec;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(20, 35, 50, 0.06);
}

.outgoing .bubble-body {
  border-color: #bde8ce;
  background: linear-gradient(180deg, #e6f8ee, #def5e8);
}

.message-meta {
  color: #8694a1;
}

.composer {
  border-top-color: #dce4ea;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 -8px 22px rgba(28, 43, 56, 0.04);
}

.quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #edf1f4;
  background: #fbfcfd;
}

.reply-rail {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.reply-chip {
  height: 34px;
  max-width: 188px;
  flex: 0 0 auto;
  border: 1px solid #dfe7ec;
  border-radius: 7px;
  padding: 0 12px;
  background: #ffffff;
  color: #2d3b48;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(20, 35, 50, 0.03);
}

.reply-chip:hover {
  border-color: #9ed8b6;
  background: #f4fbf7;
}

.composer-command-row {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.command-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  border: 1px solid #d7e1e7;
  border-radius: 7px;
  padding: 0 11px;
  background: #f5f8fa;
  color: #344453;
  font-size: 14px;
  font-weight: 600;
}

.command-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
  background: rgba(16, 25, 36, 0.06);
  font-size: 12px;
  line-height: 1;
}

.composer-tools {
  min-height: 42px;
  padding: 7px 14px 0;
  gap: 8px;
}

.tool-button {
  position: relative;
  height: 32px;
  border-color: transparent;
  padding: 0 10px 0 34px;
  font-weight: 600;
}

.tool-button::before {
  content: "";
  position: absolute;
  left: 9px;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: #eaf1f5;
  box-shadow: inset 0 0 0 1px #d5e0e7;
}

.tool-button:nth-of-type(1)::before {
  background: linear-gradient(135deg, #e5f6ed, #ccebd8);
}

.tool-button:nth-of-type(2)::before {
  background: linear-gradient(135deg, #eef5ff, #d8e7ff);
}

.note-toggle {
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.note-toggle input {
  width: 20px;
  height: 20px;
}

.composer-row {
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 12px;
  padding: 3px 14px 12px;
}

textarea {
  height: 52px;
  min-height: 52px;
  border-color: #e6edf1;
  background: #f8fafb;
  font-size: 14px;
}

textarea:focus {
  border-color: #9ed8b6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(19, 168, 90, 0.08);
}

.send-button {
  height: 42px;
  align-self: center;
  background: linear-gradient(180deg, #18b866, #0d9d50);
  box-shadow: 0 8px 18px rgba(13, 157, 80, 0.18);
}

.send-button:hover {
  background: linear-gradient(180deg, #14ab5e, #078b45);
}

.customer-panel {
  padding: 0 22px 18px;
  background: #fbfcfd;
}

.panel-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -22px 18px;
  background: rgba(255, 255, 255, 0.96);
}

.section {
  padding: 17px 0;
}

.section h2 {
  color: #132231;
  font-size: 15px;
  letter-spacing: 0;
}

.detail-list {
  color: #43515f;
}

.detail-list div {
  padding: 2px 0;
}

.collab-row,
.audit-row {
  color: #465461;
}

.tag,
.source-tag,
.status-pill {
  font-weight: 600;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 280px minmax(360px, 1fr);
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .composer-command-row {
    justify-content: flex-start;
  }
}
