/* ─────────────────────────────────────────────────────────────────────────────
   portal-kit.css — Sistema visual do Portal Cliente (paleta AURA)
   Escopo isolado em `body.portal-mode`. Não afeta o app do operador.
   Paleta: bege creme + dourado champagne + navy escuro.
   ───────────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Cormorant+Garamond:wght@500;600;700&display=swap');

/* ── Esconder shell do operador no modo portal ────────────────────────────── */
body.portal-mode .top-bar,
body.portal-mode .page-header-block,
body.portal-mode .btn-menu-toggle,
body.portal-mode #sidebar,
body.portal-mode #bottom-nav { display: none !important; }
body.portal-mode #main-content {
  margin-left: 0 !important;
  padding-left: 0 !important;
  padding-top: 0 !important;
}
body.portal-mode { background: var(--ph-bg); }

/* ═══ TOKENS ═══════════════════════════════════════════════════════════════ */
.portal-mode {
  --ph-bg:           #F8F5F0;     /* Background */
  --ph-bg-2:         #F1ECE0;     /* Bege escurecido (sidebar/skeleton) */
  --ph-card:         #FFFFFF;     /* Surface */
  --ph-sidebar:      #F1ECE0;

  --ph-gold:         #C8A96A;     /* Primary */
  --ph-gold-dark:    #A8843E;     /* Primary Dark */
  --ph-gold-soft:    #E7D3A3;     /* Primary Light */
  --ph-gold-light:   #F2E5BF;     /* Tom suave para fundos */
  --ph-gold-grad:    linear-gradient(135deg, #C8A96A 0%, #A8843E 100%);

  --ph-navy:         #2B2B2B;     /* Text Primary (charcoal) */
  --ph-navy-2:       #3D3D3D;
  --ph-navy-soft:    #555555;
  --ph-navy-grad:    linear-gradient(135deg, #3D3D3D 0%, #1F1F1F 100%);

  --ph-fg-1:         #2B2B2B;     /* Text Primary */
  --ph-fg-2:         #6B6B6B;     /* Text Secondary */
  --ph-fg-3:         #8E8E8E;
  --ph-fg-4:         #B5B5B5;

  --ph-border:       #E5E0D8;     /* Border */
  --ph-border-soft:  #F1ECE0;

  --ph-rose:         #C9A96A;     /* avatar default */
  --ph-success:      #2E7D32;
  --ph-success-bg:   #E8F0E8;
  --ph-danger:       #C62828;
  --ph-danger-bg:    #FAEAE9;
  --ph-warning:      #ED6C02;
  --ph-warning-bg:   #FBF1E1;

  --ph-radius:       16px;        /* Cards */
  --ph-radius-lg:    20px;
  --ph-radius-btn:   10px;        /* Buttons */
  --ph-radius-input: 8px;         /* Inputs */
  --ph-shadow-sm:    0 1px 2px rgba(43,43,43,.04), 0 1px 3px rgba(43,43,43,.05);
  --ph-shadow:       0 4px 12px rgba(43,43,43,.05);
  --ph-shadow-lg:    0 12px 32px rgba(43,43,43,.10), 0 4px 8px rgba(43,43,43,.06);

  /* Tipografia híbrida: serif só em hero, Inter no resto */
  --ph-font:         'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ph-font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --ph-font-serif:   var(--ph-font-display); /* alias legacy — usado em poucos hero */

  font-family: var(--ph-font);
}
body.portal-mode { font-family: var(--ph-font, system-ui, -apple-system, sans-serif); }

/* ═══ APP SHELL ════════════════════════════════════════════════════════════ */
.portal-mode .ph-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--ph-bg);
}

/* Sidebar desktop */
.portal-mode .ph-sidebar {
  background: var(--ph-sidebar);
  border-right: 1px solid var(--ph-border);
  padding: 1.25rem 0 .85rem;
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  align-self: start;
}

.portal-mode .ph-logo {
  font-family: var(--ph-font-serif);
  font-size: 1.45rem; font-weight: 600;
  color: var(--ph-navy);
  letter-spacing: .15em;
  text-align: center;
  padding: .25rem 1rem 1rem;
  border-bottom: 1px solid var(--ph-border);
  margin-bottom: .65rem;
  flex-shrink: 0;
}
.portal-mode .ph-logo-sub {
  display: block; font-size: .55rem; letter-spacing: .35em;
  color: var(--ph-gold); margin-top: -.15rem; font-family: inherit;
}

.portal-mode .ph-nav-list {
  display: flex; flex-direction: column; gap: 1px;
  padding: 0 .75rem;
  flex: 1;
}
.portal-mode .ph-nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .8rem; border-radius: 9px; cursor: pointer;
  font-size: .86rem; font-weight: 500; color: var(--ph-fg-2);
  background: none; border: 0; text-align: left; width: 100%;
  transition: background .15s, color .15s;
  font-family: inherit;
  flex-shrink: 0;
}
.portal-mode .ph-nav-item:hover { background: rgba(201,169,97,.08); color: var(--ph-navy); }
.portal-mode .ph-nav-item.active {
  background: var(--ph-card); color: var(--ph-navy);
  font-weight: 700;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-nav-item.active .ph-nav-ic {
  background: var(--ph-gold-grad); color: #fff;
  box-shadow: 0 4px 10px rgba(201,169,97,.3);
}
.portal-mode .ph-nav-ic {
  width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(31,44,68,.06); color: var(--ph-navy);
  font-size: .92rem;
  flex-shrink: 0;
  transition: all .15s;
}

.portal-mode .ph-sidebar-foot {
  padding: .65rem .75rem .35rem;
  border-top: 1px solid var(--ph-border);
  margin-top: .5rem;
  display: flex; flex-direction: column; gap: .55rem;
  flex-shrink: 0;
}
.portal-mode .ph-logout-btn {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem .9rem; width: 100%;
  background: none; border: 1.5px solid var(--ph-border);
  border-radius: 10px; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--ph-fg-2);
  font-family: inherit; transition: all .15s;
}
.portal-mode .ph-logout-btn:hover {
  background: var(--ph-card);
  border-color: var(--ph-fg-3);
  color: var(--ph-navy);
}

