:root {
  --bg: #eef1ec;
  --ink: #17201d;
  --muted: #66716d;
  --line: #d7ddd7;
  --panel: #ffffff;
  --steel: #223136;
  --steel-light: #314348;
  --accent: #bb3324;
  --accent-dark: #962418;
  --focus: #44717c;
}

* {
  box-sizing: border-box;
}

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

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

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(238, 241, 236, 0.92)),
    var(--bg);
}

.auth-shell {
  width: min(940px, 100%);
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  border: 1px solid #cdd5cf;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(27, 38, 35, 0.16);
  overflow: hidden;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 38px 40px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(34, 49, 54, 0.96), rgba(19, 28, 26, 0.98)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 22px);
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: min(320px, 100%);
  height: auto;
  display: block;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.eyebrow,
.form-kicker {
  margin: 0 0 10px;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-panel h1,
.topbar h1,
.welcome h1 {
  margin: 0;
  line-height: 1;
}

.brand-panel h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 5vw, 4.75rem);
  overflow-wrap: anywhere;
}

.intro {
  max-width: 360px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.98rem;
  line-height: 1.55;
}

.login-panel {
  display: grid;
  align-items: center;
  padding: 44px 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 251, 249, 1)),
    var(--panel);
}

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

.login-form h2,
.welcome h2 {
  margin: 0;
  font-size: 1.75rem;
}

.login-form label {
  margin-top: 8px;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  height: 50px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  background: #fdfdfb;
  outline: none;
}

.login-form input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.14);
}

.login-form button,
.secondary-button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(180deg, #c43a2a, var(--accent));
  cursor: pointer;
  font-weight: 800;
}

.login-form button {
  margin-top: 14px;
  width: 100%;
}

.login-form button:hover,
.secondary-button:hover {
  background: var(--accent-dark);
}

.alert {
  border: 1px solid rgba(183, 55, 37, 0.3);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--accent-dark);
  background: rgba(183, 55, 37, 0.08);
  font-size: 0.92rem;
  font-weight: 600;
}

.manual-duplicate-warning {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(183, 55, 37, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: rgba(183, 55, 37, 0.05);
}

.manual-duplicate-warning h2 {
  margin: 2px 0 0;
  font-size: 1rem;
}

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

.manual-duplicate-link {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(31, 45, 48, 0.1);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  text-decoration: none;
}

.manual-duplicate-link span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.manual-duplicate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-duplicate-override {
  background: #ffffff;
}

.manual-duplicate-new {
  color: var(--text);
  background: #ffffff;
  text-decoration: none;
}

.form-error {
  border: 1px solid rgba(183, 55, 37, 0.28);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--accent-dark);
  background: rgba(183, 55, 37, 0.07);
  font-size: 0.86rem;
  font-weight: 800;
}

.invite-role {
  margin: -5px 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.app-page {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: #f6f7f4;
}

.crm-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--steel), #182321);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

.sidebar-brand-logo {
  width: 154px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  background: #ffffff;
}

.brand-mark-small {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  font-size: 0.82rem;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 34px;
}

.nav-item,
.icon-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-item {
  padding: 0 12px;
}

.nav-item img,
.icon-button img {
  width: 20px;
  height: 20px;
  filter: invert(1);
  opacity: 0.74;
}

.nav-item:hover,
.icon-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.is-active,
.icon-button.is-active {
  color: #ffffff;
  background: rgba(187, 51, 36, 0.94);
}

.nav-item.is-active img,
.icon-button.is-active img,
.icon-button:hover img {
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 6px;
}

.sidebar-logout {
  margin: 0;
}

.icon-button {
  width: 100%;
  border: 0;
  padding: 0 12px;
  background: transparent;
  cursor: pointer;
}

.crm-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.crm-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.crm-header .eyebrow {
  color: var(--muted);
}

.crm-header h1 {
  margin: 0;
  font-size: 1.45rem;
}

.header-subline {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.header-subline-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.header-subline-group .header-subline {
  margin: 0;
}

.assignee-chip,
.assignee-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.assignee-form span {
  text-transform: uppercase;
}

.assignee-form select {
  min-width: 128px;
  max-width: 190px;
  height: 26px;
  padding: 0 22px 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.supplier-number {
  color: #4d6b42;
}

.header-lead-edit {
  min-width: 280px;
}

.header-title-row {
  align-items: center;
  justify-content: flex-start;
}

.header-title-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-back-button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.header-back-button:hover {
  background: #f7f8f5;
}

.header-back-button img {
  width: 15px;
  height: 15px;
}

.header-title-main h1 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.header-title-main .inline-icon-actions {
  flex: 0 0 auto;
}

.header-edit-form {
  width: min(420px, 100%);
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.context-header-actions {
  display: contents;
}

.primary-action,
.secondary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 6px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.primary-action {
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, #c43a2a, var(--accent));
}

.primary-action.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.secondary-action,
.ghost-action {
  border: 1px solid var(--line);
  color: var(--steel);
  background: #ffffff;
}

.secondary-action-button {
  min-height: 42px;
}

.secondary-action-button:disabled {
  cursor: default;
  opacity: 0.64;
}

.ghost-action {
  justify-self: start;
}

.primary-action:hover {
  background: var(--accent-dark);
}

.secondary-action:hover,
.ghost-action:hover {
  border-color: #c7d0c7;
  background: #f7f8f5;
}

.primary-action img,
.secondary-action img,
.ghost-action img {
  width: 18px;
  height: 18px;
}

.primary-action img {
  filter: invert(1);
}

.primary-action-button {
  border: 0;
}

.phone-widget {
  position: relative;
}

.power-dialer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #dfe5dc;
  border-radius: 6px;
  padding: 4px 6px 4px 12px;
  background: #fbfcfa;
  box-shadow: none;
}

.power-dialer-bar[hidden] {
  display: none;
}

.power-dialer-bar [hidden] {
  display: none !important;
}

.power-dialer-bar span,
.power-dialer-counter {
  color: var(--steel);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.power-dialer-counter {
  border: 0;
  border-radius: 999px;
  padding: 4px 7px;
  background: transparent;
}

.power-dialer-counter.is-clickable {
  cursor: pointer;
}

.power-dialer-counter.is-clickable:hover {
  background: #edf0ec;
}

.power-dialer-bar.is-reviewing {
  background: #ffffff;
}

.power-dialer-bar.is-reviewing .power-dialer-control {
  display: none !important;
}

.power-dialer-control {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe0da;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.power-dialer-stop-button {
  width: auto;
  min-width: 72px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--steel);
  font-size: 0.76rem;
  font-weight: 900;
}

.power-dialer-control:hover,
.power-dialer-control.is-paused {
  border-color: #c9d2c8;
  background: #f4f7f2;
}

.power-dialer-control.is-muted {
  border-color: rgba(183, 55, 37, 0.28);
  background: rgba(183, 55, 37, 0.08);
}

.power-dialer-control-danger {
  border-color: rgba(183, 55, 37, 0.28);
  background: var(--accent);
}

.power-dialer-control-danger:hover {
  border-color: rgba(183, 55, 37, 0.28);
  background: var(--accent);
}

.power-dialer-control img {
  width: 15px;
  height: 15px;
  opacity: 0.74;
}

.power-dialer-control-danger img {
  filter: invert(1);
  opacity: 1;
}

.power-dialer-review-button {
  min-height: 28px;
  border: 1px solid #dbe0da;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--steel);
  background: #ffffff;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 850;
}

.power-dialer-review-button:hover {
  background: #f4f7f2;
}

.dialer-review-list-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 64px));
  display: grid;
  gap: 14px;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(20, 31, 30, 0.22);
}

.dialer-review-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.dialer-review-list-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  text-align: left;
  background: #ffffff;
  cursor: pointer;
}

.dialer-review-list-item:hover,
.dialer-review-list-item.is-current {
  background: #f6f7f4;
}

