@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');


* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(139,92,246,0.10), transparent 22%),
    linear-gradient(180deg, #0b1020 0%, #0a0f1d 100%);
  color: var(--text-primary);
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.5;
}

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

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

img {
  max-width: 100%;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-blue-glow);
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  margin-bottom: 10px;
  font-size: 34px;
  font-weight: 800;
}

p {
  color: var(--text-secondary);
}

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

th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
  vertical-align: middle;
}

th {
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-weight: 700;
}

tbody tr:hover {
  background: rgba(59,130,246,0.06);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(59,130,246,0.18), transparent 30%),
    linear-gradient(180deg, #0b1020 0%, #0a0f1d 100%);
}

.login-card,
.filters-card,
.table-card,
.meta-card,
.pagination-bar,
.detail-layout,
.call-metadata,
.call-coaching,
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.login-card {
  width: 100%;
  max-width: 460px;
  padding: 36px;
  background: var(--bg-card-elevated);
}

.brand {
  margin-bottom: 14px;
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.brand.small {
  font-size: 11px;
}

.sub,
.page-header p,
.sort-note,
.empty-state,
.meta-card p,
.meta-card li,
.detail-card p {
  color: var(--text-secondary);
}

.stack {
  display: grid;
  gap: 10px;
}









.alerts,

.alert {
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow-card);
}

.alert.error {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.35);
  color: #fecaca;
}

.alert.success {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.35);
  color: #bbf7d0;
}

.alert.info {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.35);
  color: #bfdbfe;
}

.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3,7,18,0.62);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  backdrop-filter: blur(6px);
  z-index: 9998;
}

.loading-overlay.show {
  display: flex;
}

.loading-overlay span {
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card-elevated);
  box-shadow: var(--shadow-card);
}









.sidebar a.active,








.page-header {
  margin-bottom: 14px;
}

.page-header.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}



.filters-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.filter-actions,
.pagination-controls,
.mini-scores,
.pill-group,
.call-metadata,
.coaching-sections {
  display: flex;
  gap: 10px;
}

.table-card,
.meta-card,
.pagination-bar {
  padding: 8px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  padding: 0;
}

.detail-card,
.meta-card {
  padding: 18px;
}

.pagination-bar {
  margin-top: 20px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.row-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
}

.row-link:hover {
  color: var(--accent-blue-hover);
}

.badge,
.direction-pill,
.trend,




.outcome-venta,
.trend-up,
.coaching-box.success {
  background: rgba(34,197,94,0.14);
  color: #86efac;
}

.outcome-perdido,
.trend-down {
  background: rgba(248,113,113,0.14);
  color: #fecaca;
}

.outcome-callback,
.coaching-box.action {
  background: rgba(245,158,11,0.14);
  color: #fde68a;
}

.trend,
.direction-unknown,
.coaching-box.summary,
.coaching-box.bullet {
  background: rgba(148,163,184,0.12);
  color: var(--text-secondary);
}

.direction-pill {
  padding: 5px 8px;
  white-space: nowrap;
}

.direction-inbound {
  color: #93c5fd;
  background: rgba(59,130,246,0.16);
}

.direction-outbound {
  color: #fcd34d;
  background: rgba(245,158,11,0.16);
}

.mini-score-dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08);
}

.score-high {
  background: var(--success);
}

.score-mid {
  background: var(--warning);
}

.score-low {
  background: var(--danger);
}

.score-empty {
  background: var(--bg-input);
}

.score-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}



.call-audio {
  width: 100%;
  display: block;
}

.coaching-box {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card-elevated);
}

.coaching-box.opp {
  background: rgba(45,212,191,0.10);
  border-color: rgba(45,212,191,0.30);
}

.coaching-box.aop {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.30);
}

.coaching-box.quote {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.28);
}

.aop-category {
  margin-bottom: 2px;
  color: #ddd6fe;
  font-size: 1.1rem;
  font-weight: 700;
}

.aop-subcategory {
  color: #c4b5fd;
  font-size: .95rem;
}

.insight-title {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 700;
}







blockquote {
  margin: 0;
  padding-left: 0;
  color: var(--text-primary);
}

.meta-card ul,
.objections-list {
  margin: 0;
  padding-left: 20px;
}

.meta-card li {
  margin-bottom: 5px;
}

#qualityChart {
  width: 100%;
  height: 250px;
}





.sidebar.collapsed .brand,
.sidebar.collapsed .sidebar-user,




.mobile-overlay {
  display: none;
}













.logo-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(139,92,246,0.22));
  box-shadow: var(--shadow-blue-glow);
  font-size: 1.2rem;
}





















.promo-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(45,212,191,0.12);
  color: #99f6e4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 18px 22px;
  border: 1px solid rgba(148,163,184,0.10);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18,26,43,0.92), rgba(13,19,38,0.92));
  box-shadow: var(--shadow-card);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-page-header {
  margin-bottom: 0;
}

.topbar-search {
  position: relative;
}

.topbar-search input {
  padding-left: 42px;
  border-radius: 999px;
}

