:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8dee6;
  --panel: #ffffff;
  --soft: #f4f7f9;
  --accent: #116c5f;
  --accent-dark: #0b5047;
  --danger: #b42318;
  --nav-width: 230px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-panel h1 {
  margin: 0 0 20px;
  font-size: 24px;
}

.login-panel form {
  display: grid;
  gap: 10px;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.inline-field button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d4ed8 0%, #22aaf2 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
}

.inline-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inline-two > div {
  display: grid;
  gap: 6px;
}

.login-panel label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-panel input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.login-panel button {
  min-height: 42px;
  margin-top: 8px;
}

#loginStatus {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
}

.auth-switch {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

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

button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d4ed8 0%, #22aaf2 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-link {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #1d4ed8 0%, #22aaf2 100%);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
  font-weight: 700;
  text-decoration: none;
}

.danger-button {
  background: var(--danger);
}

.warning-button {
  background: #ea7a1e;
}

.secondary-button {
  color: var(--ink);
  background: #e7edf2;
  box-shadow: none;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 28px 10px 28px;
  background: linear-gradient(to right, #fbfcfd 0, #fbfcfd var(--nav-width), #fff var(--nav-width), #fff 100%);
  border-bottom: 1px solid var(--line);
}

.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--nav-width);
  width: 1px;
  background: var(--line);
}

.topbar-brand {
  width: var(--nav-width);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding-left: 8px;
  padding-top: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}

.topbar h1,
.topbar p,
.detail-heading h2,
.detail-heading p {
  margin: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 13px;
  line-height: 1.05;
  text-align: left;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.brand-wordmark {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #0f766e 0%, #155eef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-rainbow {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9 0%, #22c55e 35%, #f59e0b 70%, #ef4444 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  vertical-align: middle;
}

.topbar p {
  margin-top: 4px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.refresh-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 112px;
}

.header-user-name {
  min-height: 14px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.demo-readonly-pill {
  display: inline-grid;
  min-height: 34px;
  padding: 0 12px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #f5c26b;
  color: #8a4b00;
  background: #fff5dd;
  font-weight: 700;
  box-shadow: none;
}

#refreshBtn,
.top-actions .button-link {
  border-radius: 999px;
  background: linear-gradient(90deg, #1d4ed8 0%, #22aaf2 100%);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
}

.topbar button,
.composer button {
  min-height: 40px;
  padding: 0 16px;
}

.layout {
  display: grid;
  grid-template-columns: var(--nav-width) 340px 1fr;
  min-height: calc(100vh - 86px);
}

.layout.billing-mode {
  grid-template-columns: var(--nav-width) 1fr;
}

.layout.billing-mode #leadDetail,
.layout.billing-mode #emptyState,
.layout.billing-mode .conversation,
.layout.billing-mode #mainSettingsPanel {
  display: none !important;
}

.app-nav {
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  padding: 18px 12px;
}

.app-nav-brand {
  margin: 2px 8px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.app-nav-btn {
  width: 100%;
  min-height: 64px;
  margin-bottom: 10px;
  padding: 0 16px;
  border: 1px solid #d9e1ea;
  border-radius: 18px;
  color: #6b7280;
  background: #fff;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
}

.app-nav-btn.active {
  color: #fff;
  border-color: #1f7ae0;
  background: linear-gradient(90deg, #1d4ed8 0%, #22aaf2 100%);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.25);
}

.nav-badge {
  margin-left: auto;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
  color: #1e3a8a;
  border: 1px solid rgba(30, 58, 138, 0.15);
}

.app-nav-btn.active .nav-badge {
  background: rgba(255, 255, 255, 0.95);
}

.lead-panel,
.detail-panel {
  background: var(--panel);
}

.lead-panel {
  border-right: 1px solid var(--line);
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
}

#leadCount {
  color: var(--muted);
  font-weight: 700;
}

#searchInput {
  width: 100%;
  margin: 14px 0 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

#newLeadToggleBtn {
  width: 100%;
  margin-top: 12px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  background: linear-gradient(90deg, #1d4ed8 0%, #22aaf2 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
}

#bulkImportToggleBtn {
  width: 100%;
  margin-top: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
  background: #e7edf2;
  box-shadow: none;
}

.new-lead-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.new-lead-form input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

#createLeadBtn {
  min-height: 38px;
}

#newLeadStatus {
  margin: 0;
  font-size: 12px;
}

