/* app.css, luzdaserra-terapias. MESMO layout do sistema Luz da Serra atual, em versao
   BLACK & WHITE / monocromatica. Mesma estrutura de componentes (sysnav, sv-head, basecard,
   info-note, feat-list, acct, auth-card) e mesma tipografia (Bricolage + Inter + JetBrains Mono),
   so que a paleta vira preto/branco/cinza: acento PRETO (era coral), teal/esmeralda vira cinza-escuro,
   dourado vira cinza medio. Preto no branco, high-end, minimalista. Zero travessao. */

:root {
  color-scheme: light;
  /* identidade oficial Luz da Serra: branco quente + coral da marca */
  --bg:          #fdfcfa;
  --surface:     #ffffff;
  --surface-2:   #f6f1ea;
  --line:        #ebe4da;
  --line-soft:   #f2ece3;
  --ink:         #3b342e;
  --ink-soft:    #6d6359;
  --ink-faint:   #7c7268;
  /* acento coral da marca */
  --coral:       #a02b2d;
  --coral-press: #872325;
  --coral-ink:   #ffffff;
  --coral-bright:#f5874f;
  --coral-soft:  #faefe9;
  --coral-line:  #efd8cb;
  /* apoio pastel */
  --sage:        #b9cfb6;
  --sage-ink:    #5f7a62;
  --lav:         #d9d2ec;
  /* estados */
  --esmeralda:     #5f7a62;
  --esmeralda-dim: rgba(95,122,98,0.12);
  --dourado:       #b0703a;
  /* alpha/sombra (coral + tinta quente) */
  --accent-glow:   rgba(160,43,45,0.14);
  --accent-soft:   rgba(160,43,45,0.08);
  --accent-line:   rgba(160,43,45,0.42);
  --sel-ring:      rgba(160,43,45,0.40);
  --shadow-1:      rgba(59,52,46,0.16);
  --overlay:       rgba(59,52,46,0.42);
  --shadow-modal:  rgba(59,52,46,0.55);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-btn: 10px;
  --radius-card: 14px;
  --radius-pill: 100px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'Manrope', system-ui, sans-serif;
  --lotus-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M12%203c1.8%202.4%202.6%205%202.6%208.4%200%201.2-.2%202.3-.6%203.3%201-1.9%202.7-3.3%205-4-.2%203-1.7%205.5-4.3%206.9-1.4.8-2.9%201-4.7%201s-3.3-.2-4.7-1C5.7%2016.2%204.2%2013.7%204%2010.7c2.3.7%204%202.1%205%204-.4-1-.6-2.1-.6-3.3C8.4%208%209.2%205.4%2011%203c.3-.4.7-.4%201%200z%27%2F%3E%3C%2Fsvg%3E");
  --constellation: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20200%20200%27%20fill%3D%27%23000%27%20stroke%3D%27%23000%27%20stroke-width%3D%271%27%3E%3Cline%20x1%3D%2730%27%20y1%3D%2740%27%20x2%3D%2790%27%20y2%3D%2770%27%2F%3E%3Cline%20x1%3D%2790%27%20y1%3D%2770%27%20x2%3D%27150%27%20y2%3D%2750%27%2F%3E%3Cline%20x1%3D%2790%27%20y1%3D%2770%27%20x2%3D%27110%27%20y2%3D%27140%27%2F%3E%3Cline%20x1%3D%27150%27%20y1%3D%2750%27%20x2%3D%27170%27%20y2%3D%27120%27%2F%3E%3Cline%20x1%3D%27110%27%20y1%3D%27140%27%20x2%3D%2760%27%20y2%3D%27160%27%2F%3E%3Ccircle%20cx%3D%2730%27%20cy%3D%2740%27%20r%3D%273%27%2F%3E%3Ccircle%20cx%3D%2790%27%20cy%3D%2770%27%20r%3D%274%27%2F%3E%3Ccircle%20cx%3D%27150%27%20cy%3D%2750%27%20r%3D%273%27%2F%3E%3Ccircle%20cx%3D%27110%27%20cy%3D%27140%27%20r%3D%273.5%27%2F%3E%3Ccircle%20cx%3D%27170%27%20cy%3D%27120%27%20r%3D%272.5%27%2F%3E%3Ccircle%20cx%3D%2760%27%20cy%3D%27160%27%20r%3D%273%27%2F%3E%3C%2Fsvg%3E");
}

/* ============ TEMA ESCURO (B&W invertido, monocromatico) ============ */
[data-theme="dark"] {
  color-scheme: dark;
  /* preto puro neutro (sem tom quente) */
  --bg:          #000000;
  --surface:     #0e0e0e;
  --surface-2:   #171717;
  --line:        #282828;
  --line-soft:   #1c1c1c;
  --ink:         #f5f5f5;
  --ink-soft:    #b9b9b9;
  --ink-faint:   #8b8b8b;
  /* coral mais claro p/ contraste no escuro */
  --coral:       #e88a7c;
  --coral-press: #d9705f;
  --coral-ink:   #241f1b;
  --coral-bright:#f5a07a;
  --coral-soft:  rgba(232,138,124,0.12);
  --coral-line:  rgba(232,138,124,0.34);
  --sage:        #8fb08f;
  --sage-ink:    #9fc09f;
  --lav:         #c9c0e0;
  --esmeralda:     #9fc09f;
  --esmeralda-dim: rgba(159,192,159,0.14);
  --dourado:       #d19a5f;
  --accent-glow:   rgba(232,138,124,0.18);
  --accent-soft:   rgba(232,138,124,0.14);
  --accent-line:   rgba(232,138,124,0.42);
  --sel-ring:      rgba(232,138,124,0.45);
  --shadow-1:      rgba(0,0,0,0.55);
  --overlay:       rgba(0,0,0,0.62);
  --shadow-modal:  rgba(0,0,0,0.72);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); background: var(--bg); color: var(--ink);
  line-height: 1.55; min-height: 100vh; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
::selection { background: var(--coral); color: var(--coral-ink); }
a { color: inherit; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 100px; border: 2px solid transparent; background-clip: content-box; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* ============ SHELL ============ */
.shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); align-items: start; width: 100%; min-height: 100vh; }