.dialer-review-list-number {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--steel);
  background: #edf0ec;
  font-size: 0.75rem;
  font-weight: 900;
}

.dialer-review-list-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dialer-review-list-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialer-review-list-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialer-review-list-item em {
  border-radius: 999px;
  padding: 3px 7px;
  color: #9a332b;
  background: rgba(199, 53, 45, 0.08);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}

.dialer-review-list-item em.is-done {
  color: #28734d;
  background: rgba(40, 115, 77, 0.1);
}

.live-note-hint {
  align-self: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.phone-toggle,
.phone-call-button,
.phone-mute-button,
.phone-hangup-button,
.phone-accept-button,
.phone-reject-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  cursor: pointer;
}

.phone-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--steel);
  background: #ffffff;
}

.phone-toggle:hover {
  border-color: #c7d0c7;
  background: #f7f8f5;
}

.phone-toggle img,
.phone-call-button img,
.phone-mute-button img,
.phone-hangup-button img,
.phone-accept-button img,
.phone-reject-button img {
  width: 16px;
  height: 16px;
}

.phone-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: 286px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(20, 34, 36, 0.14);
}

.phone-panel [hidden] {
  display: none !important;
}

.phone-dial-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.phone-dial-row input,
.phone-caller-select select,
.phone-audio-settings select {
  width: 100%;
  height: 36px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.phone-dial-row input {
  padding: 0 10px;
  font-weight: 700;
}

.phone-dial-row input:focus,
.phone-caller-select select:focus,
.phone-audio-settings select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.12);
}

.phone-caller-select {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.phone-call-button {
  width: 38px;
  height: 36px;
  border-color: rgba(57, 135, 73, 0.28);
  border-radius: 6px;
  background: #2f8f48;
}

.phone-call-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.phone-call-button img,
.phone-hangup-button img,
.phone-accept-button img,
.phone-reject-button img {
  filter: invert(1);
}

.phone-audio-settings {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.phone-audio-settings label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.phone-audio-settings select {
  padding: 0 8px;
  font-size: 0.78rem;
}

.phone-error {
  margin-top: 8px;
  border: 1px solid rgba(183, 55, 37, 0.22);
  border-radius: 6px;
  padding: 7px 8px;
  color: var(--accent-dark);
  background: rgba(183, 55, 37, 0.07);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.phone-incoming-view {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(57, 135, 73, 0.2);
  border-radius: 7px;
  padding: 10px;
  background: #fbfdfb;
}

.phone-incoming-view.is-ringing {
  animation: phoneIncomingPulse 1.1s ease-in-out infinite;
}

.phone-incoming-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.phone-incoming-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.phone-incoming-title strong,
.phone-incoming-title span,
.phone-incoming-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-incoming-title strong {
  flex: 0 1 auto;
  color: var(--ink);
  font-size: 0.92rem;
}

.phone-incoming-title span {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.phone-incoming-title span::before {
  content: "| ";
  color: #a7b1a8;
}

.phone-incoming-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.phone-incoming-actions {
  display: grid;
  grid-template-columns: 36px 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.phone-accept-button,
.phone-reject-button {
  width: 36px;
  height: 34px;
  border-radius: 6px;
}

.phone-accept-button {
  border-color: rgba(57, 135, 73, 0.28);
  background: #2f8f48;
}

.phone-reject-button {
  border-color: rgba(183, 55, 37, 0.26);
  background: var(--accent);
}

.phone-reject-button:hover {
  border-color: rgba(183, 55, 37, 0.26);
  background: var(--accent);
}

.phone-ignore-button {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.phone-ignore-button:hover {
  border-color: #c7d0c7;
  background: #f7f8f5;
}

@keyframes phoneIncomingPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(57, 135, 73, 0.18);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(57, 135, 73, 0.08);
  }
}

.phone-call-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.phone-call-view strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-call-view span {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.phone-call-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-mute-button,
.phone-hangup-button {
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

.phone-mute-button {
  background: #ffffff;
}

.phone-mute-button.is-muted {
  border-color: rgba(183, 55, 37, 0.25);
  background: rgba(183, 55, 37, 0.08);
}

.phone-hangup-button {
  border-color: rgba(183, 55, 37, 0.26);
  background: var(--accent);
}

.phone-hangup-button:hover {
  border-color: rgba(183, 55, 37, 0.26);
  background: var(--accent);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
}

.user-chip > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  background: #ffffff;
  font-weight: 800;
}

.user-chip strong,
.user-chip small {
  display: block;
  white-space: nowrap;
}

.user-chip strong {
  font-size: 0.9rem;
}

.user-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.empty-workspace {
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(#eef1ec 1px, transparent 1px),
    linear-gradient(90deg, #eef1ec 1px, transparent 1px),
    #f8f9f6;
  background-size: 28px 28px;
}

.workspace {
  min-height: 0;
  overflow: hidden;
  padding: 28px;
  background: #f8f9f6;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 25vw)) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  background:
    linear-gradient(#eef1ec 1px, transparent 1px),
    linear-gradient(90deg, #eef1ec 1px, transparent 1px),
    #f8f9f6;
  background-size: 28px 28px;
}

.dashboard-inbox {
  width: 100%;
  max-height: min(620px, calc(100vh - 176px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(24, 33, 30, 0.08);
  overflow: hidden;
}

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

.dashboard-inbox-head h2 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-inbox-head > span {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #edf0ec;
  border-radius: 999px;
  color: var(--steel);
  background: #fbfcfa;
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-inbox-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border-top: 1px solid #edf0ec;
  border-bottom: 1px solid #edf0ec;
  padding: 6px;
  background: #fbfcfa;
}

.dashboard-inbox-tabs-three {
  grid-template-columns: repeat(3, 1fr);
}

.dashboard-inbox-tabs button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  padding: 7px 4px;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-inbox-tabs button.is-active {
  color: var(--ink);
  background: #edf1eb;
}

.dashboard-inbox-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  overflow: auto;
}

.dashboard-inbox-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  align-items: start;
  gap: 9px;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  padding: 9px;
  background: #ffffff;
}

.dashboard-pipeline-item {
  grid-template-columns: 32px minmax(0, 1fr);
}

.dashboard-inbox-item[hidden],
.dashboard-inbox-empty[hidden] {
  display: none;
}

.dashboard-inbox-placeholder {
  grid-template-columns: 32px minmax(0, 1fr);
}

.dashboard-inbox-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f2f5f1;
}

.dashboard-inbox-icon img {
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.dashboard-inbox-icon-call {
  background: rgba(187, 51, 36, 0.08);
}

.dashboard-inbox-icon-email {
  background: rgba(68, 113, 124, 0.1);
}

.timeline-email-card {
  display: grid;
  gap: 10px;
}

.timeline-email-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-email-body {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  line-height: 1.45;
}

.timeline-email-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-email-attachments a,
.timeline-email-attachments span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
}

.timeline-email-attachments img {
  width: 14px;
  height: 14px;
}

.dashboard-inbox-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: inherit;
  text-decoration: none;
}

.dashboard-inbox-copy strong,
.dashboard-inbox-copy span,
.dashboard-inbox-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-inbox-copy strong {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.dashboard-inbox-copy span {
  color: var(--steel);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-inbox-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.inbox-done-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe4da;
  border-radius: 7px;
  background: #fbfcfa;
  cursor: pointer;
}

.inbox-done-button:hover {
  border-color: rgba(45, 125, 70, 0.35);
  background: rgba(45, 125, 70, 0.08);
}

.inbox-done-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.inbox-done-button img {
  width: 15px;
  height: 15px;
  opacity: 0.78;
}

.dashboard-inbox-empty {
  margin: 0;
  border: 1px dashed #dfe5de;
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: #fbfcfa;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.leads-workspace {
  overflow: auto;
}

.leads-workspace:has(.lead-detail) {
  overflow: hidden;
}

.lead-section-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 46px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lead-tab-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.lead-section-tabs a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.lead-section-tabs a:hover {
  color: var(--ink);
  background: #f3f5f1;
}

.lead-section-tabs a.is-active {
  color: var(--ink);
  font-weight: 850;
  background: #eef1ec;
}

.lead-website-tab {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #eef1ec;
}

.lead-website-tab > a {
  min-height: 34px;
  padding: 0 10px;
}

.lead-website-tab .lead-website-tab-close {
  min-width: 28px;
  justify-content: center;
  border-left: 1px solid #d9dfd7;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 900;
}

.lead-website-tab .lead-website-tab-close:hover {
  color: var(--accent);
  background: #f7f8f5;
}

.lead-empty-tab {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lead-empty-tab-soft {
  display: flex;
  align-items: center;
  min-height: 92px;
  padding: 14px;
}

.settings-workspace {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
}

.settings-panel,
.settings-alert {
  width: min(720px, 100%);
}

.settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
}

.settings-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.settings-panel-head > img,
.settings-panel-title > img {
  width: 24px;
  height: 24px;
  opacity: 0.72;
}

.settings-panel-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.settings-panel-head-spread {
  justify-content: space-between;
  gap: 16px;
}

.settings-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.connector-row-stack {
  display: grid;
  align-items: stretch;
}

.connector-row strong {
  display: block;
  font-size: 0.94rem;
}

.connector-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.integration-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #edf0ec;
  border-radius: 7px;
  padding: 9px 10px;
  background: #ffffff;
}

.integration-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.integration-row strong,
.integration-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-row strong {
  font-size: 0.86rem;
}

.integration-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

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

.connector-form label,
.connector-field {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.connector-form input,
.connector-form select {
  width: 100%;
  height: 40px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 11px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.connector-form select {
  font-weight: 800;
}

.connector-form input:focus,
.connector-form select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.12);
}

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

.twilio-number-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.twilio-number-row .icon-only {
  width: 34px;
  height: 34px;
}

.twilio-number-row .icon-only[hidden] {
  display: none;
}

.twilio-number-add {
  justify-self: start;
  margin-top: 2px;
}

.connector-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  grid-column: 1 / -1;
  gap: 10px;
}

.invite-link-panel {
  display: grid;
  gap: 8px;
}

.invite-link-panel strong {
  font-size: 0.96rem;
}

.invite-link-panel input {
  width: 100%;
  height: 40px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 11px;
  color: var(--ink);
  background: #fbfcfa;
  font-weight: 800;
}

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

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #edf0ec;
  border-radius: 7px;
  padding: 10px 11px;
  background: #ffffff;
}

.team-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-row strong,
.team-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.team-row-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.team-row-meta small {
  border: 1px solid rgba(183, 55, 37, 0.22);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-dark);
  background: rgba(183, 55, 37, 0.07);
  font-size: 0.7rem;
  font-weight: 900;
}

.empty-state {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  text-align: center;
}

.empty-state img {
  width: 46px;
  height: 46px;
  opacity: 0.42;
}

.empty-state h2 {
  margin: 0;
  color: var(--steel);
  font-size: 1.25rem;
}

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

.lead-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: inherit;
  background: #ffffff;
  text-decoration: none;
}

.lead-row:hover {
  border-color: #c8d2ca;
  box-shadow: 0 10px 30px rgba(27, 38, 35, 0.07);
}

.lead-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef1ec;
}

.lead-folder-list {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-content: start;
}

.lead-folder-row {
  position: relative;
  min-height: 104px;
  align-items: start;
  padding: 0;
}

.lead-folder-link {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 14px 48px 14px 14px;
  color: inherit;
  text-decoration: none;
}

.lead-folder-action {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

.lead-folder-icon {
  background: rgba(183, 55, 37, 0.08);
}

.lead-folder-icon img {
  filter: invert(31%) sepia(56%) saturate(1136%) hue-rotate(337deg) brightness(92%) contrast(87%);
}

.lead-list-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 20px 80px rgba(23, 32, 29, 0.22);
}

.lead-list-modal label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 900;
}

.lead-list-modal input,
.lead-list-modal select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--steel);
  background: #ffffff;
  font: inherit;
  font-weight: 700;
}