.bulk-preview {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

.bulk-preview table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.bulk-preview th,
.bulk-preview td {
  padding: 6px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.status-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.filter-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 29px;
  padding: 6px 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
}

.filter-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip strong {
  display: inline-grid;
  min-width: 18px;
  min-height: 18px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: var(--soft);
  font-size: 10px;
}

.filter-chip.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.filter-chip.active strong {
  color: var(--accent-dark);
  background: #fff;
}

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

.status-filters.hidden-by-mode {
  display: none;
}

.lead-group {
  display: grid;
  gap: 8px;
}

.lead-group-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.lead-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px;
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
}

.group-delete-btn {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #ea7a1e;
  color: #fff;
}

.lead-group-title strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.lead-group-title .count {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.lead-group-title .caret {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.lead-group-items {
  display: grid;
  gap: 8px;
}

.lead-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 11px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.lead-row strong {
  font-size: 12px;
}

.lead-row span {
  font-size: 11px;
}

.lead-row small {
  font-size: 10px;
}

.lead-row.active {
  border-color: #60a5fa;
  background: #eaf2ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.lead-row span,
.lead-row small,
.muted {
  color: var(--muted);
}

.detail-panel {
  padding: 24px;
}

.settings-panel {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

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

.setting-card {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.setting-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.setting-card strong {
  display: block;
  margin-top: 7px;
}

.extension-card {
  min-height: 110px;
}

.extension-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.extension-card .button-link {
  display: inline-block;
  padding: 6px 10px;
}

.numbers-status-shell {
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.numbers-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.numbers-status-top h3 {
  margin: 0;
  font-size: 20px;
}

.numbers-status-cards {
  display: grid;
  gap: 10px;
}

.numbers-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.numbers-status-main {
  min-width: 0;
}

.numbers-status-card h4 {
  margin: 0;
  font-size: 16px;
}

.numbers-status-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.numbers-step-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.numbers-step-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.numbers-status-card.step-active {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.numbers-status-pill {
  display: inline-grid;
  min-height: 34px;
  padding: 0 12px;
  place-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
}

.numbers-status-pill.neutral {
  color: #5f6b83;
  background: #e2e8f0;
}

.numbers-status-pill.progress {
  color: #1d4ed8;
  background: #dbeafe;
}

.numbers-status-pill.active {
  color: #0b5047;
  background: #dff4ee;
}

.numbers-form-heading {
  margin: 16px 0 6px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.numbers-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.numbers-form-grid input,
.numbers-form-grid select,
.numbers-form-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  text-transform: none;
}

.numbers-form-grid textarea {
  min-height: 74px;
  resize: vertical;
}

.numbers-form-grid .full-row {
  grid-column: 1 / -1;
}

.numbers-a2p-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.numbers-a2p-actions button {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
  width: 100%;
}

.test-sms {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.test-sms input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.test-sms button {
  min-height: 42px;
  padding: 0 14px;
}

#testSmsStatus {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.queue-panel {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.hidden {
  display: none;
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.status-pill {
  display: inline-grid;
  min-height: 34px;
  padding: 6px 12px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #dff4ee;
  font-size: 13px;
  font-weight: 800;
}

.status-pill.danger {
  color: var(--danger);
  background: #fee4e2;
}

#doNotTextBtn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--danger);
  color: #fff;
  box-shadow: none;
}

#deleteLeadBtn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: #ea7a1e;
  color: #fff;
  box-shadow: none;
}

#editLeadMainBtn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: #e7edf2;
  color: var(--ink);
  box-shadow: none;
}

#saveLeadInlineBtn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.field {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.field input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.edit-lead,
.workflow,
.campaign-box,
.conversation {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.edit-lead {
  margin-bottom: 22px;
}

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

.edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.edit-grid input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  text-transform: none;
}

#saveLeadStatus {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
}

.workflow {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.workflow label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.composer h3,
.messages h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.onboarding-checklist {
  margin: 14px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.onboarding-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.onboarding-head h3 {
  margin: 0;
  font-size: 16px;
}

.onboarding-progress {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.onboarding-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.onboarding-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.onboarding-mark {
  width: 18px;
  text-align: center;
  font-weight: 900;
  color: #9aa5b6;
}

.onboarding-item.done {
  color: var(--ink);
  font-weight: 700;
}

.onboarding-item.done .onboarding-mark {
  color: #168062;
}

select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

textarea {
  resize: vertical;
}

#templateSelect {
  margin-bottom: 10px;
}

.campaign-box {
  margin-bottom: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-heading h3,
.section-heading p {
  margin: 0;
}

.section-heading h3 {
  font-size: 17px;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
}

.campaign-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
}

.campaign-actions button {
  min-height: 42px;
  padding: 0 14px;
}

.campaign-steps {
  display: grid;
  gap: 10px;
}

.campaign-step {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.campaign-step div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.campaign-step span,
.campaign-step small {
  color: var(--muted);
}

.campaign-step p {
  margin: 0;
}

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.queue-item.due {
  border-left: 4px solid var(--accent);
}

.queue-item-heading,
.queue-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queue-item-heading div {
  display: grid;
  gap: 3px;
}

.queue-item-heading span,
.queue-item-heading small {
  color: var(--muted);
}

.queue-item p {
  margin: 0;
}

.queue-actions {
  justify-content: flex-start;
}

.queue-actions button {
  min-height: 36px;
  padding: 0 12px;
}

.duplicates-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.duplicate-list {
  display: grid;
  gap: 10px;
}

.duplicate-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f9fbfc;
}

.duplicate-item p {
  margin: 0 0 8px;
}

.duplicate-item .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
}

.duplicate-item small {
  color: var(--muted);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

#sendStatus {
  margin: 0;
  color: var(--muted);
}

.conversation-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f9fc;
  max-width: 760px;
  margin: 0;
}

.messages {
  padding: 4px;
  border: 0;
}

#messageList {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  width: 100%;
  margin: 0;
}

.message {
  max-width: 68%;
  padding: 9px 11px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.message.outbound {
  justify-self: end;
  color: #fff;
  background: linear-gradient(90deg, #1d4ed8 0%, #22aaf2 100%);
  border-color: #1d4ed8;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.2);
}

.message.inbound {
  justify-self: start;
  background: #e8edf4;
  border-color: #d7deea;
}

.message span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.message p {
  margin: 6px 0;
}

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

.message.outbound span,
.message.outbound small {
  color: rgba(255, 255, 255, 0.88);
}

.composer {
  padding: 7px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
}

.template-manager {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.template-manager input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.template-actions {
  display: flex;
  gap: 8px;
}

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 10px;
  color: #fff;
  background: #14532d;
  border: 1px solid #0f3f23;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.toast span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.toast.clickable {
  cursor: pointer;
}

.toast.clickable:hover {
  filter: brightness(1.06);
}

@media (max-width: 850px) {
  .topbar,
  .detail-heading,
  .detail-actions,
  .section-heading,
  .queue-item-heading,
  .queue-actions,
  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .refresh-wrap {
    align-items: stretch;
    min-width: 0;
  }

  .header-user-name {
    text-align: left;
  }

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

  .topbar {
    background: #fff;
  }

  .topbar::after {
    display: none;
  }

  .app-nav {
    padding: 18px 12px;
  }

  .lead-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

  .settings-grid,
  .test-sms {
    grid-template-columns: 1fr;
  }

  .numbers-form-grid {
    grid-template-columns: 1fr;
  }

  .numbers-form-grid .full-row {
    grid-column: auto;
  }

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

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

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

  .campaign-step div {
    flex-direction: column;
  }
}


@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .app-nav {
    display: flex;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
  }

  .app-nav-brand {
    display: none;
  }

  .app-nav-btn {
    margin: 0;
  }

  .lead-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.nav-icon {
  width: 24px;
  display: inline-grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.app-nav-btn .nav-label {
  font-size: 14px;
  line-height: 1;
}


.admin-checklist {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.admin-checklist li {
  margin: 8px 0;
  line-height: 1.45;
}