/* ============ ASIDE (sidebar) ============ */
.aside {
  position: sticky; top: 0; align-self: start; height: 100vh;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 26px 18px 22px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto;
}
.aside-brand { display: flex; flex-direction: column; gap: 7px; }
.aside-brand .mark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.03em; line-height: 1; }
.aside-brand .mark .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--accent-glow); flex-shrink: 0; }
.aside-brand .kicker { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); padding-left: 18px; }

/* ============ SYSNAV (navegacao por papel) ============ */
.sysnav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sysnav-head { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); padding: 2px 11px 7px; }
.sysnav-head.k2 { margin-top: 8px; border-top: 1px solid var(--line-soft); padding-top: 13px; }
.sysnav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: transparent; border: none; color: var(--ink-soft); font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; line-height: 1.25; padding: 10px 11px; border-radius: var(--radius-sm); cursor: pointer; min-height: 44px; transition: background 0.16s var(--ease), color 0.16s var(--ease); }
.sysnav-item:hover { background: var(--surface-2); color: var(--ink); }
.sysnav-item.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.sysnav-item::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0); width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--coral); transition: transform 0.2s var(--ease); }
.sysnav-item.active::before { transform: translateY(-50%) scaleY(1); }
.sysnav-num { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; color: var(--ink-faint); min-width: 22px; height: 22px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; flex-shrink: 0; transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease); }
.sysnav-item.active .sysnav-num { color: var(--coral); border-color: var(--accent-line); background: var(--accent-soft); }
.sysnav-item .sysnav-label { min-width: 0; flex: 1; }
.sysnav-ico { width: 20px; height: 20px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-faint); transition: color 0.16s var(--ease); }
.sysnav-ico svg { width: 20px; height: 20px; display: block; }
.sysnav-item:hover .sysnav-ico { color: var(--ink); }
.sysnav-item.active .sysnav-ico { color: var(--coral); }
.sysnav-flag { margin-left: auto; font-family: var(--font-mono); font-size: 0.52rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px 7px; flex-shrink: 0; white-space: nowrap; }
.sysnav-flag.preview { color: var(--esmeralda); border-color: var(--line); }
.sysnav-flag.novo { color: var(--ink); border-color: var(--accent-line); }

/* ============ RODAPE DA SIDEBAR (conta) ============ */
.aside-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.acct { display: flex; align-items: center; gap: 11px; padding: 4px 2px; }
.acct .av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.acct .info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.acct .info .nm { display: block; max-width: 100%; font-size: 0.86rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct .info .rl { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 1px; }
.acct .info .rl.admin { color: var(--ink); }
.acct .logout { background: transparent; border: 1px solid var(--line); color: var(--ink-faint); width: 34px; height: 34px; border-radius: var(--radius); cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; transition: border-color 0.15s, color 0.15s, background 0.15s; font-size: 1rem; }
.acct .logout:hover { border-color: var(--coral); color: var(--coral); background: var(--surface-2); }
/* alvo de toque acessivel (>=44px) para o link "Termos de Uso" do rodape no mobile */
@media (max-width: 640px) {
  .aside-foot .termos-foot-link { min-height: 44px; display: flex; align-items: center; }
}

/* ============ MAIN ============ */
.main { min-width: 0; padding: 0 clamp(20px, 3.4vw, 48px) 96px; }
.main > .sv-head, .main > .content { max-width: 1350px; margin-left: auto; margin-right: auto; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 18px 0 16px; margin-bottom: 8px; background: var(--bg); flex-wrap: wrap; }
.topbar .last-update { margin-left: auto; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar .last-update .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex-shrink: 0; }
.topbar .last-update strong { color: var(--ink-soft); font-weight: 500; }
/* hamburguer: escondido no desktop; vira botao-icone quadrado (estilo .icob) em <=980px */
.drawer-trigger { display: none; width: 42px; height: 42px; padding: 0; flex-shrink: 0; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius-sm); cursor: pointer; align-items: center; justify-content: center; transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease); }
.drawer-trigger:hover { border-color: var(--ink-faint); background: var(--surface-2); }
.drawer-trigger .bars { display: inline-flex; flex-direction: column; gap: 3px; }
.drawer-trigger .bars i { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }

/* ============ SV-HEAD (cabecalho da secao) ============ */
.sv-head { padding: 8px 0 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 28px; }
.sv-head .eyebrow { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--coral); margin-bottom: 12px; display: inline-flex; align-items: center; gap: 9px; }
.sv-head .eyebrow .nm { color: var(--ink-faint); }
.sv-head h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; }
.sv-head .sub { color: var(--ink-soft); font-size: 1rem; margin-top: 14px; max-width: 66ch; line-height: 1.6; }
.sv-head .sub b { color: var(--ink); font-weight: 600; }

/* ============ CARDS ============ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.basecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: clamp(22px, 3vw, 30px); position: relative; overflow: hidden; }
.basecard .blabel { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.basecard .blabel::before { content: ""; width: 18px; height: 1px; background: var(--coral); }
.basecard h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -.02em; line-height: 1.14; color: var(--ink); margin-bottom: 12px; }
.basecard .bp { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.62; max-width: 72ch; }

/* lista de features (era marcador esmeralda) */
.feat-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.feat-list li { position: relative; padding-left: 18px; font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); }
.feat-list li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 6px; height: 6px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }

/* nota informativa (passo de proxima fase) */
.info-note { margin-top: 22px; display: flex; align-items: flex-start; gap: 13px; background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; }
.info-note .ic { width: 32px; height: 32px; border-radius: var(--radius); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.info-note .in-t { font-weight: 600; color: var(--ink); margin-bottom: 3px; font-size: 0.92rem; }
.info-note .in-d { font-size: 0.86rem; line-height: 1.55; color: var(--ink-soft); }

/* faixa de status / banner */
.banner { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; background: var(--surface); margin-bottom: 22px; font-size: 0.9rem; color: var(--ink-soft); }
.banner .tag { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--ink); flex-shrink: 0; }
.banner.warn { border-style: dashed; }