.topbar-search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.topbar-user-avatar {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,0.24), rgba(45,212,191,0.24));
  border: 1px solid rgba(96,165,250,0.32);
  color: var(--text-primary);
  font-weight: 800;
  box-shadow: var(--shadow-blue-glow);
}

.topbar-user-meta {
  display: grid;
  gap: 2px;
}

.topbar-user-meta strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.topbar-user-meta span {
  color: var(--text-muted);
  font-size: 0.82rem;
}



.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}







.kpi-icon-tile {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(59,130,246,0.16);
  border: 1px solid rgba(96,165,250,0.40);
  box-shadow: var(--shadow-blue-glow);
  font-size: 1.05rem;
}

.kpi-trend {
  color: var(--accent-teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.kpi-label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.kpi-value {
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.kpi-sparkline {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 44px;
  margin-top: 18px;
}

.kpi-sparkline span {
  flex: 1;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, rgba(96,165,250,0.95), rgba(59,130,246,0.18));
  box-shadow: 0 0 0 1px rgba(96,165,250,0.08);
}







.kpi-icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(59,130,246,0.08));
  border: 1px solid rgba(96,165,250,0.38);
  box-shadow: var(--shadow-blue-glow);
}



















.outcome-venta {
  background: rgba(34,197,94,0.14);
  color: #22C55E;
  border: 1px solid rgba(34,197,94,0.3);
}

.outcome-perdido {
  background: rgba(248,113,113,0.14);
  color: #F87171;
  border: 1px solid rgba(248,113,113,0.3);
}

.outcome-callback,
.outcome-callback_programado {
  background: rgba(245,158,11,0.16);
  color: #F59E0B;
  border: 1px solid rgba(245,158,11,0.3);
}

.outcome-desconocido {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(100,116,139,0.14);
  color: #94A3B8;
  border: 1px solid rgba(100,116,139,0.3);
}

.mini-score-dot {
  width: 12px;
  height: 12px;
}

.row-action-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.16);
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.row-action-btn:hover {
  color: var(--text-primary);
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.26);
  box-shadow: var(--shadow-blue-glow);
}

.kpi-grid {
  margin-bottom: 16px;
}



.kpi-sparkline {
  margin-top: 16px;
  padding-bottom: 0;
}

.summary-cell {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calls-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.calls-main-column {
  min-width: 0;
}

.rep-panel-card {
  position: sticky;
  top: 24px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.rep-panel-card h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.rep-panel-card p {
  margin-top: 0;
  margin-bottom: 16px;
}

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

.rep-panel-item {
  padding: 14px;
  border: 1px solid rgba(148,163,184,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
}

.rep-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rep-panel-top strong {
  display: block;
  color: var(--text-primary);
}

.rep-panel-top span,
.rep-panel-metrics span {
  color: var(--text-secondary);
  font-size: 0.83rem;
}

.rep-panel-conv {
  color: var(--accent-teal);
  font-weight: 800;
}

.rep-panel-metrics {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}













.topbar {
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 24px;
}

.eyebrow {
  margin-bottom: 4px;
  font-size: 0.68rem;
}

.page-header h1 {
  margin-bottom: 4px;
  font-size: 24px;
}

.topbar-page-header p,
.page-header p {
  font-size: 12px;
}

.topbar-search input {
  height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
}

.topbar-user-avatar {
  width: 38px;
  height: 38px;
}

.topbar-user-meta strong {
  font-size: 0.86rem;
}

.topbar-user-meta span {
  font-size: 0.74rem;
}

.kpi-grid {
  gap: 14px;
}





.kpi-icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.kpi-label {
  margin-bottom: 6px;
  font-size: 11px;
}

.kpi-value {
  font-size: 28px;
}

.kpi-trend {
  font-size: 0.72rem;
}

.kpi-sparkline {
  height: 48px;
  margin-top: 10px;
}

.kpi-sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.kpi-sparkline path.spark-fill {
  opacity: 1;
}

.kpi-sparkline path.spark-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-card.kpi-blue .kpi-icon-tile,


.kpi-card.kpi-teal .kpi-icon-tile,


.kpi-card.kpi-green .kpi-icon-tile,


.kpi-card.kpi-amber .kpi-icon-tile,












.filters-grid {
  gap: 12px;
}










th,
td {
  padding: 12px 14px;
}

.summary-cell {
  max-width: 260px;
}


.detail-page-v2 .page-header {
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--accent-blue);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.detail-eyebrow {
  margin-bottom: 8px;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-subtitle {
  display: none;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.detail-kpi {
  min-height: 132px;
}

.detail-kpi-primary {
  background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(30,41,59,0.96));
  border: 1px solid rgba(96,165,250,0.28);
  box-shadow: 0 16px 36px rgba(2,6,23,0.34), inset 0 1px 0 rgba(255,255,255,0.05);
}

.kpi-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.detail-kpi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.detail-kpi-meta.stack {
  display: grid;
  gap: 6px;
}

.detail-state-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}









.chip-neutral {
  color: var(--text-secondary);
  background: rgba(148,163,184,0.10);
  border-color: rgba(148,163,184,0.18);
}











.detail-score-big,
.detail-money,
.detail-signal-title {
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 0.95;
}

.detail-signal-title {
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  text-wrap: pretty;
}

.detail-score-caption {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.detail-layout-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.detail-main-column,
.detail-side-column {
  display: grid;
  gap: 20px;
}

.detail-card-hero {
  border-color: rgba(96,165,250,0.22);
  box-shadow: 0 18px 42px rgba(2,6,23,0.26);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading.small {
  margin-bottom: 12px;
}

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

.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--text-tertiary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.coaching-stack {
  display: grid;
  gap: 14px;
}

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

.coaching-box-hero p,
.coaching-box-action p,
.coaching-box.success p,
.coaching-box.summary p {
  margin: 0;
}

.coaching-box.quote blockquote {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
}

.coaching-box h3 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.insight-panel {
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(15,23,42,0.72);
}

.insight-title {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audio-panel {
  margin-bottom: 16px;
}

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

.detail-meta-grid.secondary div,
.secondary-facts div,
.ctc-line {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15,23,42,0.62);
  border: 1px solid rgba(148,163,184,0.12);
}

.detail-meta-grid.secondary span,
.secondary-facts span,
.ctc-line span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-tertiary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-meta-grid.secondary strong,
.secondary-facts strong,
.ctc-line strong {
  color: var(--text-primary);
  font-size: 0.94rem;
}

.side-sticky {
  position: sticky;
  top: 18px;
}

.score-mini-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.score-mini-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15,23,42,0.72);
  border: 1px solid rgba(148,163,184,0.12);
}

.score-mini-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.status-stack {
  display: grid;
  gap: 10px;
}

.status-alert {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.status-alert strong {
  display: block;
  margin-bottom: 6px;
}

.status-alert p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.status-warning {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.24);
  color: #fde68a;
}

.status-success {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.22);
  color: #bbf7d0;
}

.status-ctc {
  background: rgba(139,92,246,0.14);
  border-color: rgba(139,92,246,0.26);
  color: #ddd6fe;
}

.status-danger {
  background: rgba(244,63,94,0.14);
  border-color: rgba(244,63,94,0.26);
  color: #fecdd3;
}

.ctc-transaction-list.modern {
  display: grid;
  gap: 12px;
}

.ctc-transaction-item.modern {
  display: grid;
  gap: 8px;
}

.secondary-facts {
  display: grid;
  gap: 10px;
}

.objections-list.modern {
  margin: 0;
  padding-left: 18px;
}














.transcript-panel {
  margin-top: 18px;
  border: 1px solid rgba(96,165,250,0.20);
  border-radius: 16px;
  background: rgba(15,23,42,0.78);
  overflow: hidden;
}

.transcript-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148,163,184,0.12);
}