.lead-list-modal-text,
.lead-list-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.lead-list-help {
  margin: 8px 0 0;
  font-size: 0.76rem;
}

.lead-list-delete-actions,
.lead-transfer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-list-delete-actions {
  justify-content: flex-start;
}

.lead-transfer-head {
  margin: 4px 0 10px;
}

.lead-transfer-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #f9faf8;
}

.lead-transfer-list label {
  min-height: 30px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin: 0;
  font-size: 0.82rem;
}

.lead-transfer-list input {
  min-height: auto;
}

.mini-action-danger {
  color: #ffffff;
  background: var(--accent);
}

.lead-import-modal {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 20px 80px rgba(23, 32, 29, 0.22);
}

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

.lead-import-source-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--steel);
  background: #f9faf8;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.lead-import-source-card:hover {
  border-color: #c8d2ca;
  background: #ffffff;
}

.lead-import-source-card img {
  width: 22px;
  height: 22px;
  opacity: 0.72;
}

.lead-import-source-card strong {
  font-size: 0.98rem;
}

.lead-import-source-card span,
.lead-import-toolbar p,
.lead-import-duplicate-copy {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.lead-import-paste-panel {
  margin-top: 12px;
}

.lead-import-paste-panel textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--steel);
  font: inherit;
  font-weight: 700;
}

.lead-import-status {
  margin-bottom: 12px;
  border: 1px solid rgba(52, 101, 74, 0.22);
  border-radius: 6px;
  padding: 10px 12px;
  color: #2f6648;
  background: rgba(52, 101, 74, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
}

.lead-import-status.is-error {
  border-color: rgba(183, 55, 37, 0.28);
  color: var(--accent-dark);
  background: rgba(183, 55, 37, 0.07);
}

.lead-research-board {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.lead-research-board-head,
.lead-research-job-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lead-research-board h2,
.lead-research-job h3,
.lead-research-candidate h3 {
  margin: 2px 0 0;
}

.lead-research-jobs {
  display: grid;
  gap: 10px;
}

.lead-research-job,
.lead-research-candidate {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.lead-research-job p,
.lead-research-candidate p,
.lead-research-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-research-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  margin: 10px 0;
  background: #eef1ec;
}

.lead-research-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

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

.lead-research-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.lead-research-candidate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-research-warning {
  display: block;
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
}

.lead-research-modal {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 20px 80px rgba(23, 32, 29, 0.22);
}

.lead-research-form,
.lead-research-key-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.lead-research-form[hidden],
.lead-research-key-form[hidden] {
  display: none;
}

.lead-research-copy {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.lead-research-field {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 0.84rem;
  font-weight: 800;
}

.lead-research-field input,
.lead-research-field textarea {
  width: 100%;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  color: var(--ink);
  background: #fdfdfb;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.lead-research-field input {
  height: 42px;
  padding: 0 11px;
}

.lead-research-field textarea {
  min-height: 108px;
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.45;
}

.lead-research-field input:focus,
.lead-research-field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.14);
}

.lead-research-count-field {
  max-width: 210px;
}

.lead-research-modal .form-row-actions {
  grid-template-columns: minmax(0, 1fr);
}

.lead-research-modal .primary-action {
  width: 100%;
  min-height: 42px;
}

.lead-research-status {
  margin-bottom: 12px;
  border: 1px solid rgba(52, 101, 74, 0.22);
  border-radius: 6px;
  padding: 10px 12px;
  color: #2f6648;
  background: rgba(52, 101, 74, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
}

.lead-research-status.is-error {
  border-color: rgba(183, 55, 37, 0.28);
  color: var(--accent-dark);
  background: rgba(183, 55, 37, 0.07);
}

.lead-import-toolbar,
.lead-transfer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-import-table-wrap {
  max-height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lead-import-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.lead-import-table th,
.lead-import-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 7px;
  text-align: left;
  vertical-align: top;
}

.lead-import-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f7f4;
}

.lead-import-table th span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.lead-import-column-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.lead-import-column-head span {
  min-width: 0;
  margin-bottom: 0;
}

.lead-import-column-head .icon-only {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.lead-import-table select,
.lead-import-table input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  color: var(--steel);
  background: #ffffff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-import-duplicates {
  display: grid;
  gap: 10px;
}

.lead-import-duplicate-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgba(183, 55, 37, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(183, 55, 37, 0.04);
}

.lead-import-duplicate-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.lead-import-decision {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 160px;
}

.lead-import-decision label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
}

