/* x-summary.css: the owner Summary on the Dashboard (owner-summary.js). Only design tokens from style.css. */

/* Gym trend cards: the .stat tile, with the clickable part as a button so the calc note stays usable */
.sum-stat { min-height: 0; }
.sum-stat-hit {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0;
  background: none; border: 0; color: inherit; font: inherit; text-align: left;
}
button.sum-stat-hit { cursor: pointer; }
.sum-stat:has(button.sum-stat-hit:hover) { border-color: var(--ink); }
.sum-badge-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sum-stat .calc { font-size: 13px; }
.sum-trend .section-head { margin-bottom: 12px; }
.sum-trend .sample-note { margin: 0; }

/* Do these first */
.sum-first-meta { text-align: right; }
.sum-first-meta strong { color: var(--text); }
.sum-steps { margin: 0; padding: 0; list-style: none; }
.sum-step { align-items: flex-start; flex-wrap: wrap; padding: 16px 12px 16px 16px; }
.sum-step.sum-red { box-shadow: inset 4px 0 0 var(--accent); }
.sum-step.sum-amber { box-shadow: inset 4px 0 0 var(--mk-amber); }
.sum-step-n { flex: none; min-width: 22px; font: 800 26px/40px var(--display); color: var(--muted); }
.sum-red .sum-step-n { color: var(--accent-text); }
.sum-icon { font-size: 18px; }
.sum-more { margin-left: 6px; vertical-align: 2px; }
/* "+3 more" is a button: it opens the whole list behind the step */
button.sum-more { height: 32px; padding: 0 10px; border: 1px solid transparent; font-size: 13px; cursor: pointer; }
button.sum-more:hover { border-color: currentColor; }
.sum-step .row-main em { overflow-wrap: anywhere; }
.sum-step .calc { font-size: 13px; }
.sum-step-btn { flex: none; display: flex; align-items: center; }
@media (max-width: 619px) {
  .sum-first-meta { text-align: left; }
  .sum-step-btn { flex-basis: 100%; padding-left: 86px; }
  .sum-step-btn .btn { width: 100%; }
}

/* Cards grid below the steps: stacks on phones, two columns on wide screens */
.sum-grid { display: grid; gap: 16px; }
@media (min-width: 960px) {
  .sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .sum-grid > :only-child { grid-column: 1 / -1; }
}
.sum-card { border-top: 4px solid var(--line-strong); }
.sum-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.sum-card .sample-note { margin: 16px 0 0; }
.sum-big { margin: 12px 0 4px; font: 800 48px/1 var(--display); }

/* Joined vs left */
.sum-split { display: flex; gap: 2px; height: 14px; }
.sum-split-j { background: var(--st-green); }
.sum-split-l { background: var(--accent); }
.sum-legend { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 4px; font-size: 16px; }
.sum-legend b { font-weight: 700; margin-right: 4px; }
/* "6 joined" / "3 left" open the people behind them */
.sum-legend-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-ctl); text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.sum-legend-btn:hover { text-decoration-color: var(--accent-text); text-decoration-thickness: 2px; }
.sum-key { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.sum-key-j { background: var(--st-green); }
.sum-key-l { background: var(--accent); }
.sum-net-bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 20px; }
.sum-net-col { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.sum-net-num { text-align: center; font: 700 16px var(--display); }
.sum-net-track { position: relative; height: 72px; margin-top: 4px; }
.sum-net-track::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line-ctl); }
.sum-net-bar { position: absolute; left: 22%; right: 22%; min-height: 2px; }
.sum-net-bar.up { bottom: 50%; background: var(--st-green); }
.sum-net-bar.down { top: 50%; background: var(--accent); }
.sum-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 16px 0 0; background: var(--line); border: 1px solid var(--line); }
.sum-facts > div { padding: 10px 12px; background: var(--surface-2); }
.sum-facts dt { color: var(--muted); font: 700 12px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; }
.sum-facts dd { margin: 4px 0 0; font: 800 26px/1 var(--display); }

/* Call today */
.sum-call-row { flex-wrap: wrap; align-items: flex-start; }
.sum-call-row .contact-btns { flex-basis: 100%; padding-left: 52px; }
.sum-last { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* Revenue vs goal */
.sum-rev-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sum-rev-line .sum-big { margin-bottom: 0; }
.sum-progress { height: 12px; margin-top: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sum-progress span { display: block; height: 100%; background: var(--text); }
.sum-progress span.met { background: var(--ok); }
.sum-rev-sub { margin-top: 8px; }
.sum-rev-sub b { color: var(--text); }
.chart-card.sum-chart { margin-top: 18px; padding: 16px 0 0; border-top: 1px solid var(--line); }
.sum-line { position: relative; height: 170px; margin-top: 4px; border-bottom: 2px solid var(--text); }
.sum-line-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sum-rev-polyline { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sum-goal-line { stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.sum-goal-tag { position: absolute; left: 0; margin-top: -4px; transform: translateY(-100%); padding: 0 4px; background: var(--surface); color: var(--ok); font: 700 12px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .05em; }
.sum-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--surface); border: 2px solid var(--text); pointer-events: none; }
.sum-dot.latest { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--accent); border-color: var(--accent); }
.sum-line-x { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); }
.sum-line-x .bar-x { min-height: 32px; margin-top: 0; padding: 6px 0 0; background: none; border: 0; cursor: pointer; font-family: inherit; }
.sum-line-x .bar-x:hover, .sum-line-x .bar-x:focus-visible { color: var(--text); }