/* ============ AUTH (login / signup) ============ */
.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.auth-aside { position: relative; padding: clamp(40px, 6vw, 88px) clamp(34px, 5vw, 76px); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; overflow: hidden; }
.auth-aside .brand-row { display: inline-flex; align-items: center; gap: 11px; }
.auth-aside .brand-row .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px var(--accent-glow); flex-shrink: 0; }
.auth-aside .brand-row .nm { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.auth-aside .pitch { position: relative; max-width: 34ch; }
.auth-aside .pitch .eyebrow { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--coral); margin-bottom: 18px; }
.auth-aside .pitch h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.04; margin-bottom: 18px; }
.auth-aside .pitch p { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.auth-aside .auth-points { position: relative; display: flex; flex-direction: column; gap: 14px; }
.auth-aside .auth-points .pt { display: flex; align-items: flex-start; gap: 11px; color: var(--ink-soft); font-size: 0.92rem; }
.auth-aside .auth-points .pt .mk { color: var(--ink); font-family: var(--font-mono); font-size: 0.8rem; margin-top: 1px; flex-shrink: 0; }
.auth-aside .auth-sign { position: relative; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.auth-aside .auth-sign b { color: var(--ink-soft); font-weight: 500; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(36px, 5vw, 64px) clamp(22px, 4vw, 56px); background: var(--bg); }
.auth-card { width: 100%; max-width: 410px; }
.auth-card .auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-card .auth-mobile-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--accent-glow); }
.auth-card .auth-mobile-brand .nm { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.auth-card h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; font-size: 1.7rem; line-height: 1.1; margin-bottom: 8px; }
.auth-card .lede { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 26px; }
.auth-card .field { margin-bottom: 15px; }
.auth-card .field label { display: block; font-family: var(--font-mono); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 7px; }
.auth-card .field input, .auth-card .field select { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; color: var(--ink); font-family: var(--font-body); font-size: 0.94rem; outline: none; min-height: 46px; transition: border-color 0.16s var(--ease), background 0.16s var(--ease); }
.auth-card .field input::placeholder { color: var(--ink-faint); }
.auth-card .field input:focus, .auth-card .field select:focus { border-color: var(--ink); background: var(--surface-2); }
/* selecao de papel (terapeuta/consultante) no signup */
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.role-tile { position: relative; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 14px 14px; background: var(--surface); transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.role-tile:hover { border-color: var(--ink-faint); }
.role-tile.sel { border-color: var(--ink); box-shadow: 0 0 0 2px var(--sel-ring); background: var(--surface-2); }
.role-tile .rt-t { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; color: var(--ink); margin-bottom: 3px; }
.role-tile .rt-d { font-size: 0.76rem; color: var(--ink-faint); line-height: 1.45; }
.auth-card .submit { width: 100%; background: var(--coral); color: var(--coral-ink); border: none; border-radius: var(--radius-btn); font-family: var(--font-body); font-weight: 700; font-size: 0.94rem; min-height: 50px; cursor: pointer; margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: background 0.18s var(--ease), transform 0.12s var(--ease); }
.auth-card .submit:hover { background: var(--coral-press); }
.auth-card .submit:active { transform: scale(0.99); }
.auth-card .submit:disabled { opacity: 0.6; cursor: wait; }
.auth-card .switch-line { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 0.9rem; color: var(--ink-soft); text-align: center; }
.auth-card .switch-line a { color: var(--coral); font-weight: 700; text-decoration: none; }
.auth-card .switch-line a:hover { text-decoration: underline; }
.auth-msg { font-size: 0.85rem; padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 18px; display: none; border: 1px solid transparent; line-height: 1.5; }
.auth-msg.show { display: block; }
.auth-msg.error { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.auth-msg.ok { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

/* ============================================================
   F2, MARKETPLACE (cards, filtros, form de perfil, pagina publica)
   Mesmo tema B&W, mesmos tokens. Acento PRETO, superficies cinza claro.
   ============================================================ */

/* grade de cards do terapeuta */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.t-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px; text-decoration: none; color: inherit; transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease); }
a.t-card:hover { border-color: var(--ink-faint); transform: translateY(-2px); box-shadow: 0 10px 30px -18px var(--shadow-1); }
.t-card.preview { border-style: dashed; }
.t-top { display: flex; align-items: center; gap: 13px; }
.t-av { width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.t-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-av.noimg { font-size: 1.05rem; }
.t-id { min-width: 0; flex: 1; }
.t-nome { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.t-tag { font-family: var(--font-mono); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--ink); color: var(--coral-ink); }
.t-tag.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.t-bio { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.55; }
.t-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chip { font-size: 0.74rem; color: var(--ink-soft); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 10px; background: var(--bg); }
.t-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-preco { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.t-preco small { font-family: var(--font-mono); font-weight: 500; font-size: 0.62rem; color: var(--ink-faint); letter-spacing: 0.06em; margin-left: 3px; }
.t-cta { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }

/* barra de filtros / busca */
.t-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 22px; }
.t-filters .ff { display: flex; flex-direction: column; gap: 6px; min-width: 140px; flex: 1; }
.t-filters .ff.grow { flex: 2.4; min-width: 200px; }
.t-filters .ff label { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.t-filters input, .t-filters select { width: 100%; background-color: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; color: var(--ink); font-family: var(--font-body); font-size: 0.9rem; outline: none; min-height: 44px; transition: border-color 0.16s var(--ease); }
.t-filters input:focus, .t-filters select:focus { border-color: var(--ink); }
.t-filters .ff-actions { display: flex; gap: 8px; }
.btn { font-family: var(--font-body); font-weight: 700; font-size: 0.86rem; min-height: 44px; padding: 0 18px; border-radius: var(--radius-btn); cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--ink); transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.12s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.99); }
.btn.primary { background: var(--coral); color: var(--coral-ink); border-color: var(--coral); }
.btn.primary:hover { background: var(--coral-press); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.55; cursor: wait; }
/* botao destrutivo: em B&W o "coral" some (== ink), entao o sinal e a borda 2px +
   peso + inversao no hover. Distinto do .btn.ghost mesmo sem cor. Funciona nos 2 temas. */
.btn.danger { background: transparent; border: 2px solid var(--ink); color: var(--ink); font-weight: 600; }
.btn.danger:hover { background: var(--ink); color: var(--coral-ink); border-color: var(--ink); }
.btn.danger:active { transform: scale(0.99); }
/* variante destrutiva do icon-button: hover inverte (fundo ink, icone claro) */
.icob.danger:hover { background: var(--ink); color: var(--coral-ink); border-color: var(--ink); }

/* estado vazio / contador */
.t-count { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); margin-bottom: 14px; }
.t-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--ink-soft); }
.t-empty .big { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-bottom: 6px; }
.t-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
.t-pager .pg-info { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); }

