/* =========================================================================
   Beyond Madeira — Affiliate App Design System
   Shared by: afiliados.html · afiliados-painel.html · parceiros.html
   Loaded AFTER /css/style.css and each page's inline <style> so it wins.
   Mobile-first (375px primary canvas), great at 768/1280.
   ========================================================================= */

:root {
  /* Brand (fall back to style.css vars where present) */
  --aff-primary: var(--primary, #0e5259);
  --aff-primary-dark: var(--primary-dark, #0a3d42);

  /* Mint / surface accents */
  --aff-mint: #e1f5ee;
  --aff-mint-soft: #ecfdf5;
  --aff-mint-line: #cdeae0;

  /* Neutrals */
  --aff-bg: #f4f5f7;
  --aff-surface: #ffffff;
  --aff-ink: #0f1f23;
  --aff-ink-2: #3b4a50;
  --aff-muted: #6b7a82;
  --aff-faint: #9aa7ae;
  --aff-line: #e9edef;
  --aff-field-bg: #f6f8f9;

  /* Radii */
  --aff-r-sm: 14px;
  --aff-r-md: 18px;
  --aff-r-lg: 24px;
  --aff-r-xl: 28px;
  --aff-r-pill: 999px;

  /* Shadows — soft, layered, never heavy */
  --aff-shadow-sm: 0 1px 2px rgba(15,31,35,.04), 0 4px 12px rgba(15,31,35,.05);
  --aff-shadow-md: 0 2px 4px rgba(15,31,35,.04), 0 10px 30px rgba(15,31,35,.07);
  --aff-shadow-lg: 0 4px 10px rgba(15,31,35,.05), 0 20px 50px rgba(15,31,35,.10);
  --aff-shadow-cta: 0 8px 22px rgba(14,82,89,.28);

  /* Rhythm */
  --aff-gap: 14px;
  --aff-col: 640px;       /* readable centred column */
  --aff-col-wide: 1040px; /* two-up landing */
  --aff-tab-safe: calc(88px + env(safe-area-inset-bottom, 0px)); /* clear the app tab bar */
}

/* ---- Page shell ---------------------------------------------------------- */
body { background: var(--aff-bg); -webkit-font-smoothing: antialiased; }

.aff-app {
  max-width: var(--aff-col);
  margin: 0 auto;
  padding: 104px 18px var(--aff-tab-safe);
}
.aff-app--wide { max-width: var(--aff-col-wide); }

/* ===========================================================================
   HERO (sign-up + dashboard heads)
   =========================================================================== */
.aff-app .aff-hero { text-align: center; margin: 4px auto 26px; }

.aff-app .aff-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--aff-primary);
  background: var(--aff-mint);
  border-radius: var(--aff-r-pill);
  padding: 7px 14px; margin-bottom: 16px;
}

.aff-app .aff-hero h1 {
  font-size: clamp(1.7rem, 7vw, 2.15rem);
  line-height: 1.12; font-weight: 700; letter-spacing: -.6px;
  color: var(--aff-ink); margin: 0 auto 12px; max-width: 16ch;
}
.aff-app .aff-hero p {
  font-size: 1rem; line-height: 1.6; color: var(--aff-ink-2);
  max-width: 40ch; margin: 0 auto;
}

/* ===========================================================================
   BENEFIT ROW (sign-up)
   =========================================================================== */
.aff-benefits {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 22px;
}
.aff-benefit {
  display: flex; align-items: center; gap: 14px;
  background: var(--aff-surface);
  border: 1px solid var(--aff-line);
  border-radius: var(--aff-r-md);
  padding: 16px 18px;
  box-shadow: var(--aff-shadow-sm);
}
.aff-benefit-icon {
  flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--aff-mint);
  display: inline-flex; align-items: center; justify-content: center;
}
.aff-benefit-icon svg { width: 22px; height: 22px; color: var(--aff-primary); }
.aff-benefit h3 { font-size: .9rem; font-weight: 700; color: var(--aff-ink); margin: 0 0 2px; }
.aff-benefit p  { font-size: .82rem; line-height: 1.45; color: var(--aff-muted); margin: 0; }

