/* PERSEA shared theme — mirrors the brand presentation deck:
   near-black ground, terracotta/gold accents, Playfair Display headline
   type over Poppins body type, film grain + ambient glow. */

:root{
  --bg:#0c0a09;
  --bg2:#141210;
  --cream:#f2ece0;
  --terracotta:#b8863a;
  --terracotta-soft:rgba(184,134,58,.45);
  --gold:#dcc7a8;
  --muted:#a89a8c;
  --card:#161210;
  --line:rgba(242,236,224,.12);
  --error:#a85a52;
}

*{box-sizing:border-box;}
html,body{background:var(--bg);}
body{
  font-family:'Poppins',sans-serif;
  color:var(--cream);
  position:relative;
  -webkit-font-smoothing:antialiased;
}
.font-serif{ font-family:'Playfair Display', serif; font-style:italic; font-weight:500; }

/* ambient glow wash */
.ambient{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(circle at 20% 20%, rgba(184,134,58,.16), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(184,134,58,.12), transparent 50%);
  animation:ambientDrift 20s ease-in-out infinite alternate;
}
@keyframes ambientDrift{
  0%{ opacity:.7; transform:translate(0,0) scale(1); }
  100%{ opacity:1; transform:translate(-2%,2%) scale(1.05); }
}

/* film grain */
.grain{
  position:fixed; inset:-50%; width:200%; height:200%;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  opacity:.4; pointer-events:none; z-index:60; mix-blend-mode:overlay;
  animation:grainShift 8s steps(8) infinite;
}
@keyframes grainShift{
  0%{transform:translate(0,0)} 25%{transform:translate(-2%,1%)}
  50%{transform:translate(1%,-2%)} 75%{transform:translate(-1%,-1%)}
  100%{transform:translate(0,0)}
}

/* floating particles — slow, elegant, barely-there gold motes */
.particles{
  position:fixed; inset:0; z-index:1; pointer-events:none; overflow:hidden;
}
.particle{
  position:absolute; bottom:-10px; border-radius:50%;
  background:radial-gradient(circle, rgba(220,199,168,.9), rgba(220,199,168,0) 70%);
  animation-name:particleFloat; animation-timing-function:linear; animation-iteration-count:infinite;
}
@keyframes particleFloat{
  0%{ transform:translate(0,0) scale(1); opacity:0; }
  12%{ opacity:.45; }
  50%{ transform:translate(var(--drift,14px), -52vh) scale(1.08); opacity:.3; }
  88%{ opacity:.12; }
  100%{ transform:translate(calc(var(--drift,14px) * 2), -108vh) scale(.95); opacity:0; }
}

/* reveal-on-load stagger, matching the brand deck's slide entrances */
.reveal{
  opacity:0; transform:translateY(14px);
  animation:revealUp .8s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes revealUp{ to{ opacity:1; transform:translateY(0); } }

/* scroll-triggered reveal (Euveka-style "scroll to explore") */
.reveal-scroll{
  opacity:0; transform:translateY(26px);
  transition:opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1);
}
.reveal-scroll.is-visible{ opacity:1; transform:translateY(0); }

/* magnetic tilt — subtle cursor-tracked 3D card response */
.tilt-card{
  transform-style:preserve-3d; will-change:transform;
  transition:transform .25s cubic-bezier(.22,1,.36,1);
}

/* cover photo — full-bleed editorial portrait treatment, as seen on the
   brand's own PDF guide covers: desaturated, darkened, vignetted so text
   stays legible without a hard overlay box. */
.cover-photo{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-size:cover; background-position:center center;
  filter:grayscale(1) brightness(.4) contrast(1.08);
  animation:coverDrift 30s ease-in-out infinite alternate;
}
@keyframes coverDrift{
  0%{ transform:scale(1.02) translate(0,0); }
  100%{ transform:scale(1.07) translate(-1%,-1%); }
}
.cover-scrim{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(12,10,9,.55) 78%, rgba(12,10,9,.92) 100%),
    linear-gradient(180deg, rgba(12,10,9,.35) 0%, rgba(12,10,9,.55) 55%, rgba(12,10,9,.88) 100%);
}

/* app chrome */
.app-shell{ position:relative; z-index:1; min-height:100vh; }
.app-header{
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:40;
  background:rgba(12,10,9,.86); backdrop-filter:blur(10px);
}
.brand-mark{
  font-family:'Playfair Display',serif; font-style:italic; font-weight:600;
  font-size:19px; letter-spacing:.04em; color:var(--cream);
}
.nav-link{
  padding:8px 12px; border-radius:3px; font-size:13px; font-weight:500;
  letter-spacing:.02em; color:var(--muted); transition:color .25s, background .25s;
  text-decoration:none;
}
.nav-link:hover{ color:var(--cream); background:rgba(242,236,224,.04); }
.nav-link.active{ color:var(--cream); background:rgba(184,134,58,.16); }

