:root {
  --ink: #152434;
  --muted: #627381;
  --line: #d8e0e6;
  --panel: #ffffff;
  --page: #f3f6f8;
  --navy: #151f5f;
  --navy-2: #1f2f87;
  --gold: #d7a33e;
  --gold-dark: #a96910;
  --blue: #151f8a;
  --blue-dark: #121a68;
  --pride-red: #c8132f;
  --green: #237a57;
  --red: #b4443f;
  --shadow: 0 18px 42px rgba(23, 33, 43, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(16, 37, 54, 0.05), rgba(16, 37, 54, 0) 240px),
    var(--page);
}

body.is-locked {
  overflow: hidden;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(21, 31, 95, 0.96), rgba(7, 15, 48, 0.94)),
    #151f5f;
}

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

.login-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid rgba(215, 163, 62, 0.45);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.login-logo {
  width: min(260px, 100%);
  height: auto;
  display: block;
  margin-bottom: 22px;
  background: #fff;
  border-radius: 4px;
}

.login-card h1 {
  margin: 0;
  color: var(--navy);
}

.login-card p {
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.login-error {
  min-height: 22px;
  margin-top: 12px;
  color: var(--red);
  font-weight: 700;
}

.sidebar {
  background: #ffffff;
  color: #fff;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.brand-logo {
  width: 160px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--gold);
  color: var(--navy);
}

.brand span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 13px;
}

.brand strong {
  color: var(--navy);
}

.office-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  margin-bottom: 18px;
  background: #f7fafb;
}

.office-card span {
  display: block;
  color: var(--pride-red);
  font-size: 12px;
  text-transform: uppercase;
}

.office-card strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  line-height: 1.35;
}

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

