/* =========================================================================
   Presupuestame — modo app (panel cliente/empresa, login y registro)
   ========================================================================= */

.psm-body {
  --a-bg: #F3F2EF;
  --a-side: #F7F6F3;
  --a-card: #FAF9F7;
  --a-white: #FFFFFF;
  --a-line: #E6E3DD;
  --a-line-2: #EFEDE8;
  --a-ink: #1E1E1E;
  --a-ink-2: #2A2A2A;
  --a-text: #3D3B37;
  --a-muted: #8C8983;
  --a-gold: #9A8662;
  --a-accent: #FF6B35;
  --a-radius: 16px;
  --psm-navy: #1E1E1E;
  --psm-text: #3D3B37;
  --psm-muted: #8C8983;
  --psm-line: #E6E3DD;
  --psm-light: #F3F2EF;
  --psm-soft: #FFF3EE;
  margin: 0;
  background: var(--a-bg);
  color: var(--a-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.psm-body *, .psm-body *::before, .psm-body *::after { box-sizing: border-box; }
.psm-body a { color: inherit; }
.psm-body h1, .psm-body h2, .psm-body h3 { font-family: inherit; letter-spacing: -.01em; }
.psm-ico { flex: 0 0 auto; display: block; }

/* ---------- Layout ---------- */
.psm-app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--a-side) 251px, var(--a-line) 251px, var(--a-line) 252px, var(--a-bg) 252px); }
.psm-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--a-side); border-right: 1px solid var(--a-line); padding: 18px 10px 24px; display: flex; flex-direction: column; }
.psm-main { min-width: 0; display: flex; flex-direction: column; }
.psm-content { padding: 30px 38px 60px; max-width: 1480px; width: 100%; }
.psm-account.psm-content { margin: 0; }