.eyebrow{
  font-size:10.5px; letter-spacing:.28em; text-transform:uppercase; color:var(--terracotta);
  font-weight:600;
}

.pg-title{
  font-family:'Playfair Display', serif; font-weight:500; font-style:italic;
  font-size:clamp(1.9rem, 3.2vw, 2.6rem); color:var(--cream); line-height:1.1;
}

/* card */
.card{
  background:var(--card); border:1px solid var(--line); border-radius:4px; padding:22px 24px;
  position:relative; overflow:hidden; box-sizing:border-box; height:100%;
  transition:transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease, border-color .35s ease;
}
.card::before{
  content:''; position:absolute; top:0; left:0; width:2px; height:100%; background:var(--terracotta);
  opacity:.7; transition:width .35s ease;
}
a.card:hover, button.card:hover, .card-interactive:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 40px -12px rgba(0,0,0,.55), 0 0 0 1px rgba(220,199,168,.08);
  border-color:rgba(220,199,168,.25);
}
a.card:hover::before, button.card:hover::before, .card-interactive:hover::before{ width:3px; }

/* buttons */
.btn-primary{
  background:var(--cream); color:var(--bg); font-weight:600; font-size:13px;
  padding:11px 22px; border-radius:3px; letter-spacing:.01em; transition:opacity .2s, transform .2s;
  border:none; cursor:pointer;
}
.btn-primary:hover{ opacity:.88; }
.btn-primary:disabled{ opacity:.4; cursor:default; }

.btn-ghost{
  background:transparent; color:var(--cream); font-weight:500; font-size:12.5px;
  padding:9px 16px; border-radius:3px; border:1px solid var(--line);
  transition:border-color .2s, background .2s; cursor:pointer;
}
.btn-ghost:hover{ border-color:var(--terracotta); background:rgba(184,134,58,.1); }
.btn-ghost:disabled{ opacity:.4; cursor:default; }

.btn-text{
  background:none; border:none; color:var(--muted); font-size:12px; cursor:pointer;
  transition:color .2s;
}
.btn-text:hover{ color:var(--cream); }

/* badges */
.badge{
  display:inline-flex; align-items:center; padding:4px 11px; border-radius:99px;
  font-size:11px; font-weight:600; letter-spacing:.02em; border:1px solid transparent;
}
.badge-completed{ background:rgba(220,199,168,.12); color:var(--gold); border-color:rgba(220,199,168,.3); }
.badge-progress{ background:rgba(184,134,58,.18); color:#e8cf8f; border-color:rgba(184,134,58,.4); }
.badge-locked{ background:rgba(242,236,224,.04); color:var(--muted); border-color:var(--line); }

/* Initials avatar — stands in for a client photo (none is ever uploaded in
   this prototype). Deterministic per name so the same client always gets
   the same tone, not a random one on every render. */
.avatar-initials{
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  border-radius:50%; background:linear-gradient(135deg, rgba(184,134,58,.5), rgba(220,199,168,.25));
  color:var(--cream); font-family:'Playfair Display', serif; font-weight:600; letter-spacing:.02em;
  border:1px solid rgba(220,199,168,.3);
}

/* progress */
.progress-track{ width:100%; height:2px; border-radius:2px; background:var(--line); overflow:hidden; }
.progress-fill{ height:100%; background:linear-gradient(90deg,var(--terracotta),var(--gold)); transition:width .7s cubic-bezier(.22,1,.36,1); }

/* inputs */
.field{
  width:100%; background:transparent; border:1px solid var(--line); border-radius:3px;
  padding:12px 14px; color:var(--cream); font-family:'Poppins',sans-serif; font-size:14px;
  transition:border-color .2s;
}
.field:focus{ outline:none; border-color:var(--terracotta); }
.field::placeholder{ color:var(--muted); }

/* toast */
.toast{
  position:fixed; bottom:26px; right:26px; z-index:100; padding:13px 20px; border-radius:3px;
  font-size:13px; font-weight:500; border:1px solid var(--line); background:var(--card);
  color:var(--cream); box-shadow:0 12px 40px rgba(0,0,0,.5);
  transition:opacity .3s ease, transform .3s ease;
}
.toast::before{ content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--terracotta); margin-right:10px; }

