:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-muted: #eef3f7;
  --text: #17212f;
  --muted: #607083;
  --line: #dce4ec;
  --accent: #176b87;
  --accent-strong: #0f5067;
  --success: #2f855a;
  --warning: #b7791f;
  --danger: #b83232;
  --ink-soft: #2c3948;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

button,
select {
  cursor: pointer;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(23, 107, 135, 0.12), rgba(47, 133, 90, 0.08)),
    var(--bg);
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 22px 70px rgba(23, 33, 47, 0.14);
}

.login-brand {
  color: var(--text);
}

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

.login-card h1 {
  margin-bottom: 8px;
}

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

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 750;
}

.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
}

.login-error {
  min-height: 22px;
  color: var(--danger);
  font-weight: 700;
}

.login-helper {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.login-helper button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  padding: 0;
}

.login-helper button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.login-error.success {
  color: var(--success);
}

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

.mobile-appbar,
.mobile-nav-backdrop {
  display: none;
}

.sidebar {
  background: #162230;
  color: #f7fbff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #ffffff;
  color: #12352e;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(18, 31, 43, 0.08);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.login-brand .brand-mark {
  width: 46px;
  height: 46px;
}

.brand strong,
.brand small {
  display: block;
  overflow-wrap: anywhere;
}

.brand strong {
  line-height: 1.15;
}

.brand small {
  color: #b8c7d5;
  margin-top: 2px;
}

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

.nav-item {
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  color: #dbe6ef;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item.active,
.nav-item:hover {
  background: #243448;
  color: #ffffff;
}

.role-panel {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 20px;
}

.role-panel > span,
.field-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.role-panel > span {
  color: #b8c7d5;
}

.role-panel strong,
.role-panel small {
  display: block;
}

.role-panel strong {
  margin-top: 8px;
}

.role-panel small {
  color: #b8c7d5;
  margin-top: 2px;
}

.role-panel p {
  min-height: 44px;
  margin: 12px 0 0;
  color: #d7e5ef;
  line-height: 1.4;
  font-size: 0.9rem;
}

.logout-button {
  width: 100%;
  border: 1px solid #3d5067;
  border-radius: 8px;
  padding: 10px;
  background: transparent;
  color: #ffffff;
  font-weight: 750;
}

.logout-button:hover {
  background: #243448;
}

.workspace {
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

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

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

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
  margin-bottom: 8px;
}

.topbar p {
  color: var(--muted);
  margin-bottom: 0;
}

.primary-button,
.secondary-button,
.status-edit button,
menu button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 750;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.primary-button:hover,
.status-edit button:hover {
  background: var(--accent-strong);
}

.secondary-button,
menu button {
  background: var(--surface-muted);
  color: var(--ink-soft);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.metrics article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metrics span {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
}

.metrics strong {
  font-size: 2rem;
  margin-top: 4px;
  display: block;
}

.controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 260px auto;
  gap: 12px;
  align-items: center;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.search-wrap input,
.controls select,
.filter-trigger,
.status-edit select,
textarea,
.form-grid input,
.form-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
}

.filter-trigger {
  text-align: left;
  font-weight: 750;
}

.multi-status-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  max-height: 132px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.multi-status-filter label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.multi-status-filter input {
  width: 14px;
  height: 14px;
}

.filter-dialog-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.export-dialog-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.filter-options {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 360px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.filter-options label,
.sort-choice label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink-soft);
  font-weight: 700;
}

.filter-options input,
.sort-choice input {
  width: 14px;
  height: 14px;
  margin-top: 3px;
}

.sort-choice {
  display: grid;
  gap: 10px;
}

.export-options {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.export-options legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.export-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink-soft);
  font-weight: 700;
}

.export-options input {
  width: 14px;
  height: 14px;
  margin-top: 3px;
}

.search-wrap input {
  border: 0;
  padding-left: 0;
  outline: 0;
}

.toggle,
.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.scope-pill {
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 14px;
  font-weight: 750;
}

