:root {
  --ink: #17211d;
  --muted: #65716b;
  --line: #dde5df;
  --paper: #f5f7f3;
  --panel: #ffffff;
  --gold: #c99a2e;
  --palm: #1f7452;
  --teal: #146f78;
  --rose: #a5403b;
  --nav: #0e261d;
  --shadow: 0 12px 28px rgba(23, 33, 29, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  background: var(--nav);
  color: #f6f2e8;
}

.login-screen.hidden {
  display: none;
}

.login-brand-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 42px;
}

.login-brand-panel img {
  width: min(560px, 100%);
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.login-brand-panel h1 {
  font-size: 44px;
}

.login-brand-panel p {
  color: rgba(246, 242, 232, 0.72);
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(440px, calc(100% - 32px));
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.login-card button {
  border: 0;
  border-radius: 8px;
  background: var(--palm);
  color: white;
  padding: 11px 14px;
  font-weight: 900;
}

.login-note {
  color: var(--muted);
  margin-bottom: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  transition: grid-template-columns 160ms ease;
}

.app-shell.locked,
.mobile-dock.locked {
  display: none;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.mobile-dock {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--nav);
  color: #f6f2e8;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #111;
  font-weight: 900;
}

.brand strong,
.brand span,
.account-card strong,
.account-card span,
.account-card small {
  display: block;
}

.brand span,
.account-card span,
.account-card small {
  color: rgba(246, 242, 232, 0.68);
  font-size: 12px;
}

.brand strong {
  font-size: 14px;
}

.sidebar-toggle {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f6f2e8;
  font-size: 20px;
  line-height: 1;
}

.nav-list {
  display: grid;
  gap: 1px;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  min-height: 32px;
  padding: 6px 9px;
  text-align: left;
  color: rgba(246, 242, 232, 0.78);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.nav-item span {
  color: rgba(246, 242, 232, 0.42);
  font-size: 11px;
  width: 20px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.account-card {
  margin-top: auto;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  min-height: 0;
}

.account-logo-cover {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  max-height: 92px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #061423;
  opacity: 0.98;
}

.app-shell.sidebar-collapsed .sidebar {
  padding: 12px 8px;
  align-items: center;
}

.app-shell.sidebar-collapsed .brand {
  width: 100%;
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand > div:not(.brand-mark),
.app-shell.sidebar-collapsed .account-card,
.app-shell.sidebar-collapsed .nav-item span {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 52px;
  left: 17px;
  margin: 0;
  transform: rotate(180deg);
}

.app-shell.sidebar-collapsed .nav-list {
  width: 100%;
  margin-top: 34px;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  min-height: 38px;
  padding: 7px 0;
  font-size: 0;
}

.app-shell.sidebar-collapsed .nav-item::after {
  content: attr(data-short);
  font-size: 11px;
  font-weight: 900;
}

.main {
  min-width: 0;
  padding: 22px;
  height: 100vh;
  overflow: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

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

h2 {
  margin-bottom: 0;
  font-size: 17px;
}

h3 {
  margin: 18px 0 9px;
  font-size: 13px;
}

.top-actions,
.table-actions,
.composer-actions,
.pipeline-toolbar,
.filter-tabs,
.conversation-control-row,
.merge-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-button,
.composer button[type="submit"],
.settings-form button,
.modal-card button[type="submit"] {
  border: 0;
  border-radius: 8px;
  background: var(--palm);
  color: white;
  padding: 10px 14px;
  font-weight: 800;
}

.ghost-button,
.icon-button,
.composer button[type="button"],
.conversation-control-row button,
.merge-field-row button,
.filter-tabs button,
.quick-actions button,
.workflow-list button,
.campaign-card button,
.text-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px 12px;
  color: var(--ink);
}

.text-button {
  border: 0;
  color: var(--teal);
  padding: 0;
  font-weight: 800;
  background: transparent;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(600px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: white;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(23, 33, 29, 0.14);
  transform: translateX(100%);
  transition: transform 160ms ease;
}

.filter-drawer.open {
  transform: translateX(0);
}

.filter-drawer-header,
.filter-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
}

.filter-drawer-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.filter-drawer-footer div {
  display: flex;
  gap: 10px;
}

.filter-drawer-body {
  padding: 26px;
  overflow: auto;
}

.filter-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.advanced-filter-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) minmax(160px, 1.2fr) auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.advanced-filter-row button,
.add-filter-btn {
  white-space: nowrap;
}

.filter-multi-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.filter-multi-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf7;
  font-size: 13px;
  font-weight: 750;
}

.filter-multi-options input {
  width: auto;
  margin: 0;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  background: white;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.connected {
  border-color: rgba(31, 116, 82, 0.24);
  color: var(--palm);
  background: #eef7f0;
}

.status-pill.offline {
  border-color: rgba(165, 64, 59, 0.22);
  color: var(--rose);
  background: #fff1ef;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric,
.panel,
.automation-card,
.modal-card,
.pipeline-column,
.conversation-list,
.conversation-panel,
.contact-panel,
.workflow-list,
.workflow-canvas,
.campaign-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric span,
.metric small,
.panel-header span,
.conversation-header span,
.deal-card span,
.appointment-card span,
.recording-row span,
.campaign-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin: 6px 0;
  font-size: 26px;
}

.dashboard-grid,
.settings-grid,
.launch-grid,
.calendar-layout,
.reviews-layout,
.lists-layout,
.mobile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.wide {
  grid-column: 1 / -1;
}

.panel {
  padding: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.calendar-main-panel,
.calendar-side-panel {
  min-height: calc(100vh - 170px);
}

.calendar-header {
  align-items: flex-start;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-controls select {
  width: auto;
  min-width: 150px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}

.calendar-day {
  min-height: 112px;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 7px;
  border: 0;
  border-radius: 0;
  padding: 10px;
  background: white;
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.calendar-day.empty {
  background: #f7f9f6;
}

.calendar-day.selected {
  box-shadow: inset 0 0 0 2px var(--palm);
  background: #f4faf6;
}

.calendar-day.today strong {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--palm);
  color: white;
}

.calendar-day span,
.calendar-day i,
.calendar-day em {
  font-size: 11px;
  color: var(--muted);
  font-style: normal;
}

.calendar-day-items {
  width: 100%;
  display: grid;
  gap: 4px;
}

.calendar-day-items i,
.calendar-day-items em {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.calendar-day-items i {
  padding: 3px 7px;
  border-radius: 6px;
  background: #f5f7f4;
  color: #526159;
  font-weight: 750;
}

.calendar-day-items i.reminder {
  background: #eef5ef;
  color: #245844;
  font-weight: 800;
}

.calendar-day-items em {
  padding-left: 3px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-calendar-grid .calendar-day {
  min-height: 92px;
  padding: 8px;
}

.dashboard-calendar-grid .calendar-day-items i {
  padding: 2px 5px;
  font-size: 10px;
}

.compact-calendar-weekdays {
  font-size: 11px;
}

.calendar-note-form {
  margin-top: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
}

.calendar-note,
.empty-state,
.appointment-card small,
.appointment-card p {
  color: var(--muted);
  font-size: 12px;
}

.calendar-note {
  margin-top: 12px;
}

.appointment-card p {
  margin: 0;
}

.mini-inbox,
.task-list,
.recording-list,
.webhook-list,
.appointment-list,
.review-list,
.check-list,
.quick-actions,
.tag-list,
.stage-strip,
.team-list {
  display: grid;
  gap: 9px;
}

.inbox-row,
.task-row,
.recording-row,
.appointment-card,
.review-row,
.workflow-step,
.report-card,
.template-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.team-form {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: end;
  margin-bottom: 12px;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.team-row span {
  color: var(--muted);
  font-size: 13px;
}

.team-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  color: var(--ink);
}

.team-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.inbox-row strong,
.inbox-row span,
.task-row,
.stage-card strong,
.conversation-row strong,
.conversation-row span,
.campaign-card strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stage-strip {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.stage-card {
  padding: 12px;
  border-radius: 8px;
  background: #f2f7f3;
  border: 1px solid var(--line);
}

.communications-layout {
  height: calc(100vh - 124px);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.35fr) minmax(280px, 0.75fr);
  gap: 12px;
  overflow: auto hidden;
  padding-bottom: 2px;
}

.conversation-list {
  padding: 10px;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
}

#conversationList {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.search-row {
  margin-bottom: 8px;
}

.filter-tabs,
.tag-filter {
  margin-bottom: 10px;
}

.inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.inbox-head h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.inbox-count {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 20px;
  border-radius: 7px;
  background: #2563eb;
  color: white;
  font-size: 11px;
  font-weight: 850;
}

.inbox-tools {
  display: flex;
  gap: 4px;
}

.inbox-tools .icon-button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #536174;
  font-size: 18px;
}

.inbox-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.inbox-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #4b5668;
  padding: 8px 4px 10px;
  font-size: 13px;
  font-weight: 750;
}

.inbox-tabs button span {
  display: block;
  margin-bottom: 3px;
  color: #69768a;
  font-size: 18px;
}

.inbox-tabs button.active {
  border-color: #2563eb;
  color: #111827;
}

.filter-tabs button.active {
  color: white;
  background: var(--palm);
  border-color: var(--palm);
}

.conversation-row {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 11px 8px;
  text-align: left;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.conversation-row strong,
.conversation-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.filter-tabs {
  flex-wrap: wrap;
}

.conversation-row.active,
.conversation-row:hover {
  border-color: #2563eb;
  border-radius: 4px;
  background: #f6f9ff;
}

.conversation-row small {
  color: var(--muted);
}

.conversation-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.conversation-copy strong {
  display: block;
  color: #475569;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy span {
  display: block;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px 18px;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: end;
  gap: 3px 5px;
  min-width: 112px;
}

.conversation-meta small {
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta small:first-child {
  grid-column: 1;
  grid-row: 1;
}

.conversation-meta small:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.star-button {
  display: inline-grid;
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 18px;
  height: 24px;
  place-items: center;
  color: #94a3b8;
  font-size: 17px;
  line-height: 1;
}

.star-button.active {
  color: #d69d16;
}

.badge {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 22px;
  min-width: 22px;
  height: 20px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: #2563eb;
  font-size: 11px;
}

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

.contact-workspace {
  min-height: calc(100vh - 124px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.contact-workspace-grid {
  height: calc(100vh - 218px);
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(420px, 1fr) minmax(300px, 0.5fr);
  gap: 0;
}

.contact-info-panel,
.contact-notes-panel {
  min-height: 0;
  overflow: auto;
}

.contact-thread-panel {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.contact-workspace .text-button {
  margin: 0 0 8px;
  padding: 0;
}

.conversation-header,
.contact-panel {
  padding: 12px;
}

.conversation-header {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.conversation-control-row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conversation-control-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.conversation-control-row select {
  min-width: 160px;
}

.message-stream {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message {
  max-width: 74%;
  padding: 9px 11px;
  border-radius: 8px;
  background: #edf3ee;
}

.message.outbound {
  align-self: flex-end;
  background: #e8f1f6;
}

.message.note {
  align-self: center;
  background: #fff7df;
}

.message.call-event {
  align-self: center;
  width: min(520px, 100%);
  max-width: 100%;
  background: #f6f7f4;
  border: 1px solid var(--line);
}

.message audio {
  width: 100%;
  margin-top: 8px;
}

.recording-player {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.playback-speeds {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.playback-speeds button {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.playback-speeds button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.message small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.composer {
  padding: 10px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.composer textarea {
  min-height: 46px;
  height: 72px;
  max-height: 72px;
  resize: none;
  overflow: auto;
}

.sticky-note-list {
  display: grid;
  gap: 10px;
  max-height: calc(100% - 166px);
  overflow: auto;
  padding-right: 4px;
}

.sticky-note {
  padding: 11px;
  border: 1px solid #eadba9;
  border-radius: 8px;
  background: #fff8d8;
}

.sticky-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #746028;
}

.sticky-note p {
  margin: 0;
  white-space: pre-wrap;
}

.sticky-note-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sticky-note-form textarea {
  min-height: 92px;
  resize: none;
  overflow: auto;
}

#propertyNotes {
  min-height: 116px;
  max-height: 150px;
  resize: none;
  overflow: auto;
}

.sticky-note-form button {
  border: 0;
  border-radius: 8px;
  background: var(--palm);
  color: white;
  padding: 10px 14px;
  font-weight: 800;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
}

.contact-panel {
  min-height: 0;
  overflow: auto;
}

.contact-panel h3 {
  margin: 12px 0 7px;
  font-size: 13px;
}

.contact-panel .panel-header {
  align-items: flex-start;
  margin-bottom: 10px;
}

#contactDetails {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 7px 10px;
}

#contactDetails dt {
  font-size: 13px;
}

#contactDetails dd {
  font-size: 17px;
  line-height: 1.25;
}

.system-field {
  display: none;
}

dl {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 12px;
  margin: 0 0 10px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.secondary-details {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.secondary-details dd {
  font-weight: 650;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef5ef;
  color: #245844;
  font-size: 12px;
  font-weight: 800;
}

.tag-list.compact {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}

.removable-tag {
  cursor: pointer;
}

.removable-tag:hover {
  background: #ffece8;
  color: var(--rose);
}

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

.tag-picker-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px 12px;
  color: var(--ink);
  font-weight: 800;
}

.tag-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.tag-create-form button,
.lead-edit-form button,
.pipeline-edit-panel button {
  border: 0;
  border-radius: 8px;
  background: var(--palm);
  color: white;
  padding: 9px 12px;
  font-weight: 800;
}

.lead-edit-form,
.pipeline-edit-panel {
  display: grid;
  gap: 8px;
}

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

.lead-action-row button {
  min-height: 44px;
}

.lead-action-row #markLostBtn {
  background: #fff5f2;
  color: var(--rose);
  border: 1px solid rgba(165, 64, 59, 0.24);
}

.pipeline-edit-panel {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.pipeline-edit-panel form {
  display: grid;
  gap: 8px;
}

.stage-editor-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.stage-editor-row.dragging {
  opacity: 0.55;
}

.stage-editor-row.drag-over {
  outline: 2px solid rgba(31, 122, 85, 0.32);
  outline-offset: 2px;
  border-radius: 8px;
}

.stage-drag-handle {
  min-height: 42px;
  padding: 0;
  background: #f4f7f3;
  color: var(--muted);
  border-color: var(--line);
  cursor: grab;
  font-weight: 900;
  letter-spacing: 1px;
}

.stage-drag-handle:active {
  cursor: grabbing;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f8faf7;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #244c88;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.contacts-header {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.contacts-title-row {
  display: grid;
  gap: 10px;
}

.contacts-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.contacts-left-actions,
.contacts-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.contacts-right-actions {
  margin-left: auto;
}

.contacts-right-actions #contactSearch {
  width: min(320px, 34vw);
}

.compact-action {
  min-height: 36px;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 750;
  line-height: 1;
}

.sort-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 750;
}

.sort-chip select {
  width: auto;
  min-width: 0;
  border: 0;
  padding: 6px 22px 6px 0;
  background-color: transparent;
  font-weight: 750;
}

.contact-list-tabs {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.contact-list-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 7px 9px 8px;
  font-weight: 750;
  white-space: nowrap;
}

.contact-list-tabs button.active {
  border-color: #2364d2;
  color: var(--ink);
}

.contact-list-tabs span {
  margin-left: 5px;
  color: #789;
}

.contact-list-tabs b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: #eef1ee;
  color: #7b3330;
  font-style: normal;
  font-size: 11px;
}

.contact-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-name-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.contact-name-link:hover strong {
  color: var(--palm);
  text-decoration: underline;
}

.avatar-chip {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e8ecff;
  color: #3e4b86;
  font-size: 12px;
  font-weight: 850;
}

.table-tags {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-bar div,
.pagination-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-bar select {
  min-height: 38px;
  padding: 8px 30px 8px 10px;
}

#contactsTable tr {
  cursor: pointer;
}

#contactsTable tr:hover {
  background: #f3f8f4;
}

.pipeline-toolbar {
  margin-bottom: 12px;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-toolbar .count-pill {
  min-height: 38px;
  margin-left: 0;
}

.opportunity-toolbar {
  align-items: center;
}

.opportunity-left-actions,
.opportunity-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.opportunity-right-actions {
  margin-left: auto;
}

.opportunity-right-actions #dealSearch {
  width: min(320px, 34vw);
}

.opportunity-toolbar .sort-chip select {
  max-width: 230px;
}

.kebab-menu {
  position: relative;
}

.menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.menu-popover button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  text-align: left;
  background: white;
  font-weight: 800;
  color: var(--ink);
}

.menu-popover button:hover {
  background: #f3f8f4;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-column {
  min-height: 520px;
  padding: 12px;
  transition: border-color 120ms ease, background 120ms ease;
}

.pipeline-column.drag-over {
  border-color: rgba(31, 116, 82, 0.55);
  background: #eef7f0;
}

.deal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  background: #fbfcfa;
  cursor: pointer;
  user-select: none;
}

.deal-name-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-weight: 850;
  cursor: pointer;
}

.deal-name-link:hover {
  color: var(--palm);
  text-decoration: underline;
}

.deal-card:hover {
  border-color: rgba(31, 116, 82, 0.35);
  background: #f3f8f4;
}

.deal-card.dragging {
  opacity: 0.55;
  border-color: var(--palm);
}

.deal-card strong,
.deal-card span {
  display: block;
}

.workflow-builder {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 12px;
}

.workflow-list,
.workflow-canvas {
  padding: 14px;
}

.workflow-list button {
  width: 100%;
  margin-bottom: 8px;
  text-align: left;
}

.workflow-list button.active {
  background: var(--palm);
  border-color: var(--palm);
  color: white;
}

.workflow-step {
  margin-bottom: 10px;
}

.ai-map-layout {
  display: block;
}

.ai-branch-modal-card,
.ai-branch-card,
.ai-center-node {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.ai-branch-modal-card {
  width: min(520px, calc(100% - 28px));
}

.ai-branch-modal-card,
.ai-branch-modal-grid {
  display: grid;
  gap: 10px;
}

.ai-branch-modal-grid {
  grid-template-columns: 1fr 1fr;
}

.ai-branch-modal-card textarea {
  resize: none;
  overflow: auto;
}

.ai-branch-modal-card button {
  border: 0;
  border-radius: 8px;
  background: var(--palm);
  color: white;
  padding: 10px 12px;
  font-weight: 800;
}

#cancelAiBranchModal {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.ai-spiderweb {
  display: grid;
  gap: 18px;
  overflow: auto;
  padding-bottom: 8px;
}

.ai-center-node {
  position: relative;
  width: min(260px, 100%);
  justify-self: center;
  padding: 14px;
  text-align: center;
  background: #f2f7f3;
}

.ai-center-node span,
.ai-branch-card small,
.ai-branch-card span {
  color: var(--muted);
  font-size: 12px;
}

.ai-branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
  gap: 16px;
  position: relative;
}

.ai-branch-grid::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  width: 1px;
  height: 18px;
  background: var(--line);
}

.ai-tree-level {
  position: relative;
  display: grid;
  gap: 12px;
}

.ai-branch-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 12px;
  margin-left: calc(var(--branch-depth, 0) * 18px);
}

.ai-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
}

.ai-branch-card::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 1px;
  height: 13px;
  background: var(--line);
}