/* ----- FORM de perfil do terapeuta (painel) ----- */
.pf-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 26px; align-items: start; }
.pf-form { display: flex; flex-direction: column; gap: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: clamp(20px, 3vw, 28px); }
.pf-field { display: flex; flex-direction: column; gap: 7px; }
.pf-field label { font-family: var(--font-mono); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.pf-field .hint { font-size: 0.74rem; color: var(--ink-faint); }
.pf-field input, .pf-field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; color: var(--ink); font-family: var(--font-body); font-size: 0.92rem; outline: none; transition: border-color 0.16s var(--ease), background 0.16s var(--ease); }
.pf-field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.pf-field input:focus, .pf-field textarea:focus { border-color: var(--ink); background: var(--surface-2); }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* toggle online */
.pf-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; user-select: none; }
.pf-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; pointer-events: none; clip: rect(0 0 0 0); clip-path: inset(50%); }
.pf-toggle input:focus-visible + .sw { outline: 2px solid var(--ink); outline-offset: 2px; }
.pf-toggle .sw { width: 42px; height: 24px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--line); position: relative; flex-shrink: 0; transition: background 0.18s var(--ease), border-color 0.18s; }
.pf-toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-faint); transition: transform 0.18s var(--ease), background 0.18s; }
.pf-toggle input:checked + .sw { background: var(--ink); border-color: var(--ink); }
.pf-toggle input:checked + .sw::after { transform: translateX(18px); background: var(--coral-ink); }
.pf-toggle .tg-txt { font-size: 0.9rem; color: var(--ink); font-weight: 500; }
.pf-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.pf-msg { font-size: 0.84rem; padding: 10px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); display: none; }
.pf-msg.show { display: block; }
/* coluna do preview */
.pf-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
.pf-side .pf-side-h { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.pf-status { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }
.pf-status .st-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--ink-faint); }
.pf-status.ok .st-dot { background: var(--ink); }
.pf-status .st-t { font-weight: 600; color: var(--ink); display: block; margin-bottom: 2px; }

/* ----- pagina publica do terapeuta (/t/:slug) ----- */
.pub-wrap { max-width: 860px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 40px) 80px; }
.pub-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(20px, 5vw, 40px); border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--bg); z-index: 20; }
.pub-nav .mark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); }
.pub-nav .mark .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--accent-glow); }
.pub-head { display: flex; align-items: center; gap: 20px; padding: 18px 0 26px; border-bottom: 1px solid var(--line-soft); margin-bottom: 26px; flex-wrap: wrap; }
.pub-head .t-av { width: 92px; height: 92px; font-size: 1.8rem; }
.pub-head .ph-id { min-width: 0; flex: 1; }
.pub-head .ph-id h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -0.04em; line-height: 1.05; }
.pub-head .ph-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pub-sec { margin-bottom: 28px; }
.pub-sec h2 { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.pub-sec .bio-txt { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; white-space: pre-wrap; }
.pub-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px 24px; background: var(--surface); position: sticky; bottom: 16px; }
.pub-cta .cta-price { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); }
.pub-cta .cta-price small { font-family: var(--font-mono); font-weight: 500; font-size: 0.66rem; color: var(--ink-faint); letter-spacing: 0.06em; }
.pub-cta .cta-note { font-size: 0.78rem; color: var(--ink-faint); margin-top: 4px; }
.pub-loading, .pub-404 { padding: 80px 20px; text-align: center; color: var(--ink-soft); }
.pub-404 .big { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--ink); margin-bottom: 8px; }

/* ============================================================
   MODAL PREMIUM (global). Sensacao de clinica particular: overlay
   difuso com blur, caixa com sombra em camadas, entrada suave,
   titulo em Bricolage com filete, botao de fechar discreto.
   Classes NAO renomeadas: .modal-ov / .modal-box / .modal-h /
   .modal-body / .modal-x.
   ============================================================ */
@keyframes ls-modal-ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ls-modal-box-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-ov {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center;
  padding: clamp(16px, 5vh, 56px) clamp(14px, 4vw, 32px);
  background: var(--overlay);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  backdrop-filter: blur(6px) saturate(1.05);
  overflow-y: auto;
}
.modal-ov.show { display: flex; animation: ls-modal-ov-in 0.22s var(--ease) both; }
.modal-box {
  position: relative; width: 100%; max-width: 560px;
  max-height: calc(100vh - clamp(32px, 10vh, 112px));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3.2vw, 38px);
  box-shadow:
    0 1px 0 0 var(--line-soft) inset,
    0 2px 6px -2px oklch(0 0 0 / 0.16),
    0 18px 40px -20px var(--shadow-modal),
    0 40px 90px -40px var(--shadow-modal);
}
.modal-ov.show .modal-box { animation: ls-modal-box-in 0.3s var(--ease) both; }
/* ornamento botanico levissimo no topo, atras do conteudo */
.modal-box::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: 132px; height: 88px; pointer-events: none; z-index: 0;
  background-color: var(--ink-faint); opacity: 0.06;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 88' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><path d='M124 6 C 96 10 74 24 60 46 C 52 58 48 70 47 82'/><path d='M96 16 C 100 26 98 36 90 43 C 84 33 87 22 96 16 Z'/><path d='M74 34 C 82 40 85 50 82 60 C 74 53 71 43 74 34 Z'/><path d='M112 12 C 118 18 120 27 116 35 C 109 30 107 20 112 12 Z'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 88' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><path d='M124 6 C 96 10 74 24 60 46 C 52 58 48 70 47 82'/><path d='M96 16 C 100 26 98 36 90 43 C 84 33 87 22 96 16 Z'/><path d='M74 34 C 82 40 85 50 82 60 C 74 53 71 43 74 34 Z'/><path d='M112 12 C 118 18 120 27 116 35 C 109 30 107 20 112 12 Z'/></svg>") no-repeat center / contain;
}
.modal-box > * { position: relative; z-index: 1; }
.modal-box .modal-x {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  background: transparent; border: 1px solid transparent;
  color: var(--ink-faint); width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.modal-box .modal-x:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.modal-box .modal-h {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); letter-spacing: -0.03em;
  line-height: 1.12; color: var(--ink);
  padding: 0 40px 16px 0; margin-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-box .modal-body { display: flex; flex-direction: column; gap: 14px; }
@media (prefers-reduced-motion: reduce) {
  .modal-ov.show, .modal-ov.show .modal-box { animation: none; }
}

/* ============================================================
   SELECTS + INPUTS PREMIUM (global). Seta custom via SVG,
   foco com anel sutil, transicoes finas. Monocromatico.
   ============================================================ */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  width: 100%; background-color: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: 0.92rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 40px 12px 13px; min-height: 46px; cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 15px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background-color 0.16s var(--ease);
}
select:hover { border-color: var(--ink-faint); }
select:focus, select:focus-visible {
  border-color: var(--ink); box-shadow: 0 0 0 3px var(--sel-ring);
  background-color: var(--surface-2); outline: none;
}
select:disabled { opacity: 0.55; cursor: not-allowed; }
[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 15px; padding-right: 40px;
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23999999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 15px; padding-right: 40px;
}
/* refinamento generico de inputs de texto e textarea (foco com anel sutil) */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], input[type="time"],
input[type="datetime-local"], textarea {
  font-family: var(--font-body); color: var(--ink);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background-color 0.16s var(--ease);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="search"]:focus, input[type="tel"]:focus, input[type="url"]:focus,