.transcript-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.transcript-body {
  margin: 0;
  padding: 16px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}


.detail-badge-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}




.score-track-hero {
  margin-top: 8px;
}


.wps-fill-strong {
  background: linear-gradient(90deg, #38bdf8 0%, #2dd4bf 100%);
}

.wps-fill-mid {
  background: linear-gradient(90deg, #f59e0b 0%, #fcd34d 100%);
}

.wps-fill-low {
  background: linear-gradient(90deg, #ef4444 0%, #fb7185 100%);
}

.detail-state-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: flex-start;
}


.wps-text-strong {
  color: #2dd4bf;
}

.wps-text-mid {
  color: #f59e0b;
}

.wps-text-low {
  color: #ef4444;
}


.rep-detail-page-v2 {
  gap: 24px;
}

.rep-detail-header {
  margin-bottom: 18px;
}

.rep-header-subtitle {
  margin-top: 6px;
  max-width: 780px;
  color: var(--text-secondary);
}

.rep-hero-grid {
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  margin-bottom: 18px;
}

.rep-hero-card {
  min-height: 0;
}

.rep-verdict-copy {
  margin: 10px 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.compact-metric-card .detail-score-big {
  margin-top: 6px;
}

.detail-mini-metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.detail-mini-metric-row strong {
  color: var(--text-primary);
}

.rep-detail-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  align-items: start;
}

.rep-coaching-grid {
  margin-bottom: 18px;
}

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

.score-compare-card {
  padding: 14px 16px;
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 16px;
  background: rgba(15,23,42,0.52);
}

.score-compare-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  align-items: center;
}

.score-compare-head strong {
  display: block;
  margin-bottom: 2px;
}

.score-compare-head span {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.delta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.delta-pill.positive {
  background: rgba(34,197,94,0.15);
  color: #86efac;
}

.delta-pill.negative {
  background: rgba(248,113,113,0.16);
  color: #fca5a5;
}

.compare-track {
  height: 9px;
  margin-bottom: 8px;
}

.team-track {
  opacity: 0.55;
}

.team-fill {
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}

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

.table-shell {
  overflow-x: auto;
}

.modern-table th,
.modern-table td {
  padding: 12px 14px;
}

.rep-sidebar-stats {
  gap: 12px;
}

.chart-stack {
  display: grid;
  gap: 14px;
}

.chart-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(15,23,42,0.58);
  border: 1px solid rgba(148,163,184,0.10);
}

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

.chart-card-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.chart-card-head span {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.chart-card {
  min-width: 0;
  overflow: hidden;
}

.chart-card canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
}

#wpsTrendChart {
  height: 220px !important;
}

