:root {
  --bg: #090b10;
  --bg-raised: #0d1016;
  --panel: #11151c;
  --panel-strong: #171c24;
  --panel-soft: #1b212b;
  --line: #29303a;
  --line-soft: #1d232c;
  --text: #f4f1eb;
  --muted: #9ba3ad;
  --dim: #68717d;
  --accent: #ff6038;
  --accent-soft: #ff9876;
  --cyan: #8bd7eb;
  --lime: #c8ef79;
  --yellow: #f2c76f;
  --danger: #ff6b59;
  --success: #8ed17f;
  --sidebar: 248px;
  --customer: 296px;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.mono,
.eyebrow,
.nav-label,
.queue-summary,
.date-chip,
.login-footnote,
.customer-head p,
.metric small,
.assignment-chip__label,
.priority-flag,
.composer__hint {
  font-family: "DM Mono", Consolas, monospace;
  letter-spacing: 0.08em;
}

.crm-grid {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 27px;
  height: 24px;
  align-items: center;
  justify-content: space-between;
  transform: skewX(-17deg);
}

.brand-mark i {
  display: block;
  width: 4px;
  height: 23px;
  background: var(--text);
}

.brand-mark i:nth-child(2) {
  background: var(--accent);
}

.brand-mark i:nth-child(3) {
  height: 15px;
  margin-top: 8px;
  background: var(--text);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-soft);
  font-size: 10px;
  line-height: 1.2;
}

/* Small line icons used throughout the shell. They keep controls legible without adding a UI dependency. */
.nav-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: currentColor;
}

.nav-icon::before,
.nav-icon::after {
  position: absolute;
  display: block;
  content: "";
}