input[type="number"]:focus, input[type="date"]:focus, input[type="time"]:focus,
input[type="datetime-local"]:focus, textarea:focus {
  box-shadow: 0 0 0 3px var(--sel-ring);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

/* ============================================================
   BASELINE controles renderizados por JS sem estilo proprio completo
   (ex.: "Caixinhas de links" da Link na Bio: .bio-row inputs/textarea
   so recebiam width/box-sizing -> caiam no visual default do browser).
   So preenche o que falta; inputs com classe/estilo proprio nao sao
   afetados (regra deles e mais forte / o :not([class]) os exclui).
   Vale claro E escuro (usa tokens do tema).
   ============================================================ */
.bio-row input, .bio-row textarea,
.main input:not([class]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.main textarea:not([class]) {
  width: 100%; box-sizing: border-box;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; min-height: 44px;
  font-family: var(--font-body); font-size: 0.92rem; line-height: 1.4;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background-color 0.16s var(--ease);
}
.bio-row textarea, .main textarea:not([class]) {
  min-height: 64px; resize: vertical; line-height: 1.5;
}
.bio-row input:focus, .bio-row textarea:focus,
.main input:not([class]):focus, .main textarea:not([class]):focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px var(--sel-ring); background: var(--surface-2);
}
.bio-row input::placeholder, .bio-row textarea::placeholder { color: var(--ink-faint); }
/* botoezinhos de ordenar/remover da caixinha: ghost neutro uniforme (claro+escuro),
   sem mexer nas dimensoes que ja alinham com a altura dos campos */
.bio-boxes .bio-row .bio-ord button, .bio-boxes .bio-row .bio-del {
  background: var(--surface); color: var(--ink-soft);
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.bio-boxes .bio-row .bio-ord button:hover { background: var(--surface-2); border-color: var(--ink-faint); color: var(--ink); }
.bio-boxes .bio-row .bio-del:hover { background: var(--surface-2); border-color: var(--coral); color: var(--coral); }

@media (max-width: 720px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-side { position: static; }
  .t-filters .ff { min-width: 100%; }
}

/* ============================================================
   DRAWER (sidebar deslizante no mobile). Em >980px NADA disto aparece:
   .aside segue sticky, .drawer-trigger e .drawer-scrim ficam escondidos.
   ============================================================ */
/* scrim so existe visualmente dentro da media query; no desktop fica fora de cena */
.drawer-scrim { display: none; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  /* a sidebar deixa de empurrar o layout e vira painel fixo que desliza da esquerda */
  .aside {
    position: fixed; top: 0; left: 0; height: 100dvh;
    width: min(84vw, 300px); z-index: 49;
    transform: translateX(-100%);
    transition: transform 0.28s var(--ease);
    overflow-y: auto;
    box-shadow: 0 24px 64px -24px var(--shadow-modal);
  }
  body.drawer-open .aside { transform: translateX(0); }

  /* veu escuro sob a sidebar aberta (abaixo do .aside, acima do resto) */
  .drawer-scrim {
    display: block; position: fixed; inset: 0; z-index: 48;
    background: var(--overlay);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.28s var(--ease);
  }
  body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }

  /* o hamburguer aparece so aqui */
  .drawer-trigger { display: inline-flex; }
}
@media (max-width: 860px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; padding: 40px 22px; }
  .auth-card .auth-mobile-brand { display: flex; }
}

/* ============ CONTROLES i18n + TEMA (idioma + claro/escuro) ============ */
.lst-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.lst-lang { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-btn); overflow: hidden; background: var(--bg); }
.lst-lang button { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; padding: 5px 9px; min-height: 28px; background: transparent; border: none; color: var(--ink-faint); cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
.lst-lang button + button { border-left: 1px solid var(--line); }
.lst-lang button:hover { color: var(--ink); }
.lst-lang button.on { background: var(--coral); color: var(--coral-ink); }
.lst-theme { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink-soft); cursor: pointer; transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease); }
.lst-theme:hover { border-color: var(--coral); color: var(--coral); background: var(--surface-2); }
.lst-theme svg { width: 15px; height: 15px; display: block; }
/* dentro da nav publica: agrupa botao existente + controles no lado direito */
.pub-nav-right { display: inline-flex; align-items: center; gap: 14px; }
.pub-nav-right .lst-controls { margin-bottom: 0; }
/* flutuante (login/signup, sem sidebar e sem nav) */
.lst-controls.floating { position: fixed; top: 14px; right: 16px; z-index: 50; margin: 0; padding: 6px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-btn); box-shadow: 0 8px 24px -16px var(--shadow-1); }
@media (max-width: 860px) {
  .lst-controls.floating { top: 10px; right: 10px; }
}

/* ============================================================
   ORNAMENTOS SUTIS, remover/ajustar aqui
   Linha botanica fina, vies de clinica de terapia. Monocromatico
   (tokens --ink / --ink-faint ou cinza neutro), opacidade 0.05 a 0.12,
   sempre ATRAS do conteudo (pointer-events none / camada de fundo).
   Para desligar tudo: apague este bloco inteiro.
   ============================================================ */

/* 1. SIDEBAR LIMPA: sem ornamento (a decoracao migrou para a area de conteudo).
   Mantido vazio de proposito. Nada de background botanico na .aside. */

