/* Socials route: ads, analytics, messaging + comment management */
:root{
  --facebook: #1877f2;
  --instagram: #e1306c;
  --tiktok: #ff2828;
  --linkedin: #0a66c2;
}

.socials.three-col {
  grid-template-columns: 280px minmax(520px, 1fr) 340px;
}

.socials .left-panel,
.socials .main-panel,
.socials .right-panel {
  min-height: 89vh;
  overflow: auto;
  padding: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-faded) transparent;
}

/* Lists */
#socialAccounts,
#socialCampaigns,
#socialInbox {
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

#socialAccounts { max-height: 28vh; }
#socialCampaigns { max-height: 34vh; }
#socialInbox { max-height: 44vh; }

/* Chart container */
.social-chart {
  min-height: 160px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.social-chart svg {
  width: 100%;
  height: 160px;
  display: block;
}

.social-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.social-item .title {
  font-weight: 650;
}

.social-item .meta {
  font-size: 12px;
  opacity: .75;
}

.social-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-dark);
  border: var(--line);
  opacity: .85;
  white-space: nowrap;
}

.reply-box textarea.input {
  width: 100%;
  resize: vertical;
}
#socials-root .chip{/* background:transparent; */padding: 2px 6px;}
.modal-head{display:flex;justify-content: space-between;align-items: center;}

/* KPI donut card (matches the reference design) */
.social-kpi-wrap {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.social-kpi-card {
  width: 100%;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-donut-box {
  position: relative;
  display: grid;
  place-items: center;
}

.social-donut-svg {
  width: 170px;
  height: 170px;
  display: block;
}

.social-donut-track {
  fill: none;
  stroke: var(--bg);
  stroke-width: 10px;
}

.social-donut-seg {
  fill: none;
  stroke-width: 3px;
  stroke-linecap: round;
}

.social-donut-seg.instagram { stroke: var(--instagram); }
.social-donut-seg.facebook { stroke: var(--facebook, #3b82f6); }
.social-donut-seg.tiktok { stroke: var(--tiktok, #ca0c38); }
.social-donut-seg.linkedin { stroke: var(--linkedin, #f59e0b); }

.social-donut-center {
  position: absolute;
  text-align: center;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.social-donut-center .v {
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0.4px;
}

.social-donut-center .muted {
  font-size: 12px;
}

.social-kpi-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 14px;
}

.social-kpi-legend .legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: var(--line);
}

.social-kpi-legend .legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.social-kpi-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.social-kpi-legend .legend-dot.instagram { background: var(--instagram); }
.social-kpi-legend .legend-dot.facebook { background: var(--facebook); }
.social-kpi-legend .legend-dot.tiktok { background: var(--tiktok); }
.social-kpi-legend .legend-dot.linkedin { background: var(--linkedin); }

.social-kpi-legend .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-kpi-legend .val {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.social-kpi-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-kpi-mini .mini-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: var(--line);
  background: rgba(255,255,255,.03);
}

.social-kpi-mini .mini-badge {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: var(--line);
  background: var(--surface);
  color: var(--primary);
  flex: 0 0 auto;
}

.social-kpi-mini .pct {
  font-weight: 850;
  font-size: 16px;
  line-height: 1;
}

/* Inbox unread styling */
#socialInbox .item.is-unread {
  border-color: color-mix(in srgb, var(--primary), transparent 55%);
  background: color-mix(in srgb, var(--primary), transparent 92%);
}

@media (max-width: 980px) {
  .socials.three-col {
    grid-template-columns: 1fr;
  }
  .socials.three-col .right-panel,
  .socials.three-col .left-panel {
    display: none;
  }
}