#radarChart {
  height: 320px !important;
}

@media (max-width: 1400px) {
  .chart-card {
    padding: 12px;
  }

  #wpsTrendChart {
    height: 200px !important;
  }

  #radarChart {
    height: 280px !important;
  }
}







.muted-objection-pill {
  color: #cbd5e1;
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(96,165,250,0.18);
}

.rep-hero-card .detail-kpi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rep-hero-card.compact-metric-card,
.rep-hero-card.detail-kpi-primary {
  padding-bottom: 20px;
}

.rep-hero-card .detail-state-chips {
  margin-top: 14px;
}




.detail-score-chip-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* reps.html */
.reps-admin-page {
  display: grid;
  gap: 12px;
}
.reps-admin-header {
  align-items: center;
  margin-bottom: 0;
}
.reps-admin-header .page-header {
  margin-bottom: 0;
}
.reps-admin-top-actions {
  display: flex;
  gap: 12px;
}
.reps-stats-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.reps-stats-strip strong {
  color: var(--text-primary);
}

.reps-stat-accent {
  color: #93c5fd;
}

.reps-stat-accent.soft {
  color: #c4b5fd;
}

.reps-inline-select.dept-manager {
  color: #fde68a;
  border-color: rgba(245,158,11,0.28);
  background: var(--bg-input);
}

.reps-inline-select.dept-manager-purple {
  color: #ddd6fe;
  border-color: rgba(139,92,246,0.28);
  background: var(--bg-input);
}

.reps-inline-select option {
  background: var(--bg-input);
  color: var(--text-primary);
}
.reps-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(170px, 1fr) minmax(150px, 0.9fr) auto auto;
  gap: 10px;
  align-items: center;
}
.reps-filter-bar input,
.reps-filter-bar select,
.modal-form input,
.modal-form select,
.modal-form textarea,
.reps-inline-input,
.reps-inline-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 10px 12px;
}
.reps-filter-bar input::placeholder,
.modal-form textarea::placeholder,
.reps-inline-input::placeholder {
  color: var(--text-muted);
}
.reps-username-text {
  display: inline-block;
  font-weight: 700;
  color: var(--text-primary);
  padding: 10px 0;
}
.reps-inline-check {
  align-self: center;
  margin: 0;
  white-space: nowrap;
}
.reps-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
}
.reps-toggle-pill input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.reps-toggle-pill span {
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.reps-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reps-table-card {
  padding: 0;
  overflow: hidden;
}
.reps-admin-table th,
.reps-admin-table td {
  vertical-align: middle;
}
.reps-admin-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}
.rep-row-form {
  display: contents;
}
.reps-row-actions {
  gap: 8px;
}

.reps-row-actions .btn.secondary {
  background: rgba(59,130,246,0.12);
  border-color: rgba(96,165,250,0.28);
  color: #dbeafe;
}

.reps-row-actions .btn.secondary:hover {
  background: rgba(59,130,246,0.18);
  border-color: rgba(147,197,253,0.4);
}


.table-row-link {
  cursor: pointer;
}

.table-row-link:hover {
  background: rgba(59,130,246,0.08);
}

.rep-name-link {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
}

.rep-name-link:hover {
  color: var(--accent-blue-hover);
}

.reps-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.btn.small {
  padding: 7px 11px;
  font-size: 0.82rem;
}
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-shell[hidden] {
  display: none !important;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}
.modal-card {
  position: relative;
  width: min(560px, 100%);
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.45);
  padding: 18px;
  display: grid;
  gap: 14px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modal-header h2 {
  margin: 0;
}
.modal-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.modal-form {
  display: grid;
  gap: 12px;
}
.form-group.compact {
  margin-bottom: 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
body.modal-open {
  overflow: hidden;
}
@media (max-width: 1100px) {
  .reps-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reps-filter-actions {
    grid-column: span 2;
  }
}
@media (max-width: 720px) {
  .reps-filter-bar {
    grid-template-columns: 1fr;
  }
  .reps-filter-actions {
    grid-column: span 1;
  }
  .modal-shell {
    padding: 14px;
  }
  .modal-card {
    padding: 16px;
  }
}

/* team_dashboard.html */
.team-dashboard-v2 .detail-actions-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.period-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.team-period-toggle .detail-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(15,23,42,0.72);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}

.team-period-toggle .detail-toggle-btn.active {
  background: rgba(45,212,191,0.14);
  border-color: rgba(45,212,191,0.4);
  color: var(--text-primary);
}

.team-period-toggle .detail-toggle-btn:hover {
  color: var(--text-primary);
  border-color: rgba(148,163,184,0.3);
}

.team-hero-grid {
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
}

.team-dashboard-layout {
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
}