.supplier-icon {
  background: #eef4ea;
}

.lead-icon img {
  width: 22px;
  height: 22px;
  opacity: 0.72;
}

.lead-row h2 {
  margin: 0;
  font-size: 1.05rem;
}

.lead-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.lead-detail {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(360px, 1fr) 300px;
  gap: 14px;
  overflow: hidden;
}

.lead-detail-leads {
  grid-template-columns: 320px minmax(520px, 1fr);
}

.lead-detail-leads > .timeline-panel {
  grid-column: 2;
  grid-row: 1;
}

.lead-detail-suppliers {
  grid-template-columns: 320px minmax(520px, 1fr);
}

.lead-detail-suppliers > .detail-column:first-child {
  grid-column: 1;
  grid-row: 1;
}

.lead-detail-suppliers > .timeline-panel,
.lead-detail-suppliers > .supplier-main-panel {
  grid-column: 2;
  grid-row: 1;
}

.website-card {
  margin-bottom: 10px;
}

.website-card a {
  color: var(--steel);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.website-card a:hover {
  color: var(--accent);
}

.lead-website-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.lead-website-view[hidden],
[data-lead-tab-content][hidden],
.lead-website-tab[hidden] {
  display: none !important;
}

.lead-website-frame-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  background: #f6f7f4;
}

.lead-website-frame-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-website-view iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: #ffffff;
}

.lead-website-frame-note {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.detail-column,
.timeline-panel {
  min-height: 0;
  overflow: auto;
}

.detail-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.detail-panel,
.timeline-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.detail-panel {
  padding: 14px;
}

.detail-company-mark,
.timeline-icon {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef1ec;
}

.detail-company-mark {
  width: 42px;
  height: 42px;
}

.detail-company-mark img,
.detail-panel-head img {
  width: 20px;
  height: 20px;
  opacity: 0.72;
}

.detail-panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.detail-panel-head-spread {
  justify-content: space-between;
}

.detail-panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-panel-head-tight {
  margin-top: 4px;
  margin-bottom: 0;
}

.detail-panel-head h3,
.timeline-head h2,
.timeline-card h3,
.contact-card h4 {
  margin: 0;
}

.detail-panel-head h3 {
  font-size: 0.98rem;
}

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

.compact-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0ec;
  padding-bottom: 9px;
}

.compact-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.compact-facts dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
}

.address-list,
.contact-list {
  display: grid;
  gap: 10px;
}

.contact-list.is-sorting .contact-card {
  cursor: grabbing;
}

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

.supplier-products-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.supplier-products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #edf0ec;
  padding-bottom: 14px;
}

.supplier-products-head h2 {
  margin: 0;
  font-size: 1.18rem;
}

.supplier-products-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.supplier-product-search {
  width: min(320px, 48%);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe0da;
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
}

.supplier-product-search img {
  width: 15px;
  height: 15px;
  opacity: 0.62;
}

.supplier-product-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  outline: none;
  font-size: 0.84rem;
  font-weight: 750;
}

.supplier-product-list {
  align-content: start;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow: auto;
}

.supplier-product-card {
  min-height: 78px;
  align-items: stretch;
  padding: 13px 12px;
  background: #ffffff;
}

.supplier-product-card > .edit-view {
  width: 100%;
  align-items: center;
}

.supplier-product-card .product-card-main {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(260px, 2fr);
  align-items: center;
  gap: 18px;
}

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

.supplier-product-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-product-title small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 850;
}

.supplier-product-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.supplier-product-facts div {
  min-width: 0;
  border: 1px solid #edf0ec;
  border-radius: 7px;
  padding: 8px 9px;
  background: #fbfcfa;
}

.supplier-product-facts dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.supplier-product-facts dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-product-facts dd small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-product-empty {
  margin: 0;
  border: 1px dashed #dfe5de;
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fbfcfa;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.supplier-product-card[hidden],
.supplier-product-empty[hidden] {
  display: none;
}

.product-card {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  padding: 0 8px 0 11px;
  background: #fbfcfa;
}

.product-card-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-card-main strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.product-card-main small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.product-price-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  color: var(--steel);
}

.product-price-line strong {
  font-size: 0.78rem;
}

.product-price-line small,
.price-updated-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.product-edit-panel {
  display: none;
  gap: 10px;
  margin-top: 0;
  border: 1px solid #dfe5de;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.editable-card.is-editing > .product-edit-panel {
  display: grid;
}

.product-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf0ec;
  padding-bottom: 8px;
}

.product-edit-head h4 {
  font-size: 0.92rem;
  white-space: nowrap;
}

.product-edit-head small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.product-edit-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.product-edit-panel .form-row-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.product-edit-danger {
  display: grid;
  gap: 8px;
  border-top: 1px solid #edf0ec;
  padding-top: 9px;
}

.product-edit-danger .mini-action {
  width: 100%;
}

.product-edit-danger span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.mini-action-danger {
  border-color: rgba(187, 51, 36, 0.22);
  color: var(--accent);
  background: rgba(187, 51, 36, 0.05);
}

.mini-action-danger:hover {
  background: rgba(187, 51, 36, 0.08);
}

.mini-action-danger img {
  filter: invert(24%) sepia(89%) saturate(1600%) hue-rotate(348deg) brightness(89%) contrast(92%);
  opacity: 0.82;
}

.address-card,
.contact-card {
  border: 1px solid #edf0ec;
  border-radius: 8px;
  background: #fbfcfa;
}

.address-card {
  padding: 11px;
}

.editable-card {
  position: relative;
}

.editable-card-plain {
  border: 0;
  background: transparent;
}

.edit-view {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.edit-view > div:first-child,
.contact-card > div:last-child {
  min-width: 0;
}

.edit-view strong {
  display: block;
  color: var(--steel);
  font-size: 0.86rem;
}

.edit-view p {
  margin: 4px 0 0;
  color: var(--steel);
  font-size: 0.84rem;
  line-height: 1.35;
}

.field-caption {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.inline-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.icon-only {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--steel);
  background: transparent;
  cursor: pointer;
}

.icon-only:hover {
  border-color: var(--line);
  background: #ffffff;
}

.icon-only img {
  width: 15px;
  height: 15px;
  opacity: 0.72;
}

.icon-only-danger:hover {
  border-color: rgba(187, 51, 36, 0.25);
  background: rgba(187, 51, 36, 0.06);
}

.icon-only-danger img {
  opacity: 0.62;
}

.icon-only-danger:hover img {
  filter: invert(24%) sepia(89%) saturate(1600%) hue-rotate(348deg) brightness(89%) contrast(92%);
  opacity: 0.9;
}

.icon-only:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.edit-form {
  display: none;
  margin-top: 8px;
}

.editable-card.is-editing > .edit-view,
.editable-card.is-editing > div > .edit-view,
.editable-card.is-editing > .add-toggle {
  display: none;
}

.editable-card.is-editing > .edit-form,
.editable-card.is-editing > div > .edit-form,
.editable-card.is-editing .timeline-card > .edit-form {
  display: grid;
}

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

.add-card {
  margin-top: 10px;
  border: 1px dashed #dfe4dd;
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
}

.add-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--steel);
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
}