/* ===========================================================================
   CARD (generic app surface)
   =========================================================================== */
.aff-card {
  width: 100%;
  background: var(--aff-surface);
  border: 1px solid var(--aff-line);
  border-radius: var(--aff-r-xl);
  box-shadow: var(--aff-shadow-md);
  padding: 26px 22px;
}
.aff-card + .aff-card,
.aff-stats + .aff-card,
.aff-card + .aff-stats { margin-top: 16px; }

.aff-card-heading { font-size: 1.22rem; font-weight: 700; color: var(--aff-ink); letter-spacing: -.3px; margin: 0 0 4px; }
.aff-card-sub     { font-size: .9rem; line-height: 1.5; color: var(--aff-muted); margin: 0 0 22px; }
.aff-card-title   { font-size: 1.02rem; font-weight: 700; color: var(--aff-ink); letter-spacing: -.2px; margin: 0 0 16px; }

/* ===========================================================================
   FORM — large, friendly, iOS-safe (16px font, 52px min height)
   =========================================================================== */
.form-group { margin-bottom: 16px; }
.form-group > label {
  display: block; font-size: .82rem; font-weight: 600; color: var(--aff-ink-2);
  margin-bottom: 7px;
}
.form-group label .req { color: #e0564b; margin-left: 2px; }
.form-group .help { display: block; font-size: .74rem; color: var(--aff-faint); margin-top: 7px; line-height: 1.4; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 52px;
  border: 1.5px solid var(--aff-line);
  border-radius: var(--aff-r-sm);
  padding: 14px 16px;
  font-size: 16px;                 /* prevents iOS zoom */
  font-family: 'Montserrat', sans-serif;
  color: var(--aff-ink);
  background: var(--aff-field-bg);
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
  -webkit-appearance: none; appearance: none;
}
.form-group textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #d6dde0; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--aff-primary);
  background: var(--aff-surface);
  box-shadow: 0 0 0 4px rgba(14,82,89,.10);
}
.form-group input.field-invalid,
.form-group select.field-invalid,
.form-group textarea.field-invalid {
  border-color: #e0564b; background: #fff7f6;
  box-shadow: 0 0 0 4px rgba(224,86,75,.10);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--aff-faint); }

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a82' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 42px;
}

