/* ==========================================================================
   Love2Live — the representative zone.
   Loaded on top of css/style.css by the rep-*.php pages and by opportunity.php.
   Same tokens, same radii (100px or 10px, nothing between), same 44px targets.
   Mobile-first: every grid here is one column until there is room for two.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sub-navigation (includes/rep-nav.php)
   -------------------------------------------------------------------------- */
.rep-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 28px; padding: 6px;
  background: var(--linen); border: 1px solid var(--hair);
  border-radius: var(--r-pill);
}
.rep-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-2);
}
.rep-nav a:hover { background: var(--sand); color: var(--ink); }
.rep-nav a[aria-current="page"] { background: var(--ink); color: var(--white); }

/* --------------------------------------------------------------------------
   Stat tiles
   -------------------------------------------------------------------------- */
.rep-stats {
  display: grid; gap: 14px; margin: 0 0 28px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.rep-stat {
  background: var(--white); border: 1px solid var(--hair);
  border-radius: var(--r-card); padding: 18px 20px;
}
.rep-stat-label {
  margin: 0 0 6px; font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.rep-stat-value {
  margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.1;
  font-weight: 400; color: var(--ink);
}
.rep-stat-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); max-width: none; }
.rep-stat.is-accent { background: var(--purple-soft); border-color: #DCD2EA; }
.rep-stat.is-quiet { background: var(--linen); }

/* --------------------------------------------------------------------------
   Panels
   -------------------------------------------------------------------------- */
.rep-panel {
  background: var(--white); border: 1px solid var(--hair);
  border-radius: var(--r-card); padding: clamp(18px, 3vw, 30px);
  margin: 0 0 24px;
}
.rep-panel > :last-child { margin-bottom: 0; }
.rep-panel h2 { margin-top: 0; font-size: clamp(22px, 3vw, 28px); }
.rep-panel h3 { margin-top: 1.4em; font-size: 18px; }
.rep-panel-cream { background: var(--linen); }
.rep-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .rep-grid-2 { grid-template-columns: 1fr 1fr; } }

.rep-head { margin: 0 0 20px; }
.rep-head h1 { margin: 0 0 6px; }
.rep-head .lead { margin-bottom: 0; }
.rep-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  margin: 12px 0 0; font-size: 14px; color: var(--muted);
}
.rep-code {
  font-family: var(--sans); font-weight: 500; letter-spacing: .22em;
  font-size: 17px; color: var(--ink);
}

/* --------------------------------------------------------------------------
   The personal link + copy button
   -------------------------------------------------------------------------- */