.add-toggle:hover {
  background: #f8f9f6;
}

.timeline-panel {
  padding: 16px;
}

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

.lead-main-panel > [data-lead-tab-content] {
  min-height: 0;
  overflow: auto;
}

.lead-main-panel .timeline-list,
.lead-main-panel .lead-inquiries,
.lead-main-panel .lead-empty-tab {
  min-height: 0;
  overflow: auto;
}

.lead-inquiries {
  display: grid;
  align-content: start;
  gap: 12px;
}

.power-dialer-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.power-dialer-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
}

.power-dialer-board-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.18rem;
}

.power-dialer-board-head > span {
  border: 1px solid #e1e6df;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--steel);
  background: #f7f9f6;
  font-size: 0.78rem;
  font-weight: 850;
}

.power-dialer-grid {
  min-height: 0;
  display: grid;
  gap: 12px;
}

.power-dialer-grid-1 {
  grid-template-columns: 1fr;
}

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

.power-dialer-grid-3,
.power-dialer-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, 1fr);
}

.power-dialer-card {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid #dfe5de;
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
}

.power-dialer-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent);
  background: rgba(183, 55, 37, 0.08);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.power-dialer-card.is-connected span {
  color: #28783f;
  background: rgba(57, 135, 73, 0.1);
}

.power-dialer-card.is-stopped span,
.power-dialer-card.is-missed span {
  color: var(--muted);
  background: #f1f3f0;
}

.power-dialer-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.12;
}

.power-dialer-card p,
.power-dialer-card small {
  margin: 0;
  color: var(--steel);
  font-weight: 850;
}

.power-dialer-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.power-dialer-locked .workspace a[href^="mailto:"],
.power-dialer-locked .workspace [data-contact-action],
.power-dialer-locked .workspace .detail-column button,
.power-dialer-locked .workspace .lead-section-tabs button,
.power-dialer-locked .workspace .inquiry-card-actions,
.power-dialer-locked .workspace .editable-card:not(.timeline-item-call) > .edit-view button {
  pointer-events: none;
  opacity: 0.42;
}

.inquiry-form {
  display: grid;
  gap: 14px;
  border: 1px solid #dfe5de;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.inquiry-form[hidden] {
  display: none;
}

.inquiry-card > .inquiry-edit-form {
  display: none;
}

.inquiry-card.is-editing > .inquiry-edit-form {
  display: grid;
}

.inquiry-form-head,
.inquiry-card-head,
.inquiry-delivery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inquiry-delivery-head label {
  flex: 1 1 0;
}

.inquiry-form-head h2,
.inquiry-card h3 {
  font-size: 1.05rem;
}

.inquiry-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 800;
}

.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.inquiry-form input,
.inquiry-form select {
  height: 34px;
  padding: 0 9px;
}

.inquiry-form textarea {
  min-height: 82px;
  padding: 8px 9px;
  resize: vertical;
  line-height: 1.4;
}

.inquiry-form input:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.12);
}

.inquiry-title-group > span,
.inquiry-delivery-summary-head span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.inquiry-card-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.inquiry-card-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.inquiry-form-grid,
.inquiry-meta-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1.25fr) minmax(190px, 0.95fr) minmax(112px, 0.45fr);
  gap: 10px;
}

.inquiry-checkbox-field {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 58px;
  border: 1px solid #e6ebe4;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfa;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.inquiry-checkbox-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.inquiry-checkbox-field span {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: 1.2;
}

.inquiry-deliveries,
.inquiry-list,
.inquiry-delivery-list {
  display: grid;
  gap: 10px;
}

.inquiry-list {
  gap: 9px;
}

.inquiry-delivery,
.inquiry-delivery-summary {
  border: 1px solid #e7ece6;
  border-radius: 8px;
  background: #fbfcfa;
}

.inquiry-card {
  border: 1px solid #dde4dd;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(24, 35, 32, 0.035);
}

.inquiry-card-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "identity"
    "facts"
    "deliveries"
    "notes";
  align-items: start;
  gap: 9px;
}

.inquiry-card-head {
  display: flex;
  grid-area: identity;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border-bottom: 1px solid #edf0ec;
  padding-bottom: 8px;
}

.inquiry-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  min-width: 250px;
}

.inquiry-stage-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
  justify-content: flex-end;
}

.supplier-request-open {
  min-height: 30px;
  padding-inline: 9px;
  white-space: nowrap;
}

.supplier-request-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(47, 111, 137, 0.18);
  border-radius: 6px;
  padding: 0 8px;
  color: #2f6f89;
  background: rgba(47, 111, 137, 0.07);
  font-size: 0.74rem;
  font-weight: 850;
}

.inquiry-card-actions time {
  width: auto;
  min-width: 0;
  margin-right: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.inquiry-title-group {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}

.inquiry-title-group h3 {
  font-size: 1.04rem;
}

.inquiry-overview-grid {
  display: grid;
  grid-area: facts;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.9fr) minmax(74px, 0.36fr) minmax(104px, 0.48fr);
  gap: 6px;
  min-width: 0;
}

.inquiry-overview-grid div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fbfcfa;
}

.inquiry-overview-grid small,
.inquiry-delivery-summary li small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.inquiry-overview-grid strong {
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.25;
}

.inquiry-delivery {
  padding: 12px;
}

.inquiry-delivery {
  background: #f8f9f6;
}

.inquiry-delivery-summary {
  padding: 9px;
  background: #fbfcfa;
}

.inquiry-delivery-list {
  grid-area: deliveries;
}

.inquiry-delivery-summary-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.inquiry-delivery-summary-head h4 {
  min-width: 0;
}

.inquiry-delivery-summary-head small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-product-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid #edf0ec;
  padding-top: 12px;
}

.inquiry-product-picker label:first-child {
  position: relative;
}

.inquiry-product-suggestions {
  position: absolute;
  z-index: 15;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #dfe5de;
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(24, 35, 32, 0.12);
}

.inquiry-product-suggestions button {
  width: 100%;
  display: grid;
  gap: 2px;
  border: 0;
  border-radius: 6px;
  padding: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.inquiry-product-suggestions button:hover {
  background: #f3f5f1;
}

.inquiry-product-suggestions small,
.inquiry-item-row small,
.inquiry-card-head time {
  color: var(--muted);
  font-size: 0.76rem;
}

.inquiry-items {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.inquiry-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 58px;
  align-items: center;
  gap: 8px;
  border: 1px solid #edf0ec;
  border-radius: 7px;
  padding: 8px;
  background: #ffffff;
}

.inquiry-item-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inquiry-item-row .inline-icon-actions {
  justify-content: end;
}

.inquiry-add-delivery {
  justify-self: start;
}

.inquiry-form > .form-row-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.inquiry-meta-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inquiry-meta-grid strong,
.inquiry-delivery-summary h4 {
  font-size: 0.8rem;
}

.inquiry-delivery-summary ul {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.inquiry-delivery-summary li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #edf0ec;
  border-radius: 7px;
  padding: 7px 8px;
  background: #ffffff;
  font-size: 0.8rem;
}

.inquiry-delivery-summary li span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inquiry-notes {
  grid-area: notes;
  margin: 0;
  border-top: 1px solid #edf0ec;
  padding-top: 8px;
  color: var(--steel);
  font-size: 0.8rem;
}

.supplier-request-modal {
  width: min(760px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.supplier-request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.supplier-request-head h2 {
  font-size: 1.1rem;
}

.supplier-request-list {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding-right: 2px;
}

.supplier-request-delivery {
  display: grid;
  gap: 8px;
}

.supplier-request-delivery h3 {
  color: var(--steel);
  font-size: 0.82rem;
}

.supplier-request-item {
  display: grid;
  gap: 9px;
  border: 1px solid #e4e9e3;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.supplier-request-item.has-error {
  border-color: rgba(187, 51, 36, 0.42);
  box-shadow: 0 0 0 3px rgba(187, 51, 36, 0.08);
}

.supplier-request-item-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: start;
}

.supplier-request-item-title div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.supplier-request-item-title small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.supplier-request-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}

.supplier-request-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(47, 111, 137, 0.18);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--steel);
  background: #ffffff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 830;
}