.ai-child-branches {
  position: relative;
  display: grid;
  gap: 12px;
  margin-left: 22px;
  padding-left: 18px;
}

.ai-child-branches::before {
  content: "";
  position: absolute;
  top: -12px;
  bottom: 12px;
  left: 0;
  width: 1px;
  background: var(--line);
}

.ai-child-branches .ai-tree-level::before {
  content: "";
  position: absolute;
  top: 24px;
  left: -18px;
  width: 18px;
  height: 1px;
  background: var(--line);
}

.ai-branch-card .icon-button,
.ai-add-root {
  padding: 3px 7px;
}

.ai-add-root {
  position: absolute;
  right: 8px;
  top: 8px;
  min-width: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--palm);
  font-weight: 900;
}

.ai-branch-card p {
  margin: 0;
}

.campaign-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 12px;
}

.campaign-card {
  padding: 16px;
}

.campaign-card p,
.review-row p {
  color: var(--muted);
}

.settings-form {
  display: grid;
  gap: 12px;
}

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

.mapping-grid label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.template-composer {
  display: grid;
  gap: 10px;
}

.inline-setting {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.mobile-preview {
  display: grid;
  place-items: center;
  min-height: 390px;
  background: linear-gradient(180deg, #eef5ef, #f9fbf7);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.phone-frame {
  width: min(260px, 100%);
  min-height: 340px;
  border: 10px solid #18231f;
  border-radius: 28px;
  background: #0e261d;
  color: #f6f2e8;
  padding: 22px 18px;
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: center;
  box-shadow: var(--shadow);
}

.phone-frame strong {
  font-size: 24px;
}

.phone-frame span {
  color: #ffffff;
  font-weight: 800;
}

.phone-frame small,
.phone-status {
  color: rgba(246, 242, 232, 0.7);
}

.phone-status {
  position: relative;
  top: -36px;
  font-size: 12px;
}

.phone-logo {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 18px;
  justify-self: center;
  border: 1px solid rgba(246, 242, 232, 0.2);
  margin: -14px 0 6px;
}

.phone-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.phone-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px;
  color: white;
  background: var(--palm);
  font-weight: 800;
}

.phone-actions button:last-child {
  background: var(--teal);
}

.mobile-call-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  margin-bottom: 12px;
}