.field-msg { display: none; font-size: .76rem; color: #c23b30; margin-top: 7px; }
.field-msg.show { display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Honeypot — visually hidden but present for bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Segmented "I am a…" selector (real cards, syncs hidden value) ------- */
.aff-typepick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.aff-type {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; text-align: center;
  min-height: 96px; padding: 14px 8px;
  background: var(--aff-field-bg);
  border: 1.5px solid var(--aff-line);
  border-radius: var(--aff-r-md);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .12s ease, box-shadow .16s ease;
}
.aff-type:hover { border-color: #cfd7da; }
.aff-type:active { transform: scale(.97); }
.aff-type-ic {
  width: 38px; height: 38px; border-radius: 11px;
  background: #fff; border: 1px solid var(--aff-line);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .16s ease, border-color .16s ease;
}
.aff-type-ic svg { width: 20px; height: 20px; color: var(--aff-muted); transition: color .16s ease; }
.aff-type-label { font-size: .78rem; font-weight: 600; color: var(--aff-ink-2); line-height: 1.2; }
.aff-type-check {
  position: absolute; top: 9px; right: 9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--aff-primary);
  display: none; align-items: center; justify-content: center;
}
.aff-type-check svg { width: 11px; height: 11px; color: #fff; }

.aff-type.is-selected {
  border-color: var(--aff-primary);
  background: var(--aff-mint);
  box-shadow: 0 0 0 4px rgba(14,82,89,.08);
}
.aff-type.is-selected .aff-type-ic { background: var(--aff-primary); border-color: var(--aff-primary); }
.aff-type.is-selected .aff-type-ic svg { color: #fff; }
.aff-type.is-selected .aff-type-label { color: var(--aff-primary); }
.aff-type.is-selected .aff-type-check { display: inline-flex; }
.aff-type:focus-visible { outline: 2px solid var(--aff-primary); outline-offset: 3px; }

/* visually-hide the real <select> but keep it accessible to scripts */
.aff-select-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  min-width: 0 !important; max-width: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0 !important;
}

/* ---- Optional-details expander ------------------------------------------ */
.aff-optional { border-top: 1px solid var(--aff-line); margin-top: 4px; padding-top: 4px; }
.aff-optional > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 2px; font-size: .86rem; font-weight: 600; color: var(--aff-primary);
}
.aff-optional > summary::-webkit-details-marker { display: none; }
.aff-optional > summary .chev {
  width: 18px; height: 18px; color: var(--aff-primary);
  margin-left: auto; transition: transform .2s ease;
}
.aff-optional[open] > summary .chev { transform: rotate(180deg); }
.aff-optional > summary .lead {
  width: 26px; height: 26px; border-radius: 8px; background: var(--aff-mint);
  display: inline-flex; align-items: center; justify-content: center;
}
.aff-optional > summary .lead svg { width: 15px; height: 15px; color: var(--aff-primary); }
.aff-optional-body { padding-top: 6px; }

/* ===========================================================================
   BUTTONS — pill primary, ghost secondary
   =========================================================================== */
.aff-submit, .aff-btn {
  width: 100%;
  min-height: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--aff-primary);
  color: #fff; border: none;
  border-radius: var(--aff-r-pill);
  padding: 15px 24px;
  font-size: .98rem; font-weight: 700; font-family: 'Montserrat', sans-serif;
  letter-spacing: .1px; cursor: pointer; text-decoration: none;
  box-shadow: var(--aff-shadow-cta);
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.aff-submit { margin-top: 8px; }
.aff-submit:hover, .aff-btn:hover { background: var(--aff-primary-dark); }
.aff-submit:active, .aff-btn:active { transform: scale(.985); box-shadow: 0 4px 12px rgba(14,82,89,.24); }
.aff-submit:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.aff-btn { width: auto; }
.aff-btn-ghost {
  background: var(--aff-surface); color: var(--aff-primary);
  border: 1.5px solid var(--aff-primary); box-shadow: none;
}
.aff-btn-ghost:hover { background: var(--aff-mint); color: var(--aff-primary-dark); }

.form-error {
  display: none;
  background: #fff5f4; color: #b6342a; border: 1px solid #f6cfca;
  border-radius: var(--aff-r-sm); padding: 13px 16px; font-size: .85rem; margin-bottom: 18px;
}

.aff-note-legal {
  text-align: center; font-size: .78rem; color: var(--aff-faint);
  line-height: 1.5; margin: 22px auto 0; max-width: 38ch;
}

/* ===========================================================================
   SUCCESS state (sign-up magic moment)
   =========================================================================== */
.success-card { text-align: center; padding: 8px 4px 6px; }
.success-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--aff-mint-soft);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 0 8px rgba(5,150,105,.06);
  animation: aff-pop .45s cubic-bezier(.32,.72,0,1) both;
}
.success-icon svg { width: 34px; height: 34px; color: #059669; }
@keyframes aff-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.success-title { font-size: 1.3rem; font-weight: 700; color: var(--aff-ink); letter-spacing: -.3px; margin-bottom: 10px; }
.success-text  { font-size: .94rem; line-height: 1.6; color: var(--aff-muted); margin: 0 auto 24px; max-width: 38ch; }

.ref-label { display: block; text-align: left; font-size: .76rem; font-weight: 600; color: var(--aff-ink-2); margin-bottom: 8px; }

/* tappable copy chip — link sits inside a pill, button on the right */
.ref-row {
  display: flex; align-items: stretch; gap: 0;
  background: var(--aff-field-bg);
  border: 1.5px solid var(--aff-line);
  border-radius: var(--aff-r-sm);
  overflow: hidden;
  margin-bottom: 24px;
}
.ref-row input {
  flex: 1; min-width: 0; border: none; background: transparent;
  padding: 15px 16px; font-size: .9rem; font-family: 'Montserrat', sans-serif;
  color: var(--aff-ink); outline: none; text-overflow: ellipsis;
}
.copy-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--aff-primary); color: #fff;
  border: none; border-radius: 0;
  padding: 0 18px; min-width: 96px; justify-content: center;
  font-size: .84rem; font-weight: 700; font-family: 'Montserrat', sans-serif;
  cursor: pointer; transition: background .18s ease;
}
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn:hover { background: var(--aff-primary-dark); }
.copy-btn.copied { background: #059669; }

.dash-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px;
  background: var(--aff-primary); color: #fff;
  border-radius: var(--aff-r-pill); padding: 15px 28px;
  font-size: .98rem; font-weight: 700; text-decoration: none;
  box-shadow: var(--aff-shadow-cta);
  transition: background .18s ease, transform .12s ease;
}
.dash-btn svg { width: 18px; height: 18px; }
.dash-btn:hover { background: var(--aff-primary-dark); }
.dash-btn:active { transform: scale(.985); }