.supplier-request-chip:hover {
  border-color: rgba(187, 51, 36, 0.32);
  background: #fff8f6;
}

.supplier-request-chip img {
  width: 13px;
  height: 13px;
  opacity: 0.58;
}

.supplier-request-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.supplier-request-search input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.supplier-request-search input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.12);
}

.supplier-request-modal .form-row-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.supplier-request-modal .mini-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.offer-modal {
  width: min(980px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.offer-modal.is-previewing {
  width: min(760px, calc(100vw - 48px));
  height: calc(100vh - 32px);
  max-height: none;
}

.offer-modal [data-offer-edit-panel] {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 14px;
}

.offer-modal [data-offer-edit-panel][hidden] {
  display: none;
}

.offer-modal-preview {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

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

.offer-pdf-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f6f2;
}

.offer-modal-list,
.offer-delivery-group,
.lead-offers {
  display: grid;
  gap: 12px;
}

.offer-modal-list {
  overflow: auto;
  padding-right: 2px;
}

.offer-delivery-group h3 {
  margin: 0;
  color: var(--steel);
  font-size: 0.82rem;
}

.offer-item-card {
  border: 1px solid #e4e9e3;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.offer-item-head,
.offer-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.offer-item-head {
  margin-bottom: 10px;
}

.offer-item-head small,
.offer-preview-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.offer-item-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(110px, 1fr));
  gap: 10px;
}

.offer-item-grid label,
.offer-delivery-cost label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 830;
}

.offer-item-grid input,
.offer-item-grid select,
.offer-delivery-cost input {
  width: 100%;
  height: 36px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
  font-weight: 760;
  outline: none;
}

.offer-delivery-cost {
  max-width: 220px;
}

.offer-modal-totals,
.offer-preview-totals {
  display: grid;
  gap: 6px;
  justify-self: end;
  min-width: 260px;
}

.offer-modal-totals p,
.offer-preview-totals p {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  color: var(--steel);
  font-size: 0.86rem;
  font-weight: 830;
}

.offer-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.offer-preview-head {
  margin-bottom: 14px;
}

.offer-preview-head h2 {
  margin: 2px 0;
}

.offer-preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.offer-preview-meta {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.offer-preview-meta div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.offer-preview-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.offer-preview-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.offer-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 130px 130px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.offer-preview-row:first-child {
  border-top: 0;
}

.offer-preview-row-head {
  color: var(--muted);
  background: #f4f6f2;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.offer-preview-grand-total {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  color: var(--ink) !important;
  font-size: 1rem !important;
}

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

.offer-list-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
  background: #ffffff;
}

.email-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--steel);
  background: #fbfcfa;
  font-size: 0.84rem;
  font-weight: 830;
}

.email-attachment[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .email-modal-backdrop.has-side-preview {
    grid-template-columns: 1fr;
    overflow: auto;
    align-items: start;
  }

  .email-offer-preview {
    height: min(760px, calc(100vh - 48px));
  }

  .offer-item-grid,
  .offer-preview-meta,
  .offer-preview-row {
    grid-template-columns: 1fr;
  }
}

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

.timeline-head h2 {
  font-size: 1.15rem;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.timeline-item-outgoing,
.timeline-item-system {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.timeline-item-outgoing .timeline-icon,
.timeline-item-system .timeline-icon {
  grid-column: 2;
  grid-row: 1;
}

.timeline-item-outgoing .timeline-card,
.timeline-item-system .timeline-card {
  grid-column: 1;
  justify-self: end;
  text-align: left;
}

.timeline-item-incoming .timeline-card,
.timeline-item-outgoing .timeline-card,
.timeline-item-system .timeline-card {
  width: min(78%, 520px);
}

.timeline-item-incoming .timeline-card {
  justify-self: start;
}

.timeline-icon {
  width: 34px;
  height: 34px;
  margin-top: 2px;
}

.timeline-icon img {
  width: 17px;
  height: 17px;
  opacity: 0.72;
}

.timeline-card {
  border: 1px solid #e7ece6;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.timeline-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-add-card {
  position: relative;
  min-width: 118px;
}

.note-add-card .note-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(360px, 72vw);
  border: 1px solid #dfe5de;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(24, 35, 32, 0.14);
}

.timeline-card .note-form {
  margin-top: 10px;
  border-top: 1px solid #edf0ec;
  padding-top: 10px;
}

.timeline-item-outgoing .timeline-card,
.timeline-item-system .timeline-card {
  border-color: rgba(187, 51, 36, 0.18);
  background: #fffaf8;
}

.timeline-item-incoming .timeline-card {
  background: #ffffff;
}

.timeline-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.timeline-card-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-live-tag {
  border: 1px solid rgba(51, 132, 88, 0.22);
  border-radius: 999px;
  padding: 1px 6px;
  color: #25724c;
  background: #eef8f1;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  text-transform: none;
}

.timeline-card h3 {
  margin-top: 3px;
  font-size: 0.98rem;
}

.timeline-card time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.timeline-card p {
  margin: 10px 0 8px;
  color: var(--steel);
  font-size: 0.9rem;
  line-height: 1.45;
}

.call-note {
  border: 1px solid #edf0ec;
  border-radius: 7px;
  margin: 8px 0;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.72);
}

.call-note span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.call-note p {
  margin: 4px 0 0;
  font-size: 0.86rem;
}

.power-dialer-review-summary {
  border-color: rgba(47, 111, 137, 0.18);
  background: rgba(47, 111, 137, 0.06);
}

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

.power-review-grid [hidden] {
  display: none !important;
}

.power-review-grid fieldset,
.power-review-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid #e3e8e1;
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
}

.power-review-grid legend,
.power-review-grid > label > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.power-review-grid fieldset label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 0;
  border-radius: 5px;
  padding: 4px 6px;
  color: var(--steel);
  background: #f7f9f6;
  font-size: 0.76rem;
  font-weight: 850;
}

.power-review-grid input[type="radio"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.power-review-grid select {
  width: 100%;
  min-height: 32px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.power-dialer-review-form textarea {
  min-height: 84px;
  resize: vertical;
}

.timeline-audio {
  width: 100%;
  height: 34px;
  margin: 2px 0 8px;
}

.timeline-audio-native {
  display: none;
}

.timeline-audio-player {
  min-height: 44px;
  display: grid;
  grid-template-columns: 34px minmax(120px, 1fr) auto 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 4px 0 8px;
  padding: 5px 7px;
  background: #f6f7f4;
}

.timeline-audio-play,
.timeline-audio-speed {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--steel);
  background: #ffffff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.timeline-audio-play {
  width: 30px;
  padding: 0;
}

.timeline-audio-speed {
  min-width: 38px;
  padding: 0 7px;
}

.timeline-audio-play:hover,
.timeline-audio-speed:hover {
  background: #edf0ec;
}

.timeline-audio-waveform {
  width: 100%;
  height: 34px;
  display: block;
  cursor: pointer;
}

.timeline-audio-time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.transcript-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0 0 8px;
  padding: 0 10px;
  color: var(--steel);
  background: #ffffff;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.transcript-button:hover {
  background: #f7f8f5;
}

.transcript-button img {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.timeline-card small,
.muted-copy {
  color: var(--muted);
}

.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  cursor: grab;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.contact-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.995);
}

.contact-card.is-drop-target {
  border-color: rgba(187, 51, 36, 0.34);
  box-shadow: 0 0 0 2px rgba(187, 51, 36, 0.08);
}

.contact-card .edit-view {
  display: block;
  padding-right: 28px;
}

.contact-card .inline-icon-actions {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  gap: 4px;
}