.nav-item {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  text-align: left;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.is-active {
  background: #eef2ff;
  color: var(--navy);
  box-shadow: inset 3px 0 0 var(--pride-red);
}

.main {
  padding: 28px;
  overflow: hidden;
}

.topbar,
.section-heading,
.status-strip,
.filter-row,
.call-controls {
  display: flex;
  align-items: center;
}

.topbar,
.section-heading {
  justify-content: space-between;
  gap: 18px;
}

.topbar h1,
.section-heading h2,
.panel h3 {
  margin: 0;
}

.topbar h1 {
  font-size: 32px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--pride-red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar-copy {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.topbar-actions,
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.user-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
}

.icon-button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: #e7eef3;
  color: var(--blue-dark);
}

.primary-button {
  min-height: 42px;
  padding: 0 16px;
  background: var(--blue);
  color: #fff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  background: #e7eef3;
  color: var(--navy);
}

.secondary-button:hover {
  background: #d8e5ec;
}

.secondary-button.danger-soft {
  background: #fff1d6;
  color: #7a4700;
}

.secondary-button.danger-soft:hover {
  background: #ffe4ad;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}

.mini-button:hover {
  background: #e7eef3;
}

.status-strip {
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.status-strip > div,
.analytics-card,
.panel,
.table-wrap,
.search-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status-strip > div {
  padding: 16px;
  border-top: 4px solid var(--pride-red);
}

.metric {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--navy);
}

.mini-metric {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7fafb;
}

.mini-metric strong {
  color: var(--navy);
  font-size: 22px;
}

.mini-metric span {
  color: var(--muted);
  font-weight: 800;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-card {
  padding: 16px;
  border-top: 4px solid var(--pride-red);
}

.analytics-card span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.analytics-table {
  margin-top: 16px;
}

.momentum-bar {
  height: 9px;
  min-width: 100px;
  border-radius: 999px;
  background: #e7eef3;
  overflow: hidden;
}

.momentum-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.section-heading {
  margin-bottom: 16px;
}

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

.table-wrap {
  overflow: auto;
}

.queue-spreadsheet {
  max-height: 62vh;
  border-radius: 6px;
  overflow-x: hidden;
  padding-left: 4px;
}

.queue-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.queue-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 12px;
  cursor: pointer;
}

.queue-tab.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.queue-spreadsheet table {
  min-width: 0;
  table-layout: fixed;
}

.queue-spreadsheet .sales-grid-table {
  min-width: 0;
}

.queue-spreadsheet th,
.queue-spreadsheet td {
  padding: 9px 10px;
  font-size: 12px;
  vertical-align: top;
}

.queue-spreadsheet th:nth-child(1),
.queue-spreadsheet td:nth-child(1) {
  width: 38px;
}

.queue-spreadsheet th:nth-child(2),
.queue-spreadsheet td:nth-child(2) {
  width: 26%;
}

.queue-spreadsheet th:nth-child(3),
.queue-spreadsheet td:nth-child(3) {
  width: 72px;
}

.queue-spreadsheet th:nth-child(4),
.queue-spreadsheet td:nth-child(4) {
  width: 94px;
}

.queue-spreadsheet th:nth-child(5),
.queue-spreadsheet td:nth-child(5) {
  width: 84px;
}

.queue-spreadsheet th:nth-child(6),
.queue-spreadsheet td:nth-child(6) {
  width: 94px;
}

.queue-spreadsheet th:nth-child(8),
.queue-spreadsheet td:nth-child(8) {
  width: 78px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

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

.queue-spreadsheet th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid #cfd9e1;
  background: #eef3f6;
}

.sales-grid-table {
  table-layout: fixed;
  min-width: 0;
  font-size: 13px;
}

.sales-grid-table th,
.sales-grid-table td {
  padding: 8px 9px;
  line-height: 1.25;
}

.sales-grid-table th:nth-child(1),
.sales-grid-table td:nth-child(1) {
  width: 44px;
}

.sales-grid-table th:nth-child(2),
.sales-grid-table td:nth-child(2) {
  width: 275px;
}

.sales-grid-table th:nth-child(3),
.sales-grid-table td:nth-child(3) {
  width: 80px;
}

.sales-grid-table th:nth-child(4),
.sales-grid-table td:nth-child(4) {
  width: 135px;
}

.sales-grid-table th:nth-child(5),
.sales-grid-table td:nth-child(5) {
  width: 95px;
}

.sales-grid-table th:nth-child(6),
.sales-grid-table td:nth-child(6) {
  width: 100px;
}

.sales-grid-table th:nth-child(7),
.sales-grid-table td:nth-child(7) {
  width: 275px;
}

.sales-grid-table th:nth-child(8),
.sales-grid-table td:nth-child(8) {
  width: 120px;
}

.sales-grid-table tbody tr:nth-child(even) {
  background: #fbfdfe;
}

.sales-grid-table tbody tr:hover {
  background: #eef7fb;
}

.queue-grid-row {
  cursor: pointer;
}

.queue-grid-row.is-selected {
  background: #edf4ff;
  box-shadow: inset 4px 0 0 var(--navy);
}

.queue-grid-row.priority-high {
  box-shadow: inset 4px 0 0 var(--pride-red);
}

.queue-row-number {
  width: 48px;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.queue-company-cell,
.queue-contact-methods,
.queue-next-action {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.queue-company-cell strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.queue-company-cell small,
.queue-next-action span {
  color: var(--muted);
  line-height: 1.3;
}

.queue-next-action strong {
  display: -webkit-box;
  max-height: 34px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.queue-company-cell small {
  display: -webkit-box;
  max-height: 34px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.queue-source,
.queue-contact-name {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.queue-contact-name {
  color: var(--ink);
  font-weight: 700;
}

.queue-owner-cell {
  font-weight: 800;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.queue-owner-cell strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.15;
}

.queue-owner-cell span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.queue-contact-methods a {
  display: block;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.queue-contact-methods span {
  overflow-wrap: anywhere;
}

.queue-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.queue-stack .lead-tag {
  margin: 0;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

.lead-tag.touch {
  background: #e9f7ef;
  color: #08633f;
}

.lead-tag.hot,
.queue-status-pill.hot {
  background: #fff1cc;
  color: #735000;
  border: 1px solid #f0d27a;
}

.queue-open-button {
  width: 100%;
  min-height: 30px;
  padding: 0 6px;
  font-size: 11px;
}

.queue-spreadsheet .badge,
.queue-spreadsheet .queue-status-pill {
  min-height: 22px;
  padding: 0 7px;
  font-size: 11px;
}

.queue-status-pill,
.missing-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.queue-status-pill.good {
  background: #e7f8ef;
  color: #146c43;
}

.queue-status-pill.watch {
  background: #fff6da;
  color: #725200;
}

.queue-status-pill.bad,
.missing-chip {
  background: #fff0f0;
  color: #9f1d1d;
}

.missing-chip {
  margin: 0 4px 4px 0;
}

.missing-badge-wrap {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
}

.missing-badge-wrap .missing-chip {
  margin: 0;
}

.queue-grid-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 5px;
  min-width: 0;
  margin-top: 0;
}

.queue-grid-actions button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 11px;
  border-radius: 5px;
}

.queue-grid-actions .zoominfo-action-btn {
  grid-column: span 2;
}

.queue-detail-panel {
  margin-top: 14px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.queue-detail-empty {
  color: var(--muted);
  font-weight: 800;
}

.queue-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.queue-detail-header h3 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.1;
}

.queue-detail-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.queue-detail-status {
  display: grid;
  justify-items: end;
  gap: 7px;
  max-width: 280px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.queue-detail-summary {
  display: grid;
  grid-template-columns: 1.25fr .9fr 1.35fr .75fr 1.25fr .85fr;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.queue-detail-summary > div {
  min-width: 0;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
}

.queue-detail-summary > div:last-child {
  border-right: 0;
}

.queue-detail-summary span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.queue-detail-summary strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.selected-action-items {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfd;
}

.selected-action-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.selected-action-heading strong {
  color: var(--navy);
  font-size: 13px;
}

.selected-action-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

.selected-action-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.selected-action-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.selected-action-card strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.selected-action-card.hot {
  border-color: #f0d27a;
  background: #fff8df;
}

.selected-action-card.warn {
  border-color: #efb6b6;
  background: #fff5f5;
}

.selected-action-card.next {
  border-color: #bfd4e5;
  background: #f3f8fc;
}

.selected-action-card.setup {
  border-color: #bcd7c8;
  background: #f1faf5;
}

.queue-detail-grid {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.4fr);
  gap: 0;
}

.queue-detail-section {
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.queue-detail-section:last-child {
  border-right: 0;
}

.queue-detail-grid h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 12px;
}

.queue-detail-fields {
  display: grid;
  gap: 7px;
}

.queue-detail-fields > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.queue-detail-fields span {
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

.queue-detail-fields strong {
  color: var(--ink);
  font-weight: 800;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.queue-detail-grid a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.queue-detail-notes p {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.associated-contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.associated-contact-card {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdfe;
  font-size: 12px;
}

.associated-contact-card.is-primary {
  border-color: #f0d27a;
  background: #fff9e8;
}

.associated-contact-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.associated-contact-card strong {
  color: var(--navy);
}

.associated-contact-card span,
.associated-contact-card em {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.associated-contact-card a {
  overflow-wrap: anywhere;
}

.primary-contact-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f7df91;
  color: #5f4300;
  font-size: 10px;
  font-weight: 900;
}

.queue-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.queue-detail-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: #f8fbfd;
}

.queue-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.queue-action-group.primary button {
  min-width: 74px;
}

.queue-action-group.admin {
  justify-content: flex-end;
}

.queue-detail-actions button {
  min-height: 30px;
  border: 1px solid #cfd9e1;
  border-radius: 6px;
  padding: 0 9px;
  background: #ffffff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.queue-detail-actions button:hover {
  background: #e7eef3;
}

.queue-detail-actions .ai-action-prep {
  border-color: #1f7a5a;
  background: #edf9f4;
  color: #155f45;
}

.queue-detail-actions .ai-action-prep:hover {
  background: #dff3eb;
}

.queue-detail-actions .ai-action-strong {
  border-color: var(--navy);
  background: var(--navy);
  color: #ffffff;
}

.queue-detail-actions .ai-action-strong:hover {
  background: #17364f;
}

.queue-detail-actions .email-action-danger-soft {
  border-color: #efb6b6;
  background: #fff3f3;
  color: #9f1d1d;
}

.queue-detail-actions .email-action-hot {
  border-color: #f0d27a;
  background: #fff7dc;
  color: #735000;
}

.queue-detail-actions .email-action-hot:hover {
  background: #ffeeb8;
}

.queue-detail-actions .email-action-danger-soft:hover {
  background: #ffe4e4;
}

.queue-detail-actions .email-action-danger {
  border-color: #9f1d1d;
  background: #b91c1c;
  color: #ffffff;
}

.queue-detail-actions .email-action-danger:hover {
  background: #991b1b;
}

.queue-detail-actions button:disabled {
  cursor: wait;
  opacity: .65;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 25, 55, .48);
}

.modal-backdrop[hidden] {
  display: none;
}

.draft-modal {
  width: min(820px, 94vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(8, 25, 55, .24);
  padding: 18px;
}

.modal-header,
.draft-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
  color: var(--navy);
}

.draft-modal-meta {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 7px 12px;
  margin: 14px 0;
  padding: 12px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
}

.draft-modal-meta strong {
  color: var(--muted);
}

.draft-modal textarea {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.draft-internal-notes {
  margin-top: 12px;
  border: 1px solid #d8e1ea;
  border-radius: 7px;
  background: #f7fafb;
  padding: 10px 12px;
}

.draft-internal-notes[hidden] {
  display: none;
}

.draft-internal-notes h3 {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.draft-internal-notes pre {
  margin: 0;
  color: var(--muted);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  user-select: none;
}

.draft-modal-actions {
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

.draft-mailto-link.is-disabled {
  opacity: .55;
  pointer-events: none;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.badge.high {
  background: #f9dddd;
  color: var(--red);
}

.badge.medium {
  background: #fff0d2;
  color: var(--gold);
}

.badge.good {
  background: #dff2ea;
  color: var(--green);
}

.badge.review {
  background: #e7eef3;
  color: var(--blue-dark);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 16px;
}

.two-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel,
.search-panel {
  padding: 18px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 700;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.inline-check input {
  width: auto;
}

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

textarea {
  resize: vertical;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

.result-panel {
  min-height: 220px;
}

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

.kv {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 14px;
  margin: 16px 0;
}

.kv strong {
  color: var(--muted);
}

.kv span {
  white-space: pre-line;
}

.notice {
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  padding: 12px;
  margin-top: 12px;
}

.queue-notice {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.action-guide {
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.action-guide summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--navy);
  font-weight: 900;
}

.action-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 12px;
  padding: 0 12px 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.lead-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef3f7;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
}

.lead-tag.assigned {
  background: #e7eef3;
  color: var(--navy);
}

.lead-tag.existing {
  background: #dff2ea;
  color: #176145;
}

.lead-tag.program {
  background: #fff0d2;
  color: #815d00;
}

.lead-tag.mixed {
  background: #f9dddd;
  color: var(--red);
}

.lead-tag.allocation {
  background: #f6f7f9;
  color: var(--muted);
}

.rep-mode .app-shell {
  grid-template-columns: 1fr;
}

.rep-mode .sidebar {
  display: none;
}

.rep-mode .main {
  width: min(80vw, 1480px);
  min-width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 14px;
}

.rep-mode .topbar,
.rep-mode .section-heading {
  align-items: flex-start;
}

.rep-mode .topbar h1 {
  font-size: 28px;
}

.rep-mode .topbar-copy {
  max-width: 560px;
}

.rep-mode .status-strip {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin: 12px 0;
  gap: 10px;
}

.rep-mode .status-strip > div {
  padding: 9px 12px;
  border-top-width: 3px;
}

.rep-mode .metric {
  font-size: 22px;
  line-height: 1;
}

.rep-mode .filter-row {
  justify-content: flex-end;
  gap: 8px;
}

.queue-command-heading {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, .9fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 10px;
}

.queue-command-heading .filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.queue-command-heading h2 {
  margin-bottom: 2px;
}

.queue-command-heading p {
  font-size: 13px;
}

.rep-day-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 1.05fr;
  gap: 10px;
  margin-bottom: 10px;
}

.rep-day-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.rep-day-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.rep-day-panel h3 {
  margin: 2px 0 7px;
  color: var(--navy);
  font-size: 15px;
}

.rep-day-list {
  display: grid;
  gap: 0;
}

.rep-day-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  align-items: start;
  border-top: 1px solid #eef2f4;
  padding: 6px 0;
  min-height: 0;
}

.rep-day-item:first-child {
  border-top: 0;
}

.rep-day-item strong {
  color: var(--pride-red);
  font-size: 12px;
  line-height: 1.25;
}

.rep-day-item span {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.hubspot-work-panel {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  align-items: start;
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hubspot-work-panel h3 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 15px;
}

.hubspot-work-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.hubspot-work-item,
.hubspot-work-empty {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #eef2f4;
  border-radius: 6px;
  background: #fbfdfe;
}

.hubspot-work-item strong {
  display: block;
  color: var(--pride-red);
  font-size: 11px;
  line-height: 1.2;
}

.hubspot-work-item span,
.hubspot-work-empty {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.rep-task-list {
  display: grid;
  gap: 12px;
}

.rep-task-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--pride-red);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.rep-task-topline,
.rep-task-meta,
.rep-sprint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rep-task-topline {
  justify-content: space-between;
}

.rep-task-number {
  color: var(--muted);
  font-weight: 800;
}

.landstar-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  margin: 0 5px;
  color: #c08a00;
  font-weight: 900;
}

.rep-task-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
  color: var(--navy);
}

.rep-task-action {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.lead-contact {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.lead-contact.compact {
  margin: 8px 0 0;
  padding: 8px;
}

.lead-contact div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.lead-contact a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.lead-contact-label {
  color: var(--muted);
  font-weight: 800;
}

.lead-contact .missing {
  color: #9f1d1d;
  font-weight: 800;
}

.lead-brief {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  padding: 10px;
  border-left: 3px solid var(--pride-red);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.lead-brief.compact {
  margin: 8px 0 0;
  padding: 8px;
}

.lead-brief div {
  display: grid;
  gap: 2px;
}

.lead-brief strong {
  color: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

.rep-task-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.rep-task-meta span {
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.rep-task-meta span:last-child {
  border-right: 0;
}

.rep-sprint {
  margin-top: 14px;
}

.queue-action-copy {
  margin: 0 0 10px;
}

.queue-disposition-actions {
  max-width: 560px;
}

.queue-draft-panel {
  margin-top: 14px;
}

.queue-ai-panel {
  margin-top: 14px;
}

.rep-sprint button {
  min-height: 34px;
  border: 1px solid #cfd9e1;
  border-radius: 7px;
  padding: 0 11px;
  background: #f7fafb;
  color: var(--navy);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.rep-sprint button:hover {
  background: #e7eef3;
}

.rep-sprint .ai-action-prep {
  border-color: #1f7a5a;
  background: #edf9f4;
  color: #155f45;
}

.rep-sprint .ai-action-prep:hover {
  background: #dff3eb;
}

.rep-sprint .ai-action-handoff {
  border-color: #d8b24a;
  background: #fff8df;
  color: #725200;
}

.rep-sprint .ai-action-handoff:hover {
  background: #ffefb3;
}

.rep-sprint .ai-action-strong {
  border-color: var(--navy);
  background: var(--navy);
  color: #ffffff;
}

.rep-sprint .ai-action-strong:hover {
  background: #17364f;
}

.rep-sprint .email-action-danger-soft {
  border-color: #efb6b6;
  background: #fff3f3;
  color: #9f1d1d;
}

.rep-sprint .email-action-danger-soft:hover {
  background: #ffe4e4;
}

.rep-sprint .email-action-danger {
  border-color: #9f1d1d;
  background: #b91c1c;
  color: #ffffff;
}

.rep-sprint .email-action-danger:hover {
  background: #991b1b;
}

.rep-sprint button:disabled {
  cursor: wait;
  opacity: .65;
}

.rep-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7eef3;
  margin-top: 8px;
}

.rep-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pride-red);
}

.email-owner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.email-card {
  box-shadow: none;
}

.draft-preview {
  min-height: 180px;
  margin: 0;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f7fafb;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.45;
}

.ai-assist-preview {
  min-height: 220px;
  margin: 0;
  white-space: pre-wrap;
  border: 1px solid #b9d8ca;
  border-radius: 8px;
  padding: 14px;
  background: #f6fbf8;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.45;
}

.inline-ai-assist {
  min-height: 0;
  margin-top: 12px;
  max-height: 420px;
  overflow: auto;
}

@media (max-width: 900px) {
  .queue-command-heading .filter-row {
    grid-template-columns: 1fr;
  }

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

  .queue-detail-header,
  .queue-detail-actions {
    display: grid;
  }

  .queue-detail-status {
    justify-items: start;
    text-align: left;
  }

  .queue-detail-summary {
    grid-template-columns: 1fr 1fr;
  }

  .queue-detail-summary > div {
    border-bottom: 1px solid var(--line);
  }

  .email-owner-grid {
    grid-template-columns: 1fr;
  }

  .queue-detail-grid {
    grid-template-columns: 1fr;
  }

  .queue-detail-section {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .queue-action-group.admin {
    justify-content: flex-start;
  }
}

@media (max-width: 1280px) {
  .selected-action-list {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 920px) {
  .selected-action-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .rep-mode .main {
    width: calc(100vw - 24px);
    min-width: 0;
  }

  .queue-command-heading {
    grid-template-columns: 1fr;
  }

  .queue-command-heading .filter-row {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .hubspot-work-panel {
    grid-template-columns: 1fr;
  }

  .hubspot-work-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.call-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

.wide-script-grid {
  margin-bottom: 16px;
}

.script-table {
  margin: 16px 0;
  box-shadow: none;
}

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

.script-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.script-card p,
.script-card li {
  color: var(--muted);
  line-height: 1.45;
}

.script-card p {
  margin: 0;
}

.script-card ul {
  margin: 0;
  padding-left: 18px;
}

.voice-setup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.voice-launch-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(360px, .95fr);
  gap: 12px;
  margin-bottom: 12px;
}

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

.panel-title-row h3 {
  margin: 0 0 4px;
}

.panel-title-row p {
  margin: 0;
  color: var(--muted);
}

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

.launch-kv {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f8fbfd;
}

.launch-kv span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.launch-kv strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
}

.script-snippets {
  display: grid;
  gap: 8px;
}

.script-snippet {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

.script-snippet h4 {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 13px;
}

.script-snippet p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.compact-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.mono {
  font-family: Consolas, Monaco, monospace;
  word-break: break-all;
  color: var(--navy);
  background: #f7fafb;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 7px;
}

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

.voice-table {
  margin-top: 14px;
  box-shadow: none;
}

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

.agent-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.agent-card h3 {
  margin: 0 0 8px;
}

.agent-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

.voice-status {
  min-height: 0;
  margin-top: 14px;
  box-shadow: none;
}

.call-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.call-item h3 {
  margin: 0 0 6px;
}

.call-item p {
  margin: 0;
  color: var(--muted);
}

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

  .sidebar {
    position: static;
  }

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

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

  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-strip,
  .analytics-grid,
  .voice-setup,
  .agent-grid,
  .two-column,
  .two-field-row,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .rep-mode .topbar,
  .rep-mode .section-heading,
  .rep-mode .topbar-actions {
    display: grid;
    width: 100%;
  }

  .rep-mode .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rep-task-card {
    padding: 14px;
  }
}

@media (max-width: 720px) {
  body {
    background: #f3f6f8;
  }

  body.is-locked {
    overflow: auto;
  }

  .login-screen {
    align-items: start;
    padding: 18px 12px;
    overflow: auto;
  }

  .login-card {
    padding: 18px;
  }

  .login-logo {
    width: 210px;
    margin-bottom: 16px;
  }

  .app-shell,
  .rep-mode .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: block;
    padding: 10px 10px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(21, 36, 52, .08);
  }

  .rep-mode .sidebar {
    display: none;
  }

  .brand {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .brand-logo {
    width: 118px;
    margin: 0;
  }

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

  .brand span,
  .office-card {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid var(--line);
    background: #fff;
    white-space: nowrap;
    font-size: 13px;
  }

  .nav-item.is-active {
    box-shadow: inset 0 -3px 0 var(--pride-red);
  }

  .main,
  .rep-mode .main {
    width: 100%;
    min-width: 0;
    padding: 12px;
    overflow: visible;
  }

  .topbar {
    gap: 10px;
    padding-bottom: 8px;
  }

  .topbar h1 {
    font-size: 22px;
    line-height: 1.1;
  }

  .topbar-copy {
    display: none;
  }

  .eyebrow {
    font-size: 11px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    width: 100%;
    gap: 7px;
  }

  .user-pill {
    min-width: 0;
    min-height: 38px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .icon-button,
  .primary-button,
  .secondary-button {
    min-height: 40px;
  }

  .topbar-actions .primary-button {
    grid-column: 1 / -1;
  }

  .status-strip,
  .rep-mode .status-strip,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
  }

  .status-strip > div,
  .analytics-card {
    padding: 10px;
    border-top-width: 3px;
  }

  .metric {
    font-size: 22px;
  }

  .queue-command-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }

  .queue-command-heading h2 {
    font-size: 20px;
  }

  .queue-command-heading p {
    margin: 2px 0 0;
    font-size: 12px;
  }

  .queue-command-heading .filter-row,
  .rep-mode .filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .filter-row select,
  input,
  select,
  textarea {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 16px;
  }

  .rep-day-grid,
  .voice-launch-grid,
  .voice-setup,
  .agent-grid,
  .two-column,
  .two-field-row,
  .search-panel,
  .script-grid,
  .email-owner-grid {
    grid-template-columns: 1fr;
  }

  .rep-day-grid {
    gap: 8px;
    margin-bottom: 8px;
  }

  .rep-day-panel {
    padding: 9px 10px;
  }

  .rep-day-panel h3 {
    font-size: 14px;
  }

  .rep-day-item {
    grid-template-columns: 62px 1fr;
  }

  .hubspot-work-panel {
    display: block;
    padding: 10px;
  }

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

  .action-guide {
    margin: 8px 0;
  }

  .action-guide-grid {
    grid-template-columns: 1fr;
  }

  .queue-detail-panel {
    margin-top: 8px;
    border-radius: 7px;
  }

  .queue-detail-header {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  .queue-detail-header h3 {
    font-size: 18px;
  }

  .queue-detail-header p {
    font-size: 12px;
  }

  .queue-detail-status {
    justify-items: start;
    max-width: none;
    text-align: left;
  }

  .queue-detail-summary {
    grid-template-columns: 1fr;
  }

  .queue-detail-summary > div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .queue-detail-summary span {
    margin: 0;
  }

  .queue-detail-grid {
    grid-template-columns: 1fr;
  }

  .queue-detail-section {
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .queue-detail-fields > div {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
  }

  .queue-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .queue-action-group,
  .queue-action-group.admin {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 7px;
  }

  .queue-detail-actions button {
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }

  .queue-spreadsheet {
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .queue-spreadsheet table,
  .queue-spreadsheet thead,
  .queue-spreadsheet tbody,
  .queue-spreadsheet tr,
  .queue-spreadsheet th,
  .queue-spreadsheet td,
  .sales-grid-table,
  .sales-grid-table tbody,
  .sales-grid-table tr,
  .sales-grid-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .queue-spreadsheet thead {
    display: none;
  }

  .queue-grid-row {
    margin: 0 0 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-left: 4px solid transparent;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(21, 36, 52, .08);
  }

  .queue-grid-row.priority-high,
  .queue-grid-row.is-selected {
    box-shadow: 0 8px 22px rgba(21, 36, 52, .08);
    border-left-color: var(--pride-red);
  }

  .queue-grid-row.is-selected {
    background: #f7fbff;
    border-left-color: var(--navy);
  }

  .queue-spreadsheet td,
  .sales-grid-table td {
    padding: 6px 0;
    border-bottom: 0;
  }

  .queue-spreadsheet td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .queue-spreadsheet td:nth-child(1)::before { content: 'Row'; }
  .queue-spreadsheet td:nth-child(2)::before { content: 'Company'; }
  .queue-spreadsheet td:nth-child(3)::before { content: 'Owner'; }
  .queue-spreadsheet td:nth-child(4)::before { content: 'Priority'; }
  .queue-spreadsheet td:nth-child(5)::before { content: 'Last Touch'; }
  .queue-spreadsheet td:nth-child(6)::before { content: 'Missing'; }
  .queue-spreadsheet td:nth-child(7)::before { content: 'Next Step'; }
  .queue-spreadsheet td:nth-child(8)::before { content: 'Action'; }

  .queue-row-number {
    width: auto;
  }

  .queue-company-cell strong {
    font-size: 15px;
  }

  .queue-owner-cell {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 8px;
    align-items: start;
  }

  .queue-owner-cell strong,
  .queue-owner-cell span {
    margin: 0;
    font-size: 12px;
  }

  .queue-next-action strong {
    max-height: none;
    -webkit-line-clamp: unset;
  }

  .queue-open-button {
    min-height: 40px;
    font-size: 13px;
  }

  .table-wrap:not(.queue-spreadsheet) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap:not(.queue-spreadsheet) table {
    min-width: 760px;
  }

  .panel,
  .search-panel {
    padding: 12px;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