/* base: .main vira contexto posicionado para os pseudos ficarem ATRAS do
   conteudo (z-index -1). Nunca cobrem texto: aparecem so nas folgas/margens. */
.main { position: relative; }

/* 2a. GALHO delicado no canto INFERIOR ESQUERDO da area de conteudo.
   Raminho fino com poucas folhas, tamanho comedido, bem sutil. */
.main::after {
  content: ""; position: absolute; left: 18px; bottom: 24px;
  width: 118px; height: 136px; pointer-events: none; z-index: -1;
  background-color: var(--ink-faint); opacity: 0.06;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 150' fill='none' stroke='%23000' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M8 148 C 14 120 20 96 34 74 C 46 55 62 40 78 28'/><path d='M22 110 C 12 106 6 98 6 90 C 15 92 22 100 22 110 Z'/><path d='M34 86 C 44 80 50 71 50 62 C 40 64 33 74 34 86 Z'/><path d='M52 58 C 42 55 36 47 36 39 C 45 41 52 49 52 58 Z'/><path d='M64 44 C 73 39 78 31 79 23 C 70 25 63 34 64 44 Z'/><path d='M78 28 C 82 22 88 19 92 20'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 150' fill='none' stroke='%23000' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M8 148 C 14 120 20 96 34 74 C 46 55 62 40 78 28'/><path d='M22 110 C 12 106 6 98 6 90 C 15 92 22 100 22 110 Z'/><path d='M34 86 C 44 80 50 71 50 62 C 40 64 33 74 34 86 Z'/><path d='M52 58 C 42 55 36 47 36 39 C 45 41 52 49 52 58 Z'/><path d='M64 44 C 73 39 78 31 79 23 C 70 25 63 34 64 44 Z'/><path d='M78 28 C 82 22 88 19 92 20'/></svg>") no-repeat center / contain;
}

/* 2b. SPRIG leve (3 folhinhas) no canto SUPERIOR DIREITO, abaixo da topbar.
   Ainda mais sutil que o galho de baixo. */
.main::before {
  content: ""; position: absolute; right: 22px; top: 92px;
  width: 88px; height: 70px; pointer-events: none; z-index: -1;
  background-color: var(--ink-faint); opacity: 0.045;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 76' fill='none' stroke='%23000' stroke-width='0.85' stroke-linecap='round' stroke-linejoin='round'><path d='M90 10 C 72 14 56 24 44 40 C 38 48 35 57 33 66'/><path d='M62 25 C 69 18 72 10 71 3 C 63 6 58 15 62 25 Z'/><path d='M48 40 C 56 36 62 29 64 21 C 55 22 48 30 48 40 Z'/><path d='M40 52 C 47 49 52 42 53 35 C 45 37 39 44 40 52 Z'/><path d='M33 66 C 30 60 31 54 35 50'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 76' fill='none' stroke='%23000' stroke-width='0.85' stroke-linecap='round' stroke-linejoin='round'><path d='M90 10 C 72 14 56 24 44 40 C 38 48 35 57 33 66'/><path d='M62 25 C 69 18 72 10 71 3 C 63 6 58 15 62 25 Z'/><path d='M48 40 C 56 36 62 29 64 21 C 55 22 48 30 48 40 Z'/><path d='M40 52 C 47 49 52 42 53 35 C 45 37 39 44 40 52 Z'/><path d='M33 66 C 30 60 31 54 35 50'/></svg>") no-repeat center / contain;
}

/* 3. filete organico com uma folhinha ao lado do cabecalho de secao.
   Refinado: traco mais fino, folha menor, curva mais elegante. */
.sv-head { position: relative; }
.sv-head::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 2px;
  width: 46px;
  height: 15px;
  background-color: var(--ink-faint);
  opacity: 0.09;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 16' fill='none' stroke='%23000' stroke-width='0.85' stroke-linecap='round' stroke-linejoin='round'><path d='M2 9 C 12 4 20 4 28 8'/><path d='M28 8 C 32 3 39 3 43 6 C 38 9 32 11 28 8 Z'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 16' fill='none' stroke='%23000' stroke-width='0.85' stroke-linecap='round' stroke-linejoin='round'><path d='M2 9 C 12 4 20 4 28 8'/><path d='M28 8 C 32 3 39 3 43 6 C 38 9 32 11 28 8 Z'/></svg>") no-repeat center / contain;
  pointer-events: none;
}

/* 3b. EXTRA: floreio minusculo repousando no divisor do cabecalho de secao
   (canto inferior esquerdo). Levissimo, so um toque estrutural. */
.sv-head::before {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 12px;
  width: 28px;
  height: 13px;
  background-color: var(--ink-faint);
  opacity: 0.08;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 14' fill='none' stroke='%23000' stroke-width='0.85' stroke-linecap='round' stroke-linejoin='round'><path d='M2 11 C 8 7 14 7 20 10'/><path d='M20 10 C 23 5 28 5 29 8 C 26 11 22 12 20 10 Z'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 14' fill='none' stroke='%23000' stroke-width='0.85' stroke-linecap='round' stroke-linejoin='round'><path d='M2 11 C 8 7 14 7 20 10'/><path d='M20 10 C 23 5 28 5 29 8 C 26 11 22 12 20 10 Z'/></svg>") no-repeat center / contain;
  pointer-events: none;
}

/* 4. folha minima, ornamento de canto muito sutil no topo dos cards.
   Refinado: traco mais fino, folha menor, com nervura elegante. */
.basecard::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  background-color: var(--ink);
  opacity: 0.045;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M5 19 C 5 11 11 5 19 5 C 19 13 13 19 5 19 Z'/><path d='M9 15 L 15 9'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M5 19 C 5 11 11 5 19 5 C 19 13 13 19 5 19 Z'/><path d='M9 15 L 15 9'/></svg>") no-repeat center / contain;
  pointer-events: none;
}

/* 5. EXTRA: folhinha solta minuscula no lado esquerdo (vazio) da topbar.
   Toque estrutural discreto, pointer-events none nao bloqueia nada. */
.topbar::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 20px;
  width: 15px;
  height: 15px;
  background-color: var(--ink-faint);
  opacity: 0.06;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M4 16 C 4 9 9 4 16 4 C 16 11 11 16 4 16 Z'/><path d='M7 13 L 13 7'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><path d='M4 16 C 4 9 9 4 16 4 C 16 11 11 16 4 16 Z'/><path d='M7 13 L 13 7'/></svg>") no-repeat center / contain;
  pointer-events: none;
}

