/* ==========================================================
   Client portal dashboard (.portal-dash) — SINGLE SOURCE
   Loaded only on /portal/ for logged-in clients with a dashboard.
   Uses the theme's global tokens (--honey #febb1a, --ink, --rule,
   --ink-mute, etc.). One flat, geometric system shared by every
   client; modules turn on per client in template-parts/portal-client.php.

   Brand rules honored here: NO rounded corners, NO box-shadows,
   NO pill shapes, NO one-sided colored border accents. Status is
   carried by tag chips, not by colored card edges.
   ========================================================== */

.portal-dash-band { padding: 0 var(--pad-x) clamp(48px, 6vw, 88px); }
.portal-dash { max-width: var(--max-w); margin: 0 auto; }

/* report head */
.pd-report-head { margin: 26px 0 6px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pd-report-title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.04; margin: 0; }
.pd-report-sub { color: var(--ink-mute); font-size: 14px; margin: 5px 0 0; }

/* Honey chip, square and flat.
   NOT removed: as of 2026-08-17 it no longer appears in .pd-report-head
   (sign out took that slot), but template-parts/hive-preview.php still
   renders it for the "Sample Preview" tag on the public
   /services/client-portals/ mockup. Deleting this rule breaks that page. */
.pd-tier {
  display: inline-block; background: var(--honey-wash); color: var(--honey-deep);
  border: 1px solid rgba(163,125,10,.28); padding: 6px 12px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
}

/* section heads */
.pd-sec { margin: 30px 0 0; }
.pd-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 13px; }
.pd-sec-head h2 { font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--honey-deep); margin: 0; font-weight: 700; }
/* Honey highlighter. Kept in sync with the shared rule in style.css
   ("ONE honey highlighter", 2026-08-18) - this stylesheet is deliberately
   standalone, so the declaration is duplicated here on purpose rather than
   inherited. Was a linear-gradient, which paints to the inline box and runs
   past the last letter; the padding made it worse. If the highlighter changes
   in style.css, change it here too. */
.pd-sec-head h2 .u {
  background: none;
  padding: 0;
  text-decoration-line: underline;
  text-decoration-color: var(--honey);
  text-decoration-thickness: 0.28em;
  text-underline-offset: -0.12em;
  text-decoration-skip-ink: none;
}
.pd-sec-head .win { font-size: 12.5px; color: var(--ink-mute); }

/* grids */
.pd-grid { display: grid; gap: 14px; }
.pd-g4 { grid-template-columns: repeat(4, 1fr); }
/* .pd-g3 removed 2026-08-17: its only user was the three-across property
   grid, dropped when property cards went full width. .pd-g4 is still used by
   the advertising tiles and the Hive preview mockup. */
@media (max-width: 820px) { .pd-g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pd-g4 { grid-template-columns: 1fr; } }

/* tiles — flat square */
.pd-tile { background: #fff; border: 1px solid var(--rule); padding: 16px; }
.pd-tile .label { font-size: 12.5px; color: var(--ink-mute); font-weight: 600; margin: 0 0 6px; }
.pd-tile .value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); }
.pd-tile .value.sm { font-size: 24px; }
.pd-tile .unit { font-size: 16px; font-weight: 700; color: var(--honey-deep); margin-left: 2px; }
.pd-delta { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; margin-top: 9px; }
.pd-delta.up { color: #2f7d34; }
.pd-delta.down { color: #b3261e; }
.pd-delta .arrow { font-size: 11px; }
.pd-delta .from { color: var(--ink-mute); font-weight: 500; }
.pd-foot { font-size: 11.5px; color: var(--ink-mute); margin-top: 7px; }

/* chart / table card — flat square */
.pd-card { background: #fff; border: 1px solid var(--rule); padding: 18px; }
.pd-card h3 { margin: 0 0 2px; font-size: 15px; color: var(--ink); }
.pd-card .cap { font-size: 12.5px; color: var(--ink-mute); margin: 0 0 10px; }
.portal-dash svg { display: block; width: 100%; height: auto; overflow: visible; }
.pd-axislbl { font-size: 12px; fill: var(--ink-mute); font-weight: 600; }
.pd-ptlbl { font-size: 12.5px; fill: var(--ink); font-weight: 800; }

/* table */
.portal-dash table { width: 100%; border-collapse: collapse; font-size: 14px; }
.portal-dash th, .portal-dash td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--rule); }
.portal-dash th { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.portal-dash td.num, .portal-dash th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pd-qbar { position: relative; }
.pd-qbar .fill { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); height: 22px; background: var(--honey-wash); z-index: 0; }
.pd-qbar .txt { position: relative; z-index: 1; }
.pd-rank { display: inline-block; min-width: 34px; padding: 2px 7px; background: var(--honey-wash); color: var(--honey-deep); font-weight: 800; font-size: 12.5px; text-align: center; }
.pd-datanote { margin-top: 20px; font-size: 12px; color: var(--ink-mute); }

/* ---- Tabs (Metrics / Notes) — flat honey underline ---- */
.pd-tabs { display: flex; gap: 4px; margin: 22px 0 20px; border-bottom: 1px solid var(--rule); }
.pd-tab {
  appearance: none; background: transparent; border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; padding: 12px 20px; margin-bottom: -1px;
  font-family: var(--font-headline, "Roboto Condensed", sans-serif);
  font-size: 15px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-mute); cursor: pointer; transition: color 160ms ease, border-color 160ms ease;
}
.pd-tab:hover { color: var(--ink); }
.pd-tab.is-active { color: var(--ink); border-bottom-color: var(--honey); }
.pd-tab:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.pd-tab-panel[hidden] { display: none; }

