:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  --sidebar-start: #6366f1;
  --sidebar-end: #8b5cf6;
  --blue: #2563eb;
  --purple: #7c3aed;
  --green: #059669;
  --orange: #ea580c;
  --cyan: #0891b2;
  --pink: #db2777;
  --amber: #d97706;
}

* { box-sizing: border-box; }

html,
body {
  overflow-y: auto;
  height: 100%;
}

.main-content-container {
  height: 100vh;
  overflow-y: auto;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

html:has(#view-manage-campaigns.active),
body:has(#view-manage-campaigns.active) {
  height: 100%;
  max-height: 100vh;
  overflow-y: auto;
}

a { color: var(--blue); }

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

.sidebar {
  background: linear-gradient(165deg, var(--sidebar-start) 0%, var(--sidebar-end) 55%, #a855f7 100%);
  border-right: none;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  color: #fff;
  box-shadow: 4px 0 24px rgba(99, 102, 241, 0.18);
}

.brand h1 {
  font-size: 1.15rem;
  margin: 0 0 .25rem;
  color: #fff;
}

.brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: .85rem;
}

nav { display: grid; gap: .5rem; margin: 2rem 0; }

.nav-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: .65rem .8rem;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background .15s, transform .15s;
}

.nav-btn.active {
  background: #fff;
  color: var(--purple);
  border-color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.nav-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.22);
}

.settings-panel label {
  display: grid;
  gap: .35rem;
  font-size: .8rem;
  margin-bottom: .75rem;
  color: rgba(255, 255, 255, 0.92);
}

.settings-panel input {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text);
  padding: .45rem .55rem;
  border-radius: 8px;
}

.content {
  padding: 1.5rem 2rem 3rem;
  max-width: 1200px;
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.06), transparent 24%),
    var(--bg);
}

.content:has(#view-overview.active) {
  max-width: none;
  padding-right: 2.5rem;
  overflow-x: hidden;
}

.view { display: none; }
.view.active { display: block; }

.view.view-embedded-module.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2rem);
}

.app-shell:has(#view-manage-campaigns.active),
.app-shell:has(#view-clients.active),
.app-shell:has(#view-voice-playground.active),
.app-shell:has(#view-knowledge-base.active) {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.content:has(#view-manage-campaigns.active),
.content:has(#view-clients.active),
.content:has(#view-voice-playground.active),
.content:has(#view-knowledge-base.active) {
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#view-manage-campaigns.view-embedded-module.active,
#view-clients.view-embedded-module.active,
#view-voice-playground.view-embedded-module.active,
#view-knowledge-base.view-embedded-module.active {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  flex-direction: column;
}

.embedded-module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.embedded-module-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
}

.embedded-module-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
}

.embedded-module-toolbar-actions button.active {
  box-shadow: inset 0 0 0 2px #76c8b1;
}

#view-manage-campaigns .embedded-module-frame,
#view-clients .embedded-module-frame,
#view-voice-playground .embedded-module-frame,
#view-knowledge-base .embedded-module-frame {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  display: block;
}

#view-manage-campaigns .embedded-module-frame::-webkit-scrollbar,
#view-clients .embedded-module-frame::-webkit-scrollbar,
#view-voice-playground .embedded-module-frame::-webkit-scrollbar,
#view-knowledge-base .embedded-module-frame::-webkit-scrollbar {
  width: 8px;
}

#view-manage-campaigns .embedded-module-frame::-webkit-scrollbar-thumb,
#view-clients .embedded-module-frame::-webkit-scrollbar-thumb,
#view-voice-playground .embedded-module-frame::-webkit-scrollbar-thumb,
#view-knowledge-base .embedded-module-frame::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0;
  color: #0f172a;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

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

.metrics-grid.compact .metric-card h3 { font-size: 1.2rem; }

.metric-card,
.card-list .card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.metric-card h3 { margin: 0; font-size: 1.6rem; }
.metric-card p { margin: .35rem 0 0; color: var(--text-muted); font-size: .85rem; }

.card-list { display: grid; gap: 1rem; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.card h3 { margin: 0; color: #0f172a; }
.card .meta { color: var(--text-muted); font-size: .85rem; margin: .5rem 0; }
.script-preview { color: #475569; font-size: .9rem; margin: 0 0 .75rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.card-actions button.secondary.campaign-action-tab.active {
  background: #f8fafc;
  border-color: var(--sidebar-start);
  color: #312e81;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.campaign-workspace-body { margin-top: .75rem; width: 100%; }

.workspace-panel-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .75rem;
}

.campaign-workspace-body--details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

#campaign-detail.campaign-detail-panel--details {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#campaign-detail.campaign-detail-panel--details .campaign-details-layout {
  flex: 1;
  min-height: 0;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.space-y-6 {
  gap: 1.5rem;
}

.campaign-details-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
}

.details-summary-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  flex-shrink: 0;
}

.details-metrics-block {
  width: 100%;
}

.details-metrics-block .metrics-grid.compact {
  margin-bottom: 0;
}

.details-params-block {
  width: 100%;
}

.details-section-divider {
  flex-shrink: 0;
}

.details-preview-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

.readonly-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.workspace-hint {
  margin: 0;
  font-size: .875rem;
}

.preview-label {
  margin: 0 0 .4rem;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
}

hr.border-gray-200 {
  border: 0;
  border-top: 1px solid #e5e7eb;
  width: 100%;
  margin: 0;
}

.details-preview-block {
  background: #f9fafb;
  color: #374151;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #f3f4f6;
  font-size: .875rem;
  line-height: 1.55;
  white-space: pre-wrap;
  width: 100%;
  box-sizing: border-box;
}

.readonly-panel .readonly-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: .85rem 1rem;
  color: #334155;
  font-size: .875rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.campaign-edit-warning {
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: .875rem;
  line-height: 1.45;
}

.edit-form h4 { margin: 0 0 1rem; font-size: 1rem; color: #0f172a; }

.edit-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: #475569;
}

.edit-form textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
}

.edit-form button[type="submit"] {
  margin-top: .5rem;
}

button,
.upload-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  border: none;
  border-radius: 10px;
  padding: .55rem .85rem;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
  transition: transform .12s, box-shadow .12s;
}