.nav-icon--inbox::before {
  inset: 3px 1px 2px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.nav-icon--inbox::after {
  right: 3px;
  bottom: 5px;
  left: 3px;
  height: 1px;
  background: currentColor;
  box-shadow: 4px -3px 0 -0.1px currentColor, -4px -3px 0 -0.1px currentColor;
}

.nav-icon--pipeline::before {
  inset: 2px 1px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  box-shadow: inset 5px 0 0 -4px currentColor, inset -5px 0 0 -4px currentColor;
}

.nav-icon--pipeline::after {
  top: 7px;
  right: 3px;
  left: 3px;
  height: 1px;
  background: currentColor;
}

.nav-icon--people::before {
  top: 2px;
  left: 5px;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.nav-icon--people::after {
  right: 2px;
  bottom: 1px;
  left: 2px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 8px 8px 3px 3px;
}

.nav-icon--team::before {
  top: 2px;
  left: 5px;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: -5px 3px 0 -2px var(--panel-strong), 5px 3px 0 -2px var(--panel-strong);
}

.nav-icon--team::after {
  right: 1px;
  bottom: 1px;
  left: 1px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 8px 8px 2px 2px;
}

.nav-icon--chart::before {
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 12px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
}

.nav-icon--chart::after {
  top: 3px;
  right: 3px;
  width: 11px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: skewY(-30deg);
}

.nav-icon--search::before {
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.nav-icon--search::after {
  right: 1px;
  bottom: 2px;
  width: 7px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: right center;
}

.nav-icon--filter::before {
  top: 2px;
  right: 1px;
  left: 1px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.nav-icon--filter::after {
  top: 0;
  left: 4px;
  width: 3px;
  height: 5px;
  border: 1.5px solid currentColor;
  background: var(--panel);
  box-shadow: 4px 5px 0 -1.5px var(--panel), 4px 5px 0 0 currentColor, -1px 10px 0 -1.5px var(--panel), -1px 10px 0 0 currentColor;
}

.nav-icon--refresh::before {
  inset: 2px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.nav-icon--refresh::after {
  top: 1px;
  right: 1px;
  border-top: 4px solid currentColor;
  border-left: 4px solid transparent;
}

.nav-icon--alert::before {
  top: 1px;
  left: 6px;
  width: 5px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 5px 5px 2px 2px;
}

.nav-icon--alert::after {
  right: 4px;
  bottom: 1px;
  left: 4px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 5px 2px 0 -0.1px currentColor;
}

.nav-icon--person::before {
  top: 1px;
  left: 5px;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.nav-icon--person::after {
  right: 2px;
  bottom: 1px;
  left: 2px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 8px 8px 2px 2px;
}

.nav-icon--check::before {
  top: 3px;
  left: 2px;
  width: 12px;
  height: 7px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

/* Login */
.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 36px 20px;
}

.login-panel {
  width: min(100%, 480px);
  padding: 38px 42px 30px;
  border: 1px solid var(--line);
  background: rgba(17, 21, 28, 0.96);
  box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.12);
}

.login-copy {
  margin: 72px 0 32px;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-copy h1 em {
  color: var(--accent);
  font-style: normal;
}

.login-copy p:last-child {
  max-width: 340px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.login-form,
.modal-form {
  display: grid;
  gap: 16px;
}

.login-form label,
.modal-form label,
.filter-popover label {
  display: grid;
  gap: 7px;
}

.login-form label > span,
.modal-form label > span,
.filter-popover label:not(.check-field) {
  color: var(--muted);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 11px 12px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--dim);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #3d4652;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 48px;
}

.password-field .icon-button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 36px;
  min-height: 36px;
  border: 0;
  background: transparent;
}

.form-status {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.login-footnote {
  margin: 30px 0 0;
  color: var(--dim);
  font-size: 9px;
}

.primary-button,
.create-button,
.send-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #190d09;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  margin-top: 3px;
}

.primary-button b,
.create-button b,
.send-button b {
  font-size: 17px;
  font-weight: 500;
}

.primary-button:hover,
.create-button:hover,
.send-button:hover {
  background: #ff754e;
}

/* App shell and sidebar */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 25px 16px 18px;
  border-right: 1px solid var(--line);
  background: #0b0e13;
}

.sidebar__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 28px;
}

.brand-suffix {
  color: var(--accent-soft);
  font-size: 10px;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
}

.nav-label {
  margin: 21px 10px 7px;
  color: var(--dim);
  font-size: 9px;
}

.nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item span:not(.nav-icon) {
  flex: 1;
}

.nav-item b {
  min-width: 21px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 10px;
  font-weight: 400;
  text-align: center;
}

.nav-item:hover {
  border-color: var(--line);
  color: var(--text);
}

.nav-item.is-active {
  border-color: #673b2f;
  background: #291c1b;
  color: var(--text);
  box-shadow: inset 3px 0 var(--accent);
}

.nav-item.is-active .nav-icon {
  color: var(--accent);
}

.nav-item.is-active b {
  border-color: #734438;
  color: var(--accent-soft);
}

.sidebar__bottom {
  display: grid;
  gap: 15px;
  margin-top: auto;
}

.presence-button,
.account__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.presence-button {
  min-height: 49px;
  padding: 7px 10px;
}

.presence-button:hover,
.account__trigger:hover {
  border-color: var(--line);
  background: var(--panel);
}

.presence-button > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 1px;
}

.presence-button small,
.account small {
  color: var(--dim);
  font-size: 9px;
}

.presence-button strong,
.account strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(142, 209, 127, 0.13);
}

.presence-button b {
  color: var(--dim);
  font-size: 16px;
  font-weight: 400;
}

.account {
  position: relative;
}

.account__trigger {
  min-height: 57px;
  padding: 8px 9px;
}

.account__trigger > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.account__trigger > b {
  color: var(--dim);
  font-size: 17px;
  font-weight: 400;
}

.avatar {
  display: inline-grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border: 1px solid #6c4237;
  border-radius: 50%;
  background: #2a1c1a;
  color: var(--accent-soft);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
}

.avatar--large {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 13px;
}

.avatar--xl {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
  font-size: 17px;
}

.account__menu,
.dialog-menu,
.filter-popover {
  position: absolute;
  z-index: 50;
  border: 1px solid var(--line);
  background: #12171e;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.22);
}

.account__menu {
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  padding: 5px;
}

.account__menu button,
.dialog-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.account__menu button:hover,
.dialog-menu button:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.account__menu button:last-child {
  color: var(--danger);
}

.mobile-bar {
  display: none;
}

/* Workspace */
.workspace {
  width: calc(100% - var(--sidebar));
  min-width: 0;
  margin-left: var(--sidebar);
  padding: 34px 34px 48px;
}

.workspace-head,
.view-toolbar {
  display: flex;
  min-height: 50px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.workspace-head h1,
.view-toolbar h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.workspace-head__actions,
.view-toolbar > :last-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
}

.icon-button:hover {
  border-color: #49515d;
  color: var(--text);
}

.utility-button.is-loading .nav-icon {
  animation: spin 0.8s linear infinite;
}

.create-button {
  min-height: 36px;
  padding: 0 13px;
  gap: 8px;
  font-size: 12px;
}

.create-button > span:first-child {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.metric {
  display: flex;
  min-height: 86px;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: left;
}

.metric:hover {
  border-color: #46505d;
  background: var(--panel-strong);
}

.metric__icon {
  color: var(--dim);
}

.metric--attention .metric__icon,
.metric--attention em {
  color: var(--yellow);
}

.metric--danger .metric__icon,
.metric--danger em {
  color: var(--danger);
}

.metric__copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  font-size: 24px;
  line-height: 1;
}

.metric em {
  align-self: flex-start;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 10px;
  font-style: normal;
}

.inbox-layout {
  display: grid;
  min-height: 650px;
  grid-template-columns: minmax(290px, 0.92fr) minmax(360px, 1.55fr) var(--customer);
  border: 1px solid var(--line);
  background: var(--panel);
}

.queue-panel,
.dialog-panel,
.customer-panel {
  min-width: 0;
}

.queue-panel {
  position: relative;
  border-right: 1px solid var(--line);
}

.dialog-panel {
  position: relative;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #0f1319;
}

.customer-panel {
  background: #0e1218;
}

.queue-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  display: flex;
  min-width: 0;
  min-height: 36px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--dim);
}