/* ---- Property group header (shared; 1..N per client) ----
   The property name, what the property is, the reporting window and a link to
   that property's live site, on the page background above the white cards.
   The 2px rule under it is the delineator: every card between this header and
   the next one is that property's data. It lives here rather than inside the
   KPI card because a rule inside a card cannot group the advertising and
   search-terms cards that follow it. Replaces the old "Property at a glance"
   section label - the property name does that job now, so the name is printed
   once per property instead of twice (label + card title). Same component for a
   one-property client and a six-property client. 2026-08-17. */
.pd-prop-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin: 34px 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--ink);
}
.pd-prop-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); text-transform: none; }
.pd-prop-meta { display: flex; align-items: center; gap: 12px; }
.pd-prop-head .win { font-size: 12.5px; color: var(--ink-mute); }
/* The header already carries the top margin for the group, so the first
   section under it does not add its own. */
.pd-prop-head + .pd-sec { margin-top: 0; }

/* ---- Property KPI card (shared; 1..N per client) ---- */
.pd-site-card { display: flex; flex-direction: column; gap: 12px; }
.pd-site-role { font-size: 12.5px; color: var(--ink-mute); margin: 2px 0 0; }
.pd-linkchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.pd-linkchip:hover { border-color: var(--honey-deep); color: var(--honey-deep); }
.pd-linkchip.pd-lc-domain { background: var(--honey-wash); border-color: rgba(163,125,10,.28); color: var(--honey-deep); }
.pd-site-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.pd-site-kpis .pd-kpi { background: #fff; border-top: 1px solid var(--rule); padding: 8px 4px 2px; }
.pd-site-kpis .pd-kpi .label { font-size: 11.5px; color: var(--ink-mute); font-weight: 600; }
.pd-site-kpis .pd-kpi .value { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; margin-top: 1px; }
.pd-site-kpis .pd-kpi .foot { font-size: 11px; color: var(--ink-mute); margin-top: 4px; line-height: 1.35; }

/* ---- Assessments — flat square, NO colored side border ---- */
.pd-assess-list { display: grid; gap: 10px; }
.pd-assess-item { background: #fff; border: 1px solid var(--rule); padding: 12px 14px; }
.pd-assess-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.pd-assess-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; }
.pd-assess-tag.is-ok { background: #e6f2e6; color: #2f7d34; }
.pd-assess-tag.is-watch { background: #fff2dc; color: #8a5a12; }
.pd-assess-title { font-weight: 700; color: var(--ink); font-size: 14px; }
.pd-assess-body { font-size: 13px; color: var(--ink); line-height: 1.5; margin: 0; }
.pd-assess-body code { background: var(--honey-wash); color: var(--honey-deep); padding: 1px 5px; font-size: 12px; }

/* ---- Notes feed — flat square, no shadow ---- */
.pd-notes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pd-notes-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--honey); color: var(--ink);
  border: 1px solid rgba(163,125,10,.35); padding: 8px 14px; font-size: 12.5px; font-weight: 800;
  cursor: pointer; letter-spacing: .01em; font-family: inherit;
}
.pd-btn:hover { background: #ffcd4d; }
/* .pd-btn-ghost removed 2026-08-17: its only user was the "Mark all as
   read" button in the legacy portal-highline.php partial, and that feature
   was dropped before this stylesheet was consolidated. */
.pd-note { background: #fff; border: 1px solid var(--rule); padding: 14px 16px; margin-bottom: 10px; }
.pd-note-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pd-note-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.pd-note-date { font-size: 11.5px; color: var(--ink-mute); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.pd-note-summary { font-size: 13px; color: var(--ink); margin: 6px 0 8px; line-height: 1.55; }
.pd-note-body { font-size: 13px; color: var(--ink); line-height: 1.6; border-top: 1px dashed var(--rule); padding-top: 10px; margin-top: 6px; }
.pd-note-body p { margin: 0 0 8px; }
.pd-note-body ul { margin: 0 0 8px 18px; }
.pd-note-body code { background: var(--honey-wash); color: var(--honey-deep); padding: 1px 5px; font-size: 12px; }
.pd-note-flag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a5a12; background: #fff2dc; padding: 2px 7px; margin-left: 8px; }
.pd-note-toggle { background: transparent; border: 0; padding: 0; color: var(--honey-deep); font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; margin-top: 8px; }
.pd-empty { color: var(--ink-mute); font-size: 13px; font-style: italic; margin: 8px 0 0; }

/* ---- Footer band ---- */
.pd-footer-band { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-mute); }
.pd-footer-band a { color: var(--honey-deep); font-weight: 700; text-decoration: none; }
.pd-footer-band a:hover { text-decoration: underline; }