.install-banner img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.install-banner strong,
.install-banner span {
  display: block;
}

.install-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.call-mode-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.call-mode-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.settings-form label,
.modal-card label,
.check-list label,
.compliance-grid label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.check-list label,
.compliance-grid label {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.webhook-list code {
  display: block;
  padding: 12px;
  border-radius: 8px;
  background: var(--nav);
  color: #f6f2e8;
  overflow-wrap: anywhere;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 38, 29, 0.52);
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(500px, 100%);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.call-widget {
  position: fixed;
  left: 24px;
  bottom: 18px;
  z-index: 50;
  width: min(390px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.call-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  cursor: move;
  user-select: none;
}

.call-widget-header strong,
.call-widget-header span {
  display: block;
}

.call-widget-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.call-widget-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.call-widget-controls .icon-button {
  width: 30px;
  height: 30px;
  border-color: var(--line);
  background: white;
  color: var(--muted);
}

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

.call-action-grid button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px 10px;
  color: var(--ink);
  font-weight: 800;
}

.call-action-grid #endCallBtn {
  grid-column: 1 / -1;
  color: var(--rose);
  background: #fff5f2;
  border-color: rgba(165, 64, 59, 0.24);
}

.pipeline-editor-card {
  width: min(760px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
}

.pipeline-lead-card {
  width: min(900px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  box-sizing: border-box;
}

.pipeline-lead-card #pipelineLeadDetails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.pipeline-lead-card #pipelineLeadDetails > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  align-content: start;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.pipeline-lead-card #pipelineLeadDetails > div.wide {
  grid-column: 1 / -1;
}

.pipeline-lead-card #pipelineLeadDetails dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.pipeline-lead-card #pipelineLeadDetails dd {
  margin: 0;
  font-weight: 760;
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.pipeline-lead-card label {
  display: grid;
  gap: 6px;
}

.pipeline-lead-card .panel-header,
.pipeline-lead-card #pipelineLeadDetails,
.pipeline-lead-card .pipeline-notes-field,
.pipeline-lead-card .lead-action-row {
  grid-column: 1 / -1;
}

.pipeline-lead-card .pipeline-notes-field textarea {
  width: 100%;
  min-height: 104px;
  max-height: 160px;
  box-sizing: border-box;
  resize: none;
  overflow: auto;
}

.pipeline-editor-card form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

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

  .sidebar-toggle {
    display: none;
  }

  .dashboard-grid,
  .settings-grid,
  .launch-grid,
  .calendar-layout,
  .reviews-layout,
  .lists-layout,
  .mobile-layout,
  .workflow-builder,
  .campaign-grid,
  .report-grid,
  .team-form {
    grid-template-columns: 1fr;
  }

  .communications-layout {
    grid-template-columns: minmax(300px, 0.9fr) minmax(380px, 1.25fr) minmax(260px, 0.75fr);
    height: calc(100vh - 198px);
  }

  .contact-panel,
  .conversation-list {
    padding: 10px;
  }

  .metric-grid,
  .stage-strip,
  .compliance-grid,
  .mapping-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 701px) and (max-width: 1180px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  .brand strong,
  .brand span,
  .account-card,
  .nav-item span {
    display: none;
  }

  .brand {
    justify-content: center;
  }

  .nav-list {
    grid-template-columns: 1fr;
    margin-top: 8px;
  }

  .nav-item {
    justify-content: center;
    min-height: 38px;
    padding: 7px 0;
    font-size: 0;
  }

  .nav-item::after {
    content: attr(data-short);
    font-size: 11px;
    font-weight: 900;
  }

  .communications-layout {
    grid-template-columns: minmax(300px, 0.9fr) minmax(380px, 1.25fr) minmax(260px, 0.75fr);
    height: calc(100vh - 124px);
  }

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

@media (max-width: 700px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    padding: 24px 18px 0;
  }

  .login-brand-panel img {
    width: min(360px, 100%);
  }

  .login-brand-panel h1 {
    font-size: 32px;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .conversation-header,
  .composer,
  .conversation-control-row,
  .top-actions,
  .table-actions,
  .contacts-action-row,
  .contacts-left-actions,
  .contacts-right-actions,
  .opportunity-toolbar,
  .opportunity-left-actions,
  .opportunity-right-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contacts-right-actions,
  .opportunity-right-actions {
    margin-left: 0;
  }

  .contacts-right-actions #contactSearch,
  .opportunity-right-actions #dealSearch,
  .opportunity-toolbar .sort-chip select {
    width: 100%;
    max-width: none;
  }

  .nav-list,
  .metric-grid,
  .stage-strip,
  .calendar-layout,
  .mobile-call-grid,
  .compliance-grid,
  .mapping-grid {
    grid-template-columns: 1fr;
  }

  .calendar-controls {
    justify-content: flex-start;
  }

  .calendar-day {
    min-height: 88px;
    padding: 7px;
  }

  .calendar-day-items i {
    padding: 2px 4px;
    font-size: 9px;
  }

  .message {
    max-width: 92%;
  }

  .conversation-header-actions {
    justify-content: stretch;
  }

  .conversation-header-actions button,
  .conversation-header-actions .status-pill {
    width: 100%;
  }

  body {
    padding-bottom: 76px;
  }

  .sidebar {
    padding-bottom: 12px;
  }

  .mobile-dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(14, 38, 29, 0.96);
    box-shadow: 0 16px 34px rgba(14, 38, 29, 0.28);
  }

  .dock-item {
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(246, 242, 232, 0.74);
    font-size: 12px;
    font-weight: 800;
  }

  .dock-item.active {
    color: #111;
    background: var(--gold);
  }

  .communications-layout {
    height: auto;
    min-height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .conversation-list,
  .conversation-panel,
  .contact-panel {
    max-height: none;
  }

  .conversation-panel {
    min-height: calc(100vh - 190px);
    max-height: calc(100vh - 96px);
  }

  .contact-workspace {
    min-height: auto;
  }

  .contact-workspace-grid {
    height: auto;
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .contact-thread-panel {
    min-height: calc(100vh - 220px);
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .contact-info-panel {
    border-bottom: 1px solid var(--line);
  }

  .message-stream {
    min-height: 0;
  }

  .ai-map-layout,
  .ai-branch-grid {
    grid-template-columns: 1fr;
  }

  .filter-drawer-header,
  .filter-drawer-footer,
  .filter-drawer-body {
    padding: 16px;
  }

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

  .phone-frame {
    width: min(230px, 100%);
    min-height: 316px;
  }

  th,
  td {
    white-space: normal;
    min-width: 130px;
  }
}