/* mood check-in prompt */
.mood-prompt{
  position:fixed; bottom:26px; left:26px; z-index:100; max-width:270px;
  background:var(--card); border:1px solid var(--line); border-radius:6px;
  padding:16px 18px 14px; box-shadow:0 16px 44px rgba(0,0,0,.55);
  animation:revealUp .4s cubic-bezier(.22,1,.36,1);
}
.mood-prompt p{ font-size:12.5px; color:var(--muted); margin-bottom:12px; padding-right:14px; line-height:1.4; }
.mood-dismiss{
  position:absolute; top:8px; right:10px; background:none; border:none; color:var(--muted);
  font-size:16px; cursor:pointer; line-height:1;
}
.mood-dismiss:hover{ color:var(--cream); }
.mood-emoji-row{ display:flex; gap:6px; }
.mood-emoji-row button{
  font-size:21px; background:none; border:none; cursor:pointer; border-radius:6px;
  padding:4px 6px; transition:transform .15s ease, background .15s ease;
}
.mood-emoji-row button:hover{ transform:scale(1.25); background:rgba(220,199,168,.1); }

/* mood board workspace — large embed area with loading/empty/error states */
.board-area{
  background:var(--card); border:1px solid var(--line); border-radius:8px;
  min-height:420px; padding:24px; position:relative; overflow:hidden;
}
.board-state{
  min-height:372px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; gap:14px; padding:24px;
}
.board-skeleton{
  position:absolute; inset:0; border-radius:6px;
  background:linear-gradient(100deg, var(--bg2) 30%, rgba(184,134,58,.10) 50%, var(--bg2) 70%);
  background-size:200% 100%; animation:boardShimmer 1.8s ease-in-out infinite;
}
@keyframes boardShimmer{ 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }
@media(prefers-reduced-motion: reduce){ .board-skeleton{ animation:none; } }
.pin-embed-wrap{ width:100%; min-height:372px; }
.pin-embed-wrap iframe{ max-width:100%; border-radius:6px; }
/* Sits on top of .pin-embed-wrap (a real, visible, in-flow sibling —
   deliberately NOT display:none/off-screen, so Pinterest's own widget
   still treats the target as visible) until a real embed appears. */
.board-loading-overlay{
  position:absolute; inset:0; border-radius:8px; overflow:hidden;
  background:var(--card);
}

/* modal — detail/edit dialog */
.modal-backdrop{
  position:fixed; inset:0; z-index:90; background:rgba(12,10,9,.72); backdrop-filter:blur(3px);
  display:flex; align-items:center; justify-content:center; padding:24px;
  opacity:0; transition:opacity .2s ease;
}
.modal-backdrop.open{ opacity:1; }
.modal-panel{
  background:var(--card); border:1px solid var(--line); border-radius:6px;
  width:100%; max-width:560px; max-height:88vh; overflow-y:auto;
  box-shadow:0 30px 70px -20px rgba(0,0,0,.7);
  transform:translateY(10px) scale(.98); transition:transform .25s cubic-bezier(.22,1,.36,1);
}
.modal-backdrop.open .modal-panel{ transform:translateY(0) scale(1); }
.modal-head{
  position:sticky; top:0; z-index:1; background:var(--card);
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid var(--line);
}
.modal-title{ font-family:'Playfair Display',serif; font-style:italic; font-weight:600; font-size:17px; color:var(--cream); }
.modal-close{
  background:none; border:none; color:var(--muted); font-size:20px; line-height:1; cursor:pointer; padding:4px;
  transition:color .2s;
}
.modal-close:hover{ color:var(--cream); }
.modal-body{ padding:22px; }
@media(max-width:640px){
  .modal-backdrop{ padding:0; align-items:flex-end; }
  .modal-panel{ max-width:none; max-height:92vh; border-radius:12px 12px 0 0; }
}

/* divider */
.divider{ width:40px; height:1px; background:var(--terracotta); }

/* utility mappings — replace generic Tailwind white/opacity utilities
   with theme-correct tones so raw markup in page controllers matches
   the brand palette without hand-tuning every class list. */