/* ---------- Marca ---------- */
.psm-brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; color: var(--a-ink); }
.psm-brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--a-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.psm-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.psm-brand-text strong { font-size: 14px; font-weight: 800; letter-spacing: .06em; }
.psm-brand-text strong em { font-style: normal; color: var(--a-accent); }
.psm-brand-text small { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--a-muted); margin-top: 3px; }
.psm-brand--light { color: #fff; }
.psm-brand--light .psm-brand-mark { background: #fff; color: var(--a-ink); }
.psm-brand--light .psm-brand-text small { color: rgba(255,255,255,.55); }

/* ---------- Sidebar ---------- */
.psm-side-top { padding: 4px 10px 18px; position: relative; }
.psm-side-role { display: block; margin-top: 12px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--a-gold); font-weight: 700; }
.psm-side-nav { display: flex; flex-direction: column; gap: 2px; }
.psm-side-label { margin: 22px 10px 8px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--a-gold); }
.psm-side-nav .psm-side-label:first-child { margin-top: 6px; }
.psm-side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none !important; color: var(--a-ink-2) !important; font-weight: 500; font-size: 14px; transition: background .15s; }
.psm-side-link .psm-ico { color: var(--a-muted); width: 16px; height: 16px; }
.psm-side-link:hover { background: rgba(30,30,30,.05); }
.psm-side-link.is-active { background: var(--a-ink); color: #fff !important; font-weight: 600; }
.psm-side-link.is-active .psm-ico { color: #fff; }
.psm-side-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--a-accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.psm-side-close, .psm-side-open { display: none; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 8px !important; cursor: pointer; color: var(--a-ink); border-radius: 10px; }
.psm-side-close:hover, .psm-side-open:hover { background: rgba(30,30,30,.06) !important; }
.psm-side-overlay { display: none; }

/* ---------- Topbar ---------- */
.psm-topbar-app { display: flex; align-items: center; gap: 16px; padding: 18px 38px; border-bottom: 1px solid var(--a-line); background: var(--a-bg); position: sticky; top: 0; z-index: 20; }
.psm-topbar-title { min-width: 0; }
.psm-topbar-title h1 { margin: 2px 0 0; font-size: 24px; font-weight: 800; color: var(--a-ink); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psm-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.psm-user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--a-line); border-radius: 999px; background: var(--a-card); text-decoration: none !important; color: var(--a-ink) !important; font-size: 13px; max-width: 280px; }
.psm-user-chip:hover { border-color: #D3CFC7; }
.psm-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--a-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: 0 0 28px; }
.psm-user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Etiquetas ---------- */
.psm-eyebrow { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--a-gold); }
.psm-eyebrow--light { color: #B9A988; }

/* ---------- Hero ---------- */
.psm-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #262626; color: #fff; border-radius: var(--a-radius); padding: 34px 32px; margin: 0 0 24px; }
.psm-hero h2 { margin: 10px 0 8px; font-size: 28px; font-weight: 800; color: #fff; line-height: 1.15; }
.psm-hero-sub { margin: 0; color: rgba(255,255,255,.75); font-size: 14px; max-width: 560px; }
.psm-hero-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.psm-hero-date { margin: 0 0 6px; font-weight: 700; font-size: 15px; color: #fff; }
.psm-pill-dark { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 12px; font-weight: 600; }
.psm-pill-dark--ok { background: rgba(37,211,102,.18); color: #9FF0BE; }
.psm-pill-dark--off { background: rgba(255,107,53,.2); color: #FFB899; }

/* ---------- Números ---------- */
.psm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.psm-stat { display: flex; align-items: center; gap: 16px; background: var(--a-card); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 24px 20px; text-decoration: none !important; color: inherit !important; transition: border-color .15s, transform .15s; }
a.psm-stat:hover { border-color: #CFCBC2; transform: translateY(-1px); }
.psm-stat-ico { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--a-line); background: var(--a-white); display: inline-flex; align-items: center; justify-content: center; color: var(--a-ink); flex: 0 0 40px; }
.psm-stat p { margin: 0 0 2px; font-size: 12px; color: var(--a-muted); }
.psm-stat strong { font-size: 26px; font-weight: 800; color: var(--a-ink); line-height: 1.1; }

/* ---------- Paneles ---------- */
.psm-grid-main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; margin: 0 0 24px; }
.psm-panel { background: var(--a-card); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 24px 22px; margin: 0 0 24px; min-width: 0; }
.psm-grid-main .psm-panel { margin: 0; }
.psm-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 16px; }
.psm-panel-head h3 { margin: 6px 0 0; font-size: 17px; font-weight: 700; color: var(--a-ink); }
.psm-panel-link { font-size: 12px; color: var(--a-ink) !important; text-decoration: none !important; white-space: nowrap; }
.psm-panel-link:hover { text-decoration: underline !important; }

.psm-rows { display: flex; flex-direction: column; }
.psm-row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--a-line-2); text-decoration: none !important; color: inherit !important; border-radius: 10px; transition: background .15s; }
.psm-row:last-child { border-bottom: 0; }
.psm-row:hover { background: rgba(30,30,30,.03); }
.psm-row-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--a-white); border: 1px solid var(--a-line); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; color: var(--a-ink); }
.psm-row-ico .psm-ico { width: 16px; height: 16px; }
.psm-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.psm-row-main strong { font-size: 14px; color: var(--a-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psm-row-main small { font-size: 12px; color: var(--a-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psm-row-side { flex: 0 0 auto; font-size: 14px; color: var(--a-ink); }

.psm-empty-box { border: 1px dashed #DAD6CE; border-radius: 12px; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 14px; }
.psm-empty-box strong { color: var(--a-ink); font-size: 14px; margin-top: 4px; }
.psm-empty-box small { color: var(--a-muted); font-size: 12px; max-width: 320px; }

.psm-kv { margin: 0 0 18px; }
.psm-kv div { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--a-line-2); }
.psm-kv dt { font-size: 13px; color: var(--a-muted); }
.psm-kv dd { margin: 0; font-weight: 700; color: var(--a-ink); }
.psm-kv-total dd { font-size: 18px; font-weight: 800; }
.psm-kv div:last-child { border-bottom: 0; }

.psm-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.psm-quick-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--a-white); border: 1px solid var(--a-line); border-radius: 12px; text-decoration: none !important; color: inherit !important; transition: border-color .15s; }
.psm-quick-item:hover { border-color: #CFCBC2; }
.psm-quick-item > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.psm-quick-item strong { font-size: 13px; color: var(--a-ink); }
.psm-quick-item small { font-size: 11px; color: var(--a-muted); }
.psm-quick-item > .psm-ico { width: 14px; height: 14px; color: var(--a-muted); }

/* ---------- Componentes existentes con el estilo de la app ---------- */
.psm-body .psm-box { background: var(--a-card); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 26px; margin: 0 0 20px; }
.psm-body .psm-box h2 { font-size: 20px; color: var(--a-ink); }
.psm-body .psm-box h3 { font-size: 16px; color: var(--a-ink); }
.psm-body .psm-item { background: var(--a-card); border-color: var(--a-line); border-radius: 14px; }
.psm-body .psm-item:hover { border-color: #CFCBC2; box-shadow: none; }
.psm-body .psm-item.is-unread { border-left: 3px solid var(--a-accent); }
.psm-body .psm-item-main strong { color: var(--a-ink); font-size: 15px; }
.psm-body .psm-empty { background: var(--a-card); border: 1px dashed #DAD6CE; border-radius: var(--a-radius); }
.psm-body .psm-meta div { background: var(--a-white); border: 1px solid var(--a-line-2); }
.psm-body .psm-meta dt { color: var(--a-muted); font-size: 10px; letter-spacing: .12em; }
.psm-body .psm-meta dd { color: var(--a-ink); }
.psm-body .psm-quote { background: var(--a-white); border-left-color: var(--a-ink); }
.psm-body .psm-files a { background: var(--a-white); border: 1px solid var(--a-line); color: var(--a-ink); }
.psm-body .psm-proposal { background: var(--a-card); border-color: var(--a-line); border-radius: var(--a-radius); }
.psm-body .psm-proposal.is-chosen { border-color: #12A150; }
.psm-body .psm-price { color: var(--a-ink); }
.psm-body .psm-logo--empty { background: var(--a-ink); }
.psm-body .psm-back { color: var(--a-muted); font-size: 13px; }
.psm-body .psm-back:hover { color: var(--a-ink); }
.psm-body .psm-subtab { border-color: var(--a-line); color: var(--a-ink); background: var(--a-card); }
.psm-body .psm-subtab span { background: var(--a-bg); }
.psm-body .psm-subtab.is-active { background: var(--a-ink); border-color: var(--a-ink); color: #fff; }
.psm-body .psm-subtab.is-active span { background: rgba(255,255,255,.18); color: #fff; }
.psm-body .psm-plan div { background: var(--a-white); border: 1px solid var(--a-line-2); }
.psm-body .psm-membership h2 { font-size: 20px; }

/* Botones: oscuros como el resto del panel (usan las variables de .psm-btn) */
.psm-body .psm-btn { --b-bg: var(--a-ink); --b-bd: var(--a-ink); --b-fg: #fff; --b-bg-h: #000; --b-bd-h: #000; --b-fg-h: #fff; border-radius: 10px !important; font-size: 14px; padding: 11px 18px; }
.psm-body .psm-btn--lg { padding: 15px 24px; font-size: 15px; }
.psm-body .psm-btn--sm { padding: 8px 14px; font-size: 13px; }
.psm-body .psm-btn--ghost { --b-bg: var(--a-white); --b-fg: var(--a-ink); --b-bd: var(--a-line); --b-bg-h: var(--a-bg); --b-bd-h: #CFCBC2; --b-fg-h: var(--a-ink); }
.psm-body .psm-btn--light { --b-bg: #fff; --b-bd: #fff; --b-fg: var(--a-ink); --b-bg-h: #EDEBE7; --b-bd-h: #EDEBE7; --b-fg-h: var(--a-ink); }
.psm-body .psm-btn--wa { --b-bg: #25D366; --b-bd: #25D366; --b-bg-h: #1EBE5A; --b-bd-h: #1EBE5A; }
.psm-body .psm-btn--ok { --b-bg: #12A150; --b-bd: #12A150; --b-bg-h: #0E8A44; --b-bd-h: #0E8A44; }
.psm-body .psm-btn--danger { --b-bg: #fff; --b-fg: #B42318; --b-bd: #F1CFC9; --b-bg-h: #FBEDEA; --b-bd-h: #F1CFC9; --b-fg-h: #B42318; }
.psm-body .psm-btn .psm-ico { width: 16px; height: 16px; }
.psm-body .psm-sent { background: #EAF6EF; border: 1px solid #CDEBD9; }
.psm-body .psm-sent--wait { background: #F6F1E6; border-color: #EAE0CB; color: #6B5527; }
.psm-body .psm-more { border-color: #DAD6CE; background: var(--a-white); }
.psm-body .psm-more summary { color: var(--a-ink); }

/* Campos */
.psm-body .psm-box input[type=text], .psm-body .psm-box input[type=email], .psm-body .psm-box input[type=tel], .psm-body .psm-box input[type=url],
.psm-body .psm-box input[type=password], .psm-body .psm-box input[type=date], .psm-body .psm-box input[type=number], .psm-body .psm-box select, .psm-body .psm-box textarea,
.psm-body .psm-account textarea, .psm-body .psm-account select {
  border: 1px solid var(--a-line); border-radius: 10px; background: var(--a-white); font-size: 14px; color: var(--a-ink); padding: 11px 13px;
}
.psm-body .psm-box input:focus, .psm-body .psm-box textarea:focus, .psm-body .psm-box select:focus, .psm-body .psm-account textarea:focus { border-color: var(--a-ink); box-shadow: 0 0 0 3px rgba(30,30,30,.06); }
.psm-body .psm-field > span, .psm-body .psm-label { color: var(--a-ink); font-size: 13px; font-weight: 600; }
.psm-body .psm-cat span, .psm-body .psm-chip span, .psm-body .psm-radio { border: 1px solid var(--a-line); background: var(--a-white); color: var(--a-ink); font-size: 13px; }
.psm-body .psm-cat input:checked + span, .psm-body .psm-chip input:checked + span, .psm-body .psm-radio:has(input:checked) { border-color: var(--a-ink); background: #EFEDE8; box-shadow: inset 0 0 0 1px var(--a-ink); }
.psm-body .psm-radio input, .psm-body .psm-check input { accent-color: var(--a-ink); }

/* Avisos */
.psm-body .psm-notice { border-radius: 12px; font-size: 14px; border: 1px solid transparent; }
.psm-body .psm-notice--ok { background: #EAF6EF; border-color: #CDEBD9; color: #11603A; }
.psm-body .psm-notice--error { background: #FBEDEA; border-color: #F3D2CB; color: #9B2C1A; }
.psm-body .psm-notice--info { background: #F6F1E6; border-color: #EAE0CB; color: #6B5527; }

/* Badges en tonos suaves */
.psm-body .psm-badge { font-size: 11px; padding: 4px 10px; font-weight: 600; background: #EFEDE8; color: var(--a-ink); }
.psm-body .psm-badge--creada, .psm-body .psm-badge--nueva { background: #FBE7DE; color: #A1401C; }
.psm-body .psm-badge--esperando, .psm-body .psm-badge--en_preparacion { background: #F6EEDA; color: #7A5B12; }
.psm-body .psm-badge--propuestas, .psm-body .psm-badge--evaluando { background: #E6EBF3; color: #2B4A78; }
.psm-body .psm-badge--elegido, .psm-body .psm-badge--resuelto, .psm-body .psm-badge--aprobado { background: #E2F1E7; color: #1C6B3D; }

/* ---------- Login y registro ---------- */
.psm-auth-screen { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.psm-auth-brand { background: #262626; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: sticky; top: 0; height: 100vh; }
.psm-auth-copy h1 { margin: 14px 0 26px; font-size: 34px; line-height: 1.15; font-weight: 800; color: #fff; max-width: 460px; }
.psm-auth-copy ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.psm-auth-copy li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.82); font-size: 15px; }
.psm-auth-copy li .psm-ico { color: var(--a-accent); margin-top: 2px; }
.psm-auth-foot { margin: 0; color: rgba(255,255,255,.45); font-size: 13px; }
.psm-auth-main { padding: 32px 48px 60px; display: flex; flex-direction: column; }
.psm-auth-back { font-size: 13px; color: var(--a-muted) !important; text-decoration: none !important; align-self: flex-start; }
.psm-auth-back:hover { color: var(--a-ink) !important; }
.psm-auth-form { width: 100%; max-width: 520px; margin: auto; padding-top: 24px; }
.psm-body--auth .psm-auth { margin: 0; max-width: none; background: transparent; border: 0; padding: 0; }
.psm-body--auth .psm-auth h2 { font-size: 28px; font-weight: 800; color: var(--a-ink); }
.psm-body--auth .psm-auth .psm-sub { color: var(--a-muted); font-size: 14px; }
.psm-body--auth .psm-auth input[type=text], .psm-body--auth .psm-auth input[type=email], .psm-body--auth .psm-auth input[type=tel], .psm-body--auth .psm-auth input[type=password] { background: var(--a-white); }
.psm-body--auth .psm-muted a { color: var(--a-ink); font-weight: 600; }
.psm-body--auth .psm-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Títulos dentro del contenido */
.psm-body .psm-content > .psm-head h2, .psm-body .psm-content .psm-head h2 { font-size: 18px; font-weight: 700; color: var(--a-ink); margin: 0; }
.psm-body .psm-content > .psm-head { margin-top: 8px; }
.psm-body .psm-head .psm-muted { font-size: 14px; }
.psm-body .psm-inline { margin: 0 0 14px; }
.psm-body .psm-box > h3 { margin-bottom: 16px; }

/* Campo de archivo */
.psm-body input[type=file] { width: 100%; padding: 12px; border: 1px dashed #D6D2C9; border-radius: 10px; background: var(--a-white); font-size: 13px; color: var(--a-muted); cursor: pointer; }
.psm-body input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--a-line); border-radius: 8px; background: var(--a-bg); color: var(--a-ink); font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; }
.psm-body input[type=file]:hover { border-color: #BDB8AE; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .psm-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psm-grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .psm-app { grid-template-columns: 1fr; background: var(--a-bg); }
  .psm-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 1001; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .psm-app.is-side-open .psm-side { transform: none; }
  .psm-app.is-side-open .psm-side-overlay { display: block; position: fixed; inset: 0; background: rgba(20,20,20,.4); z-index: 1000; }
  .psm-side-open { display: inline-flex; margin-left: -8px; }
  .psm-side-close { display: inline-flex; position: absolute; right: 2px; top: 4px; }
  .psm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psm-topbar-app { padding: 14px 20px; }
  .psm-content { padding: 22px 20px 48px; }
  .psm-auth-screen { grid-template-columns: 1fr; }
  .psm-auth-brand { position: static; height: auto; padding: 28px 24px; gap: 22px; }
  .psm-auth-copy h1 { font-size: 24px; margin-bottom: 16px; }
  .psm-auth-foot { display: none; }
  .psm-auth-main { padding: 20px 20px 48px; }
}
@media (max-width: 640px) {
  .psm-user-email, .psm-topbar-cta span { display: none; }
  .psm-user-chip { padding: 4px; }
  .psm-topbar-title h1 { font-size: 19px; }
  .psm-hero { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .psm-hero-side { align-items: flex-start; text-align: left; }
  .psm-hero h2 { font-size: 22px; }
  .psm-stats { gap: 10px; }
  .psm-stat { padding: 16px 14px; gap: 12px; }
  .psm-stat strong { font-size: 22px; }
  .psm-stat-ico { width: 34px; height: 34px; flex-basis: 34px; }
  .psm-quick { grid-template-columns: 1fr; }
  .psm-panel { padding: 20px 16px; }
  .psm-body .psm-box { padding: 20px 16px; }
  .psm-row-side .psm-badge { display: none; }
  .psm-body--auth .psm-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Emojis convertidos en imagen por WordPress: siempre del tamaño del texto */
img.emoji, img.wp-smiley { display: inline !important; width: 1em !important; height: 1em !important; max-width: 1em !important; margin: 0 .07em !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important; vertical-align: -0.1em !important; }

/* Descartar oportunidad */
.psm-body .psm-discard { border-style: dashed; background: var(--a-white); }
.psm-body .psm-discard h3 { margin-bottom: 6px; }
.psm-body .psm-discard p { margin: 0 0 14px; font-size: 13.5px; }
.psm-discard-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.psm-body .psm-discard-form select { width: auto; min-width: 260px; flex: 0 1 320px; }

/* Logo subido en Ajustes → Marca */
.psm-brand-logo { display: inline-flex; align-items: center; }
.psm-brand-logo img { display: block; max-width: 190px; max-height: 46px; width: auto; height: auto; }
.psm-brand--light .psm-brand-logo { background: #fff; padding: 10px 14px; border-radius: 12px; }

/* ---------- Chat ---------- */
.psm-chat { background: var(--a-card); border: 1px solid var(--a-line); border-radius: var(--a-radius); margin: 0 0 20px; display: flex; flex-direction: column; overflow: hidden; scroll-margin-top: 100px; }
.psm-chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--a-line); background: var(--a-white); }
.psm-chat-head strong { display: block; color: var(--a-ink); font-size: 15px; }
.psm-chat-head small { color: var(--a-muted); font-size: 12.5px; }
.psm-chat-list { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 180px; max-height: 460px; overflow-y: auto; background: var(--a-bg); }
.psm-chat-empty { margin: auto; color: var(--a-muted); font-size: 13.5px; text-align: center; }
.psm-msg { max-width: min(78%, 560px); padding: 10px 14px 6px; border-radius: 16px; line-height: 1.45; font-size: 14.5px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.psm-msg p { margin: 0; white-space: normal; word-wrap: break-word; }
.psm-msg time { display: block; margin-top: 4px; font-size: 11px; opacity: .65; text-align: right; }
.psm-msg--mine { align-self: flex-end; background: var(--a-ink); color: #fff; border-bottom-right-radius: 4px; }
.psm-msg--theirs { align-self: flex-start; background: var(--a-white); color: var(--a-ink); border: 1px solid var(--a-line); border-bottom-left-radius: 4px; }
.psm-chat-form { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px 6px; border-top: 1px solid var(--a-line); background: var(--a-white); }
.psm-body .psm-chat-form textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; border-radius: 12px; line-height: 1.4; padding: 11px 14px; }
.psm-body .psm-chat-send { flex: 0 0 auto; height: 44px; padding: 0 16px; gap: 8px; }
.psm-chat-hint { margin: 0; padding: 0 16px 12px; background: var(--a-white); font-size: 11.5px; color: var(--a-muted); }
.psm-chat-closed { margin: 0; padding: 14px 20px; border-top: 1px solid var(--a-line); background: var(--a-white); color: var(--a-muted); font-size: 13.5px; }
.psm-chat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.psm-chat-wrap .psm-chat-list { max-height: 56vh; min-height: 320px; }
.psm-chat-side .psm-box h3 { margin: 6px 0 0; font-size: 16px; }
.psm-pill-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--a-accent); color: #fff; font-size: 11px; font-weight: 700; margin-left: 6px; }
.psm-avatar--lg { width: 38px; height: 38px; flex-basis: 38px; font-size: 14px; }
.psm-thread { padding: 14px 8px; }
.psm-thread .psm-row-main strong em { font-style: normal; font-weight: 500; color: var(--a-muted); }
.psm-thread.is-unread .psm-row-main small { color: var(--a-ink); font-weight: 600; }
.psm-thread .psm-row-side { display: flex; align-items: center; gap: 6px; }
.psm-thread-time { color: var(--a-muted); font-size: 12px; }
.psm-body .psm-box--rows { padding: 8px 14px; }
@media (max-width: 1024px) { .psm-chat-wrap { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .psm-msg { max-width: 88%; }
  .psm-body .psm-chat-send span { display: none; }
  .psm-chat-list { padding: 14px; }
}

/* ---------- Pago de membresía ---------- */
.psm-pay { background: var(--a-white); border: 1px solid var(--a-line); border-top: 4px solid var(--a-accent); border-radius: var(--a-radius); padding: 26px; margin: 0 0 24px; scroll-margin-top: 100px; }
.psm-pay-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.psm-pay-head h2 { margin: 6px 0 0; font-size: 22px; font-weight: 800; color: var(--a-ink); }
.psm-pay-amount { text-align: right; display: flex; flex-direction: column; }
.psm-pay-amount span, .psm-pay-amount small { font-size: 12px; color: var(--a-muted); }
.psm-pay-amount strong { font-size: 26px; font-weight: 800; color: var(--a-ink); line-height: 1.2; }
.psm-pay-text { margin: 14px 0 20px; font-size: 14.5px; max-width: 720px; }
.psm-pay-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.psm-pay-step { display: flex; gap: 12px; padding: 16px; background: var(--a-card); border: 1px solid var(--a-line-2); border-radius: 14px; }
.psm-pay-step > div { min-width: 0; flex: 1; }
.psm-pay-step strong { display: block; color: var(--a-ink); font-size: 14.5px; margin-bottom: 6px; }
.psm-pay-step .psm-muted { margin: 0 0 10px; font-size: 13px; }
.psm-pay-num { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--a-ink); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.psm-bank { margin: 0; }
.psm-bank div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--a-line); }
.psm-bank div:last-child { border-bottom: 0; }
.psm-bank dt { font-size: 12px; color: var(--a-muted); flex: 0 0 auto; }
.psm-bank dd { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; color: var(--a-ink); font-size: 13.5px; text-align: right; }
.psm-bank dd span { overflow-wrap: anywhere; }
.psm-body .psm-copy { flex: 0 0 auto; padding: 3px 8px !important; border: 1px solid var(--a-line) !important; border-radius: 6px !important; background: var(--a-white) !important; color: var(--a-ink) !important; font: 600 11px/1.4 Inter, sans-serif !important; cursor: pointer; }
.psm-body .psm-copy:hover { border-color: var(--a-ink) !important; }
.psm-body .psm-copy.is-done { background: #EAF6EF !important; border-color: #CDEBD9 !important; color: #11603A !important; }
.psm-pay-extra { margin-top: 10px !important; }
.psm-pay-num-wa { margin-top: 6px !important; font-size: 12px !important; }
@media (max-width: 1100px) { .psm-pay-steps { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .psm-pay { padding: 20px 16px; } .psm-pay-amount { text-align: left; } }
