﻿/* â”€â”€ GoTo Calls â€” App Styles â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â”€â”€ Practice filter in nav bar â”€â”€ */
.tab-nav-spacer {
  flex: 1;
}

.practice-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.practice-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  max-width: 220px;
}

/* â”€â”€ Calls per day bar chart â”€â”€ */
.day-chart {
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-bar-inner {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 130px;
  padding-bottom: 4px;
}

.day-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 28px;
  cursor: default;
}

.day-bar-count {
  font-size: 10px;
  color: var(--text-muted);
  min-height: 14px;
  text-align: center;
}

.day-bar {
  width: 20px;
  background: var(--cyan);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.day-bar:hover {
  opacity: 1;
}

.day-bar-weekend {
  background: var(--gray-md);
  opacity: 0.45;
}

.day-bar-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  transform: rotate(-45deg);
  transform-origin: top center;
  margin-top: 6px;
  height: 28px;
}

/* â”€â”€ Hourly chart â”€â”€ */
.hourly-chart {
  overflow-x: auto;
  padding-bottom: 4px;
}

/* â”€â”€ Call log filters â”€â”€ */
.calls-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-input {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--cyan);
}

.filter-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.filter-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* â”€â”€ AI Insights layout â”€â”€ */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

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

/* â”€â”€ Tab overrides â€” softer than shared navy default â”€â”€ */
.tab-btn:hover {
  color: var(--cyan) !important;
}
.tab-btn-active {
  color: var(--cyan) !important;
  border-bottom-color: var(--cyan) !important;
}

/* â”€â”€ AI analysis card â”€â”€ */
.ai-analysis-card {
  background: linear-gradient(
    150deg,
    rgba(0, 180, 216, 0.13) 0%,
    rgba(0, 120, 180, 0.07) 60%,
    rgba(0, 180, 216, 0.04) 100%
  );
  border: 1px solid rgba(0, 180, 216, 0.28);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 20px 22px;
  position: relative;
}

.ai-analysis-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ai-analysis-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: ai-pulse 2s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.ai-analysis-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 180, 216, 0.12);
}

.ai-theme-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-theme-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ai-theme-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid rgba(0, 180, 216, 0.3);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-theme-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ai-theme-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  text-transform: capitalize;
  line-height: 1.4;
}

.ai-theme-detail {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  opacity: 0.75;
}

/* â”€â”€ Topic horizontal bars â”€â”€ */
.topic-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.topic-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 10px;
}

.topic-bar-label {
  font-size: 12px;
  color: var(--text);
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.topic-bar-bg {
  height: 8px;
  background: var(--gray-lt, #e6e6e6);
  border-radius: 4px;
  overflow: hidden;
}

.topic-bar-fill {
  height: 8px;
  border-radius: 4px;
  transition: width 0.3s;
}

.topic-bar-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.topic-bar-neg {
  font-size: 10px;
  color: #f87171;
  margin-left: 5px;
}

/* â”€â”€ Sentiment breakdown â€” KPI tiles â”€â”€ */
.sentiment-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sentiment-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.sentiment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sentiment-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.sentiment-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.sentiment-stat-pct {
  font-size: 12px;
  color: var(--text-muted);
}

/* â”€â”€ Topic filter buttons â”€â”€ */
.topic-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.topic-filter-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.topic-filter-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.topic-filter-btn.active {
  background: rgba(0, 180, 216, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
  font-weight: 600;
}

/* â”€â”€ Topic chips grid â”€â”€ */
.topics-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chip-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: default;
}

.topic-chip-label {
  font-size: 12px;
  color: var(--text);
  text-transform: capitalize;
}

.topic-chip-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.topic-chip-neg {
  font-size: 10px;
  color: #f87171;
}

/* â”€â”€ Scoring rubric collapsible card â”€â”€ */
.scoring-rubric-details summary::-webkit-details-marker {
  display: none;
}
.scoring-rubric-details summary {
  list-style: none;
}
.scoring-rubric-hint::after {
  content: "show details â€º";
  font-size: 11px;
  color: var(--cyan);
}
.scoring-rubric-details[open] .scoring-rubric-hint::after {
  content: "hide â€¹";
}

/* â”€â”€ Call scoring drawer â”€â”€ */
.scoring-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
}

.scoring-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  opacity: 0;
  width: 680px;
  max-width: calc(100vw - 32px);
  max-height: 88vh;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 201;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.scoring-drawer.open {
  transform: translate(-50%, -50%);
  opacity: 1;
}

.scoring-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.scoring-drawer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.scoring-drawer-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.scoring-drawer-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  line-height: 1;
}