button:hover,
.upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.upload-btn { display: inline-block; }

button.secondary,
.upload-btn.secondary {
  background: #fff;
  color: #475569;
  border: 1px solid var(--border);
  box-shadow: none;
}

button.secondary:hover,
.upload-btn.secondary:hover {
  background: #f8fafc;
  box-shadow: var(--shadow);
}

button.full { width: 100%; margin-top: .5rem; }
.hidden { display: none !important; }

.panel label {
  display: grid;
  gap: .35rem;
  margin-bottom: .75rem;
  font-size: .9rem;
  color: #334155;
}

.panel input,
.panel textarea,
.panel select {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: .5rem;
  border-radius: 8px;
  font: inherit;
}

.panel input:focus,
.panel textarea:focus,
.panel select:focus,
.settings-panel input:focus,
.review-search input:focus,
.campaign-filter select:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
}

.form-actions { display: flex; gap: .5rem; margin-top: .5rem; }

.schedule-details { margin: .75rem 0; color: var(--text-muted); }
.schedule-details summary { cursor: pointer; margin-bottom: .5rem; }
.checkbox-label { flex-direction: row !important; align-items: center; gap: .5rem !important; }

.table-wrap { overflow-x: auto; margin-top: 1rem; }

#lead-table { width: 100%; border-collapse: collapse; }

#lead-table th,
#lead-table td {
  border-bottom: 1px solid var(--border);
  padding: .65rem;
  text-align: left;
  font-size: .9rem;
}

#lead-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

#lead-table tbody tr:hover { background: #f8fafc; }

