/* Calls page v2: three card-tabs + four statistics cards, no right rail. */
body[data-active="calls"] .calls-full-layout {
  display: block;
  width: 100%;
  min-width: 0;
}

body[data-active="calls"] .calls-full-layout > .main-column {
  width: 100%;
  min-width: 0;
}

body[data-active="calls"] .calls-primary-tabs,
body[data-active="calls"] .calls-stat-cards {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

body[data-active="calls"] .calls-primary-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 12px;
}

body[data-active="calls"] .calls-stat-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
}

body[data-active="calls"] .calls-primary-card,
body[data-active="calls"] .calls-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 16px 17px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(36, 84, 52, .12);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.99), rgba(248,251,249,.98));
  color: #17211b;
  text-align: left;
  box-shadow:
    0 8px 22px rgba(26, 65, 39, .065),
    0 1px 0 rgba(255,255,255,.9) inset;
}

body[data-active="calls"] .calls-primary-card {
  cursor: pointer;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease,
    background .2s ease,
    color .2s ease;
}

body[data-active="calls"] .calls-stat-card {
  cursor: default;
}

body[data-active="calls"] .calls-primary-card::before,
body[data-active="calls"] .calls-stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 0 0, rgba(45,150,80,.075), transparent 42%);
  pointer-events: none;
}

body[data-active="calls"] .calls-primary-card > span,
body[data-active="calls"] .calls-stat-card > span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #667169;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .055em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-active="calls"] .calls-primary-card > span::before,
body[data-active="calls"] .calls-stat-card > span::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2d9650;
  box-shadow: 0 0 0 4px rgba(45,150,80,.09);
}

body[data-active="calls"] .calls-primary-card > strong,
body[data-active="calls"] .calls-stat-card > strong {
  position: relative;
  justify-self: end;
  color: #17211b;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.035em;
}

body[data-active="calls"] .tone-past::before,
body[data-active="calls"] .tone-records::before {
  background: radial-gradient(circle at 0 0, rgba(226,154,39,.09), transparent 42%);
}

body[data-active="calls"] .tone-past > span::before {
  background: #e29a27;
  box-shadow: 0 0 0 4px rgba(226,154,39,.10);
}

body[data-active="calls"] .calls-primary-card.tone-records::before {
  background: radial-gradient(circle at 0 0, rgba(216,72,72,.085), transparent 42%);
}

body[data-active="calls"] .calls-primary-card.tone-records > span::before {
  background: #d84848;
  box-shadow: 0 0 0 4px rgba(216,72,72,.10);
}

body[data-active="calls"] .calls-stat-card.tone-records::before {
  background: radial-gradient(circle at 0 0, rgba(75,130,207,.09), transparent 42%);
}

body[data-active="calls"] .calls-stat-card.tone-records > span::before {
  background: #4b82cf;
  box-shadow: 0 0 0 4px rgba(75,130,207,.10);
}

body[data-active="calls"] .calls-stat-card.tone-individual::before {
  background: radial-gradient(circle at 0 0, rgba(125,82,193,.085), transparent 42%);
}

body[data-active="calls"] .calls-stat-card.tone-individual > span::before {
  background: #7d52c1;
  box-shadow: 0 0 0 4px rgba(125,82,193,.10);
}

body[data-active="calls"] .calls-stat-card.tone-group::before {
  background: radial-gradient(circle at 0 0, rgba(221,119,42,.09), transparent 42%);
}

body[data-active="calls"] .calls-stat-card.tone-group > span::before {
  background: #dd772a;
  box-shadow: 0 0 0 4px rgba(221,119,42,.10);
}

body[data-active="calls"] .calls-primary-card:hover,
body[data-active="calls"] .calls-primary-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(43, 132, 67, .22);
  box-shadow:
    0 13px 28px rgba(24, 78, 43, .105),
    0 1px 0 rgba(255,255,255,.95) inset;
  outline: none;
}

body[data-active="calls"] .calls-primary-card.active {
  border-color: #48a85e;
  background: linear-gradient(135deg, #58bd70, #3ca957);
  color: #fff;
  box-shadow: 0 12px 26px rgba(55, 153, 80, .22);
}

body[data-active="calls"] .calls-primary-card.active::before {
  background: radial-gradient(circle at 0 0, rgba(255,255,255,.15), transparent 44%);
}

body[data-active="calls"] .calls-primary-card.active > span,
body[data-active="calls"] .calls-primary-card.active > strong {
  color: #fff;
}

body[data-active="calls"] .calls-primary-card.active > span::before {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.18);
}

body[data-active="calls"] .calls-full-layout .call-hero,
body[data-active="calls"] .calls-full-layout .calls-clean-panel {
  width: 100%;
  max-width: 100%;
}

body[data-theme="dark"][data-active="calls"] .calls-primary-card,
body[data-theme="dark"][data-active="calls"] .calls-stat-card {
  border-color: rgba(202, 225, 209, .14);
  background: linear-gradient(145deg, rgba(23,37,30,.98), rgba(16,29,23,.98));
  color: #eef7f0;
  box-shadow:
    0 8px 22px rgba(0,0,0,.18),
    0 1px 0 rgba(255,255,255,.025) inset;
}

body[data-theme="dark"][data-active="calls"] .calls-primary-card > span,
body[data-theme="dark"][data-active="calls"] .calls-stat-card > span {
  color: rgba(226,238,229,.72);
}

body[data-theme="dark"][data-active="calls"] .calls-primary-card > strong,
body[data-theme="dark"][data-active="calls"] .calls-stat-card > strong {
  color: #f4faf5;
}

body[data-theme="dark"][data-active="calls"] .calls-primary-card.active {
  border-color: #52b96a;
  background: linear-gradient(135deg, #31944c, #23783b);
  box-shadow: 0 12px 28px rgba(22, 91, 44, .30);
}

body[data-theme="dark"][data-active="calls"] .calls-primary-card.active > span,
body[data-theme="dark"][data-active="calls"] .calls-primary-card.active > strong {
  color: #fff;
}

@media (max-width: 1050px) {
  body[data-active="calls"] .calls-stat-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-active="calls"] .calls-primary-tabs,
  body[data-active="calls"] .calls-stat-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-active="calls"] .calls-primary-card,
  body[data-active="calls"] .calls-stat-card {
    min-height: 72px;
    padding: 14px 15px;
  }

  body[data-active="calls"] .calls-primary-card > strong,
  body[data-active="calls"] .calls-stat-card > strong {
    font-size: 25px;
  }
}