.search-field:focus-within {
  border-color: #58626f;
}

.search-field input {
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}

.toolbar-filter {
  position: relative;
  width: 36px;
  min-width: 36px;
}

.toolbar-filter[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-popover {
  top: 58px;
  right: 14px;
  width: min(280px, calc(100vw - 32px));
  padding: 14px;
}

.filter-popover__head,
.staff-panel__head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-popover__head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
}

.filter-popover__head button,
.section-title button {
  border: 0;
  background: transparent;
  color: var(--accent-soft);
  font-size: 11px;
}

.filter-popover > label {
  margin-top: 12px;
}

.filter-popover select {
  min-height: 35px;
  font-size: 12px;
}

.check-field {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  color: var(--muted);
  font-size: 11px;
}

.check-field input {
  width: 15px;
  min-height: 15px;
  accent-color: var(--accent);
}

.queue-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.queue-tabs::-webkit-scrollbar {
  display: none;
}

.queue-tabs button {
  position: relative;
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}

.queue-tabs button::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  background: transparent;
  content: "";
}

.queue-tabs button:hover,
.queue-tabs button.is-active {
  color: var(--text);
}

.queue-tabs button.is-active::after {
  background: var(--accent);
}

.queue-tabs b {
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 10px;
  font-weight: 400;
}

.queue-summary {
  margin: 13px 14px 7px;
  color: var(--dim);
  font-size: 9px;
}

.conversation-list {
  display: grid;
}

.conversation-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px 12px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.conversation-row:hover {
  background: #171c23;
}

.conversation-row.is-selected {
  background: #241b1a;
  box-shadow: inset 3px 0 var(--accent);
}

.conversation-row.is-unassigned {
  box-shadow: inset 3px 0 var(--cyan);
}

.conversation-row .avatar {
  margin-top: 1px;
}