.text-white\/30, .text-white\/40 { color: var(--muted) !important; opacity:.75; }
.text-white\/50, .text-white\/70 { color: var(--muted) !important; }
.border-white\/5, .border-white\/10, .border-white\/15 { border-color: var(--line) !important; }
.border-white\/30, .border-white\/40 { border-color: var(--terracotta) !important; }
.bg-white\/5 { background: rgba(242,236,224,.05) !important; }
.bg-white\/\[0\.03\] { background: var(--card) !important; }
a.bg-white, button.bg-white, .bg-white { background: var(--cream) !important; color: var(--bg) !important; }
.hover\:bg-white\/90:hover { opacity:.88; }
.hover\:bg-white\/5:hover { background: rgba(242,236,224,.06) !important; }
.text-black { color: var(--bg) !important; }
.accent-\[\#e8c99b\] { accent-color: var(--terracotta); }

/* mentoring phase tracker — horizontal stepper across the whole program */
.phase-tracker-card{
  background:var(--card); border:1px solid var(--line); border-radius:4px;
  padding:26px 28px; position:relative; overflow:hidden;
}
.phase-tracker-card::before{
  content:''; position:absolute; top:0; left:0; width:2px; height:100%; background:var(--terracotta); opacity:.7;
}
.phase-tier-label{
  font-family:'Playfair Display',serif; font-style:italic; font-weight:600;
  font-size:15px; color:var(--gold);
}
.phase-tracker{ display:flex; justify-content:space-between; position:relative; margin-top:22px; }
.phase-line{
  position:absolute; top:19px; left:6%; right:6%; height:1px;
  background:repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
  z-index:0;
}
.phase-line-fill{
  position:absolute; top:19px; left:6%; height:1px; background:var(--terracotta);
  z-index:0; transition:width .8s cubic-bezier(.22,1,.36,1);
}
.phase-node{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; flex:1; background:none; border:none; cursor:pointer; }
.phase-node:hover .phase-dot{ transform:scale(1.08); }
.phase-locked .phase-dot{ transform:none !important; }
.phase-dot{
  width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; margin-bottom:12px; border:1px solid var(--line);
  background:var(--bg2); color:var(--muted); transition:all .3s;
}
.phase-done .phase-dot{ background:var(--terracotta); border-color:var(--terracotta); color:var(--cream); }
.phase-current .phase-dot{
  background:var(--card); border-color:var(--terracotta); color:var(--gold);
  box-shadow:0 0 0 4px rgba(184,134,58,.18), 0 0 22px rgba(184,134,58,.35);
  animation:phasePulse 2.6s ease-in-out infinite;
}
.phase-locked .phase-dot{ opacity:.55; }
.phase-premium .phase-dot{ opacity:.7; font-size:15px; border-style:dashed; }
.phase-premium .phase-dot{ transform:none !important; }
.phase-label{ font-size:12px; text-align:center; color:var(--muted); max-width:110px; line-height:1.3; }
.phase-current .phase-label{ color:var(--cream); font-weight:600; }
.phase-done .phase-label{ color:var(--muted); }
@keyframes phasePulse{
  0%,100%{ box-shadow:0 0 0 4px rgba(184,134,58,.18), 0 0 18px rgba(184,134,58,.3); }
  50%{ box-shadow:0 0 0 7px rgba(184,134,58,.12), 0 0 30px rgba(184,134,58,.5); }
}
@media(max-width:640px){
  .phase-tracker{ flex-direction:column; gap:18px; align-items:flex-start; }
  .phase-line, .phase-line-fill{ display:none; }
  .phase-node{ flex-direction:row; align-items:center; gap:14px; width:100%; }
  .phase-dot{ margin-bottom:0; flex:none; }
  .phase-label{ text-align:left; max-width:none; }
}

/* --- Journey phase sections (client Program Hub) — the client's guided
   "Program -> Phase -> Encounter -> Activities -> Deliverables" view. The
   pulsing effect above stays exactly where it already lives (the phase-
   tracker dots) — these larger cards get calmer, static emphasis instead,
   per "reuse the pulse but don't make it distracting." */
.journey-phases{ display:flex; flex-direction:column; gap:16px; }
.phase-section{ border-radius:6px; padding:26px 28px; }
.phase-section-current{
  background:var(--card); border:1px solid var(--terracotta-soft);
  box-shadow:0 0 0 1px rgba(184,134,58,.08), 0 8px 30px rgba(184,134,58,.06);
}
.phase-section-completed, .phase-section-upcoming{
  background:transparent; border:1px solid var(--line); padding:18px 22px;
}
.phase-section-upcoming{ opacity:.6; }
.phase-section-completed summary, .phase-section-upcoming summary{
  display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none;
}
.phase-section-completed summary::-webkit-details-marker, .phase-section-upcoming summary::-webkit-details-marker{ display:none; }
.phase-section-name{
  font-family:'Playfair Display', serif; font-size:1.15rem; color:var(--cream);
}
.phase-section-current .phase-section-name{ font-size:1.35rem; color:var(--gold); }
/* Per-row expand — "see the client's answers/material" inside admin's
   encounter briefs (see admin/client-detail.js's phaseActivityRow). */
.answer-row > summary{ display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none; padding:8px 0; }
.answer-row > summary::-webkit-details-marker{ display:none; }
.mentor-deliverable-grid{ display:grid; grid-template-columns:1fr; gap:10px; }
@media(min-width:640px){ .mentor-deliverable-grid{ grid-template-columns:1fr 1fr; } }
.mentor-deliverable-card{
  background:rgba(220,199,168,.05); border:1px solid var(--line); border-radius:5px; padding:14px 16px;
}
.encounter-row{
  background:rgba(184,134,58,.06); border:1px solid var(--terracotta-soft); border-radius:5px; padding:14px 16px; margin-bottom:10px;
}
.encounter-row:last-child{ margin-bottom:0; }
@media(max-width:640px){
  .phase-section{ padding:20px; }
  .phase-section-completed, .phase-section-upcoming{ padding:16px; }
}

/* the Playbook as a physical book: closed cover -> open animation -> reader */
.book-stage{
  display:flex; justify-content:center; padding:20px 0 40px;
  perspective:1800px;
}
.book-cover{
  position:relative; width:min(340px, 80vw); aspect-ratio:2/3; border-radius:6px;
  background-size:cover; background-position:center center;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(220,199,168,.15);
  cursor:pointer; overflow:hidden;
  transition:transform .6s cubic-bezier(.22,1,.36,1), opacity .6s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
  transform-origin:left center;
}
.book-cover::before{
  content:''; position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(12,10,9,.15) 0%, rgba(12,10,9,.35) 55%, rgba(12,10,9,.88) 100%),
    linear-gradient(90deg, rgba(0,0,0,.35) 0%, transparent 6%);
  filter:grayscale(.3);
}
.book-cover::after{
  content:''; position:absolute; left:0; top:0; bottom:0; width:10px;
  background:linear-gradient(90deg, rgba(0,0,0,.6), transparent);
}
.book-cover:hover{ transform:scale(1.015) rotateY(-2deg); box-shadow:0 36px 70px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(220,199,168,.25); }
.book-cover.opening{ transform:rotateY(-100deg) scale(.94); opacity:0; }
.book-cover-content{
  position:absolute; inset:0; z-index:1; display:flex; flex-direction:column; justify-content:flex-end;
  padding:28px 24px; text-align:left;
}
.book-cover-mark{ font-size:11px; letter-spacing:.28em; color:var(--gold); text-transform:uppercase; margin-bottom:10px; }
.book-cover-title{
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  font-size:2.1rem; line-height:1.08; color:var(--cream); margin-bottom:8px;
  text-shadow:0 2px 20px rgba(0,0,0,.6);
}
.book-cover-author{ font-size:11px; letter-spacing:.1em; color:var(--muted); text-transform:uppercase; }
.book-cover-hint{
  position:absolute; top:20px; right:20px; z-index:1; font-size:10px; letter-spacing:.15em;
  color:var(--muted); text-transform:uppercase; opacity:.8;
}