.rep-link-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch;
  margin: 0 0 10px;
}
.rep-link-field {
  flex: 1 1 240px; min-width: 0;
  display: flex; align-items: center; min-height: 48px;
  padding: 10px 16px; background: var(--linen);
  border: 1px solid var(--hair); border-radius: var(--r-card);
  font-size: 14px; color: var(--ink);
  overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.rep-copy { flex: 0 0 auto; min-height: 48px; }
.rep-copy.is-done { background: var(--olive); border-color: var(--olive); color: var(--white); }

/* --------------------------------------------------------------------------
   Progress
   -------------------------------------------------------------------------- */
.rep-progress { margin: 0 0 14px; }
.rep-progress-track {
  height: 10px; border-radius: var(--r-pill);
  background: var(--sand); overflow: hidden;
}
.rep-progress-fill {
  height: 100%; background: var(--olive);
  border-radius: var(--r-pill); transition: width .3s ease;
}
.rep-progress-text { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Training module list
   -------------------------------------------------------------------------- */
.rep-modules { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rep-module {
  border: 1px solid var(--hair); border-radius: var(--r-card);
  background: var(--white); padding: 18px 20px;
}
.rep-module.is-done { background: var(--linen); border-color: var(--sage); }
.rep-module-n {
  font-size: 11px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.rep-module h3 { margin: 4px 0 6px; font-size: 21px; }
.rep-module p { margin: 0 0 14px; font-size: 15px; }
.rep-module-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rep-tick {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 13px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--moss);
}

/* Module body: long-form reading. */
.rep-article { max-width: 68ch; }
.rep-article h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 22px; margin: 1.8em 0 .5em;
}
.rep-article ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.rep-article li { margin-bottom: .55em; }
.rep-article p { margin-bottom: 1.1em; }
.rep-claims-yes, .rep-claims-no {
  border-radius: var(--r-card); padding: 18px 22px; margin: 0 0 20px;
}
.rep-claims-yes { background: #F2F4EC; border: 1px solid var(--sage); }
.rep-claims-no  { background: #FBF0EE; border: 1px solid #E8CEC8; }

/* --------------------------------------------------------------------------
   Tables (customers, ledger). Scroll inside themselves; the page never does.
   -------------------------------------------------------------------------- */
.rep-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rep-table th, .rep-table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--hair); white-space: nowrap;
}
.rep-table th {
  font-size: 11px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.rep-table td.num, .rep-table th.num { text-align: right; }
.rep-table tbody tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Rates list (opportunity page). Rates, never earnings.
   -------------------------------------------------------------------------- */
.rep-rates { margin: 0; padding: 0; list-style: none; }
.rep-rates li {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--hair); font-size: 16px;
}
.rep-rates li:last-child { border-bottom: 0; }
.rep-rates-level {
  flex: 0 0 auto; min-width: 86px;
  font-size: 11px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); padding-top: 4px;
}

/* --------------------------------------------------------------------------
   Share kit
   -------------------------------------------------------------------------- */
.rep-assets { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .rep-assets { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .rep-assets { grid-template-columns: repeat(3, 1fr); } }
.rep-asset {
  border: 1px solid var(--hair); border-radius: var(--r-card);
  background: var(--white); overflow: hidden;
  display: flex; flex-direction: column;
}
.rep-asset img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.rep-asset-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.rep-asset h3 { margin: 0; font-size: 19px; }
.rep-asset-caption {
  margin: 0; padding: 12px 14px; background: var(--linen);
  border-radius: var(--r-card); font-size: 15px; color: var(--ink);
  max-width: none;
}
.rep-asset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */
.rep-note {
  border-left: 3px solid var(--purple); background: var(--purple-soft);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  padding: 16px 20px; margin: 0 0 22px; font-size: 15px;
}
.rep-note p { margin: 0; max-width: none; }
.rep-note p + p { margin-top: .8em; }
.rep-note-quiet { border-left-color: var(--bamboo); background: var(--linen); }
.rep-empty { color: var(--muted); font-style: italic; }

/* Pills reuse style.css's .pill; these add the two states it has no name for. */
.pill-pending { background: var(--sand); color: var(--bark); }
.pill-reversed { background: #F1E6E4; color: #7A4036; }

/* --------------------------------------------------------------------------
   Form bits the shared .form does not cover
   -------------------------------------------------------------------------- */
.rep-agreement {
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--hair); border-radius: var(--r-card);
  background: var(--linen); padding: 18px 20px; margin: 0 0 16px;
  font-size: 15px;
}
.rep-agreement ul { margin: 0; padding-left: 1.2em; }
.rep-agreement li { margin-bottom: .6em; }
.rep-agreement li:last-child { margin-bottom: 0; }
.rep-check {
  display: flex; gap: 12px; align-items: flex-start;
  min-height: 44px; padding: 10px 0; font-size: 16px;
}
.rep-check input[type="checkbox"] {
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px;
  accent-color: var(--purple);
}

/* Nothing on any of these pages may overflow a 390px phone. */
.rep-zone { overflow-x: hidden; }

/* ==========================================================================
   The personal landing page (rep-page.php) and "My page" (rep-page-edit.php).

   Mobile-first like the rest of this file: one column at 390px, nothing that
   can overflow, every target at least 44px. The two-column layouts only
   appear once there is genuinely room for them.
   ========================================================================== */

.rep-landing { overflow-x: hidden; }

/* --------------------------------------------------------------------------
   Hero: her photo and her words
   -------------------------------------------------------------------------- */
.rl-hero-inner {
  display: grid; gap: clamp(24px, 5vw, 48px);
  grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 820px) {
  .rl-hero-inner { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
}

.rl-portrait {
  width: min(240px, 62vw); margin: 0 auto; aspect-ratio: 1 / 1;
  border-radius: 50%; overflow: hidden;
  background: var(--linen); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 820px) { .rl-portrait { width: 100%; margin: 0; } }
.rl-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The fallback when she has uploaded nothing: the brand mark on bark, never a
   grey silhouette. A woman without a photo should not look like a missing one. */
.rl-portrait-mark {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bark);
}
.rl-portrait-mark img { width: 52%; height: auto; object-fit: contain; }

.rl-intro h1 { margin-top: 0; }
.rl-intro .lead { margin-bottom: .8em; }

/* Her own words. pre-line keeps the line breaks she typed; the text itself is
   escaped by the page, so nothing else of hers survives. */
.rl-message {
  white-space: pre-line;
  font-size: 17px; line-height: 1.7; color: var(--ink-2);
  margin: 0 0 24px; max-width: 62ch;
}
.rl-attrib { margin-top: 14px; }

/* --------------------------------------------------------------------------
   The kit card
   -------------------------------------------------------------------------- */
.rl-kit {
  display: grid; gap: clamp(24px, 5vw, 48px);
  grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 860px) { .rl-kit { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.rl-kit h2 { margin-top: 0; }

/* --------------------------------------------------------------------------
   "Write to her" and "do what she does"
   -------------------------------------------------------------------------- */
.rl-ask { text-align: center; }
.rl-ask h2 { margin-top: 0; }
.rl-ask .lead, .rl-ask p { margin-left: auto; margin-right: auto; }
.rl-ask .btn-row { justify-content: center; }

/* --------------------------------------------------------------------------
   "My page": her link, her QR, her photo
   -------------------------------------------------------------------------- */
.rl-share {
  display: grid; gap: clamp(20px, 4vw, 36px);
  grid-template-columns: 1fr; align-items: start;
}
@media (min-width: 760px) { .rl-share { grid-template-columns: minmax(0, 1fr) auto; } }
.rl-share h2 { margin-top: 0; font-size: clamp(20px, 3vw, 24px); }

.rl-qr { text-align: center; }
.rl-qr-img {
  display: inline-block; padding: 10px; background: var(--white);
  border: 1px solid var(--hair); border-radius: var(--r-card);
  line-height: 0;
}
/* The SVG is square and sized in the markup; this keeps it inside a 390px
   phone whatever that size says. */
.rl-qr-img svg { width: min(190px, 58vw); height: auto; display: block; }
.rl-qr p { max-width: 28ch; margin-left: auto; margin-right: auto; }

.rl-photo-now img {
  width: 120px; height: 120px; object-fit: cover;
  border-radius: var(--r-card); border: 1px solid var(--hair); display: block;
}

/* A file input is the one control that ignores the shared form styling, and
   on a phone it is also the one that overflows. */
.rep-zone input[type="file"] {
  display: block; width: 100%; max-width: 100%;
  font-size: 15px; padding: 12px 0; min-height: 44px;
}