.contact-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--steel-light);
  font-weight: 800;
}

.contact-card h4 {
  margin: 0;
  font-size: 0.93rem;
}

.contact-title-line {
  min-width: 0;
  display: block;
  padding-right: 2px;
}

.contact-title-line h4 {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

.contact-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 3px 0 2px;
}

.contact-meta-line p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.priority-tag {
  flex: 0 0 auto;
  border: 1px solid #e1e7df;
  border-radius: 999px;
  padding: 1px 5px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.15;
}

.contact-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-card a {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  margin-top: 6px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.contact-card a img {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  opacity: 0.72;
}

.contact-card a span {
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.contact-links {
  display: grid;
  gap: 4px;
  margin: 9px 0;
  overflow: visible;
}

.contact-delete-form {
  display: none;
  margin-top: 8px;
}

.contact-card.is-editing > div > .contact-delete-form {
  display: block;
}

.contact-delete-form .mini-action {
  width: 100%;
}

.method-editor {
  display: grid;
  gap: 6px;
}

.method-editor > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.method-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.method-row .icon-only {
  width: 30px;
  height: 30px;
}

.mini-link-button {
  width: max-content;
  border: 0;
  padding: 0;
  color: var(--steel);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.mini-link-button:hover {
  color: var(--accent);
}

.contact-menu {
  position: fixed;
  z-index: 50;
  min-width: 150px;
  border: 1px solid #d8ded7;
  border-radius: 6px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(23, 32, 29, 0.18);
}

.contact-menu button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  padding: 0 9px;
  color: var(--steel);
  background: transparent;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 700;
  text-align: left;
}

.contact-menu button:hover {
  background: #f2f5f1;
}

.contact-menu img {
  width: 15px;
  height: 15px;
  opacity: 0.72;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 32, 29, 0.36);
  backdrop-filter: blur(3px);
}

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

.product-db-modal {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.product-db-table-wrap {
  overflow: auto;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  background: #ffffff;
}

.product-db-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.product-db-table th,
.product-db-table td {
  border-bottom: 1px solid #edf0ec;
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.product-db-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #fbfcfa;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-db-table td {
  color: var(--steel);
  font-size: 0.84rem;
  font-weight: 750;
}

.product-db-table td > strong,
.product-db-supplier strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
}

.product-db-table small,
.product-db-supplier small,
.product-db-price small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.product-db-suppliers {
  display: grid;
  gap: 7px;
}

.product-db-supplier {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
  gap: 12px;
  border: 1px solid #edf0ec;
  border-radius: 7px;
  padding: 8px 9px;
  background: #fbfcfa;
}

.product-db-price {
  text-align: right;
}

.muted-inline {
  color: var(--muted);
  font-weight: 750;
}

.product-modal {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.dialer-modal {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.dialer-summary-modal {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.dialer-preview-list-modal {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.dialer-summary-copy {
  margin: 0;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 850;
}

.dialer-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dialer-summary-stats div {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.dialer-summary-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dialer-summary-stats strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.dialer-summary-actions {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.dialer-summary-actions .mini-action {
  min-height: 38px;
}

.dialer-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 190px);
  gap: 14px;
  align-items: center;
  border: 1px solid #edf0ec;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.dialer-setting strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
}

.dialer-setting span,
.dialer-preview-button span,
.dialer-number-menu p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.38;
}

.dialer-setting select,
.dialer-setting input[type="number"] {
  width: 100%;
  height: 38px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
  outline: none;
}

.dialer-radio-group {
  display: grid;
  gap: 6px;
}

.dialer-radio-group label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 9px;
  background: #ffffff;
  color: var(--steel);
  font-size: 0.8rem;
  font-weight: 850;
}

.dialer-radio-group input {
  accent-color: var(--accent);
}

.dialer-number-picker {
  position: relative;
}

.dialer-number-toggle {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
}

.dialer-number-toggle img {
  width: 15px;
  height: 15px;
  opacity: 0.68;
}

.dialer-number-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 56;
  display: grid;
  gap: 4px;
  border: 1px solid #d8ded7;
  border-radius: 7px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(23, 32, 29, 0.14);
}

.dialer-number-menu[hidden] {
  display: none;
}

.dialer-number-menu label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 5px;
  padding: 0 8px;
  color: var(--steel);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.dialer-number-menu label:hover {
  background: #f2f5f1;
}

.dialer-number-menu input {
  accent-color: var(--accent);
}

.dialer-preview-button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px dashed #dbe0da;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.dialer-preview-button:hover {
  border-color: #cbd4ca;
  background: #fbfcfa;
}

.dialer-preview-button img {
  width: 18px;
  height: 18px;
  opacity: 0.72;
}

.dialer-preview-button span {
  margin: 0;
}

.dialer-preview-button strong {
  color: inherit;
  font-size: inherit;
}

.dialer-preview-table {
  display: grid;
  gap: 6px;
  max-height: min(560px, calc(100vh - 170px));
  overflow: auto;
  padding-right: 2px;
}

.dialer-preview-table-head,
.dialer-preview-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) minmax(90px, 0.55fr);
  gap: 12px;
  align-items: center;
}

.dialer-preview-table-head {
  padding: 0 12px 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dialer-preview-table-row {
  min-height: 48px;
  border: 1px solid #edf0ec;
  border-radius: 7px;
  padding: 8px 12px;
  background: #ffffff;
}

.dialer-preview-table-row.is-next {
  border-color: #d7dfd5;
  background: #fbfcfa;
}

.dialer-preview-table-row strong,
.dialer-preview-table-row span,
.dialer-preview-table-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialer-preview-table-row strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.dialer-preview-table-row span {
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 800;
}

.dialer-preview-table-row em {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--steel);
  background: #f0f3ef;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 850;
}

.email-modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
  overflow: auto;
}

.email-modal-backdrop.has-side-preview {
  grid-template-columns: minmax(380px, 500px) minmax(390px, 560px);
  align-items: center;
  justify-content: center;
  gap: 12px;
  place-items: stretch;
}

.email-modal-backdrop.has-side-preview .email-modal {
  width: 100%;
  max-height: min(780px, calc(100vh - 72px));
}

.email-offer-preview {
  width: 100%;
  height: min(780px, calc(100vh - 72px));
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.email-offer-preview .modal-head {
  align-items: center;
}

.email-offer-preview .modal-head h2 {
  margin: 2px 0 0;
  font-size: 1.02rem;
}

.email-offer-preview .offer-pdf-preview {
  border-radius: 6px;
}

.email-offer-preview .offer-preview-actions {
  justify-content: stretch;
  gap: 8px;
}

.email-offer-preview .offer-preview-actions > * {
  flex: 1 1 0;
  justify-content: center;
}

.email-offer-preview[hidden] {
  display: none;
}

.transcript-modal {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.24);
}

.transcript-list {
  display: grid;
  gap: 10px;
  overflow: auto;
}

.transcript-entry {
  width: min(78%, 480px);
  border: 1px solid #edf0ec;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.transcript-entry-me {
  justify-self: end;
  border-color: rgba(187, 51, 36, 0.18);
  background: #fffaf8;
}

.transcript-entry-other {
  justify-self: start;
  background: #ffffff;
}

.transcript-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.transcript-entry-head strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.transcript-entry-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.transcript-entry p {
  margin: 0;
  color: var(--steel);
  font-size: 0.9rem;
  line-height: 1.48;
}

.email-modal label,
.email-recipient-section {
  display: grid;
  gap: 7px;
}

.email-modal label span,
.email-field-head span {
  color: var(--steel);
  font-size: 0.84rem;
  font-weight: 800;
}

.email-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.email-recipient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.email-recipient-picker-row {
  grid-template-columns: minmax(0, 1fr) 30px;
}

.email-combo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  background: #ffffff;
}

.email-combo input {
  border: 0;
}