.book-toc-item{
  display:flex; align-items:baseline; gap:16px; padding:16px 4px; cursor:pointer;
  border-bottom:1px solid var(--line); transition:padding-left .2s ease, color .2s ease;
}
.book-toc-item:hover{ padding-left:10px; }
.book-toc-item .num{ font-family:'Playfair Display',serif; font-style:italic; color:var(--gold); font-size:1.3rem; flex:none; width:34px; }
.book-toc-item .meta{ flex:1; }
.book-toc-item .ttl{ font-weight:500; margin-bottom:2px; }
.book-toc-item .sub{ font-size:12px; color:var(--muted); }

.book-page{ max-width:640px; margin:0 auto; }
.book-page p{ line-height:1.85; margin-bottom:1.1em; color:var(--cream); }
.book-page ul{ margin:0 0 1.1em 1.2em; padding:0; }
.book-page li{ line-height:1.7; margin-bottom:.6em; color:var(--cream); list-style:disc; }

/* Conteúdos gateway cards — premium portrait "category" cards that link out
   to Hubla (see ui.js contentCardInner). Same editorial language as
   .book-cover above (dark ground, bottom-aligned Playfair title) but sized
   for a grid rather than a single centered stage. */
.content-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:24px;
}
.content-card{
  position:relative; display:block; aspect-ratio:3/4; border-radius:6px; overflow:hidden;
  text-decoration:none; color:inherit; cursor:pointer;
  box-shadow:0 20px 44px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(220,199,168,.08);
  transition:transform .45s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
}
.content-card:hover{ transform:translateY(-6px); box-shadow:0 30px 60px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(220,199,168,.25); }
.content-card:focus-visible{ outline:2px solid var(--terracotta); outline-offset:4px; }
.content-card-disabled{ cursor:default; opacity:.55; }
.content-card-disabled:hover{ transform:none; box-shadow:0 20px 44px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(220,199,168,.08); }
.content-card-cover{
  position:absolute; inset:0; background-size:cover; background-position:center center;
  display:flex; align-items:center; justify-content:center;
}
.content-card-emblem{ font-size:2.2rem; color:rgba(220,199,168,.32); }
.content-card-overlay{
  position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-end;
  padding:22px 20px; background:linear-gradient(180deg, transparent 38%, rgba(12,10,9,.6) 74%, rgba(12,10,9,.94) 100%);
}
.content-card-title{
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  font-size:1.35rem; line-height:1.12; color:var(--cream); margin-bottom:6px;
  text-shadow:0 2px 18px rgba(0,0,0,.6);
}
.content-card-desc{ font-size:12px; color:var(--muted); line-height:1.45; margin-bottom:12px; }
.content-card-cta{ font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); display:inline-flex; align-items:center; gap:6px; }
.content-card-ext{ font-size:13px; }
@media (max-width:640px){
  .content-grid{ display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:16px; margin:0 -4px; padding:2px 4px 10px; -webkit-overflow-scrolling:touch; }
  .content-grid .content-card{ flex:0 0 72vw; scroll-snap-align:start; }
}
/* admin "Gerenciar conteúdos" mode — same card, plus a small always-visible
   toolbar (not hover-only, since this is an explicit management screen). */