.detail-alert-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-alert-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.12);
  background: rgba(15,23,42,0.76);
}

.detail-alert-card.warning {
  border-color: rgba(245,158,11,0.22);
}

.detail-alert-card.info {
  border-color: rgba(59,130,246,0.22);
}

.detail-alert-card p {
  margin: 10px 0 0;
  color: var(--text-secondary);
}

.team-priority-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leaderboard-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.leaderboard-panel {
  border-radius: 18px;
  padding: 16px;
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(148,163,184,0.12);
}

.leaderboard-good {
  box-shadow: inset 0 0 0 1px rgba(45,212,191,0.05);
}

.leaderboard-risk {
  box-shadow: inset 0 0 0 1px rgba(248,113,113,0.05);
}

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

.leaderboard-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(2,6,23,0.38);
  border: 1px solid rgba(148,163,184,0.08);
  text-decoration: none;
  color: inherit;
}

.leaderboard-row span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.leaderboard-score {
  font-size: 1.15rem;
  font-weight: 700;
}

.objection-team-card {
  min-height: 128px;
}

.team-trend-card {
  display: flex;
  flex-direction: column;
}

.team-trend-chart-wrap {
  position: relative;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
}

.team-trend-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.objection-team-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.compact-table th,
.compact-table td {
  padding: 10px 12px;
}

.empty-state-card.error-state-card {
  margin-top: 18px;
}

@media (max-width: 1380px) {
  .team-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .leaderboard-split-grid,
  .team-priority-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .team-hero-grid {
    grid-template-columns: 1fr;
  }
}


.best-calls-stack,
.settings-shell,
.profile-page .settings-shell {
  display: grid;
  gap: var(--space-6, 24px);
}

.settings-section-card {
  position: relative;
  overflow: hidden;
}

.settings-section-card::before,
.best-call-card::before,
.objections-header-card::before,
.flagged-summary-strip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(59,130,246,0.9), rgba(139,92,246,0.55));
  opacity: 0.9;
}

.best-call-card,
.settings-section-card,
.profile-info-item,
.objections-header-card {
  position: relative;
}

.flagged-summary-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.flagged-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.flagged-summary-chip strong {
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1;
}

.flagged-summary-chip span {
  color: var(--text-secondary);
  font-size: 13px;
}

.modern-flag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.best-call-card {
  padding-left: 18px;
}