.email-combo-toggle {
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid #edf0ec;
  border-radius: 0 6px 6px 0;
  background: transparent;
  cursor: pointer;
}

.email-combo-toggle:hover {
  background: #f8f9f6;
}

.email-combo-toggle img {
  width: 15px;
  height: 15px;
  opacity: 0.68;
}

.email-modal input,
.email-modal textarea,
.email-picker {
  width: 100%;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.email-modal input,
.email-picker {
  height: 38px;
  padding: 0 10px;
}

.email-modal .email-combo input {
  border: 0;
}

.email-suggestion-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 55;
  max-height: 160px;
  overflow: auto;
  border: 1px solid #d8ded7;
  border-radius: 6px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 29, 0.14);
}

.email-suggestion-list[hidden] {
  display: none;
}

.email-suggestion-list button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  padding: 0 9px;
  color: var(--steel);
  background: transparent;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 700;
  text-align: left;
}

.email-suggestion-list button:hover {
  background: #f2f5f1;
}

.email-modal textarea {
  height: clamp(180px, 28vh, 300px);
  min-height: 160px;
  max-height: 300px;
  resize: none;
  padding: 10px;
  font: inherit;
  line-height: 1.45;
}

.email-modal .form-row-actions {
  position: sticky;
  bottom: -16px;
  margin: 0 -16px -16px;
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
  background: #ffffff;
}

.product-step {
  display: grid;
  gap: 12px;
}

.product-step[hidden] {
  display: none;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1rem;
}

.product-modal label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 0.84rem;
  font-weight: 800;
}

.product-modal input {
  width: 100%;
  height: 42px;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  padding: 0 11px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.product-suggestions {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.product-suggestions button {
  min-height: 34px;
  display: grid;
  gap: 3px;
  border: 1px solid #edf0ec;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--steel);
  background: #fbfcfa;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
}

.product-suggestions button[hidden] {
  display: none;
}

.product-suggestions small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.product-suggestions button:hover {
  border-color: #c7d0c7;
  background: #f2f5f1;
}

.compact-edit-form,
.add-mini-form {
  display: grid;
  gap: 9px;
}

.add-mini-form {
  margin-top: 0;
  border-top: 1px solid #edf0ec;
  padding: 12px;
}

.compact-edit-form.edit-form,
.add-mini-form.edit-form {
  display: none;
}

.editable-card.is-editing > .edit-form,
.editable-card.is-editing > div > .edit-form {
  display: grid;
}

.compact-edit-form label {
  display: grid;
  gap: 5px;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 800;
}

.compact-edit-form input,
.compact-edit-form select,
.compact-edit-form textarea {
  width: 100%;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.compact-edit-form input,
.compact-edit-form select {
  height: 34px;
  padding: 0 9px;
}

.compact-edit-form textarea {
  min-height: 74px;
  padding: 8px 9px;
  resize: vertical;
  line-height: 1.4;
  font: inherit;
}

.compact-edit-form input:focus,
.compact-edit-form select:focus,
.compact-edit-form textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.12);
}

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

.task-card {
  border: 1px solid #edf0ec;
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px 11px;
}

.task-card-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  cursor: pointer;
  outline: none;
}

.task-card-view:focus,
.task-card-view:hover {
  color: var(--steel);
}

.task-card-main {
  min-width: 0;
}

.task-card.is-completed {
  background: #f4f7f3;
}

.task-card.is-completed strong {
  color: #7b8780;
  text-decoration: line-through;
}

.task-card strong {
  display: block;
  color: var(--steel);
  font-size: 0.86rem;
  line-height: 1.35;
}

.task-card small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.task-card small img {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.task-menu [data-task-menu-delete] {
  color: #b7352b;
}

.compact-edit-form input[data-date-picker] {
  cursor: pointer;
}

.date-picker-menu {
  position: fixed;
  z-index: 60;
  width: 238px;
  border: 1px solid #d9dfd8;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(24, 35, 32, 0.16);
}

.date-picker-head,
.date-picker-weekdays,
.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  gap: 4px;
}

.date-picker-head {
  grid-template-columns: 28px 1fr 28px;
  margin-bottom: 8px;
}

.date-picker-head strong {
  color: var(--steel);
  font-size: 0.84rem;
  text-align: center;
  text-transform: capitalize;
}

.date-picker-head button,
.date-picker-days button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--steel);
  font: inherit;
  font-weight: 800;
}

.date-picker-head button {
  height: 28px;
  font-size: 1rem;
}

.date-picker-weekdays {
  margin-bottom: 4px;
}

.date-picker-weekdays span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.date-picker-days button,
.date-picker-days > span {
  height: 28px;
}

.date-picker-days button {
  font-size: 0.78rem;
}

.date-picker-head button:hover,
.date-picker-days button:hover,
.date-picker-days button.is-selected {
  background: #eef1ec;
}

.mini-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 8px;
}

.mini-action,
.danger-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.mini-action {
  border: 1px solid var(--line);
  color: var(--steel);
  background: #ffffff;
}

.mini-action-muted {
  color: var(--muted);
  background: #f8f9f6;
}

.danger-action {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(187, 51, 36, 0.24);
  color: var(--accent-dark);
  background: rgba(187, 51, 36, 0.06);
}

.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mini-action:hover {
  background: #f7f8f5;
}

.danger-action:hover:not(:disabled) {
  background: rgba(187, 51, 36, 0.12);
}

.mini-action img,
.danger-action img {
  width: 14px;
  height: 14px;
}

.muted-copy {
  margin: 0;
  font-size: 0.88rem;
}

.lead-form {
  width: min(940px, 100%);
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.section-heading img {
  width: 26px;
  height: 26px;
  opacity: 0.72;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.08rem;
}

.form-section label,
.field-grid label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-section input,
.form-section textarea,
.form-section select {
  width: 100%;
  border: 1px solid #dbe0da;
  border-radius: 6px;
  color: var(--ink);
  background: #fdfdfb;
  outline: none;
}

.form-section input,
.form-section select {
  height: 44px;
  padding: 0 12px;
}

.form-section textarea {
  resize: vertical;
  min-height: 86px;
  padding: 11px 12px;
  line-height: 1.45;
}

.form-section input:focus,
.form-section textarea:focus,
.form-section select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 137, 0.14);
}

.form-section select:disabled {
  color: var(--muted);
  background: #f2f4f1;
}

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

.entry-block {
  display: grid;
  gap: 12px;
  border: 1px solid #e3e7e1;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entry-head strong {
  font-size: 0.9rem;
}

.entry-remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.entry-remove:hover {
  border-color: rgba(187, 51, 36, 0.35);
  background: rgba(187, 51, 36, 0.07);
}

.entry-remove img {
  width: 16px;
  height: 16px;
}

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

.address-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 140px minmax(0, 1fr);
}

.form-footer {
  display: flex;
  justify-content: flex-end;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 780px) {
  .auth-page {
    padding: 18px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .brand-panel,
  .login-panel {
    padding: 28px;
  }

  .brand-panel h1 {
    max-width: none;
    font-size: 3rem;
  }

  .crm-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .sidebar-brand {
    padding: 0 4px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
  }

  .nav-item,
  .icon-button {
    min-height: 44px;
  }

  .sidebar-footer {
    margin-top: 12px;
  }

  .crm-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .workspace {
    padding: 18px;
  }

  .dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .lead-detail {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .lead-detail-leads {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .lead-detail-leads > .timeline-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .lead-detail-suppliers {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .lead-detail-suppliers > .detail-column:first-child,
  .lead-detail-suppliers > .timeline-panel,
  .lead-detail-suppliers > .detail-column:last-child {
    grid-column: 1;
    grid-row: auto;
  }

  .detail-column,
  .timeline-panel {
    overflow: visible;
  }

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

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

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

  .dialer-summary-stats {
    grid-template-columns: 1fr;
  }

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

  .empty-workspace {
    min-height: 360px;
  }
}