.conversation-row__main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.conversation-row__top,
.conversation-row__bottom {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conversation-row__name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row__time,
.conversation-row__assignee {
  flex: 0 0 auto;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 9px;
}

.conversation-row__subject {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row__snippet {
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row__badges {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 1px;
}

.unread-dot,
.sla-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.unread-dot {
  box-shadow: 0 0 0 3px rgba(255, 96, 56, 0.13);
}

.sla-dot--overdue {
  background: var(--danger);
}

.sla-dot--warning {
  background: var(--yellow);
}

.sla-dot--ok {
  background: var(--success);
}

.priority-mini {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
}

.priority-mini--urgent {
  background: var(--danger);
}

.priority-mini--high {
  background: var(--yellow);
}

.priority-mini--normal {
  background: var(--cyan);
}

.load-more {
  width: calc(100% - 28px);
  min-height: 35px;
  margin: 12px 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.load-more:hover {
  border-color: #4c5662;
  color: var(--text);
}

.list-empty {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--dim);
  text-align: center;
}

.list-empty strong {
  color: var(--muted);
  font-size: 12px;
}

.list-empty p {
  max-width: 220px;
  margin: 0;
  font-size: 11px;
}

/* Dialog */
.dialog-empty,
.customer-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 30px;
  color: var(--dim);
  text-align: center;
}

.dialog-empty__mark {
  width: 32px;
  height: 32px;
  color: var(--accent);
  opacity: 0.7;
}

.dialog-empty strong,
.customer-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dialog-empty p {
  margin: 0;
  font-size: 11px;
}

.dialog-content {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.dialog-head {
  position: relative;
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.dialog-back {
  display: none;
  border: 0;
  background: transparent;
  font-size: 18px;
}

.dialog-customer {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.dialog-customer > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dialog-customer strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-customer small {
  color: var(--dim);
  font-size: 10px;
}

.dialog-head__actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.priority-flag {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-size: 8px;
}

.priority-flag[data-level="urgent"] {
  border-color: #7c4037;
  color: var(--danger);
}

.priority-flag[data-level="high"] {
  border-color: #6f5b34;
  color: var(--yellow);
}

.dialog-menu {
  top: 42px;
  right: 0;
  width: 190px;
  padding: 5px;
}

.dialog-statusbar {
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.assignment-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.assignment-chip__label {
  color: var(--dim);
  font-size: 8px;
}

.assignment-chip > span:nth-child(2) {
  overflow: hidden;
  max-width: 140px;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-chip b {
  color: var(--dim);
  font-size: 13px;
  font-weight: 400;
}

.assignment-chip:hover > span:nth-child(2) {
  color: var(--accent-soft);
}

.assignment-chip:disabled,
.dialog-head__actions .icon-button:disabled,
.composer .icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.assignment-chip:disabled:hover > span:nth-child(2) {
  color: var(--text);
}

.sla-indicator {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 9px;
  text-align: right;
}

.sla-indicator[data-state="warning"] {
  color: var(--yellow);
}

.sla-indicator[data-state="overdue"] {
  color: var(--danger);
}

.sla-indicator[data-state="idle"] {
  color: var(--dim);
}

.sla-indicator__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.messages {
  display: flex;
  min-height: 330px;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 20px 15px 15px;
  scrollbar-color: var(--line) transparent;
}

.message-day {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-day::before,
.message-day::after {
  height: 1px;
  flex: 1;
  background: var(--line-soft);
  content: "";
}

.message {
  display: flex;
  max-width: 82%;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.message--outbound {
  align-self: flex-end;
  align-items: flex-end;
}

.message__bubble {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px 9px 9px 9px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.message--outbound .message__bubble {
  border-color: #684032;
  border-radius: 9px 3px 9px 9px;
  background: #2b1d1b;
}

.message__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
}

.message__meta b {
  color: var(--accent-soft);
  font-weight: 400;
}

.message-system {
  align-self: center;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
  text-align: center;
}

.reply-guard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 15px 10px;
  padding: 8px 10px;
  border: 1px solid #594d31;
  background: #282418;
  color: var(--yellow);
  font-size: 11px;
}

.reply-guard--readonly {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
}

.reply-guard__action {
  min-height: 27px;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: transparent;
  color: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
}

.reply-guard__action:hover {
  background: #3a211b;
  color: var(--text);
}

.message__delivery--queued {
  color: var(--yellow) !important;
}

.message__delivery--failed {
  color: var(--danger) !important;
}

.composer {
  margin: 0 15px 15px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.composer:focus-within {
  border-color: #5a3b32;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  max-height: 150px;
  border: 0;
  background: transparent;
  outline: 0;
}

.composer__bar {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 4px 5px 5px;
}

.composer__bar .icon-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-color: transparent;
  background: transparent;
  font-size: 19px;
}

.composer__hint {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  color: var(--dim);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-button {
  min-height: 31px;
  padding: 0 10px;
  gap: 8px;
  font-size: 11px;
}

.send-button:disabled,
.create-button:disabled,
.primary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

/* Customer card */
.customer-content {
  min-height: 100%;
}

.customer-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 17px 18px;
  border-bottom: 1px solid var(--line);
}

.customer-head > div {
  min-width: 0;
}

.customer-head p {
  margin: 0 0 4px;
  color: var(--accent-soft);
  font-size: 8px;
}

.customer-head h2 {
  overflow: hidden;
  max-width: 170px;
  margin: 0;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-head span:last-child {
  color: var(--dim);
  font-size: 10px;
}

.customer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  background: transparent;
  font-size: 20px;
}

.customer-section {
  padding: 18px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.section-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.customer-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.customer-facts div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
}

.customer-facts dt {
  color: var(--dim);
  font-size: 10px;
}

.customer-facts dd {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.interest-tag {
  padding: 5px 7px;
  border: 1px solid #36525a;
  border-radius: 2px;
  color: var(--cyan);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.customer-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.activity-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 0 0 17px;
  color: var(--muted);
  font-size: 10px;
}

.activity-list li {
  padding-left: 3px;
}

.activity-list li::marker {
  color: var(--accent);
}

.activity-list time {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
}

/* Secondary views */
.view-toolbar {
  align-items: flex-end;
}

.date-chip {
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.pipeline {
  display: grid;
  min-height: 560px;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.pipeline-column {
  min-width: 190px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.pipeline-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.pipeline-column__head b {
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 9px;
  font-weight: 400;
}

.pipeline-column__body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 9px;
}

.pipeline-card {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--accent);
  background: var(--bg-raised);
  text-align: left;
}

.pipeline-card:hover {
  border-color: #4c5662;
}

.pipeline-card strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-card small,
.pipeline-card span {
  color: var(--dim);
  font-size: 10px;
}

.data-table-panel,
.role-panel,
.staff-panel,
.analysis-panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar .search-field {
  max-width: 360px;
}

.customer-table {
  display: grid;
}

.customer-table__row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(130px, 1fr) minmax(120px, 0.8fr) 100px;
  align-items: center;
  gap: 15px;
  min-height: 61px;
  padding: 9px 15px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  text-align: left;
}

button.customer-table__row {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
}

button.customer-table__row:hover {
  background: var(--panel-strong);
}

.customer-table__row > span:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.customer-table__row > span:first-child > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-table__row > span:not(:first-child) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-head {
  color: var(--dim) !important;
  font-family: "DM Mono", Consolas, monospace;
  font-size: 9px !important;
  font-weight: 400 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Client registry */
.registry-status,
.table-count {
  color: var(--dim);
  font-size: 9px;
  white-space: nowrap;
}

.registry-status[data-state="ready"] {
  color: var(--success);
}

.registry-status[data-state="fallback"],
.registry-status[data-state="unavailable"] {
  color: var(--yellow);
}

.registry-layout,
.campaign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.78fr);
  align-items: start;
  border: 1px solid var(--line);
  background: var(--panel);
}

.registry-table-panel,
.campaign-list-panel {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
}

.registry-detail-panel,
.campaign-detail-panel {
  position: sticky;
  top: 20px;
  min-width: 0;
  min-height: 540px;
  background: #0e1218;
}

.registry-empty {
  display: grid;
  min-height: 540px;
  place-content: center;
  gap: 12px;
  padding: 28px;
  color: var(--dim);
  text-align: center;
}

.registry-empty .nav-icon {
  justify-self: center;
  color: var(--accent-soft);
}

.registry-empty p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.registry-detail-content,
.campaign-detail-content {
  min-height: 100%;
}

.registry-detail-panel .customer-close {
  display: none;
}

.registry-detail-panel .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contact-state {
  padding: 3px 5px;
  border: 1px solid var(--line);
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
  font-weight: 400;
}

.contact-state[data-state="reachable"] {
  border-color: #356342;
  color: var(--success);
}

.contact-state[data-state="blocked"] {
  border-color: #70413b;
  color: var(--danger);
}

.customer-table__row.is-selected {
  border-left: 2px solid var(--accent);
  background: #211a1a;
}

.customer-table__row .contact-channel {
  display: grid;
  gap: 2px;
}

.customer-table__row .contact-channel small {
  overflow: hidden;
  color: var(--dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Campaigns */
.campaign-list {
  display: grid;
}

button.campaign-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 15px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
}

button.campaign-row:hover,
button.campaign-row.is-selected {
  border-left-color: var(--accent);
  background: var(--panel-strong);
}

.campaign-row__main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.campaign-row__main strong,
.campaign-row__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-row__main strong {
  font-size: 12px;
}

.campaign-row__main small {
  color: var(--dim);
  font-size: 10px;
}

.campaign-status {
  align-self: start;
  padding: 4px 6px;
  border: 1px solid var(--line);
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
  font-weight: 400;
  white-space: nowrap;
}

.campaign-status[data-status="draft"],
.campaign-status[data-status="ready"],
.campaign-status[data-status="paused"] {
  border-color: #675834;
  color: var(--yellow);
}

.campaign-status[data-status="running"],
.campaign-status[data-status="active"],
.campaign-status[data-status="sending"] {
  border-color: #315d68;
  color: var(--cyan);
}

.campaign-status[data-status="completed"],
.campaign-status[data-status="sent"] {
  border-color: #356342;
  color: var(--success);
}

.campaign-status[data-status="failed"],
.campaign-status[data-status="cancelled"] {
  border-color: #70413b;
  color: var(--danger);
}

.campaign-detail-head {
  display: grid;
  gap: 10px;
  padding: 20px 17px 16px;
  border-bottom: 1px solid var(--line);
}

.campaign-detail-head > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.campaign-detail-head p,
.campaign-detail-head h2 {
  margin: 0;
}

.campaign-detail-head p {
  margin-bottom: 5px;
  color: var(--accent-soft);
  font-size: 8px;
}

.campaign-detail-head h2 {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.campaign-action {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
}

.campaign-action:hover {
  border-color: #4d5965;
  color: var(--text);
}

.campaign-action--primary {
  border-color: #7a4231;
  background: #301d1b;
  color: var(--accent-soft);
}

.campaign-action--danger {
  color: var(--danger);
}

.campaign-section {
  padding: 17px;
  border-bottom: 1px solid var(--line-soft);
}

.campaign-section__title {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.campaign-message {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.campaign-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.campaign-count {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  background: #10151c;
}

.campaign-count small {
  overflow: hidden;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-count strong {
  color: var(--text);
  font-size: 15px;
}

.campaign-recipient-list {
  display: grid;
  max-height: 250px;
  overflow-y: auto;
  border-top: 1px solid var(--line-soft);
}

.campaign-recipient {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.campaign-recipient > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.campaign-recipient strong,
.campaign-recipient small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-recipient strong {
  font-size: 10px;
}

.campaign-recipient small {
  color: var(--dim);
  font-size: 9px;
}

.campaign-recipient > span:last-child {
  align-self: start;
  color: var(--dim);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.5fr);
  gap: 12px;
}

.role-panel,
.staff-panel {
  min-height: 460px;
  padding: 16px;
}

.role-panel > p {
  margin: 0 0 13px;
  color: var(--dim);
  font-size: 9px;
}

.role-list {
  display: grid;
  gap: 3px;
}

.role-choice {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.role-choice:hover,
.role-choice.is-active {
  border-color: var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

.role-choice.is-active {
  box-shadow: inset 2px 0 var(--accent);
}

.role-choice strong {
  font-size: 11px;
}

.role-choice small {
  color: var(--dim);
  font-size: 10px;
}

.staff-panel__head {
  min-height: 34px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.staff-panel__head .mono {
  color: var(--dim);
  font-size: 9px;
}

.staff-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(100px, 0.7fr) minmax(120px, 0.8fr) 80px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border-top: 1px solid var(--line-soft);
}

.staff-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.staff-person > span:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.staff-person strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-person small,
.staff-row > span {
  color: var(--dim);
  font-size: 10px;
}

.staff-role {
  color: var(--muted) !important;
}

.staff-load {
  display: grid;
  gap: 5px;
}

.staff-load__track {
  height: 3px;
  background: var(--line);
}

.staff-load__track i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analysis-panel {
  min-height: 230px;
  padding: 16px;
}

.analysis-panel--wide {
  grid-column: 1 / -1;
  min-height: 250px;
}

.analysis-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.analysis-panel__head strong {
  color: var(--text);
  font-size: 22px;
}

.chart-placeholder {
  position: relative;
  height: 140px;
  margin-top: 22px;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px);
  background-size: 100% 35px;
}

.chart-placeholder::after {
  position: absolute;
  right: 3%;
  bottom: 17%;
  left: 2%;
  height: 45%;
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  content: "";
  transform: skewY(-8deg);
  opacity: 0.85;
}

.load-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.load-row {
  display: grid;
  grid-template-columns: 150px minmax(100px, 1fr) 70px;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
}

.load-row__track {
  height: 5px;
  background: var(--line);
}

.load-row__track i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.load-row > b {
  color: var(--text);
  font-family: "DM Mono", Consolas, monospace;
  font-size: 10px;
  font-weight: 400;
  text-align: right;
}

/* Modals and feedback */
.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 9, 0.78);
}

.modal {
  width: min(100%, 470px);
  border: 1px solid var(--line);
  background: #12171e;
  box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.28);
}

.modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.modal h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.modal-form {
  padding: 20px;
}

.assignment-list {
  display: grid;
  gap: 5px;
  max-height: 390px;
  overflow-y: auto;
  padding: 12px;
}

.assignment-option {
  display: flex;
  min-height: 51px;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.assignment-option:hover,
.assignment-option.is-current {
  border-color: var(--line);
  background: var(--panel-strong);
}

.assignment-option > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.assignment-option strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-option small {
  color: var(--dim);
  font-size: 10px;
}

.assignment-option > b {
  color: var(--success);
  font-size: 16px;
  font-weight: 400;
}

.priority-choice {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.priority-choice button {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.priority-choice button:hover {
  border-color: var(--line);
  background: var(--panel-strong);
}

.priority-choice i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}

.priority-choice button[data-priority="urgent"] i {
  background: var(--danger);
}

.priority-choice button[data-priority="high"] i {
  background: var(--yellow);
}

.priority-choice button[data-priority="normal"] i {
  background: var(--cyan);
}

.priority-choice button[data-priority="low"] i {
  background: var(--dim);
}

.priority-choice span {
  display: grid;
  gap: 2px;
}

.priority-choice strong {
  font-size: 12px;
}

.priority-choice small {
  color: var(--dim);
  font-size: 10px;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: #161c24;
  box-shadow: 9px 9px 0 rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 11px;
  animation: toast-in 0.18s ease-out;
}

.toast--error {
  border-left-color: var(--danger);
}

.toast--success {
  border-left-color: var(--success);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1260px) {
  :root {
    --customer: 260px;
  }

  .workspace {
    padding-right: 22px;
    padding-left: 22px;
  }

  .inbox-layout {
    grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.5fr) var(--customer);
  }
}

@media (max-width: 1050px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inbox-layout {
    grid-template-columns: minmax(270px, 0.9fr) minmax(360px, 1.4fr);
  }

  .customer-panel {
    position: fixed;
    z-index: 25;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, calc(100vw - 40px));
    overflow-y: auto;
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(102%);
    transition: transform 0.2s ease;
  }

  .customer-panel.is-open {
    transform: translateX(0);
  }

  .customer-close {
    display: inline-grid;
  }

  .customer-empty {
    display: none;
  }

  .team-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .registry-layout,
  .campaign-layout {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.72fr);
  }

  .registry-detail-panel,
  .campaign-detail-panel {
    top: 12px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    z-index: 80;
    width: min(280px, calc(100vw - 54px));
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 18px 0 30px rgba(0, 0, 0, 0.28);
  }

  .mobile-bar {
    position: sticky;
    z-index: 70;
    top: 0;
    display: flex;
    height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid var(--line);
    background: #0b0e13;
  }

  .mobile-bar__menu {
    display: grid;
    width: 35px;
    min-width: 35px;
    height: 35px;
    align-content: center;
    gap: 5px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
  }

  .mobile-bar__menu span {
    display: block;
    height: 1px;
    background: var(--muted);
  }

  .mobile-bar__account {
    border: 0;
    cursor: pointer;
  }

  .workspace {
    width: 100%;
    margin-left: 0;
    padding: 24px 15px 35px;
  }

  .inbox-layout {
    grid-template-columns: minmax(275px, 0.9fr) minmax(340px, 1.3fr);
  }

  .team-layout {
    grid-template-columns: 1fr;
  }

  .role-panel {
    min-height: auto;
  }

  .role-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .staff-panel {
    overflow-x: auto;
  }

  .staff-panel > div:not(.staff-panel__head) {
    min-width: 540px;
  }

  .registry-layout,
  .campaign-layout {
    grid-template-columns: 1fr;
  }

  .registry-table-panel,
  .campaign-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .registry-detail-panel,
  .campaign-detail-panel {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .registry-empty {
    min-height: 240px;
  }

  .registry-detail-panel .customer-close {
    display: inline-grid;
  }
}

@media (max-width: 680px) {
  .workspace-head,
  .view-toolbar {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .workspace-head h1,
  .view-toolbar h2 {
    font-size: 25px;
  }

  .workspace-head__actions .utility-button {
    display: none;
  }

  .create-button {
    padding: 0 10px;
  }

  .metrics {
    gap: 7px;
    margin-bottom: 12px;
  }

  .metric {
    min-height: 73px;
    gap: 8px;
    padding: 10px;
  }

  .metric__icon {
    display: none;
  }

  .metric strong {
    font-size: 20px;
  }

  .metric em {
    display: none;
  }

  .inbox-layout {
    display: block;
    min-height: 0;
  }

  .queue-panel {
    border-right: 0;
  }

  .dialog-panel {
    position: fixed;
    z-index: 75;
    inset: 58px 0 0;
    display: none;
    min-height: 0;
    border: 0;
  }

  .dialog-panel.is-open {
    display: flex;
  }

  .dialog-back {
    display: inline-grid;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .customer-panel {
    top: 58px;
    bottom: 0;
  }

  .dialog-statusbar {
    flex-wrap: wrap;
    min-height: 57px;
  }

  .messages {
    min-height: 0;
  }

  .conversation-row {
    padding-right: 12px;
    padding-left: 12px;
  }

  .pipeline {
    grid-template-columns: repeat(4, 215px);
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analysis-panel--wide {
    grid-column: auto;
  }

  .role-list {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 28px 22px 24px;
  }

  .login-copy {
    margin-top: 58px;
  }

  .customer-table {
    overflow-x: auto;
  }

  .customer-table__row {
    min-width: 610px;
  }

  .campaign-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 410px) {
  .workspace {
    padding-right: 10px;
    padding-left: 10px;
  }

  .workspace-head__actions .create-button span:last-child {
    display: none;
  }

  .workspace-head__actions .create-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  .metric small {
    font-size: 8px;
  }

  .queue-toolbar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .queue-tabs button {
    padding-right: 9px;
    padding-left: 9px;
  }
}