.content-card-manage{ position:relative; }
.content-card-toolbar{
  position:absolute; top:8px; right:8px; z-index:2; display:flex; gap:4px;
}
.content-card-toolbar button{
  width:28px; height:28px; display:flex; align-items:center; justify-content:center;
  font-size:12px; border-radius:3px; border:1px solid rgba(220,199,168,.25);
  background:rgba(12,10,9,.55); color:var(--cream); cursor:pointer; backdrop-filter:blur(2px);
}
.content-card-toolbar button:hover{ border-color:var(--terracotta); background:rgba(184,134,58,.25); }
.content-card-hidden-flag{
  position:absolute; top:8px; left:8px; z-index:2; font-size:9.5px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--muted); background:rgba(12,10,9,.7); border:1px solid var(--line); border-radius:3px; padding:3px 7px;
}

/* Agenda month view — a Google-Calendar-style grid of day squares. Clicking
   an empty square opens "new item" prefilled to that day; clicking a chip
   opens that item. See admin/agenda.js. */
.cal-grid{
  display:grid; grid-template-columns:repeat(7, 1fr);
  border:1px solid var(--line); border-radius:4px; overflow:hidden;
}
.cal-weekday{
  font-size:10.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted);
  padding:8px 8px 6px; text-align:center; border-bottom:1px solid var(--line); background:rgba(242,236,224,.02);
}
.cal-cell{
  position:relative; height:140px; padding:6px 6px 8px; cursor:pointer; overflow:hidden;
  border-right:1px solid var(--line); border-bottom:1px solid var(--line);
  transition:background .2s ease;
}
.cal-cell:hover{ background:rgba(242,236,224,.03); }
.cal-cell:nth-child(7n){ border-right:none; }
.cal-cell-other-month{ opacity:.35; }
.cal-cell-other-month .cal-day-num{ color:var(--muted); }
.cal-cell-today{ background:rgba(184,134,58,.08); }
.cal-day-num{
  font-size:12px; color:var(--cream); margin-bottom:5px; width:20px; height:20px;
  display:flex; align-items:center; justify-content:center;
}
.cal-cell-today .cal-day-num{
  background:var(--terracotta); color:var(--cream); border-radius:50%; font-weight:600;
}
.cal-chips{ display:flex; flex-direction:column; gap:3px; }
.cal-chip{
  display:block; width:100%; text-align:left; font-size:10.5px; line-height:1.3;
  padding:3px 6px; border-radius:3px; background:rgba(184,134,58,.14); color:var(--cream);
  border:1px solid rgba(184,134,58,.2); cursor:pointer;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cal-chip:hover{ background:rgba(184,134,58,.28); }
.cal-chip-time{ color:var(--gold); font-weight:600; }
.cal-chip-done{ opacity:.5; text-decoration:line-through; }
.cal-more{
  font-size:10px; color:var(--muted); background:none; border:none; text-align:left;
  padding:2px 6px; cursor:pointer;
}
.cal-more:hover{ color:var(--cream); }
@media (max-width:640px){
  .cal-cell{ height:112px; padding:4px 3px 6px; }
  .cal-weekday{ font-size:9px; padding:6px 2px 5px; }
  .cal-chip{ font-size:9px; padding:2px 4px; }
  .cal-day-num{ font-size:11px; }
}

/* Leitura Estratégica de Valor — premium badge, multiselect chips, and the
   repeatable item cards (offers/costs/references) inside the wizard. */
.premium-badge{
  display:inline-flex; align-items:center; gap:5px; font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--gold); background:rgba(220,199,168,.1); border:1px solid rgba(220,199,168,.3);
  border-radius:20px; padding:5px 12px;
}
.ms-chip{
  font-size:12px; padding:7px 14px; border-radius:20px; border:1px solid var(--line);
  background:transparent; color:var(--muted); cursor:pointer; transition:all .2s ease;
}
.ms-chip:hover{ border-color:var(--terracotta); color:var(--cream); }
.ms-chip-active{ background:rgba(184,134,58,.18); border-color:var(--terracotta); color:var(--cream); }
.value-item-card{
  border:1px solid var(--line); border-radius:4px; padding:16px 18px; background:rgba(242,236,224,.015);
}
.field-error{ display:none; }

