* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.6;
}

.nav {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: #2563eb;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: #2563eb;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-weight: 500;
  color: #475569;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 64px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #0f172a;
}

.hero-subtitle {
  font-size: 20px;
  color: #64748b;
  margin-bottom: 32px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: #64748b;
}

.dashboard-preview {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.tab {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover, .tab.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.call-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.call-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  transition: box-shadow 0.2s;
}

.call-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.call-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-completed {
  background: #10b981;
}

.status-missed {
  background: #ef4444;
}

.status-voicemail {
  background: #f59e0b;
}

.call-contact {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.call-meta {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}

.call-note {
  font-size: 14px;
  color: #475569;
}

.call-duration {
  font-weight: 600;
  color: #2563eb;
  font-size: 16px;
}

.call-action {
  padding: 8px 16px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.call-action:hover {
  background: #dbeafe;
}

.integration-status {
  margin-top: 48px;
}

.status-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-icon {
  width: 48px;
  height: 48px;
  background: #10b981;
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-content {
  flex: 1;
}

.status-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.status-description {
  font-size: 14px;
  color: #64748b;
}

.status-link {
  padding: 10px 20px;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.status-link:hover {
  background: #1d4ed8;
}

.breadcrumb {
  margin-bottom: 24px;
  font-size: 14px;
}

.breadcrumb-link {
  color: #64748b;
  text-decoration: none;
}

.breadcrumb-link:hover {
  color: #2563eb;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: #cbd5e1;
}

.breadcrumb-current {
  color: #0f172a;
  font-weight: 500;
}

.contact-header {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.contact-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 28px;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

.meta-separator {
  color: #cbd5e1;
}

.btn-primary {
  padding: 12px 24px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  padding: 12px 24px;
  background: white;
  color: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #eff6ff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}

.timeline-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-top: 4px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.timeline-type {
  font-weight: 600;
  font-size: 15px;
}

.timeline-time {
  font-size: 14px;
  color: #64748b;
}

.timeline-duration {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}

.timeline-note {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-btn {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
}

.summary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.summary-item {
  text-align: center;
}

.summary-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 24px;
  font-weight: 700;
  color: #2563eb;
}

.integration-info, .workflow-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-size: 14px;
  color: #64748b;
}

.info-value {
  font-weight: 600;
  font-size: 14px;
}

.status-badge {
  padding: 4px 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.settings-header {
  margin-bottom: 40px;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 18px;
  color: #64748b;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin-bottom: 32px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.connection-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 0;
  margin-bottom: 24px;
}

.connection-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.integration-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: white;
}

.node-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
}

.node-label {
  font-weight: 600;
  font-size: 14px;
}

.connection-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.arrow-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.connection-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
}

.stat-label {
  font-size: 14px;
  color: #64748b;
}

.stat-value {
  font-weight: 600;
  font-size: 14px;
}

.card-description {
  color: #64748b;
  margin-bottom: 20px;
  font-size: 14px;
}

.mapping-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mapping-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.mapping-source, .mapping-target {
  font-size: 14px;
  font-weight: 500;
}

.mapping-arrow {
  color: #2563eb;
  font-weight: 600;
}

.mapping-status {
  font-size: 12px;
  color: #10b981;
  font-weight: 600;
}

.trigger-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trigger-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.trigger-item:hover {
  background: #f8fafc;
  border-color: #2563eb;
}

.trigger-checkbox {
  margin-top: 2px;
}

.trigger-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.trigger-desc {
  font-size: 14px;
  color: #64748b;
}

.credential-field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.full-width {
  width: 100%;
}

.help-text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 12px;
}

.text-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.text-link:hover {
  text-decoration: underline;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .contact-grid, .settings-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}