.notice {
  margin: 1rem 0;
  padding: .75rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.notice-banner {
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  font-size: .9rem;
}

.notice-banner.good {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.notice-banner.warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.notice-banner.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.muted { color: var(--text-muted); }
.empty-state { padding: 2rem; text-align: center; }
.enroll-hint { font-size: .85rem; margin-top: .75rem; }

.review-search {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  margin: 1rem 0;
}

.review-search label {
  display: grid;
  gap: .35rem;
  flex: 1;
  min-width: 240px;
}

.review-search input {
  background: #fff;
  border: 1px solid var(--border);
  color: inherit;
  padding: .5rem;
  border-radius: 8px;
}

.review-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 1rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
}

.panel-head h3 { margin: 0; color: #0f172a; }

.campaign-detail-meta {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.campaign-detail-meta .detail-grid.compact {
  margin-top: .75rem;
}

.readonly-panel .script-block.readonly-content {
  margin: 0;
}

.readonly-panel .readonly-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #334155;
}

.detail-block { margin: 1rem 0; }
.detail-block h4 { margin: 0 0 .5rem; font-size: .95rem; color: #475569; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.script-block {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem;
  font-size: .85rem;
  margin: 0;
  color: #334155;
}

.version-row { font-size: .85rem; color: var(--text-muted); margin-bottom: .25rem; }

.status {
  font-size: .75rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

.status-running { background: #dcfce7; color: #15803d; }
.status-draft { background: #e2e8f0; color: #475569; }
.status-paused { background: #fef3c7; color: #b45309; }
.status-stopped,
.status-completed { background: #fee2e2; color: #b91c1c; }

.bar-chart { display: grid; gap: .5rem; }

.bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 32px;
  gap: .5rem;
  align-items: center;
  font-size: .85rem;
}

.bar-track {
  background: #eef2ff;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, #6366f1, #ec4899);
  height: 100%;
  border-radius: 999px;
}

.mini-table { width: 100%; border-collapse: collapse; font-size: .85rem; }

.mini-table td,
.mini-table th {
  border-bottom: 1px solid var(--border);
  padding: .4rem .25rem;
  text-align: left;
}

.transcript {
  display: grid;
  gap: .75rem;
  max-height: 420px;
  overflow-y: auto;
}

.turn {
  background: #f8fafc;
  border-radius: 10px;
  padding: .65rem .75rem;
  border: 1px solid var(--border);
}

.turn-role {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.turn-user { border-left: 4px solid #3b82f6; }
.turn-assistant { border-left: 4px solid #10b981; }
.turn p { margin: .35rem 0 0; }

.dashboard-subtitle { margin: .25rem 0 0; font-size: .9rem; }

.campaign-filter {
  display: grid;
  gap: .35rem;
  font-size: .85rem;
  min-width: 180px;
  color: #475569;
}

.campaign-filter select {
  background: #fff;
  border: 1px solid var(--border);
  color: inherit;
  padding: .5rem;
  border-radius: 8px;
}

.executive-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  min-height: 96px;
  box-shadow: var(--shadow);
  border-top-width: 4px;
}

.kpi-label {
  margin: 0;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
}

.kpi-value {
  margin: .45rem 0 0;
  font-size: 1.55rem;
  line-height: 1.15;
  color: #0f172a;
  font-weight: 700;
}

.kpi-primary {
  border-top-color: #3b82f6;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.kpi-accent {
  border-top-color: #8b5cf6;
  background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%);
}

.kpi-success {
  border-top-color: #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
}

.kpi-warn {
  border-top-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.kpi-revenue {
  border-top-color: #06b6d4;
  background: linear-gradient(180deg, #ecfeff 0%, #fff 100%);
}

.kpi-revenue .kpi-value {
  color: #0e7490;
  font-size: 1.35rem;
}

.kpi-neutral {
  border-top-color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.executive-panels { margin-bottom: 1.25rem; }

.executive-panels .panel {
  border-top: 4px solid #ec4899;
}

.executive-panels .panel:last-child {
  border-top-color: #6366f1;
}

.executive-panels .panel h3 {
  margin: 0 0 .75rem;
  font-size: .95rem;
  color: #4338ca;
}

.language-filter-summary {
  margin: 0 0 1rem;
  font-size: .88rem;
}

.executive-outcomes-panel {
  margin-bottom: 1.25rem;
  border-top: 4px solid #ec4899;
}

.executive-outcomes-panel h3 {
  margin: 0 0 .75rem;
  font-size: .95rem;
  color: #4338ca;
}

.bant-grid .metrics-grid { margin-top: .5rem; }

.embedded-module-frame {
  width: 100%;
  flex: 1;
  min-height: 720px;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
}

.excel-dialer-embed-panel {
  width: 100%;
  padding: 0;
  overflow: visible;
  margin-top: 1.25rem;
}

.excel-dialer-iframe {
  display: block;
  width: 100%;
  height: 720px;
  min-height: 720px;
  border: 0;
  background: #f8fafc;
  overflow: hidden;
  scrollbar-width: none;
}

.excel-dialer-iframe::-webkit-scrollbar {
  display: none;
}

.unified-campaign-dashboard {
  width: 100%;
  margin-top: 1.25rem;
}

.single-file-upload__dropzone.single-file-upload__dropzone--hidden {
  display: none !important;
}

.single-file-upload__dropzone.single-file-upload__dropzone--active {
  border-color: #76c8b1;
  background-color: rgb(118 200 177 / 0.1);
}

.single-file-upload__dropzone.single-file-upload__dropzone--parsing {
  pointer-events: none;
  opacity: 0.75;
}

.single-file-upload__preview {
  display: none;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.single-file-upload__preview.is-visible {
  display: flex !important;
  flex-direction: column;
}

.single-file-upload__preview-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}

.single-file-upload__preview-icon {
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgb(118 200 177 / 0.15);
}

.single-file-upload__preview-text {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.single-file-upload__preview-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.single-file-upload__preview-name {
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.single-file-upload__preview-meta {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.single-file-upload__remove-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  min-width: 5.5rem;
  flex-shrink: 0;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem !important;
  border: 1px solid #fecaca !important;
  border-radius: 10px !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer;
}

.single-file-upload__remove-btn:hover:not(:disabled) {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  transform: none !important;
  box-shadow: none !important;
}

.single-file-upload__remove-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.single-file-upload__remove-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .single-file-upload__preview.is-visible {
    flex-direction: row !important;
    align-items: center;
  }

  .single-file-upload__preview-main {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}

/* ── KPI Dashboard Metrics Grid ─────────────────────────────────────────── */

.kpi-dashboard {
  margin: 1.75rem 0 0;
}

.kpi-dashboard__header {
  margin-bottom: 1rem;
}

.kpi-dashboard__title {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.kpi-dashboard__subtitle {
  margin: 0.25rem 0 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: #64748b;
}

.kpi-metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 540px) {
  .kpi-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .kpi-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.125rem;
  }
}

@media (min-width: 1280px) {
  .kpi-metrics-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.kpi-metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 7.5rem;
  padding: 1rem 1.125rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.kpi-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

.kpi-metric-card--highlight {
  border-left: 4px solid #0d9488;
  padding-left: calc(1.125rem - 3px);
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 55%);
}

.kpi-metric-card--highlight:hover {
  border-left-color: #0f766e;
}

.kpi-metric-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.kpi-metric-card__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.35;
}

.kpi-metric-card__value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
}

.kpi-metric-card--highlight .kpi-metric-card__value {
  color: #0f766e;
  font-size: 1.625rem;
}

.kpi-metric-card__badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.kpi-metric-card__badge--blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.kpi-metric-card__badge--green {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.kpi-metric-card__badge--orange {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.kpi-metric-card__badge--red {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.kpi-metric-card__badge--teal {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

@media (max-width: 539px) {
  .kpi-metric-card__value {
    font-size: 1.5rem;
  }

  .kpi-metric-card--highlight .kpi-metric-card__value {
    font-size: 1.375rem;
  }
}

.call-metrics-dashboard,
.call-outcomes-dashboard {
  margin-top: 1.75rem;
}

.call-outcomes-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.call-outcome-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9.5rem) 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.call-outcome-row__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.call-outcome-row__bar {
  height: 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.call-outcome-row__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.call-outcome-row__fill--interested { background: linear-gradient(90deg, #34d399, #10b981); }
.call-outcome-row__fill--not_interested { background: linear-gradient(90deg, #94a3b8, #64748b); }
.call-outcome-row__fill--call_back_later { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.call-outcome-row__fill--meeting_booked { background: linear-gradient(90deg, #2dd4bf, #0d9488); }
.call-outcome-row__fill--busy { background: linear-gradient(90deg, #fb923c, #ea580c); }
.call-outcome-row__fill--no_answer { background: linear-gradient(90deg, #cbd5e1, #94a3b8); }
.call-outcome-row__fill--wrong_number { background: linear-gradient(90deg, #f87171, #dc2626); }

.call-outcome-row__meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 5.5rem;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 539px) {
  .call-outcome-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .call-outcome-row__meta {
    text-align: left;
  }
}