.best-call-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.best-call-header-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.best-call-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.best-call-note-block {
  padding: 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.best-call-note-block label {
  margin-bottom: 6px;
}

.best-call-moment-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.best-call-moment-item {
  padding: 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.settings-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.narrow-settings-shell {
  max-width: 860px;
}

.settings-section-header {
  margin-bottom: 16px;
}

.settings-table-card {
  padding: 0;
}

.settings-table-card .table-shell {
  overflow-x: auto;
}

.settings-subsection-divider {
  height: 1px;
  margin: 24px 0;
  background: rgba(148, 163, 184, 0.14);
}

.company-settings-note {
  margin-top: 6px;
  color: var(--text-secondary);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-info-item {
  padding: 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.profile-info-item p {
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
}

.portal-login-card {
  position: relative;
  overflow: hidden;
}

.portal-login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(59,130,246,0.9), rgba(45,212,191,0.75), rgba(139,92,246,0.8));
}

.brand-block {
  margin-bottom: 18px;
}

.login-action-stack {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.btn.linkish {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.32);
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .flagged-summary-strip,
  .profile-info-grid,
  .best-call-note-grid {
    grid-template-columns: 1fr;
  }

  .best-call-header {
    flex-direction: column;
  }

  .best-call-header-metrics {
    justify-content: flex-start;
  }
}


.best-call-note-block p,
.best-call-moment-item p,
.coaching-box p,
.coaching-box-hero p,
.coaching-box-action p,
.coaching-box.success p,
.coaching-box.summary p,
.call-coaching p,
.rep-coaching-grid p,
.detail-card .objection-text-cell,
.detail-card .objection-text-cell + td,
.modern-table td p {
  color: var(--text-primary);
}

.objections-page .table-card table {
  min-width: 0;
}

.objections-page .modern-table th:nth-child(2),
.objections-page .modern-table td:nth-child(2) {
  width: 120px;
}

.objections-page .modern-table th:nth-child(4),
.objections-page .modern-table td:nth-child(4) {
  width: 72px;
  text-align: center;
}

.objections-page .modern-table th:nth-child(5),
.objections-page .modern-table td:nth-child(5) {
  width: 160px;
}

.objections-page .modern-table th:nth-child(3),
.objections-page .modern-table td:nth-child(3) {
  width: 148px;
}

.flagged-calls-page .table-card table,
.content > .table-card table {
  min-width: 0;
}

.flagged-calls-page .modern-table th:nth-child(1),
.flagged-calls-page .modern-table td:nth-child(1) {
  width: 148px;
}

.flagged-calls-page .modern-table th:nth-child(2),
.flagged-calls-page .modern-table td:nth-child(2) {
  width: 120px;
}

.flagged-calls-page .modern-table th:nth-child(4),
.flagged-calls-page .modern-table td:nth-child(4) {
  width: 72px;
}

.flagged-calls-page .modern-flag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content > .table-card table {
  width: 100%;
}

.content > .table-card th:nth-child(2),
.content > .table-card td:nth-child(2) {
  width: 108px;
}

.content > .table-card th:nth-child(4),
.content > .table-card td:nth-child(4) {
  width: 132px;
}

.content > .table-card th:nth-child(5),
.content > .table-card td:nth-child(5) {
  width: 92px;
}

.content > .table-card th:nth-child(6),
.content > .table-card td:nth-child(6) {
  width: 132px;
}

.content > .table-card th:nth-child(7),
.content > .table-card td:nth-child(7) {
  width: 88px;
}



.best-call-note-block p,
.best-call-moment-item p,
.coaching-box p,
.call-coaching p,
.rep-coaching-grid p {
  line-height: 1.55;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  transition: transform 0.18s ease;
}

.inline-check.toggle-check input:checked + .toggle-switch {
  background: rgba(34, 197, 94, 0.42);
  border-color: rgba(34, 197, 94, 0.46);
}

.inline-check.toggle-check input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.inline-check.toggle-check .toggle-label-text {
  color: var(--text-secondary);
  font-weight: 700;
  min-width: 22px;
}


.chip-danger {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(248, 113, 113, 0.26);
}

.chip-info,
.chip-blue {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(96, 165, 250, 0.28);
}

.chip-purple {
  color: #ddd6fe;
  background: rgba(109, 40, 217, 0.16);
  border-color: rgba(167, 139, 250, 0.28);
}

.modern-flag-badges .detail-chip {
  white-space: nowrap;
}


.scripts-page {
  gap: 1.5rem;
}
.scripts-header {
  margin-bottom: 0.25rem;
}
.scripts-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.78);
}
.scripts-stat-accent {
  color: #60a5fa;
}
.scripts-stat-accent.soft {
  color: #34d399;
}
.scripts-table-card {
  overflow: hidden;
}
.scripts-table-card .table-shell {
  overflow-x: auto;
}
.scripts-table {
  min-width: 860px;
}
.scripts-title-cell {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.scripts-title-cell strong {
  color: #f8fafc;
}
.scripts-title-cell span,
.scripts-meta-cell {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.84rem;
}
.scripts-row-actions {
  display: flex;
  justify-content: flex-end;
}
.scripts-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}
.scripts-editor-layout.single-column {
  grid-template-columns: minmax(0, 920px);
}
.scripts-form-card,
.scripts-side-panel {
  padding: 1.4rem;
}
.scripts-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.scripts-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.scripts-form .form-group {
  margin-bottom: 0;
}
.scripts-form label,
.scripts-panel-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.83rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.82);
}
.scripts-form input[type="text"],
.scripts-form select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.scripts-form input[type="text"]:focus,
.scripts-form select:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}
.scripts-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  color: #e2e8f0;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.scripts-checkbox-row input {
  width: 1rem;
  height: 1rem;
  accent-color: #3b82f6;
}
.scripts-form-actions,
.scripts-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}
.editor-shell {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}
.scripts-quill {
  min-height: 420px;
}
.scripts-page .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.95);
}
.scripts-page .ql-container.ql-snow {
  border: none;
  background: transparent;
}
.scripts-page .ql-editor {
  min-height: 420px;
  color: #e2e8f0;
  font-size: 0.98rem;
  line-height: 1.65;
}
.scripts-page .ql-editor.ql-blank::before {
  color: rgba(148, 163, 184, 0.6);
  font-style: normal;
}
.scripts-page .ql-snow .ql-stroke {
  stroke: rgba(226, 232, 240, 0.78);
}
.scripts-page .ql-snow .ql-fill {
  fill: rgba(226, 232, 240, 0.78);
}
.scripts-page .ql-snow .ql-picker {
  color: #e2e8f0;
}
.scripts-page .ql-snow .ql-picker-options {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.scripts-page .ql-snow button:hover .ql-stroke,
.scripts-page .ql-snow button:focus .ql-stroke,
.scripts-page .ql-snow .ql-picker-label:hover .ql-stroke,
.scripts-page .ql-snow .ql-picker-label.ql-active .ql-stroke {
  stroke: #60a5fa;
}
.scripts-page .ql-snow button:hover .ql-fill,
.scripts-page .ql-snow button:focus .ql-fill,
.scripts-page .ql-snow .ql-picker-label:hover .ql-fill,
.scripts-page .ql-snow .ql-picker-label.ql-active .ql-fill {
  fill: #60a5fa;
}
.scripts-page .ql-snow button.ql-active .ql-stroke,
.scripts-page .ql-snow button.ql-active .ql-fill {
  stroke: #60a5fa;
  fill: #60a5fa;
}
.scripts-side-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.scripts-panel-block {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.scripts-panel-block strong {
  display: block;
  color: #f8fafc;
  font-size: 1.02rem;
}
.scripts-panel-block p {
  margin: 0.45rem 0 0;
  color: rgba(191, 219, 254, 0.8);
  line-height: 1.55;
}
@media (max-width: 1100px) {
  .scripts-editor-layout {
    grid-template-columns: 1fr;
  }
  .scripts-side-panel {
    order: 2;
  }
}
@media (max-width: 760px) {
  .scripts-form-grid {
    grid-template-columns: 1fr;
  }
  .scripts-form-actions,
  .scripts-header-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .scripts-form-actions .btn,
  .scripts-header-actions .btn {
    flex: 1 1 180px;
  }
  .scripts-quill,
  .scripts-page .ql-editor {
    min-height: 320px;
  }
}
.customer-page-shell {
  display: grid;
  gap: 0.75rem;
}

.customer-topbar {
  align-items: flex-start;
}

.customer-snapshot-card {
  min-width: 240px;
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.customer-snapshot-card strong {
  color: #f8fafc;
}

.customer-snapshot-card span:last-child {
  color: rgba(191, 219, 254, 0.8);
  font-size: 0.9rem;
}

.snapshot-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.snapshot-fresh {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
}

.snapshot-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}

.snapshot-stale {
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

.customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.customer-metric-card,
.customer-summary-stat,
.customer-overview-card,
.customer-ambiguous-card {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.customer-metric-card strong,
.customer-summary-stat strong,
.customer-overview-card strong,
.customer-ambiguous-card strong {
  display: block;
  color: #f8fafc;
  font-size: 1.25rem;
}

.customer-metric-label,
.customer-summary-stat span,
.customer-overview-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.customer-filter-card,
.customer-summary-card,
.customer-tab-card,
.customer-empty-card {
  padding: 0.8rem 0.95rem;
}

.customer-filters-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.customer-alert-section {
  overflow: hidden;
}

.customer-section-header,
.customer-summary-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}

.customer-section-header h2,
.customer-summary-heading h2 {
  margin-bottom: 0.3rem;
}

.customer-table-shell {
  overflow-x: auto;
}

.customer-alerts-table {
  table-layout: fixed;
}

.customer-intelligence-page .customer-alert-section {
  overflow: visible;
}

.customer-intelligence-page .customer-alert-section .customer-table-shell {
  overflow-x: auto;
  overflow-y: visible;
}

.customer-intelligence-page .customer-alert-section .customer-alerts-table {
  width: 100%;
}

.customer-alerts-table th:nth-child(1),
.customer-alerts-table td.customer-alert-name {
  width: 14%;
}

.customer-alerts-table th:nth-child(2),
.customer-alerts-table td.customer-alert-email {
  width: 22%;
}

.customer-alerts-table th:nth-child(3),
.customer-alerts-table td.customer-alert-phone {
  width: 12%;
}

.customer-alerts-table th:nth-child(4),
.customer-alerts-table td.customer-alert-last-transaction {
  width: 12%;
}

.customer-alerts-table th.customer-alert-siempre,
.customer-alerts-table td.customer-alert-siempre {
  width: 18%;
}

.customer-alerts-table th.customer-alert-ltv,
.customer-alerts-table td.customer-alert-ltv {
  width: 8%;
}

.customer-alerts-table th:nth-child(7),
.customer-alerts-table td.customer-alert-end-date {
  width: 9%;
}

.customer-intelligence-page .customer-alert-section .customer-alerts-table td {
  overflow: visible;
}

.customer-name-cell,
.customer-muted-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.customer-name-cell strong,
.customer-muted-stack strong {
  color: #f8fafc;
}

.customer-name-link {
  color: #f8fafc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.customer-name-link:hover {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.65);
}

.customer-name-cell span,
.customer-muted-stack span,
.customer-ambiguous-card span,
.customer-helper-text {
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.88rem;
}

.customer-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.customer-action-row form {
  margin: 0;
}

.btn-small {
  padding: 0.45rem 0.72rem;
  font-size: 0.82rem;
}

.customer-pagination {
  margin-top: 0.55rem;
}

.customer-lookup-search-card {
  padding: 0.65rem 0.85rem;
}

.customer-lookup-page-shell {
  align-content: start;
}

.customer-lookup-inline-empty {
  margin: 0.45rem 0 0;
  color: rgba(191, 219, 254, 0.8);
  font-size: 0.88rem;
}

.customer-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.customer-lookup-field {
  min-width: 0;
}

.customer-summary-badges,
.customer-platform-row,
.customer-tab-row,
.customer-ambiguous-list {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.customer-summary-grid,
.customer-overview-grid {
  margin-top: 0.55rem;
}

.customer-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.customer-tab-row {
  margin-bottom: 0.45rem;
}

.customer-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  font-weight: 700;
}

.customer-tab.active,
.customer-tab:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.42);
  color: #f8fafc;
}

.customer-placeholder-card {
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.5);
}

