.call-caller {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.call-caller label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #66757d;
}

.call-tabs {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  margin-bottom: 20px;
  padding: 5px;
  overflow-x: auto;
  background: rgba(242, 246, 247, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(15, 31, 36, 0.08);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15, 31, 36, 0.05);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.call-tab {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: #5b6b73;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 140ms cubic-bezier(0.22, 1, 0.36, 1),
    color 140ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 140ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

.call-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.55);
  color: #0f1f24;
}

.call-tab.active {
  background: #ffffff;
  border-color: rgba(15, 31, 36, 0.08);
  color: #0f1f24;
  box-shadow:
    0 1px 2px rgba(15, 31, 36, 0.04),
    0 2px 6px rgba(15, 31, 36, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

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

.call-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.call-section-title {
  margin: 24px 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.call-section-head .call-section-title {
  margin: 0;
}

.call-section-title:first-child {
  margin-top: 0;
}

.call-text {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.call-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.call-mix-sum {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.call-mix-sum.invalid {
  color: var(--error);
}

.call-history-state {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 13px;
}

.call-history-state dt {
  color: var(--muted);
}

.call-history-state dd {
  margin: 0;
}

.call-lift-btn {
  margin-left: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.call-lift-btn:hover {
  color: #e2440e;
}

.call-lift-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.call-lift-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.call-inbound-title {
  margin: 0 0 4px;
}

.call-lift-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.call-lift-form textarea {
  width: 100%;
  height: 72px;
  min-height: 72px;
  resize: vertical;
}

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

.call-history-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.call-history-item:last-child {
  border-bottom: none;
}

.call-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.call-history-caller {
  color: var(--muted);
}

.call-history-notes,
.call-history-summary {
  margin: 8px 0 0;
  font-size: 14px;
  white-space: pre-wrap;
}

.call-history-summary {
  color: var(--muted);
}

.call-block {
  margin-bottom: 16px;
}

.call-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.call-row-actions {
  text-align: right;
  white-space: nowrap;
}

.call-hidden {
  display: none;
}

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

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

.call-lead-name {
  margin: 0 0 4px;
  font-size: 20px;
}

.call-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.call-choice {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.call-choice:hover {
  border-color: var(--primary);
}

.call-choice.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.call-actions {
  flex-wrap: wrap;
  margin-top: 16px;
}

.call-message {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 13px;
}

.call-message.assistant {
  background: #eef2ff;
}

.call-message-meta {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .call-screen {
    grid-template-columns: minmax(0, 1fr);
  }
}

#call-notes {
  height: 96px;
  min-height: 96px;
}

.call-entry-notes {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}

.call-remove-secret {
  margin-top: 8px;
  align-self: flex-start;
}

:root {
  --call-prio-1: var(--error);
  --call-prio-2: #d97706;
  --call-prio-3: var(--muted);
}

.call-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}

.call-phone-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.call-phone-status::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.call-phone-status[data-state="connecting"]::before,
.call-phone-status[data-state="ringing"]::before,
.call-phone-status[data-state="preparing"]::before {
  background: var(--primary);
}

.call-phone-status[data-state="talking"] {
  color: var(--success);
}

.call-phone-status[data-state="talking"]::before {
  background: var(--success);
}

.call-phone-status[data-state="failed"] {
  color: var(--error);
}

.call-phone-status[data-state="failed"]::before {
  background: var(--error);
}

.call-autodial {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.call-autodial .call-hint {
  margin: 6px 0 0;
}

.call-autodial-countdown {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.call-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.call-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.call-nav .call-tabs {
  margin-bottom: 0;
}

.call-head-side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.call-head-actions:empty {
  display: none;
}

.call-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.call-lists-view,
.call-nav-extra,
.call-caller {
  --c-primary: #e2440e;
  --c-primary-soft: #fdece4;
  --c-primary-active: #a8320a;
  --c-ink: #16272d;
  --c-surface: #ffffff;
  --c-surface-muted: #f7f9fa;
  --c-surface-sunken: #eef2f3;
  --c-text: #0f1f24;
  --c-text-2: #5b6b73;
  --c-text-muted: #94a3ab;
  --c-border: #e7ecee;
  --c-border-strong: #d9e1e4;
  --c-success: #16a34a;
  --c-success-soft: #e7f6ec;
  --c-danger: #e5484d;
  --c-danger-soft: #fdecec;
  --c-shadow-xs: 0 1px 2px rgba(15, 31, 36, 0.05);
  --c-shadow-sm: 0 1px 2px rgba(15, 31, 36, 0.04), 0 2px 6px rgba(15, 31, 36, 0.04);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--c-text);
}

.call-head-actions .call-btn {
  height: 42px;
  padding: 0 20px;
  font-size: 14.5px;
}

.call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #d9e1e4;
  border-radius: 12px;
  background: #fff;
  color: #0f1f24;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 31, 36, 0.05);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.call-btn:hover {
  background: #f7f9fa;
  border-color: #94a3ab;
  box-shadow: 0 1px 2px rgba(15, 31, 36, 0.04), 0 2px 6px rgba(15, 31, 36, 0.04);
}

.call-btn.primary {
  background: #e2440e;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 2px rgba(226, 68, 14, 0.2), 0 6px 16px rgba(226, 68, 14, 0.18);
}

.call-btn.primary:hover {
  background: #c73c0c;
  border-color: transparent;
}

.call-btn.primary:active {
  background: #a8320a;
  box-shadow: 0 1px 2px rgba(15, 31, 36, 0.1);
}

.call-btn:active {
  background: #eef2f3;
  box-shadow: none;
}

.call-btn svg {
  flex-shrink: 0;
}

.call-select {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.call-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.call-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  min-width: 150px;
  max-width: 100%;
  padding: 0 12px 0 16px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--c-shadow-xs);
  cursor: pointer;
}

.call-select-trigger:hover:not(:disabled) {
  border-color: var(--c-border-strong);
}

.call-select-trigger:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

.call-select-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.call-select-labels {
  display: grid;
  min-width: 0;
  text-align: left;
}

.call-select-labels > span {
  grid-area: 1 / 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-select-labels > .hidden {
  visibility: hidden;
}

.call-select-chevron {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--c-text-muted);
  transition: transform 140ms ease;
}

.call-select-trigger[aria-expanded="true"] .call-select-chevron {
  transform: rotate(180deg);
}

.call-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 100%;
  width: max-content;
  max-width: min(360px, 90vw);
  max-height: 320px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface);
  box-shadow: 0 4px 8px rgba(15, 31, 36, 0.05), 0 20px 48px rgba(15, 31, 36, 0.1);
}

.call-select-menu.left {
  right: auto;
  left: 0;
}

.call-select-menu[hidden] {
  display: none;
}

.call-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 200px;
  padding: 7px 8px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--c-text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.call-select-option:hover,
.call-select-option:focus-visible {
  background: var(--c-surface-muted);
  outline: none;
}

.call-select-option.on {
  font-weight: 600;
}

.call-select-check {
  display: inline-grid;
  place-items: center;
  width: 16px;
  color: var(--c-primary);
}

.call-select-label {
  flex: 1;
}

.call-select-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}

.call-caller .call-select-trigger {
  min-width: 200px;
}