.scoring-drawer-close:hover {
  color: var(--text);
}

.scoring-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* â”€â”€ Negative call cards â”€â”€ */
.neg-call-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid #94a3b8;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.neg-call-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.neg-call-line {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.neg-call-org {
  font-size: 12px;
  color: var(--text-muted);
}

.neg-call-dt {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.neg-call-summary {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 8px;
}

.neg-call-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.topic-chip {
  padding: 2px 8px;
  background: var(--bg-alt, #0f2540);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* One-page call audit workspace */
body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.header {
  flex-shrink: 0;
}
#tab-scoring.main {
  max-width: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
#scoring-content {
  flex: 1;
  min-height: 0;
}
.audit-layout {
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
  display: flex;
  overflow: hidden;
  background: #eef2f5;
}
.audit-sidebar {
  width: 410px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #d7dee7;
  background: #f8fafc;
}
.audit-sidebar-top {
  padding: 12px 14px;
  border-bottom: 1px solid #d7dee7;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
.audit-eyebrow {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.audit-title {
  font-size: 15px;
  color: var(--text);
  font-weight: 800;
  margin-top: 2px;
}
.audit-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.audit-sidebar-section {
  padding: 0 0 13px;
  margin-bottom: 13px;
  border-bottom: 1px solid #e1e7ee;
}
.audit-sidebar-section .section-label {
  margin-bottom: 8px;
}
.audit-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 14px 16px 20px;
}
.audit-main-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.audit-main-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.audit-main-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.audit-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.audit-kpi-card {
  background: #0b1829;
  color: #fff;
  border: 1px solid #1f3348;
  border-radius: 8px;
  padding: 12px 15px;
  min-height: 92px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(11, 24, 41, 0.14);
}
.audit-kpi-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: #64748b;
}
.audit-kpi-good::after {
  background: #22c55e;
}
.audit-kpi-warn::after {
  background: #f59e0b;
}
.audit-kpi-bad::after {
  background: #ef4444;
}
.audit-kpi-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8aa0b8;
}
.audit-kpi-value {
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
  margin-top: 10px;
  letter-spacing: 0;
}
.audit-kpi-sub {
  font-size: 11px;
  color: #b8c4d2;
  margin-top: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audit-table-card {
  padding: 0;
  overflow: hidden;
}
.audit-table-card .data-table th {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 11px;
  border-bottom-color: #d7dee7;
}
.audit-table-card .data-table td {
  padding: 8px 11px;
}
.audit-table-card .data-table tbody tr {
  background: #fff;
}
.audit-table-card .data-table tbody tr:hover {
  background: #f4f8fb;
}
.audit-table-card .data-table tbody tr.audit-row-needs td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}
.audit-focus-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #d7dee7;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.audit-focus-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 3px #f59e0b22;
}
.audit-filter-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.audit-filter-stack .filter-select {
  width: 100%;
  min-width: 0;
}
.audit-filter-stack .filter-count {
  grid-column: 1 / -1;
}
.audit-snapshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.audit-snapshot-item {
  background: #fff;
  border: 1px solid #dde5ee;
  border-radius: 7px;
  padding: 8px 10px;
  min-width: 0;
}
.audit-snapshot-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-snapshot-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.audit-data-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}
.audit-staff-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.audit-staff-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 10px;
  text-align: left;
  border: 1px solid #dde5ee;
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}
.audit-staff-row:hover {
  border-color: var(--cyan);
}
.audit-staff-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.audit-staff-meta {
  font-size: 10px;
  color: var(--text-muted);
}
.audit-staff-score {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 18px;
  font-weight: 800;
  align-self: center;
}
.audit-staff-breakdown {
  grid-column: 1 / -1;
  font-size: 10px;
}
.audit-about {
  margin-bottom: 18px;
}
.audit-about summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  list-style: none;
}
.audit-about summary::-webkit-details-marker { display: none; }
.audit-about summary::before {
  content: '▸ ';
  font-size: 10px;
}
details[open].audit-about summary::before {
  content: '▾ ';
}
.audit-about p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 6px 0 0;
}

@media (max-width: 980px) {
  body {
    height: auto;
    overflow: auto;
  }
  .audit-layout {
    height: auto;
    min-height: calc(100vh - 56px);
    flex-direction: column;
    overflow: visible;
  }
  .audit-sidebar {
    width: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .audit-sidebar-body,
  .audit-main {
    overflow: visible;
  }
  .audit-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