.customer-alerts-table th,
.customer-alerts-table td,
.customer-transactions-table th,
.customer-transactions-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.customer-name-cell-queue,
.customer-alert-last-transaction .customer-muted-stack,
.customer-alert-status .customer-muted-stack {
  max-width: 16rem;
}

.customer-alert-siempre {
  min-width: 18rem;
}

.customer-alert-siempre .customer-muted-stack span {
  white-space: nowrap;
}

.customer-name-cell-queue {
  overflow-wrap: anywhere;
}

.customer-intelligence-page .customer-alert-section .customer-alerts-table td.customer-alert-email,
.customer-intelligence-page .customer-alert-section .customer-alerts-table td.customer-alert-phone {
  overflow: hidden;
}

.customer-alert-email,
.customer-alert-ltv,
.customer-alert-phone,
.customer-alert-end-date,
.customer-alert-workflow {
  white-space: nowrap;
}

.customer-alert-ltv {
  text-align: right;
}

.customer-alert-email .customer-copy-field {
  min-width: 24ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-alert-phone .customer-copy-field {
  min-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-alert-workflow,
.customer-alerts-table th:last-child,
.customer-alerts-table td:last-child {
  width: 5%;
  white-space: nowrap;
}

.customer-alert-workflow .customer-action-row {
  flex-wrap: nowrap;
}

.customer-copy-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #93c5fd;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.18em;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.customer-copy-field:hover {
  color: #dbeafe;
}

.customer-copy-field.copied {
  color: #86efac;
}

.customer-copy-field-inline {
  font-weight: 700;
  font-size: 1.25rem;
}

.customer-topbar .topbar-page-header,
.customer-topbar .page-header {
  margin-bottom: 0;
}

.customer-topbar h1 {
  margin-bottom: 0.15rem;
}

.customer-topbar p,
.customer-helper-text,
.customer-empty-card p,
.customer-section-header p {
  margin: 0;
}

.customer-summary-card {
  margin-bottom: 0.5rem;
}

.customer-empty-card {
  padding: 0.75rem 0.9rem;
}

.customer-empty-card h2 {
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.customer-tab-card {
  padding-top: 0.7rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill-pending {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.28);
  color: #fde68a;
}

.status-pill-completed {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.32);
  color: #bfdbfe;
}

.status-pill-chargeback {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

.status-pill-refunded {
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.3);
  color: #99f6e4;
}

.customer-transaction-history {
  margin-top: 0.2rem;
}

.customer-transaction-history summary {
  color: #93c5fd;
  cursor: pointer;
  font-size: 0.8rem;
  list-style: none;
}

.customer-transaction-history summary::-webkit-details-marker {
  display: none;
}

.customer-transaction-history-list {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.35rem;
}

.customer-transaction-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.86);
}