/* ===========================================================================
   DASHBOARD
   =========================================================================== */
/* State / loading / empty cards */
.aff-state {
  background: var(--aff-surface);
  border: 1px solid var(--aff-line);
  border-radius: var(--aff-r-xl);
  box-shadow: var(--aff-shadow-md);
  padding: 48px 28px; text-align: center;
}
.aff-spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--aff-line); border-top-color: var(--aff-primary);
  border-radius: 50%; margin: 0 auto 18px;
  animation: aff-spin .8s linear infinite;
}
@keyframes aff-spin { to { transform: rotate(360deg); } }
.aff-state-icon {
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--aff-mint);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.aff-state-icon svg { width: 30px; height: 30px; color: var(--aff-primary); }
.aff-state-title { font-size: 1.24rem; font-weight: 700; color: var(--aff-ink); letter-spacing: -.3px; margin-bottom: 10px; }
.aff-state-text  { font-size: .94rem; line-height: 1.6; color: var(--aff-muted); margin: 0 auto 24px; max-width: 40ch; }

.aff-token-retry {
  margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.aff-token-retry input {
  min-height: 52px;
  border: 1.5px solid var(--aff-line); border-radius: var(--aff-r-pill);
  padding: 12px 20px; font-size: 16px; font-family: 'Montserrat', sans-serif;
  color: var(--aff-ink); background: var(--aff-field-bg); outline: none;
  min-width: 220px; transition: border-color .18s ease, box-shadow .18s ease;
}
.aff-token-retry input:focus { border-color: var(--aff-primary); box-shadow: 0 0 0 4px rgba(14,82,89,.10); }

/* Welcome strip */
.aff-welcome {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin: 4px 2px 16px;
}
.aff-welcome h1 { font-size: 1.5rem; font-weight: 700; color: var(--aff-ink); letter-spacing: -.5px; line-height: 1.15; }
.aff-welcome h1 span { color: var(--aff-primary); }

.aff-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--aff-r-pill);
  font-size: .76rem; font-weight: 700; letter-spacing: .1px;
}
.aff-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.aff-pill.is-active  { background: var(--aff-mint-soft); color: #059669; }
.aff-pill.is-pending { background: #fff8ec; color: #b9770b; }
.aff-pill.is-grey    { background: #eef1f3; color: var(--aff-muted); }

.aff-note {
  background: #fff8ec; border: 1px solid #f6e2b8;
  border-radius: var(--aff-r-sm); padding: 14px 16px;
  font-size: .85rem; color: #8a5d10; line-height: 1.55; margin-bottom: 18px;
}

/* Hero link card — the Apple-Wallet block */
.aff-card--link {
  background: linear-gradient(150deg, var(--aff-primary) 0%, var(--aff-primary-dark) 100%);
  border: none; color: #fff;
  box-shadow: 0 14px 36px rgba(14,82,89,.30);
}
.aff-card--link .aff-card-title { color: #fff; }
.aff-card--link .aff-field-label { color: rgba(255,255,255,.78); }
.aff-card--link .aff-share-text { color: rgba(255,255,255,.92); }
.aff-card--link .aff-share-text strong { color: #fff; }
.aff-card--link .aff-copy-input {
  background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.22); color: #fff;
}
.aff-card--link .aff-copy-input::selection { background: rgba(255,255,255,.3); }
.aff-card--link .aff-copy-btn { background: #fff; color: var(--aff-primary); }
.aff-card--link .aff-copy-btn:hover { background: var(--aff-mint); }
.aff-card--link .aff-copy-btn.is-copied { background: var(--aff-mint-soft); color: #059669; }

.aff-field-label { font-size: .76rem; font-weight: 600; color: var(--aff-muted); margin-bottom: 8px; letter-spacing: .2px; }
.aff-copy-row { display: flex; gap: 9px; align-items: stretch; margin-bottom: 16px; }
.aff-copy-row:last-child { margin-bottom: 0; }
.aff-copy-input {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--aff-line); border-radius: var(--aff-r-sm);
  padding: 13px 15px; font-size: .9rem; font-family: 'Montserrat', sans-serif;
  color: var(--aff-ink); background: var(--aff-field-bg); outline: none;
  text-overflow: ellipsis;
}
.aff-copy-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  background: var(--aff-primary); color: #fff; border: none;
  border-radius: var(--aff-r-sm); padding: 0 18px; min-width: 56px;
  font-size: .82rem; font-weight: 700; font-family: 'Montserrat', sans-serif;
  cursor: pointer; transition: background .18s ease, transform .12s ease;
}
.aff-copy-btn:hover { background: var(--aff-primary-dark); }
.aff-copy-btn:active { transform: scale(.96); }
.aff-copy-btn svg { width: 16px; height: 16px; }
.aff-copy-btn.is-copied { background: #059669; }

.aff-share-text { font-size: .88rem; color: var(--aff-ink-2); line-height: 1.6; margin: 14px 0 18px; }
.aff-share-text strong { color: var(--aff-ink); font-weight: 700; }

/* Stat grid — big numbers, small labels */
.aff-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.aff-stat {
  background: var(--aff-surface); border: 1px solid var(--aff-line);
  border-radius: var(--aff-r-lg); box-shadow: var(--aff-shadow-sm);
  padding: 18px 18px 20px;
}
.aff-stat-icon {
  width: 38px; height: 38px; border-radius: 11px; background: var(--aff-mint);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.aff-stat-icon svg { width: 19px; height: 19px; color: var(--aff-primary); }
.aff-stat-value { font-size: 1.7rem; font-weight: 700; color: var(--aff-ink); letter-spacing: -.6px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.aff-stat-label { font-size: .76rem; color: var(--aff-muted); margin-top: 5px; line-height: 1.3; }

/* Tier card */
.aff-tier-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.aff-tier-badge { display: inline-flex; align-items: center; gap: 10px; font-size: .98rem; font-weight: 700; color: var(--aff-ink); }
.aff-tier-medal { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 4px rgba(0,0,0,.18); }
.aff-tier-medal svg { width: 18px; height: 18px; color: #fff; }
.aff-tier-medal.bronze { background: linear-gradient(140deg, #c79a63, #a87b45); }
.aff-tier-medal.prata  { background: linear-gradient(140deg, #c2c8cd, #9aa2a8); }
.aff-tier-medal.ouro   { background: linear-gradient(140deg, #e7c659, #cba81f); }
.aff-tier-rate {
  font-size: .82rem; font-weight: 700; color: var(--aff-primary);
  background: var(--aff-mint); border-radius: var(--aff-r-pill); padding: 6px 13px;
}
.aff-progress { height: 10px; background: #eef1f3; border-radius: var(--aff-r-pill); overflow: hidden; margin: 16px 0 12px; }
.aff-progress-bar { height: 100%; background: linear-gradient(90deg, var(--aff-primary), var(--primary-light, #1a7a6e)); border-radius: var(--aff-r-pill); transition: width .7s cubic-bezier(.32,.72,0,1); }
.aff-tier-hint { font-size: .84rem; color: var(--aff-muted); line-height: 1.5; }

/* Recent bookings — list rows (not a heavy table) */
.aff-rows { display: flex; flex-direction: column; }
.aff-rows-head {
  display: grid; grid-template-columns: 1fr auto;
  font-size: .72rem; font-weight: 600; color: var(--aff-faint);
  text-transform: uppercase; letter-spacing: .5px; padding: 0 2px 10px;
}
.aff-booking-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 2px; border-top: 1px solid var(--aff-line);
}
.aff-booking-main { min-width: 0; flex: 1; }
.aff-booking-type { font-size: .92rem; font-weight: 600; color: var(--aff-ink); text-transform: capitalize; line-height: 1.2; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aff-booking-meta { font-size: .78rem; color: var(--aff-muted); }
.aff-booking-meta .dotsep { opacity: .5; margin: 0 5px; }
.aff-booking-right { text-align: right; flex: 0 0 auto; }
.aff-booking-comm { font-size: 1rem; font-weight: 700; color: var(--aff-ink); font-variant-numeric: tabular-nums; line-height: 1.2; margin-bottom: 5px; }

.aff-row-pill { display: inline-block; padding: 3px 10px; border-radius: var(--aff-r-pill); font-size: .68rem; font-weight: 700; text-transform: capitalize; letter-spacing: .2px; }
.aff-row-pill.pending  { background: #fff8ec; color: #b9770b; }
.aff-row-pill.approved { background: #eef4ff; color: #2657c9; }
.aff-row-pill.paid     { background: var(--aff-mint-soft); color: #059669; }
.aff-row-pill.reversed { background: #eef1f3; color: var(--aff-muted); }

.aff-empty { text-align: center; padding: 18px 6px 8px; }
.aff-empty-text { font-size: .92rem; color: var(--aff-muted); line-height: 1.6; margin-bottom: 16px; }

.aff-footnote { font-size: .8rem; color: var(--aff-faint); line-height: 1.6; text-align: center; padding: 18px 8px 0; }

/* ===========================================================================
   PARCEIROS — two-door landing
   =========================================================================== */
.parceiros-main { overflow-x: clip; background: var(--aff-bg); }

.pc-hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: 58vh; padding: 132px 20px 56px;
  background-image:
    linear-gradient(180deg, rgba(8,30,33,.18) 0%, rgba(8,30,33,.62) 100%),
    url("https://images.beyondmadeira.com/site/pico-do-arieiro-see-and-go-beyond-madeira-capa-1600.webp");
  background-size: cover; background-position: center 35%;
}
.pc-hero-inner { width: 100%; max-width: var(--aff-col-wide); margin: 0 auto; color: #fff; }
.pc-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.92); margin-bottom: 16px;
}
.pc-eyebrow::before { content: ""; width: 24px; height: 1.5px; background: rgba(255,255,255,.7); }
.pc-hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; max-width: 14ch; margin-bottom: 14px; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.pc-hero p  { font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.55; max-width: 46ch; color: rgba(255,255,255,.94); }

.pc-section { max-width: var(--aff-col-wide); margin: 0 auto; padding: 0 18px; }
.pc-choice-wrap { margin-top: -44px; position: relative; z-index: 2; }

.pc-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* whole card is the tap target */
.pc-card {
  position: relative;
  background: var(--aff-surface);
  border: 1px solid var(--aff-line);
  border-radius: var(--aff-r-xl);
  box-shadow: var(--aff-shadow-lg);
  padding: 30px 26px;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(15,31,35,.06), 0 28px 60px rgba(15,31,35,.14); border-color: var(--aff-mint-line); }
.pc-card:active { transform: translateY(-1px) scale(.997); }
.pc-card:focus-visible { outline: 2px solid var(--aff-primary); outline-offset: 4px; }

.pc-card-icon {
  width: 54px; height: 54px; border-radius: 15px; background: var(--aff-mint);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.pc-card-icon svg { width: 26px; height: 26px; color: var(--aff-primary); }
.pc-card-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--aff-primary); margin-bottom: 8px; }
.pc-card h2 { font-size: 1.42rem; font-weight: 700; line-height: 1.18; letter-spacing: -.01em; color: var(--aff-ink); margin-bottom: 12px; }
.pc-card-desc { font-size: .96rem; line-height: 1.6; color: var(--aff-ink-2); margin-bottom: 20px; }

.pc-benefits { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pc-benefits li { display: flex; align-items: flex-start; gap: 11px; font-size: .92rem; line-height: 1.45; color: var(--aff-ink-2); }
.pc-benefits .tick {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--aff-mint); display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.pc-benefits .tick svg { width: 13px; height: 13px; color: var(--aff-primary); }

.pc-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: auto; align-self: stretch;
  background: var(--aff-primary); color: #fff; text-decoration: none;
  font-size: .96rem; font-weight: 700; min-height: 52px; padding: 14px 28px;
  border-radius: var(--aff-r-pill);
  box-shadow: var(--aff-shadow-cta);
  transition: background .18s ease, transform .12s ease;
}
.pc-cta svg { width: 17px; height: 17px; transition: transform .18s ease; }
.pc-card:hover .pc-cta svg { transform: translateX(3px); }
.pc-cta:active { transform: scale(.985); }
.pc-cta.is-ghost {
  background: var(--aff-surface); color: var(--aff-primary);
  border: 1.5px solid var(--aff-primary); box-shadow: none;
}
.pc-cta.is-ghost:hover { background: var(--aff-mint); }

/* Trust strip */
.pc-trust { margin-top: 56px; }
.pc-trust-head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.pc-mini-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--aff-primary); }
.pc-trust-head p { margin-top: 12px; font-size: 1.04rem; line-height: 1.6; color: var(--aff-ink-2); }
.pc-trust-head strong { color: var(--aff-ink); font-weight: 700; }
.pc-trust-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.pc-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--aff-surface); border: 1px solid var(--aff-line);
  border-radius: var(--aff-r-pill); padding: 9px 15px;
  font-size: .84rem; font-weight: 500; color: var(--aff-ink-2);
  box-shadow: var(--aff-shadow-sm);
}
.pc-tag svg { width: 15px; height: 15px; color: var(--aff-primary); }

/* Helper */
.pc-helper {
  margin: 56px auto 0; max-width: 760px;
  background: var(--aff-surface); border: 1px solid var(--aff-line);
  border-radius: var(--aff-r-xl); padding: 32px 28px; box-shadow: var(--aff-shadow-md);
}
.pc-helper h3 { font-size: 1.18rem; font-weight: 700; color: var(--aff-ink); margin-bottom: 14px; letter-spacing: -.2px; }
.pc-helper p { font-size: .95rem; line-height: 1.65; color: var(--aff-ink-2); }
.pc-helper p + p { margin-top: 12px; }
.pc-helper a { color: var(--aff-primary); font-weight: 600; text-decoration: none; }
.pc-helper a:hover { text-decoration: underline; }

.pc-foot-space { height: var(--aff-tab-safe); }

/* ===========================================================================
   RESPONSIVE — tablet & desktop
   =========================================================================== */
@media (min-width: 600px) {
  .aff-app { padding-top: 116px; }
  .aff-benefits { grid-template-columns: repeat(3, 1fr); }
  .aff-benefit { flex-direction: column; align-items: flex-start; text-align: left; gap: 12px; padding: 20px; }
  .aff-card { padding: 32px 30px; }
}

@media (min-width: 700px) {
  .aff-stats { grid-template-columns: repeat(4, 1fr); }
  .pc-cards { grid-template-columns: 1fr 1fr; gap: 24px; }
  .pc-card { padding: 38px 34px; }
  .pc-cta { align-self: flex-start; }
}

@media (max-width: 420px) {
  .aff-stats { grid-template-columns: 1fr 1fr; }
  .aff-typepick { gap: 8px; }
  .aff-type { min-height: 90px; padding: 12px 6px; }
}

/* ===========================================================================
   MOTION — respect reduced motion
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .aff-spinner { animation: aff-spin .8s linear infinite; }
}