/* ──── Sprint visual 1 — Sidebar premium ──────────────────────── */
.portal-mode .ph-side-user {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: 12px;
  padding: .65rem .75rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.portal-mode .ph-side-user-row {
  display: flex; align-items: center; gap: .55rem;
}
.portal-mode .ph-side-user-meta { flex: 1; min-width: 0; }
.portal-mode .ph-side-user-nm {
  font-size: .85rem; font-weight: 700; color: var(--ph-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.portal-mode .ph-side-user-link {
  background: none; border: 0; padding: 0;
  font-size: .72rem; color: var(--ph-gold-dark, #A8843E);
  font-weight: 600; cursor: pointer; font-family: inherit;
  text-decoration: none; margin-top: .1rem;
}
.portal-mode .ph-side-user-link:hover { text-decoration: underline; }
.portal-mode .ph-side-logout {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .4rem .75rem; background: var(--ph-bg-2, #F1ECE0);
  border: 1px solid var(--ph-border); border-radius: 8px;
  font-size: .78rem; font-weight: 600; color: var(--ph-fg-2);
  font-family: inherit; cursor: pointer; transition: all .15s;
}
.portal-mode .ph-side-logout:hover {
  background: var(--ph-card); color: var(--ph-navy);
  border-color: var(--ph-gold, #C8A96A);
}

.portal-mode .ph-side-help {
  background: linear-gradient(135deg, rgba(200,169,106,.18), rgba(168,132,62,.10));
  border: 1px solid var(--ph-gold-soft, #E7D3A3);
  border-radius: 12px; padding: .75rem .8rem;
  margin-top: .85rem;
}
.portal-mode .ph-side-help-h {
  font-family: var(--ph-font-display, Georgia, serif);
  font-size: .92rem; font-weight: 700; color: var(--ph-navy);
  margin-bottom: .15rem;
}
.portal-mode .ph-side-help-s {
  font-size: .7rem; color: var(--ph-fg-3);
  line-height: 1.4; margin-bottom: .55rem;
}
.portal-mode .ph-side-help-btn {
  display: flex; align-items: center; justify-content: center; gap: .35rem;
  width: 100%; padding: .45rem .7rem;
  background: #25D366; color: #fff; border: 0; border-radius: 8px;
  font-size: .75rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: filter .15s;
}
.portal-mode .ph-side-help-btn:hover { filter: brightness(.95); }

/* ──── Sprint visual 1 — 4 Stat cards ─────────────────────────── */
.portal-mode .ph-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .85rem; margin-bottom: 1.5rem;
}
.portal-mode .ph-stat-card {
  display: flex; flex-direction: column; gap: .65rem;
  background: var(--ph-card); border: 1px solid var(--ph-border);
  border-radius: 16px; padding: 1.1rem 1rem;
  cursor: pointer; transition: all .18s; text-align: left;
  font-family: inherit;
}
.portal-mode .ph-stat-card:hover {
  border-color: var(--ph-gold, #C8A96A);
  box-shadow: 0 4px 16px rgba(200,169,106,.15);
  transform: translateY(-1px);
}
.portal-mode .ph-stat-hd {
  display: flex; align-items: center; gap: .5rem;
}
.portal-mode .ph-stat-ic {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--ph-gold-light, #F2E5BF);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.portal-mode .ph-stat-lb {
  font-size: .76rem; font-weight: 700;
  color: var(--ph-fg-3); text-transform: uppercase; letter-spacing: .04em;
}
.portal-mode .ph-stat-bd { display: flex; flex-direction: column; gap: .2rem; }
.portal-mode .ph-stat-vl {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.65rem; font-weight: 700; color: var(--ph-gold-dark, #A8843E);
  line-height: 1.1;
}
.portal-mode .ph-stat-vl-sm {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.05rem; font-weight: 700; color: var(--ph-navy);
  line-height: 1.2;
}
.portal-mode .ph-stat-vl.is-danger { color: var(--ph-danger, #C62828); }
.portal-mode .ph-stat-vl.is-success { color: var(--ph-success, #2E7D32); }
.portal-mode .ph-stat-sub {
  font-size: .82rem; font-weight: 600; color: var(--ph-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portal-mode .ph-stat-foot {
  font-size: .74rem; color: var(--ph-fg-3); line-height: 1.4;
}

@media (max-width: 1280px) {
  .portal-mode .ph-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .portal-mode .ph-stat-grid { gap: .65rem; }
}

/* ──── Sprint visual 1 — Footer features ─────────────────────── */
.portal-mode .ph-foot-feats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; padding: 1.5rem 1.5rem;
  border-top: 1px solid var(--ph-border);
  background: var(--ph-bg, #F8F5F0);
  margin-top: 1rem;
}
.portal-mode .ph-foot-feat {
  display: flex; align-items: center; gap: .75rem;
}
.portal-mode .ph-foot-feat-ic {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--ph-gold-light, #F2E5BF);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.portal-mode .ph-foot-feat-tx { min-width: 0; }
.portal-mode .ph-foot-feat-h {
  font-size: .88rem; font-weight: 700; color: var(--ph-navy);
  line-height: 1.2;
}
.portal-mode .ph-foot-feat-s {
  font-size: .74rem; color: var(--ph-fg-3); line-height: 1.4; margin-top: .1rem;
}
@media (max-width: 1024px) {
  .portal-mode .ph-foot-feats { display: none; }
}

/* ──── Sprint visual 1 (final) — Avatar profissional no stat card ─── */
.portal-mode .ph-stat-row-with-av {
  display: flex; align-items: center; gap: .85rem;
}
.portal-mode .ph-stat-row-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.portal-mode .ph-stat-row-av {
  flex-shrink: 0;
  width: 48px; height: 48px;
}
.portal-mode .ph-stat-row-av img {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ph-gold-soft, #E7D3A3);
}

/* ──── Card "Próximo agendamento" — chip de data + linha do profissional ─── */
.portal-mode .ph-prox-mini { display: flex; align-items: center; gap: .7rem; }
.portal-mode .ph-prox-mini-date {
  flex-shrink: 0; width: 50px; padding: .42rem 0;
  border-radius: 12px; text-align: center; line-height: 1;
  background: linear-gradient(150deg, var(--ph-gold, #C8A96A), var(--ph-gold-dark, #A8843E));
  color: #fff; box-shadow: 0 4px 12px rgba(168,132,62,.25);
}
.portal-mode .ph-prox-mini-day {
  display: block; font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.5rem; font-weight: 800;
}
.portal-mode .ph-prox-mini-mon {
  display: block; font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; margin-top: .12rem; opacity: .95;
}
.portal-mode .ph-prox-mini-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .18rem; }
.portal-mode .ph-prox-mini-when {
  font-size: .8rem; color: var(--ph-fg-3); text-transform: capitalize;
}
.portal-mode .ph-prox-mini-when strong {
  font-family: 'Inter', -apple-system, sans-serif; color: var(--ph-navy); font-weight: 700;
}
.portal-mode .ph-prox-mini-svc {
  font-size: .88rem; font-weight: 700; color: var(--ph-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portal-mode .ph-prox-mini-prof {
  display: flex; align-items: center; gap: .35rem;
  font-size: .74rem; color: var(--ph-fg-3); min-width: 0;
}
.portal-mode .ph-prox-mini-prof span:last-child {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portal-mode .ph-prox-mini-prof img,
.portal-mode .ph-prox-mini-av {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.portal-mode .ph-prox-mini-av {
  display: flex; align-items: center; justify-content: center;
  background: var(--ph-gold-light, #F2E5BF); color: var(--ph-gold-dark, #A8843E);
  font-size: .62rem; font-weight: 700;
}

/* Mobile: sem chip de data; conteúdo empilhado com o profissional embaixo */
@media (max-width: 768px) {
  .portal-mode .ph-prox-mini-date { display: none; }
  .portal-mode .ph-prox-mini { gap: 0; }
  .portal-mode .ph-prox-mini-prof { margin-top: .1rem; }
}

/* ──── Sprint visual 1 (final) — Banner promocional com imagem ──── */
.portal-mode .ph-promo-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: all .18s;
}
.portal-mode .ph-promo-card[data-act] { cursor: pointer; }
.portal-mode .ph-promo-card[data-act]:hover {
  border-color: var(--ph-gold, #C8A96A);
  box-shadow: 0 4px 16px rgba(200,169,106,.15);
  transform: translateY(-1px);
}
.portal-mode .ph-promo-img {
  width: 100%; height: 160px;
  background: var(--ph-gold-light, #F2E5BF);
  position: relative;
  overflow: hidden;
}
.portal-mode .ph-promo-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.portal-mode .ph-promo-img-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ph-gold-light, #F2E5BF), var(--ph-gold-soft, #E7D3A3));
  color: var(--ph-gold-dark, #A8843E);
}
.portal-mode .ph-promo-badge {
  position: absolute;
  top: 12px; right: 12px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ph-gold-dark, #A8843E);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(168,132,62,.4);
  border: 3px solid #fff;
}
.portal-mode .ph-promo-badge-vl {
  font-family: var(--ph-font-display, Georgia, serif);
  font-size: 1.4rem; font-weight: 800; line-height: 1;
}
.portal-mode .ph-promo-badge-lb {
  font-size: .62rem; font-weight: 800; letter-spacing: .12em;
  margin-top: .1rem;
}
.portal-mode .ph-promo-bd {
  padding: 1.15rem 1.1rem 1.25rem; flex: 1;
  display: flex; flex-direction: column; gap: .35rem;
}
.portal-mode .ph-promo-h {
  font-family: var(--ph-font-display, Georgia, serif);
  font-size: 1.25rem; font-weight: 700; color: var(--ph-navy);
  line-height: 1.2;
}
.portal-mode .ph-promo-s {
  font-size: .82rem; color: var(--ph-fg-3); line-height: 1.5;
  margin-bottom: .35rem;
}
.portal-mode .ph-promo-cta {
  margin-top: auto;
  padding: .55rem 1rem;
  background: var(--ph-gold-dark, #A8843E);
  color: #fff; border: 0; border-radius: 999px;
  font-size: .82rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  align-self: flex-start;
  transition: filter .15s;
}
.portal-mode .ph-promo-cta:hover { filter: brightness(.95); }

/* ──── Sprint visual 1 (final) — Ações rápidas ─────────────────── */
.portal-mode .ph-quick-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: 16px;
  padding: 1.1rem 1.1rem 1rem;
}
.portal-mode .ph-quick-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.05rem; font-weight: 700; color: var(--ph-navy);
  margin-bottom: .85rem;
}
.portal-mode .ph-quick-list {
  display: flex; flex-direction: column;
}
.portal-mode .ph-quick-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .15rem;
  background: none; border: 0;
  border-bottom: 1px solid var(--ph-border);
  cursor: pointer; font-family: inherit; text-align: left;
  transition: background .12s;
}
.portal-mode .ph-quick-item:last-child { border-bottom: 0; }
.portal-mode .ph-quick-item:hover { background: var(--ph-bg-2, #F4EFE6); }
.portal-mode .ph-quick-ic {
  font-size: 1rem; color: var(--ph-gold-dark, #A8843E);
  flex-shrink: 0; width: 22px; text-align: center;
}
.portal-mode .ph-quick-lb {
  flex: 1; font-size: .85rem; color: var(--ph-navy); font-weight: 500;
}
.portal-mode .ph-quick-arr {
  color: var(--ph-fg-3); font-size: 1.1rem; font-weight: 600;
}

/* Mobile responsivo: hero-grid empilhado, esconder ações rápidas (já há bottom-nav) */
@media (max-width: 1024px) {
  .portal-mode .ph-hero-grid {
    grid-template-columns: 1fr !important;
  }
  .portal-mode .ph-quick-card { display: none; }
}

/* Main area */
.portal-mode .ph-main {
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* Header desktop */
.portal-mode .ph-desk-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem 1rem;
  background: var(--ph-bg);
}
.portal-mode .ph-desk-title {
  font-family: var(--ph-font-serif);
  font-size: 1.6rem; font-weight: 600;
  color: var(--ph-navy); letter-spacing: -.01em;
}
.portal-mode .ph-desk-title b { color: var(--ph-gold); font-weight: 700; }
.portal-mode .ph-desk-actions {
  display: flex; align-items: center; gap: .5rem;
}
.portal-mode .ph-desk-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ph-card); border: 1px solid var(--ph-border);
  cursor: pointer; font-size: 1rem; color: var(--ph-navy);
  transition: all .15s; position: relative;
}
.portal-mode .ph-desk-btn:hover { box-shadow: var(--ph-shadow-sm); transform: translateY(-1px); }
.portal-mode .ph-desk-btn-badge {
  position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: var(--ph-danger, #C62828);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 800;
  font-family: 'Inter', -apple-system, sans-serif;
  border: 1.5px solid var(--ph-bg, #F8F5F0);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* Header mobile (oculto desktop) */
.portal-mode .ph-mob-head { display: none; }
.portal-mode .ph-bnav    { display: none; }
.portal-mode .ph-drawer-overlay { display: none; }
.portal-mode .ph-drawer  { display: none; }

/* Body */
.portal-mode .ph-body {
  flex: 1;
  padding: 0 2rem 2rem;
}

/* ═══ COMPONENTES BASE ═════════════════════════════════════════════════════ */
.portal-mode .ph-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.25rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-card-lg { border-radius: var(--ph-radius-lg); padding: 1.5rem; }

.portal-mode .ph-card-hd {
  background: var(--ph-gold-grad);
  color: var(--ph-navy);
  font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .65rem 1.25rem;
  border-radius: var(--ph-radius) var(--ph-radius) 0 0;
}
.portal-mode .ph-card-hd + .ph-card-bd {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-top: 0;
  border-radius: 0 0 var(--ph-radius) var(--ph-radius);
  padding: 1.25rem;
}

/* Botões */
.portal-mode .ph-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .7rem 1.25rem;
  border-radius: 10px; border: 0; cursor: pointer;
  font-size: .88rem; font-weight: 600;
  font-family: inherit; transition: all .15s;
  text-decoration: none;
}
.portal-mode .ph-btn-primary {
  background: var(--ph-navy); color: #fff;
}
.portal-mode .ph-btn-primary:hover { background: var(--ph-navy-soft); transform: translateY(-1px); box-shadow: var(--ph-shadow); }
.portal-mode .ph-btn-gold {
  background: var(--ph-gold-grad); color: var(--ph-navy);
  box-shadow: 0 4px 14px rgba(201,169,97,.25);
}
.portal-mode .ph-btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201,169,97,.35); }
.portal-mode .ph-btn-outline {
  background: var(--ph-card); color: var(--ph-navy);
  border: 1.5px solid var(--ph-border);
}
.portal-mode .ph-btn-outline:hover { border-color: var(--ph-navy); }
.portal-mode .ph-btn-ghost {
  background: transparent; color: var(--ph-fg-2);
}
.portal-mode .ph-btn-ghost:hover { background: rgba(31,44,68,.05); }
.portal-mode .ph-btn-sm { padding: .45rem .9rem; font-size: .8rem; }
.portal-mode .ph-btn-lg { padding: .9rem 1.6rem; font-size: .95rem; }
.portal-mode .ph-btn-block { width: 100%; }
.portal-mode .ph-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Avatar */
.portal-mode .ph-av {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ph-rose); color: #fff;
  font-weight: 700; font-size: .9rem;
  border-radius: 50%; flex-shrink: 0;
  width: 38px; height: 38px;
  overflow: hidden;
}
.portal-mode .ph-av img { width: 100%; height: 100%; object-fit: cover; }
.portal-mode .ph-av-lg { width: 60px; height: 60px; font-size: 1.3rem; }
.portal-mode .ph-av-xl { width: 80px; height: 80px; font-size: 1.8rem; }

/* Badge */
.portal-mode .ph-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.portal-mode .ph-badge-gold    { background: var(--ph-gold-light); color: var(--ph-warning); }
.portal-mode .ph-badge-success { background: var(--ph-success-bg); color: var(--ph-success); }
.portal-mode .ph-badge-danger  { background: var(--ph-danger-bg);  color: var(--ph-danger); }
.portal-mode .ph-badge-info    { background: rgba(31,44,68,.08);   color: var(--ph-navy); }

/* Loading */
.portal-mode .ph-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1rem; color: var(--ph-fg-3);
}

/* ═══ DASHBOARD ═══════════════════════════════════════════════════════════ */

/* Hero (Próximo Atendimento + Banner promocional lado-a-lado) */
.portal-mode .ph-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Card Próximo Atendimento */
.portal-mode .ph-prox-atend {
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  overflow: hidden;
  background: var(--ph-card);
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-prox-atend-hd {
  background: var(--ph-gold-grad);
  padding: .55rem 1.1rem;
  font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ph-navy);
}
.portal-mode .ph-prox-atend-bd {
  padding: 1.1rem;
  display: flex; align-items: flex-start; gap: 1rem;
}
.portal-mode .ph-prox-date {
  background: var(--ph-bg-2);
  border-radius: 10px;
  padding: .45rem .65rem;
  text-align: center;
  min-width: 60px;
}
.portal-mode .ph-prox-date-d {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--ph-navy); line-height: 1;
}
.portal-mode .ph-prox-date-m {
  font-size: .65rem; color: var(--ph-fg-3);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600; margin-top: .15rem;
}
.portal-mode .ph-prox-info { flex: 1; min-width: 0; }
.portal-mode .ph-prox-time {
  font-size: 1.05rem; font-weight: 600; color: var(--ph-navy);
  font-family: 'Inter', -apple-system, sans-serif; line-height: 1.25;
}
.portal-mode .ph-prox-svc {
  font-weight: 600; color: var(--ph-navy); margin-top: .35rem; font-size: .92rem;
}
.portal-mode .ph-prox-prof {
  font-size: .78rem; color: var(--ph-fg-3); margin-top: .25rem;
}
.portal-mode .ph-prox-actions {
  display: flex; gap: .5rem; padding: 0 1.1rem 1.1rem;
}
.portal-mode .ph-prox-empty {
  padding: 1.5rem 1.1rem; text-align: center;
  color: var(--ph-fg-3); font-size: .88rem;
}

/* Card Agendar Agora */
.portal-mode .ph-agendar-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.1rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-agendar-title {
  font-weight: 700; color: var(--ph-navy); font-size: 1rem;
  margin-bottom: .8rem;
}
.portal-mode .ph-agendar-cta {
  background: var(--ph-navy);
  color: #fff;
  padding: .65rem .8rem;
  border-radius: 10px;
  font-weight: 700; font-size: .82rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: .8rem;
  transition: all .15s;
}
.portal-mode .ph-agendar-cta:hover { background: var(--ph-navy-soft); transform: translateY(-1px); }
.portal-mode .ph-agendar-pills {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
}
.portal-mode .ph-agendar-pill {
  background: var(--ph-bg-2);
  border-radius: 10px;
  padding: .65rem .35rem;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  border: 1.5px solid transparent;
}
.portal-mode .ph-agendar-pill:hover { border-color: var(--ph-gold); background: var(--ph-gold-light); }
.portal-mode .ph-agendar-pill-ic { font-size: 1.5rem; line-height: 1; }
.portal-mode .ph-agendar-pill-lb {
  font-size: .68rem; color: var(--ph-navy); font-weight: 600;
  margin-top: .35rem; text-transform: capitalize;
}

/* Card Status Financeiro */
.portal-mode .ph-status-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.1rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-status-title {
  font-weight: 700; color: var(--ph-navy); font-size: 1rem;
  margin-bottom: .8rem;
}
.portal-mode .ph-status-line {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--ph-border-soft);
}
.portal-mode .ph-status-line:last-child { border-bottom: 0; }
.portal-mode .ph-status-line-ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ph-gold-light); color: var(--ph-gold);
  font-size: .95rem; flex-shrink: 0;
}
.portal-mode .ph-status-line-tx { flex: 1; min-width: 0; }
.portal-mode .ph-status-line-lb {
  font-size: .7rem; color: var(--ph-fg-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.portal-mode .ph-status-line-vl {
  font-weight: 700; color: var(--ph-navy); font-size: .95rem; margin-top: .1rem;
}
.portal-mode .ph-status-line-sub {
  font-size: .68rem; color: var(--ph-fg-3);
}
.portal-mode .ph-status-line-link {
  display: block;
  font-size: .72rem; color: var(--ph-gold); font-weight: 700;
  text-decoration: underline; margin-top: .15rem;
  cursor: pointer; background: none; border: 0; padding: 0;
}

/* Greeting */
.portal-mode .ph-greet {
  margin-bottom: 1.5rem;
}
.portal-mode .ph-greet-h {
  font-family: var(--ph-font-serif);
  font-size: 1.8rem; font-weight: 600;
  color: var(--ph-navy); letter-spacing: -.01em;
}
.portal-mode .ph-greet-sub {
  font-size: .92rem; color: var(--ph-fg-3); margin-top: .15rem;
}

/* Section title */
.portal-mode .ph-sec {
  margin-top: 1.75rem;
  margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.portal-mode .ph-sec-t {
  font-family: var(--ph-font);
  font-size: 1.25rem; font-weight: 600;
  color: var(--ph-navy);
}
.portal-mode .ph-sec-link {
  font-size: .8rem; color: var(--ph-gold); font-weight: 700;
  text-decoration: none; cursor: pointer;
  background: none; border: 0; padding: 0; font-family: inherit;
}
.portal-mode .ph-sec-link:hover { text-decoration: underline; }

/* Linha do Tempo */
.portal-mode .ph-timeline {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.25rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-timeline-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
.portal-mode .ph-tl-item {
  display: flex; gap: .85rem; align-items: flex-start;
  position: relative;
  padding-left: .75rem;
}
.portal-mode .ph-tl-item::before {
  content: ''; position: absolute; left: 0; top: .35rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ph-gold);
}
.portal-mode .ph-tl-foto {
  width: 70px; height: 70px; border-radius: 10px;
  background: var(--ph-bg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: var(--ph-fg-4);
  flex-shrink: 0; overflow: hidden;
}
.portal-mode .ph-tl-foto img { width: 100%; height: 100%; object-fit: cover; }
.portal-mode .ph-tl-meta { flex: 1; min-width: 0; }
.portal-mode .ph-tl-date {
  font-size: .7rem; color: var(--ph-fg-3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: .15rem;
}
.portal-mode .ph-tl-svc { font-weight: 700; color: var(--ph-navy); font-size: .92rem; }
.portal-mode .ph-tl-prof { font-size: .75rem; color: var(--ph-fg-3); margin-top: .1rem; }
.portal-mode .ph-tl-stars {
  margin-top: .3rem; color: var(--ph-gold); font-size: .8rem; letter-spacing: 1px;
}

/* Destaques & Recomendações */
.portal-mode .ph-recs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.portal-mode .ph-rec {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.1rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-rec-title {
  font-weight: 700; color: var(--ph-navy); font-size: .95rem;
  margin-bottom: .35rem;
}
.portal-mode .ph-rec-text {
  font-size: .82rem; color: var(--ph-fg-2); line-height: 1.45;
}
.portal-mode .ph-rec-cta {
  margin-top: .7rem;
  font-size: .78rem; color: var(--ph-gold); font-weight: 700;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit;
}

/* Banner promocional */
.portal-mode .ph-banner {
  background: var(--ph-navy-grad);
  color: #fff;
  border-radius: var(--ph-radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--ph-shadow);
  position: relative; overflow: hidden;
}
.portal-mode .ph-banner::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,169,97,.25), transparent 70%);
  border-radius: 50%;
}
.portal-mode .ph-banner-tx { flex: 1; position: relative; z-index: 1; }
.portal-mode .ph-banner-h {
  font-family: var(--ph-font-serif);
  font-size: 1.6rem; font-weight: 600; line-height: 1.15;
}
.portal-mode .ph-banner-sub {
  font-size: .9rem; opacity: .85; margin-top: .35rem;
  max-width: 480px; line-height: 1.45;
}
.portal-mode .ph-banner-cta {
  background: var(--ph-gold-grad);
  color: var(--ph-navy);
  font-weight: 700;
  padding: .7rem 1.3rem; border-radius: 10px;
  border: 0; cursor: pointer; font-size: .9rem; font-family: inherit;
  white-space: nowrap;
  position: relative; z-index: 1;
  box-shadow: 0 4px 14px rgba(201,169,97,.35);
}
.portal-mode .ph-banner-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201,169,97,.5); }

/* Avaliação CTA */
.portal-mode .ph-avaliar-card {
  background: linear-gradient(135deg, var(--ph-gold-light) 0%, var(--ph-card) 100%);
  border: 1px solid var(--ph-gold-soft);
  border-radius: var(--ph-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.portal-mode .ph-avaliar-ic {
  font-size: 1.6rem; flex-shrink: 0;
}
.portal-mode .ph-avaliar-tx { flex: 1; }
.portal-mode .ph-avaliar-h { font-weight: 700; color: var(--ph-navy); font-size: .92rem; }
.portal-mode .ph-avaliar-sub { font-size: .78rem; color: var(--ph-fg-2); margin-top: .15rem; }

/* Modal de avaliação */
.portal-mode .ph-modal {
  display: none;
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(31,44,68,.5);
  align-items: center; justify-content: center;
  padding: 1.25rem;
  backdrop-filter: blur(2px);
}
.portal-mode .ph-modal.open { display: flex; }
.portal-mode .ph-modal-box {
  background: var(--ph-card);
  border-radius: var(--ph-radius-lg);
  width: 100%; max-width: 460px;
  box-shadow: var(--ph-shadow-lg);
  overflow: hidden;
}
.portal-mode .ph-modal-hd {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--ph-border);
}
.portal-mode .ph-modal-h {
  font-family: var(--ph-font-serif);
  font-size: 1.25rem; color: var(--ph-navy); font-weight: 600;
}
.portal-mode .ph-modal-bd { padding: 1.5rem; }
.portal-mode .ph-modal-ft {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ph-border);
  display: flex; gap: .6rem; justify-content: flex-end;
}
.portal-mode .ph-stars {
  display: flex; gap: .35rem; justify-content: center;
  margin: 1rem 0;
}
.portal-mode .ph-star-btn {
  background: none; border: 0; cursor: pointer;
  font-size: 2.2rem; color: var(--ph-border); padding: 0;
  transition: all .15s; font-family: inherit;
}
.portal-mode .ph-star-btn.on { color: var(--ph-gold); }
.portal-mode .ph-star-btn:hover { transform: scale(1.1); }

/* ═══ TELAS COMPLEMENTARES ═══════════════════════════════════════════════ */

/* Subhead (Pagar/Histórico/Pontos) */
.portal-mode .ph-subhd {
  margin-bottom: 1.25rem;
}
.portal-mode .ph-subhd-t {
  font-family: var(--ph-font);
  font-size: 1.5rem; color: var(--ph-navy); font-weight: 600;
}

/* Lista item genérico */
.portal-mode .ph-list {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  overflow: hidden;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-list-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--ph-border-soft);
}
.portal-mode .ph-list-item:last-child { border-bottom: 0; }
.portal-mode .ph-list-date {
  text-align: center; min-width: 50px; flex-shrink: 0;
}
.portal-mode .ph-list-date-d { font-family: var(--ph-font); font-size: 1.4rem; font-weight: 700; color: var(--ph-navy); line-height: 1; }
.portal-mode .ph-list-date-m { font-size: .65rem; color: var(--ph-fg-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.portal-mode .ph-list-meta { flex: 1; min-width: 0; }
.portal-mode .ph-list-svc { font-weight: 700; color: var(--ph-navy); font-size: .92rem; }
.portal-mode .ph-list-prof { font-size: .78rem; color: var(--ph-fg-3); margin-top: .1rem; }
.portal-mode .ph-list-val { font-weight: 700; color: var(--ph-navy); font-size: .95rem; text-align: right; flex-shrink: 0; }

.portal-mode .ph-empty {
  padding: 2.5rem 1.5rem; text-align: center;
  color: var(--ph-fg-3); font-size: .9rem;
}
.portal-mode .ph-empty-ic { font-size: 2.5rem; margin-bottom: .5rem; opacity: .7; }

/* Cupons */
.portal-mode .ph-cupom {
  background: var(--ph-card);
  border: 1.5px dashed var(--ph-gold-soft);
  border-radius: var(--ph-radius);
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: 1rem;
  position: relative;
}
.portal-mode .ph-cupom.usado { opacity: .55; border-style: solid; border-color: var(--ph-border); }
.portal-mode .ph-cupom-vl {
  background: var(--ph-gold-grad);
  color: var(--ph-navy);
  font-weight: 700;
  padding: .55rem .85rem; border-radius: 8px;
  font-size: 1.1rem;
  font-family: var(--ph-font-serif);
  flex-shrink: 0; min-width: 80px; text-align: center;
}
.portal-mode .ph-cupom-meta { flex: 1; min-width: 0; }
.portal-mode .ph-cupom-cd { font-weight: 700; color: var(--ph-navy); font-size: .95rem; letter-spacing: .04em; }
.portal-mode .ph-cupom-dc { font-size: .78rem; color: var(--ph-fg-2); margin-top: .15rem; }
.portal-mode .ph-cupom-ate { font-size: .7rem; color: var(--ph-fg-3); margin-top: .25rem; }

/* Tabs internas (Disponíveis/Utilizados, Resumo/Histórico) */
.portal-mode .ph-itabs {
  display: flex; gap: 4px;
  background: var(--ph-bg-2); border-radius: 10px;
  padding: 4px; margin-bottom: 1.25rem;
}
.portal-mode .ph-itab {
  flex: 1; padding: .55rem; cursor: pointer;
  background: none; border: 0; border-radius: 7px;
  font-size: .82rem; font-weight: 600; color: var(--ph-fg-2);
  font-family: inherit; transition: all .15s;
}
.portal-mode .ph-itab.active { background: var(--ph-card); color: var(--ph-navy); box-shadow: var(--ph-shadow-sm); }

/* Search row (Agendar) */
.portal-mode .ph-search-row {
  display: flex; gap: .5rem; align-items: center;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.portal-mode .ph-search {
  flex: 1; display: flex; align-items: center; gap: .5rem;
  background: var(--ph-card); border: 1px solid var(--ph-border);
  border-radius: 10px; padding: 0 .85rem;
  min-width: 200px;
}
.portal-mode .ph-search input {
  flex: 1; border: 0; outline: 0; padding: .7rem 0;
  background: transparent; color: var(--ph-navy);
  font-size: .9rem; font-family: inherit;
}

/* Stepper */
.portal-mode .ph-steps {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 1.25rem; padding: 0 .25rem;
  overflow-x: auto;
}
.portal-mode .ph-step {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600; color: var(--ph-fg-3);
  white-space: nowrap;
}
.portal-mode .ph-step-n {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ph-bg-2); color: var(--ph-fg-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; border: 1.5px solid var(--ph-border);
}
.portal-mode .ph-step.active { color: var(--ph-navy); }
.portal-mode .ph-step.active .ph-step-n {
  background: var(--ph-navy); color: #fff; border-color: var(--ph-navy);
}
.portal-mode .ph-step.done .ph-step-n {
  background: var(--ph-gold); color: var(--ph-navy); border-color: var(--ph-gold);
}
.portal-mode .ph-step-sep {
  width: 30px; height: 1px; background: var(--ph-border);
}

/* Grid de cards selecionáveis */
.portal-mode .ph-pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}
.portal-mode .ph-pick {
  background: var(--ph-card);
  border: 1.5px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1rem;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; gap: .85rem;
  text-align: left; font-family: inherit;
}
.portal-mode .ph-pick:hover { border-color: var(--ph-gold); transform: translateY(-1px); }
.portal-mode .ph-pick.sel {
  border-color: var(--ph-navy); background: rgba(31,44,68,.03);
  box-shadow: 0 0 0 3px rgba(31,44,68,.08);
}
.portal-mode .ph-pick-tick {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ph-navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
}
.portal-mode .ph-pick-meta { flex: 1; min-width: 0; }
.portal-mode .ph-pick-nm { font-weight: 700; color: var(--ph-navy); font-size: .92rem; }
.portal-mode .ph-pick-rl { font-size: .78rem; color: var(--ph-fg-3); margin-top: .1rem; }
.portal-mode .ph-pick-vl { font-size: .82rem; color: var(--ph-gold); font-weight: 700; margin-top: .15rem; }

/* Faixa de dias (passo data) */
.portal-mode .ph-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem;
  padding: .25rem 0 .5rem; margin-bottom: .85rem;
}
/* Mobile: 4 colunas (cards maiores que no layout de 7 col) */
@media (max-width: 768px) {
  .portal-mode .ph-days { grid-template-columns: repeat(4, 1fr); gap: .35rem; }
  .portal-mode .ph-day { padding: .5rem .25rem; }
  .portal-mode .ph-day-d { font-size: 1.15rem; }
  .portal-mode .ph-day-w,
  .portal-mode .ph-day-m { font-size: .6rem; letter-spacing: 0; }
}
.portal-mode .ph-days::-webkit-scrollbar { display: none; }
.portal-mode .ph-day {
  background: var(--ph-card); border: 1.5px solid var(--ph-border);
  border-radius: 10px;
  padding: .55rem .6rem;
  cursor: pointer;
  text-align: center; min-width: 0;
  font-family: inherit; transition: all .15s;
}
.portal-mode .ph-day:hover { border-color: var(--ph-gold); }
.portal-mode .ph-day.sel {
  background: var(--ph-navy); color: #fff; border-color: var(--ph-navy);
}
.portal-mode .ph-day.sel .ph-day-d,
.portal-mode .ph-day.sel .ph-day-w { color: #fff; }
.portal-mode .ph-day-w { font-size: .65rem; color: var(--ph-fg-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.portal-mode .ph-day-d { font-family: var(--ph-font); font-size: 1.25rem; font-weight: 700; color: var(--ph-navy); line-height: 1.2; }

/* Slots de horário */
.portal-mode .ph-slots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: .4rem;
}
.portal-mode .ph-slot {
  background: var(--ph-card); border: 1.5px solid var(--ph-border);
  border-radius: 8px;
  padding: .5rem .35rem;
  cursor: pointer;
  text-align: center; font-weight: 600; font-size: .85rem;
  color: var(--ph-navy); font-family: inherit; transition: all .15s;
}
.portal-mode .ph-slot:hover { border-color: var(--ph-gold); }
.portal-mode .ph-slot.sel {
  background: var(--ph-navy); color: #fff; border-color: var(--ph-navy);
}
.portal-mode .ph-slot.unavailable {
  opacity: .35; cursor: not-allowed;
  text-decoration: line-through;
}

/* Action bar (botões fixos no agendar) */
.portal-mode .ph-actbar {
  display: flex; gap: .5rem; align-items: center;
  background: var(--ph-card); border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: .65rem .75rem;
  margin-bottom: 1rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-actbar-title {
  flex: 1; font-weight: 600; color: var(--ph-fg-2); font-size: .85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Resumo financeiro / pagar */
.portal-mode .ph-fin-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-bottom: 1.25rem;
}
.portal-mode .ph-fin-stat {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-fin-stat-lb {
  font-size: .72rem; color: var(--ph-fg-3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.portal-mode .ph-fin-stat-vl {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--ph-navy); margin-top: .25rem;
}
.portal-mode .ph-fin-stat-vl.danger  { color: var(--ph-danger); }
.portal-mode .ph-fin-stat-vl.success { color: var(--ph-success); }

/* Pontos / Fidelidade */
.portal-mode .ph-pts-card {
  background: linear-gradient(135deg, var(--ph-gold-dark, #A8843E) 0%, var(--ph-gold, #C8A96A) 50%, var(--ph-gold-dark, #A8843E) 100%);
  color: #fff;
  border-radius: var(--ph-radius-lg);
  padding: 1.65rem 1.5rem;
  margin-bottom: 1.5rem;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(168, 132, 62, .25), 0 2px 6px rgba(0,0,0,.08);
  border: 2px solid rgba(255, 255, 255, .15);
}
.portal-mode .ph-pts-card::before {
  content: '✦'; position: absolute; right: -.4rem; top: -1.2rem;
  font-size: 9rem; color: rgba(255, 255, 255, .12);
  line-height: 1;
  font-family: serif;
}
.portal-mode .ph-pts-card::after {
  content: ''; position: absolute; left: -30%; bottom: -50%;
  width: 200%; height: 100%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.18) 0%, transparent 60%);
  pointer-events: none;
}
.portal-mode .ph-pts-lb {
  font-size: .72rem; opacity: .92;
  text-transform: uppercase; letter-spacing: .14em;
  font-weight: 700; color: #fff;
  position: relative; z-index: 1;
}
.portal-mode .ph-pts-vl {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 3.2rem; font-weight: 800; line-height: 1;
  margin: .45rem 0 .55rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
  position: relative; z-index: 1;
  letter-spacing: -.02em;
}
.portal-mode .ph-pts-sub {
  font-size: .85rem;
  opacity: .95;
  color: #fff;
  font-weight: 500;
  position: relative; z-index: 1;
}
.portal-mode .ph-pts-sub b {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 800;
}

/* ═══ MOBILE ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .portal-mode .ph-app { grid-template-columns: 1fr; }
  .portal-mode .ph-sidebar { display: none; }

  /* Header mobile */
  .portal-mode .ph-mob-head {
    display: flex !important;
    align-items: center; justify-content: space-between;
    padding: .75rem 1rem;
    background: var(--ph-card);
    border-bottom: 1px solid var(--ph-border);
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 200;
    height: 56px; box-sizing: border-box;
  }
  .portal-mode .ph-burger {
    background: none; border: 0; cursor: pointer;
    width: 38px; height: 38px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--ph-navy); font-size: 1.3rem;
  }
  .portal-mode .ph-burger:hover { background: var(--ph-bg-2); }
  .portal-mode .ph-mob-logo {
    font-family: var(--ph-font-serif);
    font-size: 1.3rem; font-weight: 600;
    color: var(--ph-navy); letter-spacing: .12em;
  }

  /* Esconder desk header */
  .portal-mode .ph-desk-head { display: none; }

  /* Compensar header fixo */
  .portal-mode .ph-main { padding-top: 56px; }
  .portal-mode .ph-body { padding: 1rem 1rem 5.5rem; }

  /* Bottom nav mobile */
  .portal-mode .ph-bnav {
    display: flex !important;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--ph-card);
    border-top: 1px solid var(--ph-border);
    z-index: 200;
    box-shadow: 0 -4px 16px rgba(31,44,68,.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .portal-mode .ph-bnav-btn {
    flex: 1; padding: .55rem .15rem .65rem;
    background: none; border: 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    color: var(--ph-fg-3);
    font-family: inherit;
    position: relative;
  }
  .portal-mode .ph-bnav-ic { font-size: 1.15rem; line-height: 1; }
  .portal-mode .ph-bnav-lb { font-size: .65rem; font-weight: 600; }
  .portal-mode .ph-bnav-btn.active { color: var(--ph-navy); }
  .portal-mode .ph-bnav-btn.active .ph-bnav-lb { font-weight: 800; }
  .portal-mode .ph-bnav-btn.active::after {
    content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 3px;
    background: var(--ph-gold); border-radius: 0 0 3px 3px;
  }

  /* Drawer (hamburger menu) */
  .portal-mode .ph-drawer-overlay {
    display: block !important;
    position: fixed; inset: 0; background: rgba(31,44,68,.5);
    z-index: 250; opacity: 0; pointer-events: none;
    transition: opacity .2s;
    backdrop-filter: blur(2px);
  }
  .portal-mode .ph-drawer-overlay.open { opacity: 1; pointer-events: auto; }
  .portal-mode .ph-drawer {
    display: flex !important; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 80%; max-width: 320px;
    background: var(--ph-card);
    z-index: 260;
    transform: translateX(-100%); transition: transform .25s ease-out;
    box-shadow: 4px 0 20px rgba(31,44,68,.15);
  }
  .portal-mode .ph-drawer.open { transform: translateX(0); }
  .portal-mode .ph-drawer-hd {
    padding: 1.5rem 1.25rem 1.25rem;
    background: var(--ph-bg-2);
    border-bottom: 1px solid var(--ph-border);
  }
  .portal-mode .ph-drawer-logo {
    font-family: var(--ph-font-serif);
    font-size: 1.5rem; font-weight: 600;
    color: var(--ph-navy); letter-spacing: .15em;
    text-align: center;
  }
  .portal-mode .ph-drawer-user {
    display: flex; align-items: center; gap: .75rem;
    padding-top: 1rem;
  }
  .portal-mode .ph-drawer-name { font-weight: 700; color: var(--ph-navy); font-size: .95rem; }
  .portal-mode .ph-drawer-email { font-size: .75rem; color: var(--ph-fg-3); }
  .portal-mode .ph-drawer-list { padding: 1rem .75rem; flex: 1; overflow-y: auto; }
  .portal-mode .ph-drawer-foot { padding: 1rem .75rem; border-top: 1px solid var(--ph-border); }

  /* Hero responsive */
  .portal-mode .ph-hero-grid { grid-template-columns: 1fr; }
  .portal-mode .ph-fin-grid { grid-template-columns: 1fr; gap: .75rem; }
  .portal-mode .ph-recs { grid-template-columns: 1fr; }
  .portal-mode .ph-timeline-grid { grid-template-columns: 1fr; }

  /* Banner responsive */
  .portal-mode .ph-banner { flex-direction: column; align-items: flex-start; }
  .portal-mode .ph-banner-h { font-size: 1.3rem; }
  .portal-mode .ph-banner-cta { width: 100%; }

  /* Header desktop infos no mobile (escondidas) */
  .portal-mode .ph-greet-h { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .portal-mode .ph-greet-h { font-size: 1.3rem; }
  .portal-mode .ph-prox-time { font-size: 1.1rem; }
  .portal-mode .ph-bnav-lb { font-size: .6rem; }
  .portal-mode .ph-bnav-btn { padding: .55rem .1rem .65rem; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   COMPATIBILIDADE LEGACY — classes usadas por _renderAgendar / _renderHistorico /
   _renderFinanceiro / _renderFidelidade / _renderPerfil / _renderMensagens.
   Reaproveita o visual AURA sem necessidade de reescrever os módulos JS.
   ═════════════════════════════════════════════════════════════════════════════ */

/* Wrappers gerais */
.portal-mode .ph-page { padding: 0; }
.portal-mode .ph-h2 {
  font-family: var(--ph-font);
  font-size: 1.5rem; font-weight: 600; color: var(--ph-navy);
  margin: 0 0 1rem;
}
.portal-mode .ph-h3 {
  font-family: var(--ph-font);
  font-size: 1.15rem; font-weight: 600; color: var(--ph-navy);
  margin: 1.25rem 0 .75rem;
}
.portal-mode .ph-sub {
  color: var(--ph-fg-3); font-size: .85rem;
}
.portal-mode .ph-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--ph-bg-2); color: var(--ph-fg-2);
  padding: .2rem .55rem; border-radius: 999px;
  font-size: .7rem; font-weight: 600;
}

/* Linhas/grids */
.portal-mode .ph-row {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 720px) { .portal-mode .ph-row { grid-template-columns: 2fr 1fr; } }
.portal-mode .ph-row-2 {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 720px) { .portal-mode .ph-row-2 { grid-template-columns: 1fr 1fr; } }

/* Card genérico (agendar/histórico/financeiro/etc) */
.portal-mode .ph-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  box-shadow: var(--ph-shadow-sm);
  overflow: hidden;
}
.portal-mode .ph-card .ph-card-hd {
  background: var(--ph-gold-grad);
  color: var(--ph-navy);
  font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .55rem 1.1rem;
  border-radius: 0;
}
.portal-mode .ph-card-body { padding: 1.1rem; }
.portal-mode .ph-card-t { font-weight: 700; color: var(--ph-navy); font-size: .95rem; }
.portal-mode .ph-card-meta { font-size: .78rem; color: var(--ph-fg-3); margin-top: .15rem; }
.portal-mode .ph-mono { font-variant-numeric: tabular-nums; font-weight: 700; }

/* CTA (botão grande "Agendar novo horário") */
.portal-mode .ph-cta {
  display: flex; align-items: center; gap: 1rem;
  width: 100%;
  background: var(--ph-card);
  border: 1.5px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer; font-family: inherit;
  text-align: left; transition: all .15s;
  margin-bottom: 1.25rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-cta:hover {
  border-color: var(--ph-gold); transform: translateY(-1px);
  box-shadow: var(--ph-shadow);
}
.portal-mode .ph-cta-ic {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--ph-gold-grad); color: var(--ph-navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(201,169,97,.3);
}
.portal-mode .ph-cta-meta { flex: 1; min-width: 0; }
.portal-mode .ph-cta-t { font-weight: 700; color: var(--ph-navy); font-size: 1rem; }
.portal-mode .ph-cta-s { font-size: .82rem; color: var(--ph-fg-3); margin-top: .15rem; }
.portal-mode .ph-cta-arr { font-size: 1.6rem; color: var(--ph-gold); flex-shrink: 0; font-weight: 300; }

/* Pendência (saldo aberto) — fica no Pagar agora se necessário */
.portal-mode .ph-pend {
  background: linear-gradient(135deg, var(--ph-danger-bg) 0%, var(--ph-card) 100%);
  border: 1px solid var(--ph-danger);
  border-radius: var(--ph-radius);
  padding: 1.1rem;
  display: flex; flex-direction: column; gap: .35rem;
  position: relative;
}
.portal-mode .ph-pend.ok {
  background: linear-gradient(135deg, var(--ph-success-bg) 0%, var(--ph-card) 100%);
  border-color: var(--ph-success);
}
.portal-mode .ph-pend-bell {
  position: absolute; top: .8rem; right: .9rem;
  background: var(--ph-danger); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.portal-mode .ph-pend-eye {
  font-size: .72rem; color: var(--ph-fg-3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.portal-mode .ph-pend-sub { font-size: .85rem; color: var(--ph-fg-2); }
.portal-mode .ph-pend-val {
  font-family: var(--ph-font);
  font-size: 1.6rem; font-weight: 700;
  color: var(--ph-navy); margin: .25rem 0;
}
.portal-mode .ph-pend.ok .ph-pend-val { color: var(--ph-success); }
.portal-mode .ph-pend-btn {
  margin-top: .5rem;
  padding: .55rem 1rem;
  background: var(--ph-danger); color: #fff;
  border: 0; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: .85rem; font-family: inherit;
  align-self: flex-start;
}

/* Próximo agendamento (carousel — usa _renderProxCard antigo) */
.portal-mode .ph-prox { background: transparent; border: 0; padding: 0; }
.portal-mode .ph-prox-eye {
  font-size: .72rem; color: var(--ph-fg-3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .5rem;
}
.portal-mode .ph-prox-when {
  font-weight: 700; color: var(--ph-navy); font-size: 1rem;
  margin-bottom: .25rem;
}
.portal-mode .ph-prox-pro { font-size: .82rem; color: var(--ph-fg-2); display: flex; gap: .5rem; align-items: center; }
.portal-mode .ph-prox-dots { display: flex; gap: .35rem; justify-content: center; margin: .5rem 0; }
.portal-mode .ph-prox-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ph-border);
  border: 0; cursor: pointer; padding: 0;
}
.portal-mode .ph-prox-dot.on { background: var(--ph-gold); }
.portal-mode .ph-prox-nav { display: flex; gap: .35rem; justify-content: center; margin-top: .5rem; }
.portal-mode .ph-prox-nav-btn {
  background: var(--ph-card); border: 1px solid var(--ph-border);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  color: var(--ph-navy); font-size: .9rem; font-family: inherit;
}

/* Sugestão */
.portal-mode .ph-sugest {
  background: var(--ph-gold-light);
  border: 1px solid var(--ph-gold-soft);
  border-radius: var(--ph-radius);
  padding: 1.1rem;
}
.portal-mode .ph-sugest-eye {
  font-weight: 700; color: var(--ph-warning); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem;
}
.portal-mode .ph-sugest-d { color: var(--ph-fg-2); font-size: .88rem; line-height: 1.45; }
.portal-mode .ph-sugest-btn {
  margin-top: .8rem;
  padding: .55rem 1rem;
  background: var(--ph-navy); color: #fff;
  border: 0; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: .85rem; font-family: inherit;
}
.portal-mode .ph-blurb { color: var(--ph-fg-3); font-size: .9rem; }
.portal-mode .ph-hi {
  font-family: var(--ph-font);
  font-size: 1.7rem; font-weight: 600; color: var(--ph-navy);
}
.portal-mode .ph-wave { display: inline-block; transform-origin: 70% 70%; animation: ph-wave 2.5s ease-in-out infinite; }
@keyframes ph-wave { 0%,100%{transform:rotate(0)} 10%{transform:rotate(14deg)} 20%{transform:rotate(-8deg)} 30%{transform:rotate(14deg)} 40%{transform:rotate(-4deg)} 50%{transform:rotate(10deg)} }

/* ═══════ AGENDAR (stepper, serviços, profissionais, dia/hora, confirmar) ════ */

/* Stepper */
.portal-mode .ph-stepper {
  display: flex; flex-direction: column; align-items: stretch; gap: .55rem;
  margin-bottom: 1rem;
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1rem 1.1rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-stepper::-webkit-scrollbar { display: none; }
/* Título e subtítulo empilhados; passos numa faixa própria abaixo */
.portal-mode .ph-stepper .ph-h2  { margin: 0; }
.portal-mode .ph-stepper .ph-sub { margin: 0; }
.portal-mode .ph-stepper .ph-steps {
  margin: .35rem 0 0; padding: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.portal-mode .ph-stepper .ph-steps::-webkit-scrollbar { display: none; }
.portal-mode .ph-step {
  display: flex; align-items: center; gap: .4rem;
  white-space: nowrap;
  background: none; border: 0; cursor: pointer;
  font-family: inherit; padding: 0;
  color: var(--ph-fg-3);
}
.portal-mode .ph-step-n {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ph-bg-2); color: var(--ph-fg-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; border: 1.5px solid var(--ph-border);
  flex-shrink: 0;
}
.portal-mode .ph-step-lb { font-size: .8rem; font-weight: 600; color: inherit; }
.portal-mode .ph-step.active { color: var(--ph-navy); }
.portal-mode .ph-step.active .ph-step-n {
  background: var(--ph-navy); color: #fff; border-color: var(--ph-navy);
}
.portal-mode .ph-step.done .ph-step-n {
  background: var(--ph-gold); color: var(--ph-navy); border-color: var(--ph-gold);
}
.portal-mode .ph-stepfoot {
  display: flex; gap: .5rem; justify-content: flex-end; align-items: center;
  position: sticky; bottom: 0;
  background: var(--ph-bg);
  padding: .85rem 0;
  margin-top: 1rem;
  border-top: 1px solid var(--ph-border);
  z-index: 40;
}
@media (max-width: 1024px) {
  .portal-mode .ph-stepfoot {
    margin: 1rem -1rem 0; padding: .85rem 1rem;
    bottom: 60px; /* acima da bottom-nav */
  }
}

/* Search row */
.portal-mode .ph-search-row {
  display: flex; gap: .5rem; align-items: center;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.portal-mode .ph-search,
.portal-mode .ph-search-in {
  flex: 1; min-width: 180px;
  display: flex; align-items: center; gap: .5rem;
  background: var(--ph-card); border: 1px solid var(--ph-border);
  border-radius: 10px; padding: 0 .85rem;
}
.portal-mode .ph-search-in input,
.portal-mode .ph-search input {
  flex: 1; border: 0; outline: 0; padding: .65rem 0;
  background: transparent; color: var(--ph-navy);
  font-size: .9rem; font-family: inherit;
}
.portal-mode .ph-search-ic { color: var(--ph-fg-3); font-size: .9rem; }
.portal-mode .ph-search-clear {
  background: none; border: 0; cursor: pointer;
  color: var(--ph-fg-3); font-size: 1.1rem; padding: 0;
}

/* Botões da actbar (Voltar/Continuar) — compactos */
.portal-mode .ph-actbar-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem 1rem;
  border-radius: 10px;
  font-size: .82rem; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.portal-mode .ph-actbar-btn.ghost {
  background: var(--ph-card);
  color: var(--ph-fg-2);
  border: 1px solid var(--ph-border);
}
.portal-mode .ph-actbar-btn.ghost:hover {
  border-color: var(--ph-fg-3);
  color: var(--ph-navy);
}
.portal-mode .ph-actbar-btn.primary {
  background: var(--ph-navy);
  color: #fff;
  border: 1px solid var(--ph-navy);
}
.portal-mode .ph-actbar-btn.primary:hover:not(:disabled) {
  background: var(--ph-navy-soft, #2A3A5A);
  transform: translateY(-1px);
}
.portal-mode .ph-actbar-btn.success {
  background: var(--ph-navy);
  color: #fff;
  border: 1px solid var(--ph-navy);
  font-weight: 700;
}
.portal-mode .ph-actbar-btn.success:hover:not(:disabled) {
  background: var(--ph-navy-soft, #2A3A5A);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31,44,68,.2);
}
.portal-mode .ph-actbar-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Toggle de gênero (M/F) */
.portal-mode .ph-segwrap {
  display: inline-flex;
  background: var(--ph-bg-2); border-radius: 10px; padding: 4px;
}
.portal-mode .ph-seg, .portal-mode .ph-seg-btn {
  padding: .5rem .9rem;
  background: none; border: 0; cursor: pointer;
  font-weight: 600; font-size: .82rem; color: var(--ph-fg-2);
  font-family: inherit; border-radius: 7px;
  transition: all .15s;
}
.portal-mode .ph-seg.active, .portal-mode .ph-seg-btn.active {
  background: var(--ph-card); color: var(--ph-navy);
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-gen-toggle {
  display: inline-flex; align-items: center; gap: .25rem; flex-wrap: nowrap;
  padding: .35rem .7rem;
  background: var(--ph-bg-2);
  border: 1px solid var(--ph-border);
  border-radius: 999px;
  font-size: .74rem; font-weight: 600; color: var(--ph-fg-2);
  cursor: pointer; font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}
.portal-mode .ph-gen-toggle:hover {
  background: var(--ph-card);
  border-color: var(--ph-gold);
  color: var(--ph-navy);
}
.portal-mode .ph-gen-toggle .alt {
  color: var(--ph-gold-dark, #A8843E);
  font-weight: 700;
}

/* Selbar (resumo de itens selecionados) */
.portal-mode .ph-selbar {
  background: var(--ph-navy);
  color: #fff;
  border-radius: var(--ph-radius);
  padding: .85rem 1.1rem;
  margin-bottom: 1rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.portal-mode .ph-selbar-hd { display: flex; justify-content: space-between; align-items: center; }
.portal-mode .ph-selbar-eye {
  font-size: .7rem; opacity: .75; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.portal-mode .ph-selbar-tot {
  font-family: var(--ph-font); font-weight: 700; font-size: 1.1rem;
}
.portal-mode .ph-selbar-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.portal-mode .ph-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.15);
  padding: .25rem .55rem;
  border-radius: 999px;
  font-size: .75rem; font-weight: 600;
}
.portal-mode .ph-chip-x {
  background: none; border: 0; color: inherit;
  cursor: pointer; padding: 0; line-height: 1; font-size: .9rem; font-family: inherit;
}

/* Grid de serviços */
.portal-mode .ph-grid-svc {
  display: grid; grid-template-columns: 1fr; gap: .55rem;
}
@media (min-width: 600px)  { .portal-mode .ph-grid-svc { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px)  { .portal-mode .ph-grid-svc { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .portal-mode .ph-grid-svc { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1320px) { .portal-mode .ph-grid-svc { grid-template-columns: repeat(5, 1fr); gap: .5rem; } }

.portal-mode .ph-svc {
  background: var(--ph-card);
  border: 1.5px solid var(--ph-border);
  border-radius: 12px;
  padding: .65rem .75rem;
  cursor: pointer;
  display: flex; align-items: flex-start; gap: .55rem;
  text-align: left; font-family: inherit;
  transition: all .15s;
  min-width: 0;
}
.portal-mode .ph-svc:hover { border-color: var(--ph-gold); transform: translateY(-1px); }
.portal-mode .ph-svc.sel {
  border-color: var(--ph-navy); background: rgba(31,44,68,.03);
  box-shadow: 0 0 0 2px rgba(31,44,68,.08);
}
.portal-mode .ph-svc-em {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--ph-bg-2); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.portal-mode .ph-svc-meta { flex: 1; min-width: 0; }
.portal-mode .ph-svc-nm {
  font-weight: 700; color: var(--ph-navy); font-size: .82rem;
  line-height: 1.25;
  /* Reserva sempre espaço para 2 linhas, mesmo quando o nome cabe em 1 */
  min-height: calc(2 * 1.25em);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}
.portal-mode .ph-svc-pr {
  font-size: .8rem;
  color: var(--ph-gold-dark, #A8843E);
  font-weight: 700;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, sans-serif;
}
.portal-mode .ph-svc-dur {
  font-size: .72rem;
  color: var(--ph-fg-3);
  font-weight: 600;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, sans-serif;
}
.portal-mode .ph-svc-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .35rem;
}
.portal-mode .ph-svc-tick {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; flex-shrink: 0; transition: all .15s;
  background: transparent; border: 1.5px solid var(--ph-border); color: transparent;
  margin-top: 9px; /* alinha visualmente com o topo do nome (centro do ícone) */
}
.portal-mode .ph-svc.sel .ph-svc-tick {
  background: var(--ph-navy); color: #fff; border-color: var(--ph-navy);
}

/* Grid de profissionais */
.portal-mode .ph-grid-pro {
  display: grid; grid-template-columns: 1fr; gap: .55rem;
}
@media (min-width: 600px) { .portal-mode .ph-grid-pro { grid-template-columns: 1fr 1fr; } }
.portal-mode .ph-pro {
  background: var(--ph-card);
  border: 1.5px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: .85rem 1rem;
  cursor: pointer;
  display: flex; align-items: center; gap: .85rem;
  text-align: left; font-family: inherit;
  transition: all .15s;
}
.portal-mode .ph-pro:hover { border-color: var(--ph-gold); transform: translateY(-1px); }
.portal-mode .ph-pro.sel {
  border-color: var(--ph-navy); background: rgba(31,44,68,.03);
  box-shadow: 0 0 0 3px rgba(31,44,68,.08);
}
.portal-mode .ph-pro-av {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ph-rose); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
  overflow: hidden;
}
.portal-mode .ph-pro-av img { width: 100%; height: 100%; object-fit: cover; }
.portal-mode .ph-pro-meta { flex: 1; min-width: 0; }
.portal-mode .ph-pro-nm { font-weight: 700; color: var(--ph-navy); font-size: .92rem; }
.portal-mode .ph-pro-rl { font-size: .78rem; color: var(--ph-fg-3); margin-top: .1rem; }
.portal-mode .ph-pro-tick {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ph-navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
}
.portal-mode .ph-scroll-3 {
  max-height: 56vh; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--ph-border) transparent;
}

/* Faixa de dias e horários */
.portal-mode .ph-day-w { font-size: .65rem; color: var(--ph-fg-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.portal-mode .ph-day-d, .portal-mode .ph-day-n {
  font-family: var(--ph-font);
  font-size: 1.25rem; font-weight: 700; color: var(--ph-navy); line-height: 1.2;
}
.portal-mode .ph-day-m { font-size: .65rem; color: var(--ph-fg-3); margin-top: .1rem; text-transform: uppercase; }
.portal-mode .ph-day.sel .ph-day-d,
.portal-mode .ph-day.sel .ph-day-n,
.portal-mode .ph-day.sel .ph-day-m,
.portal-mode .ph-day.sel .ph-day-w { color: #fff; }

.portal-mode .ph-horas {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: .4rem;
}
/* Mobile: mantém o formato atual (auto-fill) */
@media (max-width: 768px) {
  .portal-mode .ph-horas { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
}
.portal-mode .ph-hora {
  background: var(--ph-card);
  border: 1.5px solid var(--ph-border);
  border-radius: 8px;
  padding: .55rem .35rem;
  cursor: pointer;
  text-align: center;
  font-weight: 600; font-size: .85rem;
  color: var(--ph-navy);
  font-family: inherit;
  transition: all .15s;
  position: relative;
}
.portal-mode .ph-hora:hover:not(:disabled):not(.off) {
  border-color: var(--ph-gold);
  transform: translateY(-1px);
}
.portal-mode .ph-hora.sel {
  background: var(--ph-navy);
  color: #fff;
  border-color: var(--ph-navy);
  box-shadow: 0 0 0 3px rgba(31,44,68,.15);
}
.portal-mode .ph-hora.off,
.portal-mode .ph-hora:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: var(--ph-bg-2);
  color: var(--ph-fg-3);
}
.portal-mode .ph-hora.off:hover,
.portal-mode .ph-hora:disabled:hover {
  border-color: var(--ph-border);
  transform: none;
}
.portal-mode .ph-horas .ph-slot { /* legado, já estilizado */ }
.portal-mode .ph-hora-info {
  margin-left: .15rem;
  font-size: .8rem;
  color: var(--ph-fg-3);
  vertical-align: top;
}

/* Confirmação */
.portal-mode .ph-confirm {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.25rem;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .ph-conf-eye {
  font-size: .7rem; color: var(--ph-fg-3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.portal-mode .ph-conf-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid var(--ph-border-soft);
}
.portal-mode .ph-conf-row:last-child { border-bottom: 0; }
.portal-mode .ph-conf-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 0 .25rem;
  border-top: 2px solid var(--ph-navy);
  margin-top: .5rem;
  font-family: var(--ph-font-serif);
  font-size: 1.2rem; font-weight: 700; color: var(--ph-navy);
}

/* ═══════ HISTÓRICO TIMELINE (Sprint visual 2) ═════════════════════════════ */
.portal-mode .ph-hist {
  position: relative;
  display: flex; flex-direction: column;
  padding-left: 0;
}

/* Linha vertical conectora atrás dos pontos da data */
.portal-mode .ph-hist::before {
  content: '';
  position: absolute;
  left: 36px; /* centro da bolinha de data (50px width / 2 ~ 25px + margin) */
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: linear-gradient(180deg, var(--ph-gold-soft, #E7D3A3) 0%, var(--ph-border) 100%);
  z-index: 0;
}
.portal-mode .ph-hist-row {
  display: flex; align-items: center; gap: .85rem;
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: .85rem 1rem .85rem .85rem;
  box-shadow: var(--ph-shadow-sm);
  transition: all .15s;
  position: relative;
  z-index: 1;
  margin-bottom: .65rem;
  margin-left: 0;
}
.portal-mode .ph-hist-row:last-child { margin-bottom: 0; }
.portal-mode .ph-hist-row:hover { transform: translateY(-1px); box-shadow: var(--ph-shadow); }

.portal-mode .ph-hist-date {
  text-align: center; min-width: 50px; flex-shrink: 0;
  background: var(--ph-gold-light, #F2E5BF);
  border-radius: 12px;
  padding: .45rem .35rem;
  border: 2px solid var(--ph-card);
  position: relative;
  z-index: 2;
}
.portal-mode .ph-hist-date-d, .portal-mode .ph-hist-date .d {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.4rem; font-weight: 800; color: var(--ph-gold-dark, #A8843E); line-height: 1;
}
.portal-mode .ph-hist-date-m, .portal-mode .ph-hist-date .m {
  font-size: .62rem; color: var(--ph-gold-dark, #A8843E); text-transform: uppercase;
  letter-spacing: .08em; font-weight: 700; margin-top: .15rem;
}
.portal-mode .ph-hist-ic {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ph-bg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0; overflow: hidden;
  border: 2px solid var(--ph-gold-soft, #E7D3A3);
}
.portal-mode .ph-hist-ic img { width: 100%; height: 100%; object-fit: cover; }
.portal-mode .ph-hist-meta { flex: 1; min-width: 0; }
.portal-mode .ph-hist-t, .portal-mode .ph-hist-svc {
  font-weight: 700; color: var(--ph-navy); font-size: .92rem;
  line-height: 1.3;
}
.portal-mode .ph-hist-s, .portal-mode .ph-hist-prof {
  font-size: .78rem; color: var(--ph-fg-3); margin-top: .15rem;
}
.portal-mode .ph-hist-r, .portal-mode .ph-hist-val {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 700; color: var(--ph-navy); font-size: 1.05rem;
  text-align: right; flex-shrink: 0;
}
.portal-mode .ph-hist-obs { font-size: .76rem; color: var(--ph-fg-3); margin-top: .25rem; font-style: italic; }
.portal-mode .ph-hist-tag-fotos {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--ph-gold-light); color: var(--ph-warning);
  padding: .15rem .5rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; margin-top: .25rem;
}

/* Mobile: linha mais à esquerda */
@media (max-width: 640px) {
  .portal-mode .ph-hist::before { left: 32px; }
  .portal-mode .ph-hist-date { min-width: 44px; padding: .4rem .3rem; }
  .portal-mode .ph-hist-date-d { font-size: 1.2rem; }
  .portal-mode .ph-hist-row { padding: .7rem .8rem; gap: .65rem; }
  .portal-mode .ph-hist-ic { width: 40px; height: 40px; }
}

/* ═══════ PACOTES (Sprint visual 2) ════════════════════════════════════════ */
.portal-mode .ph-pacs-loading {
  text-align: center; padding: 1.5rem;
  color: var(--ph-fg-3); font-size: .85rem;
}
.portal-mode .ph-pacs-list {
  display: grid; gap: .85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .portal-mode .ph-pacs-list { grid-template-columns: 1fr 1fr; }
}
.portal-mode .ph-pac-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: var(--ph-shadow-sm);
  transition: all .15s;
}
.portal-mode .ph-pac-card:hover {
  border-color: var(--ph-gold, #C8A96A);
  box-shadow: 0 4px 12px rgba(200,169,106,.12);
}
.portal-mode .ph-pac-hd {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; margin-bottom: .35rem;
}
.portal-mode .ph-pac-h {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem; font-weight: 700; color: var(--ph-navy);
  line-height: 1.2;
}
.portal-mode .ph-pac-desc {
  font-size: .78rem; color: var(--ph-fg-3); margin-bottom: .8rem;
  line-height: 1.4;
}
.portal-mode .ph-pac-progress-wrap { margin: .65rem 0; }
.portal-mode .ph-pac-progress-info {
  display: flex; justify-content: space-between;
  font-size: .76rem; color: var(--ph-fg-2); margin-bottom: .35rem;
}
.portal-mode .ph-pac-progress-info b {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--ph-navy);
}
.portal-mode .ph-pac-progress-rest {
  color: var(--ph-gold-dark, #A8843E);
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
}
.portal-mode .ph-pac-progress-bar {
  width: 100%; height: 8px;
  background: var(--ph-bg-2);
  border-radius: 999px;
  overflow: hidden;
}
.portal-mode .ph-pac-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ph-gold, #C8A96A), var(--ph-gold-dark, #A8843E));
  border-radius: 999px;
  transition: width .35s ease;
}
.portal-mode .ph-pac-svcs {
  display: flex; flex-direction: column; gap: .2rem;
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px dashed var(--ph-border);
}
.portal-mode .ph-pac-svc {
  display: flex; justify-content: space-between; align-items: center;
  padding: .2rem 0;
}
.portal-mode .ph-pac-svc-nm {
  font-size: .82rem; color: var(--ph-navy);
}
.portal-mode .ph-pac-svc-saldo {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: .78rem; font-weight: 700;
  color: var(--ph-gold-dark, #A8843E);
  background: var(--ph-gold-light, #F2E5BF);
  padding: .12rem .5rem;
  border-radius: 999px;
}
.portal-mode .ph-pac-svc-saldo.esgotado {
  color: var(--ph-fg-3);
  background: var(--ph-bg-2);
}
.portal-mode .ph-pac-foot {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--ph-fg-3);
  margin-top: .8rem;
  padding-top: .55rem;
  border-top: 1px solid var(--ph-border);
}
.portal-mode .ph-pac-foot .is-danger { color: var(--ph-danger, #C62828); font-weight: 700; }

/* ═══════ CARD IDENTIDADE NO PERFIL (Sprint visual 3) ═════════════════════ */
.portal-mode .ph-perfil-id {
  position: relative;
  background: linear-gradient(135deg, var(--ph-gold-dark, #A8843E) 0%, var(--ph-gold, #C8A96A) 100%);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 6px 20px rgba(168, 132, 62, .22);
}
.portal-mode .ph-perfil-id-bg {
  position: absolute;
  right: -2rem;
  top: -2rem;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  pointer-events: none;
}
.portal-mode .ph-perfil-id-row {
  display: flex; align-items: center; gap: 1rem;
  position: relative;
  z-index: 1;
}
.portal-mode .ph-perfil-id-av {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .2);
  border: 3px solid rgba(255, 255, 255, .4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
}
.portal-mode .ph-perfil-id-av img {
  width: 100%; height: 100%; object-fit: cover;
}
.portal-mode .ph-perfil-id-ini {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.55rem; font-weight: 800; color: #fff;
  letter-spacing: -.01em;
}
.portal-mode .ph-perfil-id-meta {
  flex: 1; min-width: 0;
}
.portal-mode .ph-perfil-id-nm {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem; font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: .35rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.portal-mode .ph-perfil-id-line {
  font-size: .82rem;
  color: rgba(255, 255, 255, .92);
  font-weight: 500;
  margin-top: .15rem;
  display: flex; align-items: center; gap: .35rem;
}

/* ═══════ WAITLIST (Sprint UI) ═════════════════════════════════════════════ */
/* Vazio no agendar quando não há horários */
.portal-mode .ph-wl-vazio {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(200,169,106,.10), rgba(168,132,62,.05));
  border: 1.5px dashed var(--ph-gold-soft, #E7D3A3);
  border-radius: 14px;
}
.portal-mode .ph-wl-vazio-ic {
  font-size: 2.4rem;
  margin-bottom: .55rem;
}
.portal-mode .ph-wl-vazio-t {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ph-navy);
  margin-bottom: .35rem;
}
.portal-mode .ph-wl-vazio-s {
  font-size: .85rem;
  color: var(--ph-fg-3);
  line-height: 1.5;
  margin-bottom: 1.1rem;
}
.portal-mode .ph-wl-vazio-cta {
  padding: .65rem 1.4rem;
  background: linear-gradient(135deg, var(--ph-gold-dark, #A8843E), var(--ph-gold, #C8A96A));
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  box-shadow: 0 3px 10px rgba(168, 132, 62, .25);
}
.portal-mode .ph-wl-vazio-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(168, 132, 62, .35);
}

/* Banner no dashboard */
.portal-mode .ph-wl-banner {
  display: flex; align-items: center; gap: .85rem;
  padding: .9rem 1.1rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  transition: all .15s;
}
.portal-mode .ph-wl-banner.ofertado {
  background: linear-gradient(135deg, #2E7D32, #43A047);
  color: #fff;
  box-shadow: 0 4px 14px rgba(46, 125, 50, .25);
  animation: phWlPulse 2s ease-in-out infinite;
}
.portal-mode .ph-wl-banner.aguardando {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  color: var(--ph-navy);
}
.portal-mode .ph-wl-banner:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.portal-mode .ph-wl-banner-ic {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.portal-mode .ph-wl-banner-tx { flex: 1; min-width: 0; }
.portal-mode .ph-wl-banner-h {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .15rem;
}
.portal-mode .ph-wl-banner-s {
  font-size: .78rem;
  opacity: .9;
}
.portal-mode .ph-wl-banner-arr {
  font-size: 1.4rem;
  font-weight: 600;
  opacity: .7;
  flex-shrink: 0;
}
@keyframes phWlPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(46, 125, 50, .25); }
  50%      { box-shadow: 0 4px 22px rgba(46, 125, 50, .45); }
}

/* Lista no modal */
.portal-mode .ph-wl-list {
  display: flex; flex-direction: column;
  gap: .7rem;
  padding: .85rem;
}
.portal-mode .ph-wl-item {
  background: var(--ph-card);
  border: 1.5px solid var(--ph-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.portal-mode .ph-wl-item.ofertado {
  border-color: #2E7D32;
  background: linear-gradient(180deg, rgba(46, 125, 50, .04), transparent);
  box-shadow: 0 2px 8px rgba(46, 125, 50, .12);
}
.portal-mode .ph-wl-item-hd {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; margin-bottom: .5rem;
}
.portal-mode .ph-wl-item-dt {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: .82rem; font-weight: 700;
  color: var(--ph-navy);
  text-transform: capitalize;
}
.portal-mode .ph-wl-item-svc {
  font-weight: 700;
  color: var(--ph-navy);
  font-size: .92rem;
  margin-bottom: .25rem;
}
.portal-mode .ph-wl-item-meta {
  font-size: .76rem;
  color: var(--ph-fg-3);
  margin-bottom: .85rem;
}
.portal-mode .ph-wl-item-actions {
  display: flex; gap: .5rem;
}
.portal-mode .ph-wl-item-expira {
  font-size: .7rem;
  color: var(--ph-fg-3);
  text-align: center;
  margin-top: .55rem;
}
@media (max-width: 640px) {
  /* Card identidade compacto */
  .portal-mode .ph-perfil-id { padding: 1.15rem 1rem; }
  .portal-mode .ph-perfil-id-av { width: 60px; height: 60px; }
  .portal-mode .ph-perfil-id-ini { font-size: 1.3rem; }
  .portal-mode .ph-perfil-id-nm { font-size: 1.2rem; }
  .portal-mode .ph-perfil-id-line { font-size: .76rem; }
}

/* ═══════ AVALIAÇÃO no histórico (estrelinhas) ═════════════════════════════ */
.portal-mode .ph-hist-stars {
  font-size: .85rem; color: var(--ph-gold);
  letter-spacing: 1px; margin-top: .15rem;
}
.portal-mode .ph-hist-aval-btn {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .25rem .55rem; border-radius: 999px;
  background: rgba(232, 159, 56, .12);
  color: #B86E1A;
  border: 1px solid rgba(232, 159, 56, .35);
  font-size: .68rem; font-weight: 700; cursor: pointer;
  margin-top: .25rem; font-family: inherit;
  transition: all .15s;
  letter-spacing: .01em;
}
.portal-mode .ph-hist-aval-btn:hover {
  background: rgba(232, 159, 56, .22);
  border-color: rgba(232, 159, 56, .55);
  transform: translateY(-1px);
}

/* ═══════ MENSAGENS / CHAT ══════════════════════════════════════════════════ */
.portal-mode .ph-chat-wrap {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  display: flex; flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 400px;
  overflow: hidden;
}
.portal-mode .ph-chat-list {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.portal-mode .ph-chat-msg {
  max-width: 78%;
  padding: .65rem .85rem;
  border-radius: 14px;
  font-size: .88rem; line-height: 1.4;
  word-wrap: break-word;
}
.portal-mode .ph-chat-msg.in {
  align-self: flex-start;
  background: var(--ph-bg-2); color: var(--ph-navy);
  border-bottom-left-radius: 4px;
}
.portal-mode .ph-chat-msg.out {
  align-self: flex-end;
  background: var(--ph-navy); color: #fff;
  border-bottom-right-radius: 4px;
}
.portal-mode .ph-chat-time {
  font-size: .65rem; opacity: .7; margin-top: .25rem;
}
.portal-mode .ph-chat-foot {
  display: flex; gap: .5rem; padding: .85rem;
  border-top: 1px solid var(--ph-border);
  background: var(--ph-bg-2);
}
.portal-mode .ph-chat-input {
  flex: 1; padding: .65rem .85rem;
  background: var(--ph-card); border: 1.5px solid var(--ph-border);
  border-radius: 10px;
  font-size: .9rem; font-family: inherit;
  outline: none; color: var(--ph-navy);
}
.portal-mode .ph-chat-input:focus { border-color: var(--ph-navy); }

/* ═══════ PERFIL — CARDS DAS SEÇÕES ═════════════════════════════════════════ */
/* As classes pf-* já são auto-suficientes em portal-cliente.js,
   mas garantimos que o background e bordas sigam a paleta AURA */
.portal-mode .pf-card {
  background: var(--ph-card) !important;
  border: 1px solid var(--ph-border) !important;
  box-shadow: var(--ph-shadow-sm);
}
.portal-mode .pf-card-hd {
  background: var(--ph-bg-2);
  border-bottom: 1px solid var(--ph-border) !important;
  color: var(--ph-navy) !important;
}
.portal-mode .pf-inp {
  background: var(--ph-card) !important;
  border-color: var(--ph-border) !important;
  color: var(--ph-navy) !important;
}
.portal-mode .pf-inp:focus { border-color: var(--ph-navy) !important; }
.portal-mode .pf-lbl { color: var(--ph-fg-3) !important; }

/* ════════════════════════════════════════════════════════════════════════
   APP-STYLE MOBILE POLISH  (bloco final — vence a cascata por posição)
   Safe-area (notch/home bar), feedback de toque, scroll com momentum,
   anti-zoom iOS e acessibilidade. Tudo escopado em .portal-mode.
   ════════════════════════════════════════════════════════════════════════ */

/* Safe-area: header fixo e bottom-nav respeitam notch/barra de gestos.
   (No desktop ambos são display:none, então o padding é inócuo.) */
.portal-mode .ph-mob-head {
  padding-top: max(.6rem, env(safe-area-inset-top));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}
.portal-mode .ph-bnav {
  padding-bottom: max(.5rem, env(safe-area-inset-bottom));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Feedback de toque imediato + remoção do delay de 300ms (estilo app) */
.portal-mode .ph-btn,
.portal-mode .ph-nav-item,
.portal-mode .ph-bnav-btn,
.portal-mode .ph-burger,
.portal-mode .ph-desk-btn,
.portal-mode [data-act] {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.portal-mode .ph-btn,
.portal-mode .ph-bnav-btn,
.portal-mode .ph-nav-item,
.portal-mode .ph-burger {
  transition: transform .12s ease, opacity .12s ease, background .15s ease, color .15s ease;
}
.portal-mode .ph-btn:active,
.portal-mode .ph-bnav-btn:active,
.portal-mode .ph-nav-item:active,
.portal-mode .ph-burger:active {
  transform: scale(.97);
  opacity: .85;
}

/* Foco acessível por teclado (não afeta toque) */
.portal-mode .ph-btn:focus-visible,
.portal-mode .ph-nav-item:focus-visible,
.portal-mode .ph-bnav-btn:focus-visible {
  outline: 2px solid var(--ph-gold, var(--brand, #B8954F));
  outline-offset: 2px;
}

/* Scroll com momentum (iOS) nas áreas roláveis */
.portal-mode .ph-main,
.portal-mode .ph-drawer-list,
.portal-mode .ph-chat-list,
.portal-mode .ph-stepper { -webkit-overflow-scrolling: touch; }

/* Mobile: anti-zoom iOS (campos ≥16px) + alvo de toque do menu hambúrguer */
@media (max-width: 1024px) {
  .portal-mode input:not([type=checkbox]):not([type=radio]),
  .portal-mode select,
  .portal-mode textarea,
  .portal-mode .pf-inp,
  .portal-mode .ph-chat-input,
  .portal-mode .ph-search input { font-size: 16px; }

  .portal-mode .ph-burger { min-width: 44px; min-height: 44px; }
}

/* Respeita "movimento reduzido" do sistema (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  .portal-mode *,
  .portal-mode *::before,
  .portal-mode *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Rede de segurança: logo/imagens do header e dos logos nunca estouram no mobile */
@media (max-width: 1024px) {
  .portal-mode .ph-mob-head img,
  .portal-mode .ph-mob-logo img,
  .portal-mode .ph-logo img,
  .portal-mode .ph-drawer-logo img {
    max-height: 32px !important;
    max-width: 50vw !important;
    width: auto !important;
    object-fit: contain;
  }
  .portal-mode .ph-mob-head { overflow: hidden; }
}

/* ── Anti-overflow horizontal no mobile (campos/cards nunca passam da tela) ── */
@media (max-width: 1024px) {
  .portal-mode .ph-main,
  .portal-mode .ph-body,
  .portal-mode .ph-page { max-width: 100%; overflow-x: hidden; }

  /* Itens de grid/flex podem encolher (impede estouro por conteúdo de largura mínima) */
  .portal-mode [class*="grid"] > *,
  .portal-mode .pf-row > * { min-width: 0; }

  /* Campos sempre dentro do container */
  .portal-mode input,
  .portal-mode select,
  .portal-mode textarea { max-width: 100%; box-sizing: border-box; }

  /* Grids densos colapsam para caber no celular */
  .portal-mode .ph-fin-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 380px) {
  .portal-mode .ph-fin-grid { grid-template-columns: 1fr !important; }
}