.customer-copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: var(--shadow-card);
  color: #e0f2fe;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1500;
}

.customer-copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.transactions-page-shell {
  align-content: start;
}

.transactions-filter-card {
  padding: 0.85rem 0.95rem;
}

.transactions-filter-form,
.transactions-filter-field {
  display: grid;
  gap: 0.45rem;
}

.transactions-filters-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.transactions-date-row,
.transactions-amount-row,
.transactions-filter-actions,
.transactions-source-pills,
.transactions-chart-legend {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.transactions-source-pills {
  gap: 0.45rem;
}

.transactions-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.88);
  cursor: pointer;
}

.transactions-source-pill.active {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(59, 130, 246, 0.16);
}

.transactions-source-pill input {
  margin: 0;
}

.transactions-date-row input,
.transactions-amount-row input {
  flex: 1 1 150px;
}

.transactions-chart-card {
  margin: 0.65rem 0 0.4rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.transactions-chart-svg-wrap {
  overflow-x: auto;
}

.transactions-chart svg {
  width: 100%;
  min-width: 520px;
  height: auto;
}

.transactions-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.84rem;
}

.transactions-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.transactions-chart-empty {
  color: rgba(148, 163, 184, 0.82);
}

.transactions-summary-table th,
.transactions-summary-table td,
.transactions-list-table th,
.transactions-list-table td {
  white-space: nowrap;
}

.transactions-list-table th a {
  color: rgba(226, 232, 240, 0.88);
  text-decoration: none;
}

.transactions-list-table th a:hover {
  color: #f8fafc;
}

.transactions-data-row {
  cursor: pointer;
}

.transactions-data-row.expanded,
.transactions-data-row:hover {
  background: rgba(59, 130, 246, 0.08);
}

.transactions-raw-row td {
  background: rgba(15, 23, 42, 0.55);
}

.transactions-raw-row pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.8rem;
}

.transactions-filter-field .is-readonly {
  opacity: 0.74;
}

@media (max-width: 1100px) {
  .customer-summary-grid,
  .customer-overview-grid,
  .customer-filters-grid,
  .transactions-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .customer-summary-grid,
  .customer-overview-grid,
  .customer-filters-grid,
  .customer-lookup-form,
  .transactions-filters-grid {
    grid-template-columns: 1fr;
  }

  .customer-topbar,
  .customer-section-header,
  .customer-summary-heading {
    flex-direction: column;
  }

  .customer-action-row {
    flex-direction: column;
  }

  .customer-action-row form,
  .customer-action-row .btn {
    width: 100%;
  }
}