/* Teste de Arquétipos — large, touch-friendly 1-5 scale control. The radio
   input stays in the DOM and focusable (not display:none) so keyboard nav
   and screen readers work natively; :has() just drives the visual state. */
.scale-row{ display:flex; gap:10px; flex-wrap:wrap; }
.scale-option{ position:relative; width:52px; height:52px; }
.scale-option input{ position:absolute; inset:0; opacity:0; margin:0; cursor:pointer; width:100%; height:100%; }
.scale-option span{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center; border-radius:50%;
  border:1.5px solid var(--line); color:var(--muted); font-family:'Playfair Display', serif; font-size:18px;
  transition:all .15s ease; pointer-events:none;
}
.scale-option:hover span{ border-color:var(--terracotta); color:var(--cream); }
.scale-option:has(input:checked) span{ background:var(--terracotta); border-color:var(--terracotta); color:var(--cream); }
.scale-option:has(input:focus-visible) span{ outline:2px solid var(--gold); outline-offset:2px; }
.dev-preview-panel{
  border:1px dashed rgba(220,199,168,.35); border-radius:4px; padding:16px 18px; margin-top:40px;
  background:rgba(220,199,168,.04);
}

/* section label pill for tabs */
.tab-btn{
  padding:12px 16px; font-size:13px; white-space:nowrap; color:var(--muted);
  border-bottom:2px solid transparent; transition:color .2s, border-color .2s; background:none; cursor:pointer;
}
.tab-btn.active{ color:var(--cream); border-color:var(--terracotta); }
.tab-btn:hover:not(.active){ color:var(--cream); }

/* --- Assistant client workspace — a narrow reference sidebar (facts, not
   an essay) beside a wider, priority-ordered action column. Kicks in at a
   lower breakpoint than a plain 50/50 grid so the sidebar doesn't stretch
   thin and empty on a normal browser window. */
.workspace-layout{ display:flex; flex-direction:column; gap:24px; align-items:start; }
@media (min-width: 860px){
  .workspace-layout{ display:grid; grid-template-columns:300px 1fr; gap:28px; }
}
.workspace-sidebar{ min-width:0; }
.workspace-main{ min-width:0; }
.ctx-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ctx-box{
  background:rgba(242,236,224,.03); border:1px solid var(--line); border-radius:4px;
  padding:10px 12px;
}
.ctx-box-label{ font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-bottom:3px; }
.ctx-box-value{ font-size:13px; color:var(--cream); line-height:1.35; }
.ctx-box-sub{ font-size:11px; color:var(--muted); margin-top:2px; }

/* Small-box treatment for simple single-fact/single-action duties in the
   assistant's client checklist — same idea as .ctx-box, so a "just one
   select and one button" duty doesn't sit inside a near-empty full-width
   card. See assistant/client-workspace.js's "Providências Rápidas". */
.action-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; }
.action-box{
  background:rgba(242,236,224,.03); border:1px solid var(--line); border-radius:4px;
  padding:12px 14px; display:flex; flex-direction:column; align-items:flex-start; gap:7px;
}
.action-box-pending{ border-color:rgba(196,90,60,.35); }
.action-box .field{ width:100%; }