.view-panel {
  display: grid;
  gap: 18px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.lead-list,
.detail-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-head,
.lead-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(160px, 1fr);
  gap: 12px;
  align-items: center;
}

.table-head {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}

.table-head button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}

.table-head button:hover,
.table-head button.active,
.table-head button.filtered {
  color: var(--accent-strong);
}

.lead-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 15px 16px;
  text-align: left;
}

.lead-row:last-child {
  border-bottom: 0;
}

.lead-row:hover,
.lead-row.active {
  background: #f0f6fa;
}

.lead-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lead-title strong,
.lead-title span,
.next-step {
  overflow-wrap: anywhere;
}

.lead-title span,
.next-step,
.owners {
  color: var(--muted);
  font-size: 0.9rem;
}

.stage-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: #e6f1f4;
  color: #14536a;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.relevant-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #e7f5ee;
  color: var(--success);
}

.relevant-badge.blocked {
  background: #f7eaea;
  color: var(--danger);
}

.detail-panel {
  min-height: 500px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

.empty-state {
  min-height: 450px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  gap: 8px;
}

.empty-state strong {
  color: var(--text);
}

.hidden {
  display: none !important;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-header h2 {
  margin: 10px 0 4px;
  font-size: 1.5rem;
}

.detail-header p {
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 18px;
}

.facts div {
  background: var(--surface-muted);
  border-radius: 8px;
  padding: 12px;
}

.facts div:last-child {
  grid-column: 1 / -1;
}

.imported-facts {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.imported-facts div:last-child {
  grid-column: auto;
}

.extra-info-button {
  width: 100%;
  justify-content: center;
  margin: 0 0 14px;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

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

.patrick-lead-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #f0c7c7;
  border-radius: 8px;
  background: #fff7f7;
  padding: 12px;
  margin-bottom: 12px;
}

.patrick-lead-panel > span {
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.patrick-lead-panel > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-button {
  border: 0;
  border-radius: 8px;
  background: var(--danger);
  color: #ffffff;
  font-weight: 750;
  padding: 11px 14px;
}

.danger-button:hover {
  background: #8f2525;
}

.handover-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.handover-panel span,
.dialog-copy {
  color: var(--muted);
  line-height: 1.45;
}

.import-status {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.import-status strong {
  color: var(--text);
}

.import-status ul {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding-left: 20px;
}

.handover-panel .primary-button {
  justify-content: center;
}

.status-edit button {
  background: var(--accent);
  color: #ffffff;
}

.status-edit button:disabled,
.secondary-button:disabled,
menu button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.permission-message {
  min-height: 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

textarea {
  resize: vertical;
  min-height: 88px;
  margin-bottom: 8px;
}

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

.activity-list li {
  border-left: 3px solid var(--line);
  padding-left: 10px;
}

.activity-list strong {
  display: block;
}

.activity-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.activity-page {
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.pipeline-board-shell {
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

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

.pipeline-column {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.pipeline-column header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  background: var(--surface);
}

.pipeline-column header span {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.pipeline-column header strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--accent-strong);
}

.pipeline-column-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 320px;
  padding: 10px;
}

.pipeline-card {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 11px;
  text-align: left;
}

.pipeline-card:hover {
  border-color: #9fc1d0;
  background: #f0f6fa;
}

.pipeline-card strong,
.pipeline-card span,
.pipeline-card small {
  display: block;
  overflow-wrap: anywhere;
}

.pipeline-card span,
.pipeline-card small,
.pipeline-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.pipeline-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px 10px;
  text-align: center;
}

.activity-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.activity-page-head h2 {
  margin-bottom: 6px;
}

.activity-page-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.activity-page-head strong {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--accent-strong);
  font-size: 1.25rem;
}

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

.activity-filters {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(170px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
}

.activity-filters label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.activity-filters input,
.activity-filters select {
  width: 100%;
}

.activity-filters .activity-search {
  min-width: 0;
}

.activity-filters button {
  min-height: 42px;
  justify-content: center;
  white-space: nowrap;
}

.activity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.activity-card:hover {
  border-color: #9fc1d0;
  background: #f0f6fa;
}

.activity-card strong,
.activity-card span,
.activity-card time {
  display: block;
  overflow-wrap: anywhere;
}

.activity-card span,
.activity-card time {
  color: var(--muted);
  font-size: 0.9rem;
}

.activity-card time {
  text-align: right;
  white-space: nowrap;
}

.compact-empty {
  min-height: 220px;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(720px, calc(100vw - 28px));
  box-shadow: 0 24px 80px rgba(20, 32, 45, 0.28);
}

dialog::backdrop {
  background: rgba(18, 31, 43, 0.45);
}

#leadForm {
  padding: 20px;
}

#handoverForm {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.password-reset-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.password-reset-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
}

.pipeline-lead-modal {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.extra-info-modal {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.extra-info-modal .dialog-head {
  align-items: flex-start;
  margin-bottom: 0;
}

.extra-info-modal h2 {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.extra-info-modal .imported-facts {
  max-height: min(36vh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.extra-info-history h3 {
  margin-bottom: 10px;
}

.extra-info-history .activity-list {
  max-height: min(28vh, 260px);
  overflow: auto;
  padding-right: 4px;
}

.pipeline-lead-modal .dialog-head {
  align-items: flex-start;
  margin-bottom: 0;
}

.pipeline-lead-modal h2 {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.pipeline-facts {
  margin: 0;
}

.pipeline-facts div:last-child,
.pipeline-facts div:nth-last-child(2) {
  grid-column: auto;
}

.pipeline-lead-modal h3 {
  margin-bottom: 10px;
}

.pipeline-lead-modal .activity-list {
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.field-label select,
.field-label input,
.field-label textarea {
  margin-top: 8px;
  text-transform: none;
  font-weight: 400;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dialog-head h2 {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid label,
fieldset {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 700;
}

fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.lead-extra-editor {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.lead-extra-editor summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 800;
}

.extra-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.extra-field-grid label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 700;
}

.extra-field-grid textarea {
  min-height: 58px;
  margin-bottom: 0;
}

legend {
  padding: 0 6px;
  color: var(--muted);
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 10px;
}

.checkbox-list label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font-weight: 600;
  line-height: 1.2;
  min-width: 0;
  text-align: left;
}

.checkbox-list input {
  width: 14px;
  height: 14px;
  margin: 3px 0 0;
}

.checkbox-list span,
.checkbox-list strong,
.checkbox-list small {
  display: block;
  min-width: 0;
}

.checkbox-list strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.checkbox-list small {
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 20px 0 0;
}

menu button:last-child {
  background: var(--accent);
  color: #ffffff;
}

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

  .detail-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    background: #162230;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(18, 31, 43, 0.18);
  }

  .mobile-menu-button {
    display: grid;
    place-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    border: 1px solid #3d5067;
    border-radius: 8px;
    background: #243448;
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
  }

  .mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 44px;
    border: 1px solid #3d5067;
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    padding: 0 12px;
  }

  .mobile-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    padding: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(300px, calc(100vw - 48px));
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: 16px 0 34px rgba(18, 31, 43, 0.25);
  }

  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.nav-open .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    background: rgba(18, 31, 43, 0.42);
  }

  .workspace {
    padding: 18px 14px 24px;
  }

  .metrics,
  .controls,
  .table-head,
  .lead-row,
  .activity-card,
  .activity-filters,
  .patrick-lead-panel > div,
  .extra-field-grid,
  .pipeline-facts,
  .form-grid,
  .checkbox-list {
    grid-template-columns: 1fr;
  }

  .activity-page-head {
    flex-direction: column;
  }

  .activity-card time {
    text-align: left;
    white-space: normal;
  }

  .table-head {
    display: none;
  }

  .topbar {
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions button,
  .activity-filters button,
  .primary-button {
    width: 100%;
    justify-content: center;
  }
}