/* 6. DARK: os ornamentos usam --ink-faint com opacidade baixa e somem no escuro.
   Subimos a opacidade p/ ~0.10 pra continuarem sutilmente visiveis no tema escuro. */
[data-theme="dark"] .modal-box::before,
[data-theme="dark"] .main::after,
[data-theme="dark"] .main::before,
[data-theme="dark"] .sv-head::after,
[data-theme="dark"] .sv-head::before,
[data-theme="dark"] .basecard::after,
[data-theme="dark"] .topbar::before { opacity: 0.10; }

/* ============================================================
   CLUB-CARD (vitrine estilo Netflix, canonico). Componente unico
   pros 3 painels (admin, terapeuta, consultante). Monocromatico:
   capa em grayscale, veu escuro na base, texto claro sobreposto.

   Estrutura HTML esperada:
   <a class="club-card" href="...">            (ou .locked no fim)
     <div class="club-card-media" style="background-image:url(CAPA)"></div>
     <div class="club-card-veil"></div>
     <span class="club-card-tag">STATUS</span>   (opcional, slot de status)
     <div class="club-card-body">
       <div class="club-card-title">Titulo</div>
       <div class="club-card-meta">Meta / duracao</div>
     </div>
     <div class="club-card-lock">CADEADO</div>   (so aparece em .locked)
   </a>
   ============================================================ */
.club-card {
  position: relative; display: block; aspect-ratio: 4 / 5;
  border-radius: var(--radius-card); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  text-decoration: none; color: var(--coral-ink); isolation: isolate;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
a.club-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -20px var(--shadow-1); border-color: var(--ink-faint); }
.club-card-media {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.02);
  transition: transform 0.4s var(--ease), filter 0.2s var(--ease);
}
a.club-card:hover .club-card-media { transform: scale(1.05); }
.club-card-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: oklch(0 0 0 / 0.55);
}
.club-card-tag {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  font-family: var(--font-mono); font-size: 0.56rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--radius-pill);
  background: oklch(0 0 0 / 0.55); color: oklch(1 0 0 / 0.95);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.club-card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px 16px 15px; }
.club-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; line-height: 1.16; color: oklch(1 0 0 / 0.98); }
.club-card-meta { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; color: oklch(1 0 0 / 0.72); margin-top: 5px; }
/* estado bloqueado: escurece a capa e mostra o cadeado central */
.club-card.locked .club-card-media { filter: grayscale(1) brightness(0.5); }
.club-card.locked { opacity: 0.78; }
.club-card-lock { display: none; }
.club-card.locked .club-card-lock {
  position: absolute; inset: 0; z-index: 3; display: flex;
  align-items: center; justify-content: center;
  font-size: 1.6rem; color: oklch(1 0 0 / 0.92);
  text-shadow: 0 2px 10px oklch(0 0 0 / 0.6);
}


/* ============ RETHEME LUZ DA SERRA (identidade oficial, 2026-07-08) ============ */
.brand-logo { height: 36px; width: auto; display: block; flex-shrink: 0; }
.aside-brand { gap: 5px; }
.aside-brand .mark { display: inline-flex; align-items: center; }
.auth-aside .brand-row { align-items: center; }
.auth-aside .brand-row .brand-logo { height: 48px; }
.auth-card .auth-mobile-brand { align-items: center; }
.auth-card .auth-mobile-brand .brand-logo { height: 40px; }
.pub-nav .mark { display: inline-flex; align-items: center; }
.pub-nav .mark .brand-logo { height: 30px; }
[data-theme="dark"] .brand-logo { background: #f5f5f5; padding: 5px 9px; border-radius: 9px; }

/* lotus, marcador fino de secao (usa a cor coral do rotulo) */
.sv-head .eyebrow::before,
.basecard .blabel::before {
  content: ""; width: 15px; height: 15px; flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--lotus-mask) center / contain no-repeat;
  mask: var(--lotus-mask) center / contain no-repeat;
}

