:root {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: #183d32;
  background: #f3f7f5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  padding: 22px 5%;
  background: #fff;
  border-bottom: 1px solid #dbe5df;
  display: flex;
  gap: 24px;
  align-items: center;
}
header span {
  flex: 1;
  color: #64786e;
}
main {
  max-width: 1050px;
  margin: 35px auto;
  padding: 0 24px;
}
h1 {
  font-size: 30px;
}
h2 {
  font-size: 21px;
}
section {
  background: white;
  border: 1px solid #dbe5df;
  border-radius: 14px;
  padding: 25px;
  margin: 22px 0;
}
p {
  line-height: 1.7;
  color: #536e61;
}
label {
  display: block;
  margin: 14px 0;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #bccfc3;
  border-radius: 8px;
  font: inherit;
  margin-top: 7px;
}
button {
  padding: 11px 20px;
  border: 0;
  border-radius: 8px;
  background: #087b56;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
}
#login {
  max-width: 500px;
  margin: 65px auto;
}
.banner {
  background: #e1efe8;
  padding: 18px;
  border-radius: 10px;
}
article {
  border-top: 1px solid #e1e9e5;
  padding: 16px 0;
  overflow-wrap: anywhere;
}
article img {
  max-width: 250px;
  background: #fff;
}
article video {
  max-width: 100%;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#notice {
  color: #a63a28;
  min-height: 24px;
}
small {
  color: #607568;
}
a {
  color: #087b56;
}
[hidden] {
  display: none !important;
}
body:has(#dashboard:not([hidden])) main {
  max-width: none;
  margin: 28px 32px 28px 248px;
}
#sidebar {
  position: fixed;
  left: 0;
  top: 80px;
  bottom: 0;
  width: 216px;
  padding: 28px 16px;
  background: #fff;
  border-right: 1px solid #dbe5df;
  overflow: auto;
}
#sidebar > strong {
  font-size: 26px;
  color: #087b56;
}
#sidebar nav {
  display: grid;
  gap: 7px;
  margin-top: 28px;
}
#sidebar button {
  background: transparent;
  color: #536e61;
  text-align: left;
}
#sidebar button.active {
  background: #e1efe8;
  color: #076a4b;
  font-weight: 700;
}
#metrics {
  display: flex;
  gap: 20px;
}
#metrics article {
  flex: 1;
  border: 1px solid #e1e9e5;
  border-radius: 12px;
  padding: 20px;
}
#metrics strong {
  font-size: 32px;
}
.inboxGrid {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 350px;
  gap: 20px;
}
#chatList {
  border-right: 1px solid #dbe5df;
  padding-right: 16px;
  max-height: 650px;
  overflow: auto;
}
#chatList button {
  display: block;
  width: 100%;
  text-align: left;
  background: #f3f7f5;
  color: #183d32;
  margin-bottom: 8px;
  padding: 12px;
}
#chatList button.active {
  background: #d7eee3;
}
#chatList small {
  display: block;
  margin-top: 6px;
}
#chatList p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0;
}
.bubble {
  background: #f3f7f5;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
  max-width: 85%;
}
.bubble.out {
  background: #dff1e8;
  margin-left: auto;
}
#thread {
  max-height: 650px;
  overflow: auto;
}
#management > h2,
#management > p {
  display: none;
}
#records button {
  margin: 6px;
}
#records {
  margin-top: 24px;
}
details {
  margin-top: 20px;
}
@media (max-width: 760px) {
  body:has(#dashboard:not([hidden])) main {
    margin: 20px 0;
    padding: 0 14px;
  }
  #sidebar {
    position: static;
    width: auto;
    border: 0;
    padding: 12px;
  }
  #sidebar nav {
    display: flex;
    overflow: auto;
    margin-top: 10px;
  }
  #sidebar button {
    white-space: nowrap;
  }
  .inboxGrid {
    grid-template-columns: 1fr;
  }
  #chatList {
    max-height: 200px;
    border: 0;
  }
  #metrics {
    gap: 8px;
  }
  #metrics article {
    padding: 10px;
  }
  header span {
    display: none;
  }
  section {
    padding: 16px;
  }
}
:root {
  --primary: oklch(0.58 0.14 165);
  --background: oklch(0.99 0.005 160);
  --foreground: oklch(0.2 0.02 165);
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
}
button {
  background: var(--primary);
}
#sidebar {
  background: oklch(0.98 0.01 165);
}
#sidebar button.active {
  background: var(--primary);
  color: white;
}
input[type="checkbox"] {
  display: inline-block;
  width: auto;
  vertical-align: middle;
  margin: 0 12px;
  accent-color: var(--primary);
}
input[type="number"] {
  max-width: 200px;
}
#records {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
#records > article {
  border: 1px solid #dbe5df;
  border-radius: 12px;
  padding: 18px;
}
article audio,
article video {
  width: 100%;
  max-height: 300px;
}
#conversationTools form {
  padding: 12px;
}
.translation {
  border-left: 3px solid #98bbac;
  padding-left: 12px;
  font-size: 14px;
}
#workspace-ai form {
  max-width: 680px;
}
#workspace-team article {
  display: flex;
  gap: 20px;
  align-items: center;
}
#workspace-channels form {
  padding: 12px;
  border-bottom: 1px solid #dbe5df;
}
#fullHistory {
  max-height: 550px;
  overflow: auto;
}
.inboxGrid {
  grid-template-columns: 240px minmax(300px, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
.customerPanel {
  padding: 12px;
  background: #f7faf8;
  border-radius: 12px;
  margin: 0;
  max-height: 80vh;
  overflow: auto;
}
.customerPanel summary {
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.composer {
  border: 0;
  border-top: 1px solid #dbe5df;
  border-radius: 0;
  padding: 16px 0;
  margin: 20px 0;
}
.composer h2 {
  font-size: 16px;
}
.composer textarea {
  min-height: 80px;
}
.composer label {
  font-size: 13px;
}
#chatList strong {
  font-size: 13px;
}
#thread {
  min-height: 200px;
  max-height: 55vh;
}
#thread > h3 {
  font-size: 16px;
  position: sticky;
  top: 0;
  background: white;
  padding: 12px 0;
  margin: 0;
}
.bubble button {
  font-size: 12px;
  padding: 5px 8px;
}
.customerPanel input,
.customerPanel textarea,
.customerPanel select {
  padding: 8px;
  font-size: 13px;
}
.customerPanel h3 {
  display: none;
}
.customerPanel button {
  padding: 8px 10px;
  margin: 5px 0;
  font-size: 13px;
}
@media (max-width: 1250px) {
  .inboxGrid {
    grid-template-columns: 220px 1fr;
  }
  .customerPanel {
    grid-column: 1/-1;
    max-height: none;
  }
}
@media (max-width: 760px) {
  .inboxGrid {
    grid-template-columns: 1fr;
  }
  .customerPanel {
    grid-column: auto;
  }
  #thread {
    max-height: none;
  }
}
/* Reference-inspired workspace: mint navigation and edge-to-edge conversation. */
:root { color-scheme: light; --primary:#009b72; --background:#f8fcfa; --foreground:#152b24; font-size:14px; }
body:has(#dashboard:not([hidden])) > header { height:56px; padding:0 24px 0 250px; background:#f8fcfa; }
body:has(#dashboard:not([hidden])) > header strong { font-size:13px; font-weight:500; color:#6b8177; }
body:has(#dashboard:not([hidden])) > header span { font-size:13px; }
#sidebar { top:0; width:224px; padding:28px 12px; background:#f0faf6; z-index:2; }
#sidebar > strong { display:block; color:#172d25; padding:0 12px; font-size:25px; letter-spacing:-1px; }
#sidebar > strong::before { content:'◯'; display:inline-grid; place-items:center; width:34px; height:36px; border-radius:11px; background:#009b72; color:white; margin-right:10px; box-shadow:0 2px 4px #bedbd0; }
#sidebar > p { font-size:12px; margin-left:14px; }
#sidebar nav { gap:5px; margin-top:26px; }
#sidebar button { display:flex; align-items:center; gap:14px; padding:13px 16px; border-radius:12px; font-size:15px; font-weight:550; }
.navIcon { width:22px; font-size:23px; line-height:1; text-align:center; }
body:has(#dashboard:not([hidden])) main { margin:24px 28px 24px 224px; padding:0 24px; }
button { transition:background .15s; } button:hover { filter:brightness(.96); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline:2px solid #009b72; outline-offset:2px; }
#logout { padding:7px 14px; background:#e3f3ec; color:#17674d; }
#notice:empty { display:none; }
#notice:not(:empty) { position:fixed; right:24px; top:58px; max-width:420px; padding:12px 18px; background:#fff5ed; border:1px solid #edd5c1; border-radius:10px; z-index:20; box-shadow:0 6px 24px #173a2215; }
body[data-page="inbox"]:has(#dashboard:not([hidden])) main { margin:0 0 0 224px; padding:0; }
body[data-page="inbox"] #pageTitle { display:none; }
body[data-page="inbox"] #dashboard > .banner { margin:0; padding:7px 18px; border-radius:0; font-size:12px; border-bottom:1px solid #d8e5de; }
.inboxShell { margin:0; padding:0; border:0; border-radius:0; background:#f8fcfa; }
.inboxShell > h2 { display:none; }
.inboxGrid { grid-template-columns:minmax(240px, 29%) minmax(320px, 1fr) minmax(270px, 26%); gap:0; align-items:stretch; height:calc(100dvh - 95px); min-height:520px; }
.listColumn { min-width:0; border-right:1px solid #d5e3dc; display:flex; flex-direction:column; overflow:hidden; }
.listColumn > h2 { margin:0; padding:21px 20px; font-size:19px; border-bottom:1px solid #d5e3dc; }
.listColumn > label { padding:0 14px; font-size:0; margin:12px 0; }
#chatSearch { margin:0; background:#fff; font-size:14px; border:1px solid #d5e3dc; border-radius:10px; }
#chatList { padding:0; border:0; max-height:none; flex:1; overflow:auto; }
#chatList button { position:relative; min-height:104px; padding:18px 14px 16px 68px; margin:0; background:transparent; border-radius:0; border-bottom:1px solid #d5e3dc; }
#chatList button.active { background:#baf1df; }
#chatList strong { display:block; font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#chatList small { display:inline-block; border-radius:12px; background:#e4f5ed; padding:2px 8px; font-size:11px; }
#chatList p { font-size:13px; margin:5px 0 0; line-height:1.5; }
.chatAvatar { position:absolute; left:15px; top:22px; display:grid; place-items:center; border-radius:50%; width:40px; height:40px; background:#dff2e9; color:#009b72; font-size:15px; }
.chatCenter { min-width:0; display:flex; flex-direction:column; overflow:auto; }
#thread { padding:0 22px 22px; min-height:220px; max-height:none; flex:1; overflow:auto; }
#thread > h3 { margin:0 -22px 14px; padding:20px 22px; border-bottom:1px solid #d5e3dc; background:#f8fcfa; z-index:1; font-size:17px; }
#thread > button { font-size:12px; padding:6px 10px; background:#e3f3ec; color:#28715a; }
.bubble { border:0; background:#eaf3ee; padding:12px 15px; border-radius:17px 17px 17px 4px; max-width:86%; margin:18px 0; }
.bubble p { margin:5px 0; line-height:1.65; color:#203d31; font-size:15px; }
.bubble.out { background:#009b72; border-radius:17px 17px 4px 17px; margin-left:auto; }
.bubble.out p, .bubble.out small, .bubble.out a { color:white; }
.bubble small { font-size:10px; opacity:.8; }
.chatCenter > details { margin:0; padding:8px 18px; border-top:1px solid #d5e3dc; font-size:12px; }
.composer { padding:12px 18px; margin:0; background:#f8fcfa; flex-shrink:0; }
.composer > h2, .composer > p { display:none; }
.composer textarea { min-height:56px; max-height:140px; resize:vertical; border-radius:12px; background:white; }
.composer label { margin:8px 0; }
.composer button { padding:9px 14px; font-size:13px; margin-right:6px; }
.composer details { margin-top:6px; font-size:12px; color:#59766a; }
.recipientDetails { margin:0!important; }
.customerPanel { border:0; border-left:1px solid #d5e3dc; background:#f8fcfa; padding:0; border-radius:0; max-height:none; overflow:auto; }
.customerPanel > summary { padding:22px 18px; border-bottom:1px solid #d5e3dc; list-style:none; font-size:18px; }
#conversationTools form { padding:10px 18px; }
.customerPanel label { font-size:13px; font-weight:550; margin:16px 0; }
.customerPanel input,.customerPanel textarea,.customerPanel select { background:#fff; border:1px solid #d5e3dc; border-radius:8px; font-weight:400; }
.customerPanel textarea { min-height:70px; }
.customerPanel > div > button { margin:8px 18px; }
.inboxShell > details { padding:14px 20px; margin:0; }
@media(max-width:1200px) { .inboxGrid { grid-template-columns:240px minmax(320px,1fr); height:auto; } .customerPanel { grid-column:1/-1; max-height:450px; border-top:1px solid #d5e3dc; } #thread { max-height:60vh; } }
@media(max-width:760px) { #sidebar { position:static; width:100%; padding:12px; } #sidebar > p { display:none; } #sidebar nav { display:flex; margin-top:12px; } #sidebar button { flex-shrink:0; padding:9px; } .navIcon { display:none; } body:has(#dashboard:not([hidden])) > header { padding:10px 16px; } body:has(#dashboard:not([hidden])) main, body[data-page="inbox"]:has(#dashboard:not([hidden])) main { margin:0; padding:0 8px; } .inboxGrid { grid-template-columns:1fr; } #chatList { max-height:230px; } .customerPanel { grid-column:auto; } }
/* Inbox reading area stays independent of the compact composer. */
body[data-page="inbox"] .chatCenter { position:relative; overflow:hidden; min-height:0; }
body[data-page="inbox"] #thread { min-height:0; flex:1 1 0; overflow-y:auto; }
body[data-page="inbox"] .composer { flex:0 0 auto; max-height:42%; overflow-y:auto; padding:10px 16px; }
body[data-page="inbox"]:not(.hasConversation) .composer,
body[data-page="inbox"]:not(.hasConversation) .chatCenter > details { display:none; }
body[data-page="inbox"]:not(.hasConversation) #thread { display:grid; place-items:center; }
#sendForm { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end; }
#sendForm .recipientDetails { grid-column:1/-1; }
#sendForm .messageInput { margin:0; }
#sendForm textarea { margin:0; min-height:48px; height:48px; max-height:120px; }
#sendForm .primarySend { margin:0; height:48px; }
#sendForm > button[type="button"] { grid-column:1/-1; justify-self:start; padding:4px 8px; margin:0; background:transparent; color:#41735e; font-size:12px; }
.deliveryDetails { border-top:1px solid #d5e3dc; padding-top:6px; }
#jobs { max-height:140px; overflow:auto; }
#jobs article { padding:7px 0; font-size:12px; }
#thread img { max-width:100%; max-height:260px; object-fit:contain; border-radius:8px; }
#thread video { max-height:260px; }
@media (min-width:761px) { .inboxGrid { height:calc(100dvh - 104px); min-height:400px; } }
@media (min-width:761px) and (max-width:1200px) { .inboxGrid { grid-template-columns:230px minmax(300px,1fr); grid-template-rows:minmax(400px,calc(100dvh - 104px)) auto; height:auto; } #thread { max-height:none; } }
@media (max-width:760px) { .chatCenter { height:75dvh; min-height:440px!important; } }
#sendForm { grid-template-columns:auto minmax(0,1fr) auto; align-items:center; }
.composerToolbar { display:flex; gap:7px; }
.composerToolbar button { width:44px; height:48px; padding:0; margin:0; border-radius:12px; background:#e4f5ee; color:#315c4b; font-size:22px; }
#sendForm .primarySend { width:48px; padding:0; font-size:23px; border-radius:12px; }
#sendForm textarea { border:1px solid #009b72; border-radius:13px; font-size:15px; padding:12px; }
#sendForm textarea:focus { box-shadow:0 0 0 3px #a4d6c6; outline:none; }
#thread .bubble { width:fit-content; margin-bottom:5px; padding:13px 18px; }
.messageFooter { max-width:86%; margin:0 0 23px; clear:both; }
.messageFooter.out { margin-left:auto; text-align:right; }
.messageFooter > small { display:block; font-size:11px; margin:8px 4px; color:#6a8277; }
.messageFooter button { padding:6px 4px; background:transparent; color:#607d70; font-size:12px; }
.inlineTranslation { border:1px dashed #ccdfd5; background:#f2f9f5; border-radius:20px; padding:12px 16px; width:fit-content; text-align:left; }
.messageFooter.out .inlineTranslation { margin-left:auto; }
.inlineTranslation small { font-weight:600; }
.inlineTranslation p { margin:4px 0 0; color:#20382e; font-size:15px; line-height:1.6; }
@media(max-width:760px) { .composerToolbar {gap:4px;} .composerToolbar button {width:34px;} }
.sendLibrary { width:min(820px,92vw); max-height:85dvh; overflow:auto; border:1px solid #d3e5db; border-radius:18px; padding:24px; color:#183d32; background:#f8fcfa; }
.sendLibrary::backdrop { background:#0b261b70; }
.libraryHeading { display:flex; align-items:center; justify-content:space-between; }
.sendLibraryGrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:14px; margin:18px 0; }
.sendLibraryGrid article { padding:12px; border:2px solid #dce9e1; border-radius:12px; }
.sendLibraryGrid article.selected { border-color:#009b72; background:#e6f7ef; }
.sendLibraryGrid img,.sendLibraryGrid video { width:100%; height:140px; object-fit:contain; }
.sendLibraryGrid audio { width:100%; }
.sendLibraryGrid strong { display:block; margin:10px 0; }
.sendLibrary > button { margin-top:14px; }
.composerToolbar button { font-size:13px; }
#chatList > details { margin:0; }
#chatList > details > summary { padding:12px 16px; font-size:12px; font-weight:600; color:#658476; background:#eff8f3; cursor:pointer; }
#ownerFilter { font-size:13px; margin-top:8px; }
#records > select { grid-column:1/-1; max-width:320px; }
.customerPanel h4 { padding-top:16px; border-top:1px solid #d8e8df; }
.categoryControls { grid-column:1/-1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.categoryControls input { width:220px; margin:0; }
#conversationQuick { padding:10px 18px; border-bottom:1px solid #d8e8df; display:flex; gap:12px; align-items:center; flex-wrap:wrap; background:#eff8f3; }
#conversationQuick label { margin:0; font-size:13px; }
#conversationQuick select { width:110px; padding:6px; }
#conversationQuick small { flex-basis:100%; font-size:11px; }
body:not(.hasConversation) #conversationQuick { display:none; }

.issue-banner{background:#fff0d5;color:#704300;border:1px solid #d99b39;margin:8px 16px;padding:10px 16px}
#issueList article{border:1px solid #d9a64c;border-radius:12px;padding:16px;margin:12px 0}
#issueList article button{margin:6px 8px 0 0}#issueList p{overflow-wrap:anywhere}