/* --- Onboarding gate banner — see ui.js's onboardingGateBanner. Sits at the
   top of every client page's content while the signed contract isn't
   archived yet; Seu Programa/Conteúdos additionally block their own real
   content (see program.js/content.js's own lock-state renders). */
.gate-banner{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  padding:14px 18px; margin-bottom:28px; border-radius:4px;
  background:rgba(184,134,58,.08); border:1px solid var(--terracotta-soft);
}
.gate-banner-icon{ font-size:16px; line-height:1; flex-shrink:0; }
.gate-banner-text{ flex:1; min-width:220px; font-size:13px; color:var(--cream); line-height:1.5; }
.gate-banner-cta{ flex-shrink:0; }
.lock-state{ text-align:center; padding:60px 20px; }
.lock-state-icon{ font-size:28px; margin-bottom:14px; opacity:.7; }

/* --- Flipbook — the Guia de Atividades rendered as an actual page-turning
   book (see client/activity-guide.js) instead of a flat PDF embed. Pages
   are pre-rasterized images; a top "flip" layer rotates in 3D about its
   left/right edge to reveal the page underneath. Purely visual — the real
   pages, download, and "open PDF" link all still work without JS. */
.book-wrap{ display:flex; flex-direction:column; align-items:center; gap:16px; }
.book-stage{
  position:relative; width:100%; max-width:360px; aspect-ratio:1191/1685;
  perspective:2200px; -webkit-perspective:2200px;
}
.book-page{
  position:absolute; inset:0; border-radius:3px; overflow:hidden;
  box-shadow:0 18px 44px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);
  background:var(--bg2);
}
.book-page img{ width:100%; height:100%; object-fit:cover; display:block; }
.book-page-flip{
  transform-style:preserve-3d; -webkit-backface-visibility:hidden; backface-visibility:hidden;
  transform-origin:left center; transition:transform .62s cubic-bezier(.45,.05,.15,1);
  will-change:transform;
}
.book-page-flip.origin-right{ transform-origin:right center; }
.book-page-flip::after{
  /* subtle spine shading so the flipping page reads as paper, not a flat photo */
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(90deg, rgba(0,0,0,.22) 0%, transparent 10%, transparent 90%, rgba(0,0,0,.22) 100%);
}
.book-edge{
  position:absolute; top:6px; bottom:6px; width:10px; pointer-events:none;
  background:repeating-linear-gradient(180deg, rgba(242,236,224,.10) 0 2px, rgba(12,10,9,.25) 2px 4px);
  border-radius:2px; opacity:.7;
}
.book-edge-right{ right:-6px; }
.book-nav{
  position:absolute; top:0; bottom:0; width:34%; border:none; background:transparent; cursor:pointer;
  display:flex; align-items:center; opacity:0; transition:opacity .2s; color:var(--cream); font-size:0;
}
.book-stage:hover .book-nav{ opacity:1; }
.book-nav[disabled]{ cursor:default; opacity:0 !important; }
.book-prev{ left:0; justify-content:flex-start; }
.book-next{ right:0; justify-content:flex-end; }
.book-nav span{
  font-family:'Playfair Display', serif; font-size:22px; line-height:1; width:34px; height:34px;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:rgba(12,10,9,.55); border:1px solid var(--line); margin:0 8px; backdrop-filter:blur(2px);
}
.book-counter{ font-size:11.5px; letter-spacing:.08em; color:var(--muted); }
.book-thumbs{ display:flex; gap:6px; flex-wrap:wrap; justify-content:center; max-width:360px; }
.book-thumb{
  width:26px; height:auto; aspect-ratio:1191/1685; border-radius:2px; overflow:hidden; cursor:pointer;
  border:1px solid var(--line); opacity:.45; transition:opacity .2s, border-color .2s; padding:0; background:none;
}
.book-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.book-thumb.active{ opacity:1; border-color:var(--terracotta); }
@media (prefers-reduced-motion: reduce){
  .book-page-flip{ transition:none; }
}

/* print / "export as PDF" — nav, buttons, and anything marked .no-print
   drop out; cards go light-on-dark -> dark-on-light so it's actually
   readable on paper. Used by Relatórios' "Imprimir / Exportar PDF" button,
   but applies to any page since the browser print flow isn't page-specific. */
@media print{
  body{ background:#fff; color:#111; }
  .app-header, .no-print, .modal-backdrop, .ambient, .grain, .particles{ display:none !important; }
  .card{ background:#fff; border-color:#ccc; color:#111; break-inside:avoid; box-shadow:none; }
  .card p, .card span{ color:inherit; }
  a{ color:#111; }
  .progress-track{ background:#e5e5e5; }
}