/* constelacao / rede neural, motivo decorativo no painel de autenticacao */
.auth-aside { position: relative; overflow: hidden; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside::after {
  content: ""; position: absolute; top: -34px; right: -34px;
  width: 280px; height: 280px; z-index: 0; pointer-events: none; opacity: 0.42;
  background-color: var(--coral);
  -webkit-mask: var(--constellation) center / contain no-repeat;
  mask: var(--constellation) center / contain no-repeat;
}

/* ===== FIX CONTRASTE DARK — modal de análise do Instagram (section[data-view="fr_instagram"]) =====
   Bug (ordem do Chefe): no MODO ESCURO, caixas com fundo claro hardcoded (--igx-*-soft, tom creme)
   herdavam a cor de texto do tema dark (--ink ≈ #f5f5f5), resultando em TEXTO CLARO sobre CAIXA CLARA
   — o texto do corpo sumia. Evidência: .igx-fact.hook/estr/cta/why com contraste ≈ 1.0.
   Correção (SÓ cor, sem tocar estrutura/conteúdo — modal congelado): mantém a caixa clara para
   preservar o código de cor semântico (coral=hook, sage=fortes, amber=cta, lavanda=por quê) e força
   o texto do corpo para a tinta escura do sistema (#3b342e = --ink do tema claro), igual ao modo claro.
   Contraste resultante ≈ 10:1 (AA/AAA). Os rótulos <b> já têm cor de família escura própria. */
[data-theme="dark"] section[data-view="fr_instagram"] .igx-fact { color: #3b342e; }
[data-theme="dark"] section[data-view="fr_instagram"] .igx-fact li { color: #3b342e; }
[data-theme="dark"] section[data-view="fr_instagram"] .igx-fact ul { color: #3b342e; }
/* diagnóstico (bem/trava): a caixa clara herdava --ink claro no container; os filhos .it/h3 já têm
   cor escura própria, mas garantimos que QUALQUER texto direto do container também fique escuro. */
[data-theme="dark"] section[data-view="fr_instagram"] .igx-diagcol { color: #3b342e; }


/* ===== LOGO TERAP.IA — marca oficial na sidebar (troca por tema, 2026-07-09) ===== */
.aside-brand .mark.aside-logo { display: block; }
.aside-logo picture { display: block; line-height: 0; }
.aside-logo .logo-img { height: 46px; width: auto; display: block; }
.aside-logo .logo-dark { display: none; }
[data-theme="dark"] .aside-logo .logo-light { display: none; }
[data-theme="dark"] .aside-logo .logo-dark { display: block; }

/* ============ MOBILE IMPECAVEL 2026-07-09 ============ */
/* Correcoes de mobile: anti-zoom iOS, alvos de toque, dvh, colapso de grids, legibilidade.
   Bloco ADITIVO — segue o padrao de patch do projeto. Fundo sempre cor solida. */

/* 3+4+7 — fallback dvh de altura de viewport (vh primeiro p/ browsers antigos; dvh depois
   p/ Safari com barra dinamica nao cortar o rodape). Re-declaracao aditiva das regras originais. */
body { min-height: 100vh; min-height: 100dvh; }
.shell { min-height: 100vh; min-height: 100dvh; }
.aside { height: 100vh; height: 100dvh; }
.auth-view { min-height: 100vh; min-height: 100dvh; }
.modal-box { max-height: calc(100vh - clamp(32px, 10vh, 112px)); max-height: calc(100dvh - clamp(32px, 10vh, 112px)); }

/* 2 — alvo de toque do fechar-modal >=44x44 (glifo mantem 1.2rem; cresce so a area clicavel) */
.modal-box .modal-x { width: 44px; height: 44px; top: 12px; right: 12px; }

@media (max-width: 768px) {
  /* 1 (P0) — anti-zoom iOS: input/select/textarea >=16px; !important vence os <style> inline dos paineis */
  input, select, textarea { font-size: 16px !important; }
  /* 7 — .auth-main (min-height so existe no @media 860) tambem ganha fallback dvh */
  .auth-main { min-height: 100vh; min-height: 100dvh; }
  /* 6 — legibilidade: flags/tags minusculas sobem p/ >=0.62rem (nowrap preservado, sem quebra) */
  .sysnav-flag { font-size: 0.62rem; }
  .t-tag { font-size: 0.62rem; }
}

@media (max-width: 480px) {
  /* 5 — grids 1fr 1fr colapsam p/ 1 coluna em telas estreitas */
  .role-pick { grid-template-columns: 1fr; }
  .pf-row { grid-template-columns: 1fr; }
}

/* ---- MOBILE IMPECAVEL — RODADA 2 (alvos de toque >=44px) 2026-07-09 ---- */
/* QA 360 combos: PT/EN 32-36x28, .lst-theme 30x30, .logout 34x34, ☰ 42x42,
   links do switch-line 19px. Tudo aqui e ADITIVO, so em <=768px. */
@media (max-width: 768px) {
  /* grupo de controles (aside-foot, pub-nav e .floating) padronizado em 44px —
     crescer de verdade e obrigatorio: .lst-lang tem overflow:hidden, entao
     hit-area via pseudo-elemento seria CLIPADA (nao recebe toque). O flex
     com align-items:center mantem o grupo alinhado. */
  .lst-lang button { min-height: 44px; min-width: 44px; padding: 5px 12px; }
  .lst-theme { width: 44px; height: 44px; }
  .acct .logout { width: 44px; height: 44px; }
  .drawer-trigger { width: 44px; height: 44px; }
  /* versao flutuante das paginas publicas: container encolhe o padding pra
     nao virar um paredao no topo; filhos ja crescem pelas regras acima */
  .lst-controls.floating { padding: 4px 6px; }
  /* links Criar conta/Entrar (login/signup): hit-area por padding + margem
     negativa equivalente — alvo 45px de altura SEM mexer no visual/fluxo */
  .auth-card .switch-line a { display: inline-block; padding: 13px 8px; margin: -13px -8px; }
}

/* ---- MOBILE IMPECAVEL — RODADA 3 (residuais paginas publicas) 2026-07-09 ---- */
/* QA after: logo .pub-nav .mark 46-49x30; botoes .btn.sm 38px (Entrar,
   ← Marketplace, #mkApply, #mkClear). Regras vivem AQUI no app.css
   (HTMLs nao tem override) — bloco aditivo, so <=768px. */
@media (max-width: 768px) {
  /* logo do header publico: hit-area por padding + margem negativa
     equivalente — alvo 30+16=46px sem crescer o header visualmente.
     (.pub-nav nao tem overflow, entao a area acolchoada recebe toque) */
  .pub-nav .mark { padding: 8px 0; margin: -8px 0; }
  /* todos os .btn.sm (Entrar, ← Marketplace, Filtrar/#mkApply,
     Limpar/#mkClear, paginacao) sobem de 38 pra 44px de alvo */
  .btn.sm { min-height: 44px; }
}

/* ---- RODADA 3b: conserto de overflow 3px no /t/ em 390px ---- */
/* Os controles de 44px (rodada 2) alargaram o grupo .pub-nav-right; no /t/
   (logo + ← Marketplace + PT/EN + tema) estourou 3px. Aperta os gaps do
   grupo em telas estreitas SEM reduzir nenhum alvo de toque. */
@media (max-width: 480px) {
  .pub-nav-right { gap: 8px; }
  .pub-nav-right .lst-controls { gap: 6px; }
}

/* ---- RODADA 3c: /t/ em <=420px — nav embrulha em 2 linhas ---- */
/* Com os alvos de 44px, o header do /t/ (logo + ← Marketplace + PT/EN/tema)
   nao cabe em 360-400px (25px de estouro medido em 360). Encolher alvo e
   proibido; a saida certa e wrap: controles descem pra 2a linha, alinhados
   a direita. Nenhum alvo reduzido. */
@media (max-width: 420px) {
  .pub-nav { flex-wrap: wrap; row-gap: 4px; }
  .pub-nav-right { margin-left: auto; }
}

/* ---- MOBILE IMPECAVEL — RODADA 4 (P0 visual /t/) 2026-07-09 ---- */
/* Auditoria humana 390px: o card .pub-cta (sticky bottom, app.css:352) e alto
   no mobile e COBRE o curriculo enquanto gruda. Em <=768px ele sai do sticky
   e entra no fluxo LOGO APOS o cabecalho do perfil (via order; #pubRoot so
   existe no /t/ — .pub-wrap do marketplace nao e afetado). Desktop inalterado. */
@media (max-width: 768px) {
  #pubRoot { display: flex; flex-direction: column; }
  #pubRoot .pub-head { order: -2; }
  #pubRoot .pub-cta { position: static; order: -1; margin-bottom: 28px; }
}