/* Socials at a glance */
.sum-social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sum-social { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 12px; background: var(--surface-2); color: inherit; text-decoration: none; transition: box-shadow .2s var(--ease-ui); }
a.sum-social:hover { box-shadow: inset 0 0 0 1px var(--text); }
.sum-social .stat-label { font: 700 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; }
.sum-social-num { font: 800 32px/1 var(--display); }
.sum-social .pill { margin-top: 4px; }
@media (max-width: 479px) { .sum-social-grid { grid-template-columns: 1fr; } }
.sum-post { margin-top: 16px; padding: 14px 14px 14px 16px; border: 1px solid var(--line); }
.sum-post.sum-red { box-shadow: inset 4px 0 0 var(--accent); }
.sum-post.sum-amber { box-shadow: inset 4px 0 0 var(--mk-amber); }
.sum-post-who { font-size: 15px; }
.sum-post-text { margin: 6px 0 12px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }

/* ======================= Dashboard, calmer (staff.js) =======================
   On top: the number tiles and "Do these first". Everything else folds away under a heading with a
   one-line summary (details.dash-sec), opened with a tap. The Call list (owner-members.js) uses the same look. */
.dash-tiles .stat-label { font-size: 14px; }
.dash-tiles .stat-sub { font-size: 16px; line-height: 1.3; }
.dash-hint { margin-top: 10px; color: var(--muted); font-size: 16px; }
.dash-tiles ~ .sum-first { margin-top: 40px; }
.dash-more { margin-top: 56px; }
.dash-more > h2 + .muted, .om-more > .muted { margin-top: 8px; font-size: 16px; }
.dash-secs { margin-top: 16px; border-top: 2px solid var(--line-strong); }
.dash-sec { border-bottom: 1px solid var(--line); }
.dash-sec > summary {
  display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 14px 8px 14px 4px;
  cursor: pointer; list-style: none; transition: background-color .2s var(--ease-ui);
}
.dash-sec > summary::-webkit-details-marker { display: none; }
.dash-sec > summary:hover { background: var(--surface-2); }
.dash-sec > summary:focus-visible { outline-offset: -3px; }
.dash-sec-text { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dash-sec-title { font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.dash-sec-line { color: var(--muted); font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
/* The word button on the right: "Show" when closed, "Hide" when open, with a drawn arrow */
.dash-sec-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 96px; min-height: 44px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line-ctl); color: var(--text);
  font: 700 14px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em;
}
.dash-sec-btn::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.dash-sec[open] > summary .dash-sec-btn::after { transform: translateY(2px) rotate(-135deg); }
.dash-sec > summary:hover .dash-sec-btn { border-color: var(--text); }
.dash-sec > summary .when-open, .dash-sec[open] > summary .when-closed { display: none; }
.dash-sec[open] > summary .when-open { display: inline; }
.dash-sec[open] > summary { border-bottom: 1px solid var(--line); }
.dash-sec-body { padding: 20px 0 36px; }
.dash-sec-body > :first-child { margin-top: 0; }
.dash-sec-body .section { margin-top: 40px; }
.dash-sec-body > .section:first-child { margin-top: 0; }
.dash-sec-body .row-main em, .dash-sec-body .message, .dash-sec-body .empty { font-size: 16px; }
.dash-sec-body .key-date span { font-size: 15px; }
.dash-sec-tools { display: flex; justify-content: flex-end; margin: -8px 0 4px; }
.dash-sec-body .winback { margin-bottom: 28px; }
.dash-follow-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.dash-follow-bar .muted { flex: 1 1 300px; font-size: 16px; }
@media (max-width: 619px) {
  .dash-sec > summary { gap: 12px; padding-right: 0; }
  .dash-sec-title { font-size: 22px; }
  .dash-sec-btn { min-width: 80px; padding: 0 10px; }
}
/* Easier to read and tap: "Do these first" gets full-size buttons and 16px detail lines; trend card captions 15px */
.sum-step-btn .btn { min-height: 48px; padding: 0 18px; font-size: 14px; }
.sum-step .row-main em { font-size: 16px; }
.dash-sec-body .sum-stat .stat-sub { font-size: 15px; }
