:root {
  color-scheme: dark;
  --ink: #eee;
  --muted: #a3a3a3;
  --line: #303030;
  --bg: #101010;
  --green: #eee;
  --light: #282828;
  --nav: #0c0c0c;
  --orange: #aaa;
}
body {
  background: linear-gradient(145deg, #151515, #090909);
  color: var(--ink);
}
.sidebar {
  background: #0c0c0c;
  color: #aaa;
  border-right: 1px solid #242424;
}
.brand {
  font-size: 22px;
  letter-spacing: 1px;
}
.brandmark {
  background: #eee;
  color: #111;
}
.brand small,
.navlabel {
  color: #aaa;
}
.navitem {
  border-radius: 24px;
}
.navitem:hover,
.navitem.active {
  background: #242424;
  color: #fff;
}
.navitem .count {
  background: #383838;
  color: #fff;
}
.workspace-note,
.profile {
  border-color: #303030;
}
.workspace-note,
.workspace-note strong,
.profile strong {
  color: #bbb;
}
.topbar,
.card,
.tablewrap,
.modal,
.login-box {
  background: #151515;
  border-color: #2b2b2b;
}
.topbar {
  background: #101010;
}
.card,
.tablewrap {
  border-radius: 20px;
}
.card {
  box-shadow: none;
}
.btn {
  background: #202020;
  color: #eee;
  border: 1px solid #383838;
  border-radius: 22px;
}
.btn:hover {
  background: #303030;
}
.btn.primary {
  background: #eee;
  color: #101010;
  border-color: #eee;
}
.btn.danger {
  color: #efaaaa;
  border-color: #643d3d;
}
.pill,
.pill.gray,
.pill.blue,
.pill.purple,
.tab.active,
.notice,
.live-banner {
  background: #252525;
  color: #ccc;
  border-color: #393939;
}
.pill.warn {
  background: #3c3323;
  color: #f4d395;
}
.field label {
  color: #bbb;
}
input,
select,
textarea,
.search {
  background: #1c1c1c;
  color: #eee;
  border-color: #393939;
  border-radius: 10px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #777;
  border-color: #bbb;
}
.btn:focus-visible,
button:focus-visible {
  outline: 2px solid #bbb;
  outline-offset: 3px;
}
th {
  background: #1c1c1c;
  color: #aaa;
}
td {
  border-color: #292929;
}
tbody tr.clickable:hover {
  background: #242424;
}
.avatar,
.avatar.blue,
.avatar.peach,
.avatar.violet {
  background: linear-gradient(135deg, #555, #292929);
  color: #fff;
}
.column,
.track {
  background: #202020;
}
.deal {
  background: #171717;
  border-color: #383838;
}
.deal:hover {
  border-color: #999;
}
.track i {
  background: #aaa;
}
.timelineitem {
  border-color: #555;
}
.timelineitem:before {
  background: #aaa;
  border-color: #151515;
}
.toast {
  background: #ededed;
  color: #141414;
}
.toast.error {
  background: #733434;
  color: #fff;
}
.solo-login {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 25%, #252525, transparent 60%), #0c0c0c;
}
.solo-login .login-box {
  width: 360px;
  max-width: 100%;
  padding: 32px;
  border: 1px solid #303030;
  border-radius: 24px;
  box-shadow: 0 24px 80px #0007;
}
.solo-login input {
  height: 46px;
}
.solo-login .btn {
  height: 46px;
}
.tg-workspace {
  --tg-bg: #141414;
  --tg-panel: #1c1c1c;
  --tg-accent: #ddd;
}
.tg-dialogs {
  background: #151515;
}
.tg-chatrow.active {
  background: #373737;
}
.tg-chatrow .avatar,
.tg-chatrow .avatar.blue,
.tg-chatrow .avatar.peach {
  background: linear-gradient(135deg, #666, #303030);
}
.tg-chatrow.active time,
.tg-chatrow.active small,
.tg-chatrow.active .tg-preview {
  color: #ddd;
}
.tg-folders button.active {
  color: #fff;
  border-color: #ddd;
}
.tg-unread {
  background: #ddd;
  color: #111;
}
.tg-conversation {
  background: #101010;
  background-image: radial-gradient(ellipse at 20% 10%, #242424, transparent 65%);
}
.tg-chatheader,
.tg-compose-area,
.tg-composer,
.tg-client-card {
  background: #1b1b1b;
}
.tg-messages .message {
  background: #252525;
  border-color: #333;
  color: #eee;
}
.tg-messages .message.out {
  background: #383838;
  border-color: #444;
}
.tg-send-button {
  background: #eee;
  color: #111;
}
.tg-shortcuts button,
.tg-icon:hover,
.tg-message-actions button:hover {
  color: #eee;
}
.tg-folders,
.tg-chatheader {
  border-color: #303030;
}
.tg-message-actions {
  background: #242424;
  color: #eee;
  border-color: #444;
}
.tg-message-actions button {
  color: #eee;
}
.translation {
  background: #202020;
  border-color: #555;
  color: #eee;
}
@media (max-width: 580px) {
  .solo-login {
    display: grid;
  }
  .solo-login .login-box {
    padding: 24px;
  }
}

.solo-login {
  grid-template-columns: 1fr;
}
.sidebar {
  overflow-y: auto;
  padding-top: 22px;
  padding-bottom: 18px;
}
.sidebar .navitem {
  padding-top: 8px;
  padding-bottom: 8px;
}
.sidebar .brand {
  padding-bottom: 20px;
}
.sidebar-bottom {
  padding-top: 16px;
}
.sidebar .workspace-note {
  display: none;
}
.tg-shortcuts button,
.tg-notice,
.tg-day,
.tg-sla .sla-clock {
  background: #292929;
  color: #ccc;
  border-color: #444;
}
.tg-countdown,
.translation b,
.tg-transcript-toggle,
.tg-translation-info,
.tg-translation-info button,
.tg-message-menu summary,
.tg-messages .message small,
.tg-shortcuts span,
.tg-compose-note {
  color: #bbb;
}
.tg-message-actions button:hover,
.tg-message-actions button:focus-visible {
  background: #393939;
}
.tg-workspace button:focus-visible,
.tg-message-menu summary:focus-visible {
  outline-color: #bbb;
}
.tg-workspace .clientpanel {
  background: #181818;
  color: #eee;
}
.tg-emoji-grid button {
  background: #303030;
}

/* Bot conversations remain independent from account inbox selection. */
.bot-workspace {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.bot-dialog-sidebar {
  min-width: 0;
  max-height: 70vh;
  overflow: auto;
}
#bot-dialog-search {
  width: 100%;
}
#bot-history {
  min-width: 0;
  padding: 12px;
  background: #161616;
  border-radius: 16px;
}
#bot-history-items {
  max-height: 55vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bot-bubble {
  max-width: 90%;
  align-self: flex-start;
  background: #222;
}
.bot-bubble.out {
  align-self: flex-end;
  background: #303030;
}
.bot-chat-back {
  display: none;
}
@media (max-width: 700px) {
  .bot-workspace {
    display: block;
  }
  .bot-workspace #bot-history {
    display: none;
  }
  .bot-workspace.bot-chat-open #bot-history {
    display: block;
  }
  .bot-chat-open .bot-dialog-sidebar {
    display: none;
  }
  .bot-chat-back {
    display: inline-flex;
  }
  .bot-bubble {
    max-width: 96%;
  }
}

[data-bot-person][hidden] {
  display: none !important;
}
