.csm-portal { max-width: 980px; }
.csm-portal-title { margin: 0 0 6px 0; }
.csm-portal-intro { margin: 0; opacity: 0.85; }

.csm-portal-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 14px 14px;
}

.csm-portal-top {
  display:flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.csm-portal-creditline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* TEST MODE badge (matches dashboard; cannot be mistaken for live) */
.csm-app__badge--test {
  display: inline-block;
  background: #d63638;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.csm-portal-creditpill {
  display:inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
}

.csm-portal-creditpill .label { opacity: 0.8; font-size: 13px; }
.csm-portal-creditpill .value { font-size: 18px; font-weight: 800; }
.csm-portal-creditpill.is-positive .value { color: #15803d; }
.csm-portal-creditpill.is-zero .value { color: #475569; }

.csm-portal-actions { display:flex; gap: 10px; flex-wrap: wrap; }
.csm-portal-note { margin-top: 10px; opacity: 0.8; font-size: 13px; }

.csm-portal-pricing { margin-top: 16px; }

.csm-portal-acc summary {
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  list-style: none;
}

.csm-portal-acc summary::-webkit-details-marker { display: none; }

.csm-portal-acc summary::after {
  content: "▾";
  float: right;
  opacity: 0.7;
}

.csm-portal-acc[open] summary::after { content: "▴"; }

.csm-portal-acc .csm-portal-acc-body { margin-top: 12px; }

.csm-portal-pricing table { width: 100%; border-collapse: collapse; font-size: 13px; }
.csm-portal-pricing th, .csm-portal-pricing td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  text-align: left;
  vertical-align: top;
}
.csm-portal-pricing th { opacity: 0.8; font-weight: 600; }
.csm-portal-pricing .right { text-align: right; white-space: nowrap; }
.csm-portal-pricing .muted { opacity: 0.75; }

.csm-portal-log { margin-top: 14px; }
.csm-portal-log h4 { margin: 0 0 8px 0; }
.csm-portal-log table { width: 100%; border-collapse: collapse; }
.csm-portal-log th, .csm-portal-log td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  text-align: left;
  vertical-align: top;
}
.csm-portal-log th { opacity: 0.8; font-weight: 600; }
