/* =====================================================================
   Umbral — Sistema visual de los PANELES (Gestión y Mi cuenta) · D-026
   Archivo : maqueta/assets/panel.css  (se sirve en /assets/panel.css)
   Fecha   : 2026-11-22
   Se carga DESPUÉS de maqueta.css solo en páginas con cabecera(..., ['panel' => ...]).
   Usa los mismos tokens de marca (pino, arcilla, arena). Todo lleva prefijo p- para no chocar
   con las clases del sitio público (.card, .panel, .kpi…).

   Índice
     1. Tokens del panel
     2. Estructura: barra lateral + barra superior + contenido
     3. Tarjetas, KPIs, gráficos, medidores
     4. Tablas, estados, avatares
     5. Moderación (cola de revisión)
     6. Formularios, diálogo, avisos (toasts)
     7. Celular: barra inferior y tablas apiladas
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
body.p-body {
  --p-bg: #f3f1ec;
  --p-card: #ffffff;
  --p-line: #e8e3d9;
  --p-line-2: #f0ece4;
  --p-ink: #141c19;
  --p-ink-2: #48534f;
  --p-muted: #7b8580;
  --p-side: #142a24;
  --p-side-2: #1f3d35;
  --p-accent: #c96a43;
  --p-accent-soft: #fbeee7;
  --p-pine-soft: #e6efeb;
  --p-r: 18px;
  --p-shadow: 0 1px 0 rgba(20,28,25,.03), 0 1px 3px rgba(20,28,25,.05), 0 12px 32px -18px rgba(20,28,25,.18);
  --p-shadow-h: 0 1px 0 rgba(20,28,25,.03), 0 4px 10px rgba(20,28,25,.06), 0 22px 44px -20px rgba(20,28,25,.28);
  background: var(--p-bg);
  color: var(--p-ink);
  font-feature-settings: "tnum" 1, "cv11" 1;
}
.p-body [hidden] { display: none !important; }
.p-num { font-variant-numeric: tabular-nums; }

/* ---------- 2. Estructura ---------- */
.p-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }

.p-side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 16px 18px; color: #dfe8e4;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(201,106,67,.16), transparent 55%),
    linear-gradient(180deg, var(--p-side-2) 0%, var(--p-side) 70%);
  border-right: 1px solid rgba(255,255,255,.04);
}
.p-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 18px; color: #fff; text-decoration: none; }
.p-brand svg { width: 34px; height: 34px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.p-brand b { font-family: var(--ff-display); font-weight: 500; font-size: 1.35rem; letter-spacing: -.01em; }
.p-brand small { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #9fb5ad; font-weight: 700; margin-top: 1px; }

.p-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.p-nav__t { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: #7f978f; font-weight: 800; padding: 14px 12px 6px; }
.p-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: #c9d6d1; text-decoration: none; font-weight: 600; font-size: .93rem; transition: background .18s, color .18s;
}
.p-nav a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.p-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.p-nav a.is-on { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.p-nav a.is-on::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--p-accent); }
.p-nav a.is-on svg { opacity: 1; color: #f0b597; }
.p-nav .p-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: rgba(255,255,255,.1); color: #fff; }
.p-nav .p-count--hot { background: var(--p-accent); }

.p-side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.p-me { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06); }
.p-me img, .p-me .p-av { width: 38px; height: 38px; border-radius: 50%; flex: none; }
.p-me div { min-width: 0; }
.p-me strong { display: block; color: #fff; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-me small { display: block; color: #9fb5ad; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-side__links { display: flex; gap: 6px; }
.p-side__links a { flex: 1; text-align: center; padding: 8px; border-radius: 10px; color: #c9d6d1; font-size: .8rem; font-weight: 700; text-decoration: none; border: 1px solid rgba(255,255,255,.08); }
.p-side__links a:hover { background: rgba(255,255,255,.06); color: #fff; }

.p-main { min-width: 0; display: flex; flex-direction: column; }
.p-top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 34px; background: rgba(243,241,236,.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(20,28,25,.06);
}
.p-top__t { min-width: 0; margin-right: auto; }
.p-top__t small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--p-accent); }
.p-top__t h1 { margin: 2px 0 0; font-family: var(--ff-display); font-weight: 500; font-size: clamp(1.45rem, 2.4vw, 1.9rem); letter-spacing: -.015em; line-height: 1.15; }
.p-top__a { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-content { padding: 28px 34px 60px; max-width: 1360px; width: 100%; }
.p-view { animation: p-in .35s cubic-bezier(.2,.7,.2,1); }
@keyframes p-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.p-sec-t { display: flex; align-items: baseline; gap: 10px; margin: 34px 0 14px; }
.p-sec-t:first-child { margin-top: 0; }
.p-sec-t h2 { margin: 0; font-family: var(--ff-display); font-weight: 500; font-size: 1.35rem; letter-spacing: -.01em; }
.p-sec-t span { color: var(--p-muted); font-size: .88rem; }
.p-sec-t .p-sec-a { margin-left: auto; }

/* Botones del panel */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 11px; border: 1px solid var(--p-line); background: var(--p-card); color: var(--p-ink); font: 700 .86rem var(--ff-body); cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .15s, transform .1s; }
.p-btn:hover { border-color: #cfc7b8; box-shadow: 0 2px 8px rgba(20,28,25,.06); }
.p-btn:active { transform: translateY(1px); }
.p-btn:disabled { opacity: .55; cursor: progress; }
.p-btn svg { width: 16px; height: 16px; }
.p-btn--pri { background: var(--p-side-2); border-color: var(--p-side-2); color: #fff; }
.p-btn--pri:hover { background: #28503f; border-color: #28503f; }
.p-btn--acc { background: var(--p-accent); border-color: var(--p-accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(201,106,67,.8); }
.p-btn--acc:hover { background: #b65a35; border-color: #b65a35; }
.p-btn--bad { color: var(--bad); }
.p-btn--bad:hover { border-color: #e7b9b3; background: #fdf3f2; }
.p-btn--sm { height: 32px; padding: 0 11px; font-size: .8rem; border-radius: 9px; }
.p-btn--ico { width: 32px; padding: 0; }

/* Control segmentado (período) */
.p-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: #e9e5dc; gap: 2px; }
.p-seg a { padding: 7px 13px; border-radius: 9px; font-size: .82rem; font-weight: 700; color: var(--p-ink-2); text-decoration: none; }
.p-seg a.is-on { background: var(--p-card); color: var(--p-ink); box-shadow: 0 1px 3px rgba(20,28,25,.12); }

/* ---------- 3. Tarjetas, KPIs, gráficos ---------- */
.p-card { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-r); box-shadow: var(--p-shadow); padding: 22px; min-width: 0; }
.p-card + .p-card { margin-top: 18px; }
.p-card__h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.p-card__h h3 { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -.005em; }
.p-card__h span { color: var(--p-muted); font-size: .82rem; }
.p-card__h .p-card__a { margin-left: auto; }
.p-card--flush { padding: 0; overflow: hidden; }
.p-card--flush .p-card__h { padding: 18px 22px 0; }

.p-grid { display: grid; gap: 18px; }
.p-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-grid--21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.p-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 16px; }
.p-kpi { position: relative; background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-r); box-shadow: var(--p-shadow); padding: 18px 18px 16px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.p-kpi:hover { box-shadow: var(--p-shadow-h); transform: translateY(-1px); }
.p-kpi__top { display: flex; align-items: center; gap: 10px; }
.p-kpi__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--p-pine-soft); color: var(--p-side-2); flex: none; }
.p-kpi__ico svg { width: 18px; height: 18px; }
.p-kpi__ico--acc { background: var(--p-accent-soft); color: var(--p-accent); }
.p-kpi__ico--wa { background: #e3f5ea; color: #17904a; }
.p-kpi__ico--warn { background: var(--warn-bg); color: var(--warn); }
.p-kpi__l { font-size: .8rem; font-weight: 700; color: var(--p-ink-2); }
.p-kpi__v { display: block; margin-top: 14px; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.p-kpi__s { display: block; margin-top: 8px; font-size: .78rem; color: var(--p-muted); }
.p-kpi__s b { color: var(--p-ink-2); }
.p-kpi__s .up { color: var(--ok); font-weight: 800; }
.p-kpi__s .dn { color: var(--bad); font-weight: 800; }
.p-kpi__spark { position: absolute; right: 16px; top: 54px; width: 92px; height: 34px; opacity: .9; }

.p-chart { position: relative; }
.p-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.p-chart .grid line { stroke: var(--p-line-2); }
.p-chart .ax text { fill: var(--p-muted); font-size: 11px; font-family: var(--ff-body); }
.p-chart .ar { fill: url(#p-grad); }
.p-chart .ln { fill: none; stroke: var(--p-side-2); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.p-chart .ln2 { fill: none; stroke: var(--p-accent); stroke-width: 2; stroke-dasharray: 4 4; }
.p-chart .hv { stroke: #cfc7b8; stroke-dasharray: 3 3; }
.p-chart .dot { fill: #fff; stroke: var(--p-side-2); stroke-width: 2.2; }
.p-tip { position: absolute; pointer-events: none; transform: translate(-50%, -110%); background: var(--p-side); color: #fff; padding: 8px 11px; border-radius: 10px; font-size: .78rem; line-height: 1.45; white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.p-tip b { display: block; font-size: .72rem; color: #9fb5ad; font-weight: 700; }
.p-legend { display: flex; gap: 16px; font-size: .78rem; color: var(--p-ink-2); }
.p-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--p-side-2); }
.p-legend i.acc { background: var(--p-accent); }

.p-meters { display: flex; flex-direction: column; gap: 13px; }
.p-meter__r { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; margin-bottom: 6px; }
.p-meter__r span { color: var(--p-ink-2); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-meter__r b { font-variant-numeric: tabular-nums; }
.p-meter__r b small { color: var(--p-muted); font-weight: 600; margin-left: 4px; }
.p-meter__b { height: 7px; border-radius: 99px; background: var(--p-line-2); overflow: hidden; }
.p-meter__b i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--p-side-2), #3d7562); }
.p-meter--acc .p-meter__b i { background: linear-gradient(90deg, var(--p-accent), #e09a78); }

.p-funnel { display: flex; flex-direction: column; gap: 8px; }
.p-funnel div { position: relative; display: flex; justify-content: space-between; padding: 11px 14px; border-radius: 11px; font-size: .88rem; font-weight: 700; overflow: hidden; background: #f7f5f0; }
.p-funnel div i { position: absolute; inset: 0 auto 0 0; background: var(--p-pine-soft); z-index: 0; }
.p-funnel div span, .p-funnel div b { position: relative; z-index: 1; }

.p-list { display: flex; flex-direction: column; }
.p-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--p-line-2); font-size: .9rem; }
.p-list > div:first-child { border-top: 0; padding-top: 0; }
.p-list > div > span:first-child { color: var(--p-ink-2); }

.p-empty { text-align: center; padding: 34px 18px; color: var(--p-muted); }
.p-empty svg { width: 40px; height: 40px; color: #c9c1b2; margin-bottom: 10px; }
.p-empty strong { display: block; color: var(--p-ink); font-size: .98rem; margin-bottom: 4px; }
.p-empty p { margin: 0; font-size: .88rem; }

/* ---------- 4. Tablas ---------- */
.p-tw { overflow-x: auto; }
.p-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.p-tbl th { position: sticky; top: 0; background: #faf9f6; text-align: left; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--p-muted); font-weight: 800; padding: 11px 14px; border-bottom: 1px solid var(--p-line); white-space: nowrap; }
.p-tbl td { padding: 13px 14px; border-bottom: 1px solid var(--p-line-2); vertical-align: middle; }
.p-tbl tbody tr { transition: background .12s; }
.p-tbl tbody tr:hover { background: #fbfaf7; }
.p-tbl tbody tr:last-child td { border-bottom: 0; }
.p-tbl td.r, .p-tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.p-tbl a { color: var(--p-ink); font-weight: 700; text-decoration: none; }
.p-tbl a:hover { color: var(--p-accent); }
.p-tbl small { display: block; color: var(--p-muted); font-size: .78rem; margin-top: 2px; }
.p-tbl .p-acts { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.p-ref { font: 700 .76rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--p-muted); background: #f3f1ec; padding: 3px 7px; border-radius: 6px; }

.p-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.p-who > div { min-width: 0; }
.p-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: .78rem; color: #fff; background: linear-gradient(135deg, #2f5a4d, #1f3d35); }
.p-av--2 { background: linear-gradient(135deg, #d4876a, #b85f3c); }
.p-av--3 { background: linear-gradient(135deg, #8a7bb8, #5b4a8a); }
.p-av--4 { background: linear-gradient(135deg, #c8a24a, #a8701a); }
.p-av--off { background: #cfcac0; }
.p-thumb { width: 54px; height: 42px; border-radius: 9px; object-fit: cover; flex: none; background: #eee; }

.p-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; background: #eeebe5; color: var(--p-ink-2); }
.p-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.p-pill--ok { background: var(--ok-bg); color: var(--ok); }
.p-pill--warn { background: var(--warn-bg); color: var(--warn); }
.p-pill--bad { background: var(--bad-bg); color: var(--bad); }
.p-pill--acc { background: var(--p-accent-soft); color: #b0532d; }
.p-pill--plain::before { display: none; }

.p-days { display: inline-flex; flex-direction: column; gap: 5px; min-width: 86px; }
.p-days b { font-size: .86rem; }
.p-days i { display: block; height: 5px; border-radius: 9px; background: var(--p-line-2); overflow: hidden; }
.p-days i::after { content: ""; display: block; height: 100%; width: var(--w); background: var(--c, var(--ok)); border-radius: inherit; }

.p-search { position: relative; }
.p-search input { height: 38px; width: 260px; max-width: 100%; padding: 0 12px 0 36px; border-radius: 11px; border: 1px solid var(--p-line); background: var(--p-card); font: 500 .88rem var(--ff-body); }
.p-search input:focus { outline: none; border-color: #9fb5ad; box-shadow: 0 0 0 4px rgba(47,90,77,.1); }
.p-search svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--p-muted); }

.p-feed { display: flex; flex-direction: column; }
.p-feed > div { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--p-line-2); }
.p-feed > div:first-child { border-top: 0; padding-top: 0; }
.p-feed .p-fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--p-pine-soft); color: var(--p-side-2); }
.p-feed .p-fi svg { width: 16px; height: 16px; }
.p-feed .p-fi--acc { background: var(--p-accent-soft); color: var(--p-accent); }
.p-feed .p-fi--bad { background: var(--bad-bg); color: var(--bad); }
.p-feed .p-fi--ok { background: var(--ok-bg); color: var(--ok); }
.p-feed strong { display: block; font-size: .88rem; }
.p-feed small { display: block; color: var(--p-muted); font-size: .8rem; margin-top: 2px; }
.p-feed time { color: var(--p-muted); font-size: .76rem; white-space: nowrap; }

.p-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.p-health > div { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; border: 1px solid var(--p-line); background: var(--p-card); }
.p-health .p-st { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.p-health .p-st--bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.p-health .p-st--warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.p-health strong { display: block; font-size: .9rem; }
.p-health small { display: block; color: var(--p-muted); font-size: .8rem; margin-top: 3px; overflow-wrap: anywhere; }

/* ---------- 5. Moderación ---------- */
.p-q { display: grid; grid-template-columns: minmax(0, 1fr) 300px; background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-r); box-shadow: var(--p-shadow); overflow: hidden; }
.p-q + .p-q { margin-top: 16px; }
.p-q__main { padding: 22px; min-width: 0; }
.p-q__side { padding: 22px; background: #faf9f6; border-left: 1px solid var(--p-line); display: flex; flex-direction: column; gap: 12px; }
.p-q__head { display: flex; gap: 14px; align-items: flex-start; }
.p-q__head h3 { margin: 0 0 4px; font-size: 1.08rem; }
.p-q__meta { color: var(--p-muted); font-size: .84rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.p-q__meta b { color: var(--p-accent); }
.p-score { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex: none; font-weight: 900; font-size: 1.1rem; line-height: 1; text-align: center; }
.p-score small { display: block; font-size: .55rem; letter-spacing: .1em; font-weight: 800; margin-top: 3px; text-transform: uppercase; }
.p-score--g { background: var(--ok-bg); color: var(--ok); }
.p-score--y { background: var(--warn-bg); color: var(--warn); }
.p-score--r { background: var(--bad-bg); color: var(--bad); }
.p-strip { display: flex; gap: 8px; margin: 16px 0; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.p-strip a { flex: none; scroll-snap-align: start; }
.p-strip img { width: 128px; height: 92px; object-fit: cover; border-radius: 11px; display: block; transition: transform .2s; }
.p-strip a:hover img { transform: scale(1.03); }
.p-alerts { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.p-alerts li { display: flex; gap: 10px; align-items: center; font-size: .84rem; padding: 8px 11px; border-radius: 10px; background: #fdf6ec; }
.p-alerts li .p-pill { flex: none; }
.p-q details summary { cursor: pointer; color: var(--p-ink-2); font-weight: 700; font-size: .86rem; }
.p-q details p { font-size: .9rem; color: var(--p-ink-2); }
.p-check { display: flex; flex-direction: column; gap: 4px; }
.p-check label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: .86rem; cursor: pointer; }
.p-check label:hover { background: #f1eee7; }
.p-check input { width: 17px; height: 17px; accent-color: var(--p-side-2); }
.p-q__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }

/* ---------- 6. Formularios, diálogo, avisos ---------- */
.p-body .field input, .p-body .field select { border-radius: 11px; }
.p-dlg { border: 0; padding: 0; border-radius: 22px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(10,16,14,.45); color: var(--p-ink); }
.p-dlg::backdrop { background: rgba(14,22,19,.5); backdrop-filter: blur(3px); }
.p-dlg[open] { animation: p-pop .22s cubic-bezier(.2,.8,.2,1); }
@keyframes p-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.p-dlg form { padding: 26px; }
.p-dlg__ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--p-pine-soft); color: var(--p-side-2); margin-bottom: 14px; }
.p-dlg__ico svg { width: 22px; height: 22px; }
.p-dlg--bad .p-dlg__ico { background: var(--bad-bg); color: var(--bad); }
.p-dlg h3 { margin: 0 0 6px; font-size: 1.15rem; }
.p-dlg p { margin: 0; color: var(--p-ink-2); font-size: .9rem; line-height: 1.55; }
.p-dlg select { width: 100%; height: 42px; margin-top: 16px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--p-line); background: #fff; font: 600 .9rem var(--ff-body); }
.p-dlg__b { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.p-dlg--bad .p-btn--pri { background: var(--bad); border-color: var(--bad); }

.p-toasts { position: fixed; right: 22px; bottom: 22px; z-index: 4000; display: flex; flex-direction: column; gap: 10px; max-width: min(400px, calc(100vw - 32px)); }
.p-toast { display: flex; gap: 11px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; background: var(--p-side); color: #fff; font-size: .88rem; line-height: 1.45; box-shadow: 0 18px 40px -12px rgba(0,0,0,.4); animation: p-pop .25s cubic-bezier(.2,.8,.2,1); }
.p-toast i { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: .75rem; background: #3a8a63; }
.p-toast--bad i { background: #d0574f; }

.p-banner { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--p-r); margin-bottom: 22px; background: linear-gradient(110deg, var(--p-side-2), #2b5a49); color: #e6efeb; box-shadow: var(--p-shadow); }
.p-banner strong { display: block; color: #fff; font-size: 1rem; }
.p-banner small { font-size: .86rem; }
.p-banner .p-btn { margin-left: auto; }
.p-banner__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.12); }
.p-banner__ico svg { width: 20px; height: 20px; }

.p-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.p-steps div { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 13px; background: #f7f5f0; font-size: .84rem; font-weight: 700; color: var(--p-muted); }
.p-steps div b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #e6e1d7; color: var(--p-ink-2); font-size: .76rem; flex: none; }
.p-steps div.is-on { background: var(--p-pine-soft); color: var(--p-side-2); }
.p-steps div.is-on b { background: var(--p-side-2); color: #fff; }
.p-steps div.is-ok b { background: var(--ok); color: #fff; }

/* Mis anuncios (anunciante) */
.p-ads { display: flex; flex-direction: column; gap: 14px; }
.p-ad { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px; background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-r); box-shadow: var(--p-shadow); transition: box-shadow .2s; }
.p-ad:hover { box-shadow: var(--p-shadow-h); }
.p-ad__img { width: 168px; height: 118px; border-radius: 13px; object-fit: cover; background: #eee; }
.p-ad h3 { margin: 8px 0 4px; font-size: 1.04rem; }
.p-ad__meta { color: var(--p-muted); font-size: .86rem; }
.p-ad__meta b { color: var(--p-accent); }
.p-ad__stats { display: flex; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.p-ad__stats div { font-size: .78rem; color: var(--p-muted); }
.p-ad__stats b { display: block; font-size: 1.05rem; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.p-ad__why { margin-top: 10px; font-size: .84rem; color: var(--bad); background: var(--bad-bg); padding: 8px 11px; border-radius: 10px; }
.p-ad__acts { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 132px; }

.p-def { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.p-def div { padding: 14px 16px; border-radius: 13px; background: #f7f5f0; }
.p-def span { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--p-muted); }
.p-def b { display: block; margin-top: 4px; font-size: .95rem; }

/* ---------- 7. Responsive ---------- */
@media (max-width: 1180px) {
  .p-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-grid--21 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .p-shell { grid-template-columns: 1fr; }
  .p-side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 900; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); flex-direction: row; border-right: 0; border-top: 1px solid rgba(255,255,255,.06); background: var(--p-side); }
  .p-brand, .p-side__foot, .p-nav__t { display: none; }
  .p-nav { flex-direction: row; margin: 0; width: 100%; overflow-x: auto; scrollbar-width: none; justify-content: space-around; }
  .p-nav a { flex-direction: column; gap: 3px; padding: 7px 8px; font-size: .66rem; min-width: 62px; text-align: center; border-radius: 10px; }
  .p-nav a.is-on::before { display: none; }
  .p-nav .p-count { position: absolute; top: 2px; right: 8px; min-width: 17px; height: 17px; font-size: .62rem; padding: 0 4px; margin: 0; }
  .p-top { padding: 14px 16px; gap: 10px; }
  .p-top__a { width: 100%; }
  .p-content { padding: 18px 16px 110px; }
  .p-grid--2, .p-grid--3 { grid-template-columns: 1fr; }
  .p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-kpi { padding: 14px; }
  .p-kpi__v { font-size: 1.55rem; margin-top: 12px; }
  .p-kpi__spark { display: none; }
  .p-card { padding: 16px; }
  .p-card--flush .p-card__h { padding: 16px 16px 0; }
  .p-q { grid-template-columns: 1fr; }
  .p-q__side { border-left: 0; border-top: 1px solid var(--p-line); }
  .p-ad { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
  .p-ad__img { width: 96px; height: 80px; }
  .p-ad__acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .p-ad__acts > * { flex: 1; }
  .p-search, .p-search input { width: 100%; }
  .p-steps { flex-direction: column; }
  .p-toasts { left: 16px; right: 16px; bottom: 84px; max-width: none; }
  .p-banner { flex-wrap: wrap; }
  .p-banner .p-btn { margin-left: 0; width: 100%; }
  /* Tablas apiladas: cada fila se vuelve una tarjeta */
  .p-tbl--stack thead { display: none; }
  .p-tbl--stack, .p-tbl--stack tbody, .p-tbl--stack tr, .p-tbl--stack td { display: block; width: 100%; }
  .p-tbl--stack tr { padding: 12px 16px; border-bottom: 1px solid var(--p-line-2); }
  .p-tbl--stack td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .p-tbl--stack td::before { content: attr(data-l); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--p-muted); text-align: left; flex: none; }
  .p-tbl--stack td[data-l=""]::before, .p-tbl--stack td:not([data-l])::before { display: none; }
  .p-tbl--stack td.p-main-cell { text-align: left; justify-content: flex-start; }
  .p-tbl--stack .p-acts { justify-content: flex-start; flex-wrap: wrap; padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .p-view, .p-dlg[open], .p-toast { animation: none; } .p-kpi:hover { transform: none; } }

/* ---------- 8. Asistente de publicación (modo foco, D-027) ---------- */
.w-body { background: var(--p-bg); }
.w-top { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(243,241,236,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(20,28,25,.06); }
.w-top .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--p-ink); font-family: var(--ff-display); font-size: 1.25rem; }
.w-top .logo svg { width: 30px; height: 30px; }
.w-top__sep { width: 1px; height: 22px; background: var(--p-line); }
.w-top__t { font-weight: 700; font-size: .9rem; color: var(--p-ink-2); }
.w-top__a { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.w-saved { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--p-muted); opacity: 0; transition: opacity .3s; }
.w-saved.is-on { opacity: 1; color: var(--ok); }
.w-saved svg { width: 15px; height: 15px; }

.w-body .wizard { max-width: 1180px; padding: 34px 28px 140px; }
.w-hero { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.w-hero h1 { margin: 6px 0 6px; font-family: var(--ff-display); font-weight: 500; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.02em; line-height: 1.1; }
.w-hero p { margin: 0; color: var(--p-ink-2); max-width: 620px; }

.w-body .stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; counter-reset: w; }
.w-body .stepper li { counter-increment: w; position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px 14px; border: 1px solid var(--p-line); border-top: 1px solid var(--p-line); border-radius: 14px; background: var(--p-card); font-size: .84rem; font-weight: 700; color: var(--p-muted); overflow: hidden; }
.w-body .stepper li::before { content: counter(w); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #efebe3; color: var(--p-ink-2); font-size: .78rem; font-weight: 800; }
.w-body .stepper li::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--p-accent); transition: width .4s ease; }
.w-body .stepper li.is-current { color: var(--p-ink); border-color: #e9c9b8; box-shadow: var(--p-shadow); }
.w-body .stepper li.is-current::before { background: var(--p-accent); color: #fff; }
.w-body .stepper li.is-current::after { width: 50%; }
.w-body .stepper li.is-done { color: var(--p-side-2); border-color: var(--p-line); }
.w-body .stepper li.is-done::before { content: "✓"; background: var(--p-side-2); color: #fff; }
.w-body .stepper li.is-done::after { width: 100%; background: var(--p-side-2); }

.w-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.w-body .panel { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--p-r); box-shadow: var(--p-shadow); padding: 24px; margin: 0 0 18px; }
.w-body .panel h3 { margin: 0 0 16px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.005em; }
.w-body .choice { grid-template-columns: repeat(3, 1fr); }
.w-body .choice label { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px; border-radius: 16px; border: 1.5px solid var(--p-line); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.w-body .choice label:hover { border-color: #cfc7b8; transform: translateY(-1px); }
.w-body .choice label:has(input:checked) { border-color: var(--p-accent); background: var(--p-accent-soft); box-shadow: 0 0 0 4px rgba(201,106,67,.12); }
.w-body .choice label svg { width: 30px; height: 30px; margin: 0; color: var(--p-side-2); }
.w-body .field input, .w-body .field select, .w-body .field textarea { border-radius: 12px; }
.w-body .field input:focus, .w-body .field select:focus, .w-body .field textarea:focus { box-shadow: 0 0 0 4px rgba(47,90,77,.1); }
.w-body .toggles label { background: #fff; }
.w-body .pick-map-wrap { position: relative; }
.w-body .pick-map { height: 340px; border-radius: 16px; border: 1px solid var(--p-line); position: relative; z-index: 0; isolation: isolate; touch-action: pan-y; }
.w-body .pick-map-lock { position: absolute; right: 12px; top: 12px; z-index: 400; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid rgba(20,28,25,.14); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); font: 800 .78rem var(--ff-body); color: var(--p-side-2); box-shadow: 0 6px 18px rgba(0,0,0,.15); cursor: pointer; }
.w-body .pick-map-lock.is-on { background: var(--p-side-2); color: #fff; border-color: var(--p-side-2); }
.w-map-shield { display: flex; gap: 11px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: 13px; background: var(--p-pine-soft); border: 1px solid #cfe0d8; color: var(--p-side-2); font-size: .84rem; line-height: 1.5; }
.w-map-shield svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--p-side-2); }
.w-map-shield strong { display: block; color: var(--p-ink); margin-bottom: 2px; }
.w-body .drop { border-radius: 18px; padding: 40px 20px; background: #fbfaf7; border-color: #ddd5c6; }
.w-body .drop svg { display: block; }
.w-body .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.w-body .ph { border-radius: 14px; box-shadow: 0 1px 3px rgba(20,28,25,.1); }
.w-body .ph:first-child { grid-column: span 2; grid-row: span 2; }
.w-body .alert { border-radius: 14px; }

/* Vista previa en vivo */
.w-prev { position: sticky; top: 86px; }
.w-prev__l { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--p-muted); margin: 0 0 10px 4px; }
.w-card { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 20px; overflow: hidden; box-shadow: var(--p-shadow-h); }
.w-card__img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e9e4da, #f4f1ea); display: grid; place-items: center; color: #b9b09f; }
.w-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.w-card__img svg { width: 44px; height: 44px; }
.w-card__img .p-pill { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.94); color: var(--p-side-2); }
.w-card__b { padding: 16px 18px 18px; }
.w-card__p { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--p-ink); }
.w-card__p small { font-size: .8rem; color: var(--p-muted); font-weight: 600; }
.w-card__t { margin-top: 4px; font-weight: 700; color: var(--p-ink); line-height: 1.35; }
.w-card__loc { margin-top: 3px; font-size: .85rem; color: var(--p-muted); }
.w-card__f { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.w-card__f span { font-size: .76rem; font-weight: 700; padding: 5px 9px; border-radius: 8px; background: #f3f1ec; color: var(--p-ink-2); }
.w-score { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: var(--p-card); border: 1px solid var(--p-line); }
.w-score__r { display: flex; justify-content: space-between; font-size: .84rem; font-weight: 700; margin-bottom: 8px; }
.w-score .p-meter__b { height: 8px; }
.w-score ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--p-ink-2); }
.w-score li::before { content: "○"; margin-right: 8px; color: var(--p-muted); }
.w-score li.ok { color: var(--p-muted); text-decoration: line-through; }
.w-score li.ok::before { content: "✓"; color: var(--ok); }
.w-tips { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: var(--p-pine-soft); color: var(--p-side-2); font-size: .85rem; line-height: 1.5; }
.w-tips strong { display: block; margin-bottom: 4px; }

/* Barra inferior fija + Guía contextual en vivo (D-039) */
.w-body .wizard-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0; padding: 10px 28px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--p-line); box-shadow: 0 -10px 30px -18px rgba(20,28,25,.2); }
.w-body .wizard-nav::before { content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: var(--avance, 25%); background: linear-gradient(90deg, var(--p-side-2), var(--p-accent)); transition: width .45s ease; }
.w-guide-bar { width: 100%; max-width: 1124px; margin: 0 auto; padding: 8px 14px; border-radius: 10px; background: #fbf2ed; border: 1px solid #f0d3c5; color: #7c381c; font-size: .84rem; line-height: 1.4; }
.w-guide-bar.is-ok { background: var(--ok-bg); border-color: #bfe0cd; color: var(--ok); }
.w-nav-btns { width: 100%; max-width: 1124px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.w-nav__info { margin: 0 auto; font-size: .84rem; font-weight: 700; color: var(--p-muted); }
.w-body .wizard-nav .btn { height: 46px; padding: 0 22px; border-radius: 13px; }
.w-body .wizard-nav #next { min-width: 170px; margin-left: auto; box-shadow: 0 8px 22px -10px rgba(201,106,67,.9); }
.w-body .wizard-nav .w-nav__info + #next { margin-left: 0; }

/* Tarjetas de guía en cada paso, botones mágicos y ayudas visuales (D-039) */
.w-step-guide { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; padding: 15px 18px; border-radius: 16px; background: linear-gradient(120deg, var(--p-side-2), #18322b); color: #e6efeb; box-shadow: var(--p-shadow); }
.w-step-guide b { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #f3b896; }
.w-step-guide span { font-size: .92rem; line-height: 1.5; }
.w-howto { margin: 2px 0 10px; padding: 12px 14px; border-radius: 12px; background: #f7f5f0; border: 1px solid var(--p-line); font-size: .84rem; color: var(--p-ink-2); }
.w-howto b { display: block; color: var(--p-ink); margin-bottom: 4px; }
.w-howto ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.w-label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.w-label-row span { font-size: .85rem; font-weight: 700; }
.w-body .field em { font-style: normal; font-weight: 600; color: var(--p-accent); font-size: .78rem; }
.w-magic-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid #e6c4b2; background: var(--p-accent-soft); color: #9c4421; font: 800 .78rem var(--ff-body); cursor: pointer; transition: transform .12s, background .15s; }
.w-magic-btn:hover { background: #f6dfd3; transform: translateY(-1px); }
.w-desc-bar { height: 5px; border-radius: 99px; background: var(--p-line-2); overflow: hidden; margin-top: 2px; }
.w-desc-bar i { display: block; height: 100%; width: 0; background: var(--p-accent); transition: width .2s, background .2s; }
.w-photo-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.w-photo-tips div { padding: 11px 13px; border-radius: 12px; background: #f7f5f0; border: 1px solid var(--p-line); font-size: .82rem; }
.w-photo-tips b { display: block; color: var(--p-side-2); margin-bottom: 2px; }
.w-photo-tips span { color: var(--p-ink-2); }
.w-tyc-box { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; border-radius: 13px; background: #f7f5f0; border: 1.5px solid var(--p-line); font-size: .92rem; cursor: pointer; }
.w-tyc-box input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--p-side-2); flex: none; }
.w-shake { box-shadow: 0 0 0 3px var(--p-accent) !important; transition: box-shadow .2s; }

.w-body .done-box { padding: 56px 24px; }
.w-body .done-box .ring { width: 86px; height: 86px; font-size: 2rem; font-weight: 900; box-shadow: 0 0 0 10px rgba(47,125,87,.08); animation: p-pop .4s cubic-bezier(.2,.8,.2,1); }
.w-foot { text-align: center; color: var(--p-muted); font-size: .78rem; padding: 0 20px 150px; }
.w-foot a { color: inherit; }

@media (max-width: 1000px) {
  .w-grid { grid-template-columns: 1fr; }
  .w-prev { display: none; }
}
@media (max-width: 640px) {
  .w-top { padding: 12px 16px; }
  .w-top__sep, .w-top__t { display: none; }
  .w-body .wizard { padding: 18px 16px 165px; }
  .w-body .stepper { gap: 6px; }
  .w-body .stepper li { flex-direction: column; gap: 6px; padding: 10px 4px 12px; font-size: .66rem; text-align: center; }
  .w-body .panel { padding: 18px; }
  .w-body .choice { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .w-body .choice label { padding: 14px 6px; font-size: .84rem; }
  .w-body .fields, .w-body .fields--3 { grid-template-columns: 1fr; gap: 14px; }
  .w-photo-tips { grid-template-columns: 1fr; gap: 8px; }
  .w-body .pick-map { height: 220px; margin-right: 16px; }
  .w-body .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .w-body .wizard-nav { padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); gap: 6px; }
  .w-guide-bar { font-size: .79rem; padding: 7px 11px; }
  .w-nav__info { display: none; }
  .w-body .wizard-nav .btn { flex: 1; padding: 0 12px; }
  .w-body .wizard-nav #prev { flex: 0 0 auto; }
}

/* ---------- 9. Equipo (D-030) y Carga asistida (D-036) ---------- */
.p-eq-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; }
.p-eq-form input, .p-eq-form select, .p-eq-rol, .p-asist-form input, .p-asist-form select { height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--p-line); background: #fff; font: 600 .9rem var(--ff-body); color: var(--p-ink); min-width: 0; }
.p-eq-form input:focus, .p-eq-form select:focus, .p-eq-rol:focus, .p-asist-form input:focus, .p-asist-form select:focus { outline: none; border-color: #9fb5ad; box-shadow: 0 0 0 4px rgba(47,90,77,.1); }
.p-eq-form .p-btn, .p-asist-form .p-btn { height: 40px; }
.p-asist-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.p-asist-out { margin-top: 14px; padding: 14px 16px; border-radius: 13px; background: var(--p-pine-soft); color: var(--p-side-2); font-size: .88rem; overflow-wrap: anywhere; }
.p-asist-out a { color: var(--p-side-2); font-weight: 700; }
@media (max-width: 900px) { .p-eq-form, .p-asist-form { grid-template-columns: 1fr; } .p-asist-form input[style] { grid-column: auto !important; } }

/* ---------- 10. Equipamiento por ambiente en el asistente (D-042) ---------- */
.w-amb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.w-amb__g { padding: 14px 16px; border-radius: 14px; background: #faf8f3; border: 1px solid var(--p-line); }
.w-amb__g > b { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--p-muted); margin-bottom: 10px; }
.w-amb__g .toggles { gap: 6px; }
.w-amb__g .toggles label { padding: 7px 12px; font-size: .84rem; }
@media (max-width: 640px) { .w-amb { grid-template-columns: 1fr; } }

/* ---------- 11. Menú lateral en pantallas bajas (fix 2026-11-23) ----------
   El menú mide 100vh; con muchas secciones el contenido se salía del fondo. Ahora se desplaza dentro de la barra. */
@media (min-width: 901px) {
  .p-side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
  .p-side::-webkit-scrollbar { width: 6px; }
  .p-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 6px; }
  .p-side__foot { padding-top: 12px; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .p-side { padding-top: 14px; gap: 2px; }
  .p-brand { padding-bottom: 8px; }
  .p-nav a { padding: 7px 12px; }
  .p-nav__t { padding: 10px 12px 4px; }
  .p-me { padding: 9px; }
}

/* D-048: aviso de barrio que no coincide con el punto del mapa */
.w-body #ubi-barrio { margin-top: 10px; }
.ubi-acc { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ubi-acc .chip { font-size: .82rem; }

/* D-051: botón Volver (sitio, panel y modo foco) */
.btn-volver { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; height: 38px; padding: 0 12px 0 8px; border-radius: 12px;
  border: 1px solid rgba(24,34,31,.14); background: rgba(255,255,255,.75); color: inherit; font: 700 .86rem var(--ff-body); cursor: pointer; transition: background .2s, border-color .2s; }
.btn-volver:hover { background: #fff; border-color: rgba(24,34,31,.3); }
.btn-volver svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .btn-volver { width: 38px; padding: 0; } .btn-volver span { display: none; } }

/* D-051: nada más ancho que la pantalla en el celular (evita arrastrar la página de costado) */
html, body { max-width: 100%; overflow-x: clip; }
img, video, svg, iframe { max-width: 100%; }
@media (max-width: 640px) {
  /* iPhone agranda la pantalla al tocar campos de menos de 16 px y después queda corrida: 16 px mínimo */
  input, select, textarea { font-size: 16px !important; }
}

.p-top .btn-volver { align-self: center; }
.w-top .btn-volver { margin-right: -4px; }
/* /publicar: el cartel de promo y el título no deben ensanchar la página */
.w-hero > div { min-width: 0; }
.w-hero .p-pill { white-space: normal; }

/* D-052: casilla con su texto al lado (expensas incluidas) */
.w-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; margin-top: 4px; font-size: .86rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.w-check input[type=checkbox] { width: 20px !important; height: 20px; flex: none; margin: 0; padding: 0; accent-color: var(--brand-pine, #1f3d35); }

/* ---------- D-053: asistente cómodo en computadora ----------
   Barra inferior en UNA fila, alineada con el contenido: [Atrás] [qué hacer ahora] [Continuar]. Cabecera más compacta. */
@media (min-width: 901px) {
  .w-body .wizard-nav { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 14px;
    padding-left: max(28px, calc((100vw - 1124px) / 2)); padding-right: max(28px, calc((100vw - 1124px) / 2)); }
  .w-body .wizard-nav .w-nav-btns { display: contents; }
  .w-body .wizard-nav #prev { order: 1; flex: none; }
  .w-body .wizard-nav .w-guide-bar { order: 2; flex: 1 1 auto; width: auto; max-width: none; margin: 0; min-height: 46px; display: flex; align-items: center; }
  .w-body .wizard-nav #next { order: 3; flex: none; margin-left: 0; }
  .w-body .wizard-nav .w-nav__info { display: none; }

  .w-body .wizard { padding-top: 22px; }
  .w-hero { margin-bottom: 16px; }
  .w-hero h1 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); margin: 4px 0 4px; }
  .w-hero p { font-size: .95rem; }
  .w-body .stepper { margin-bottom: 18px; }
  .w-body .stepper li { padding: 9px 12px 11px; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .w-hero p { display: none; }   /* el recuadro de cada paso ya explica qué hacer */
  .w-hero h1 { font-size: 1.7rem; }
}
.w-body .wizard-nav #next.is-listo { animation: w-latido 1.8s ease-in-out infinite; }
@keyframes w-latido { 0%, 100% { box-shadow: 0 8px 22px -10px rgba(201,106,67,.9); } 50% { box-shadow: 0 0 0 6px rgba(201,106,67,.22), 0 8px 22px -10px rgba(201,106,67,.9); } }
@media (prefers-reduced-motion: reduce) { .w-body .wizard-nav #next.is-listo { animation: none; } }

/* D-054: el mensaje de la barra se achica (nunca empuja Continuar fuera de la pantalla) y "Atrás" no ocupa lugar en el paso 1 */
.w-body .wizard-nav .w-guide-bar { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 901px) { .w-body .wizard-nav #prev.is-oculto { display: none; } }
#ubi-barrio.w-shake { animation: w-shake .5s; }

/* D-055: mini barras de lectura por anuncio (F/D/M/C) */
.p-lee { display: inline-flex; gap: 4px; }
.p-lee i { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border-radius: 7px; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--p-ink-2); background: #f1eee7; overflow: hidden; isolation: isolate; }
.p-lee i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--p-pine-soft); z-index: -1; }
.p-lee b { color: var(--p-side-2); }

/* D-056: bloque socios ACIP en Mi perfil */
.p-acip { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: #fbf6ee; border: 1px solid #efdcc2; }
.p-acip b:first-child { display: inline-block; margin-right: 8px; }
.p-acip p { margin: 8px 0 10px; font-size: .9rem; color: var(--p-ink-2); }
.p-acip a { color: var(--p-accent); font-weight: 700; }

/* D-058: requisitos para alquilar como 3 preguntas Sí/No */
.w-req { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.w-req__f { padding: 12px 14px; border-radius: 14px; background: #faf8f3; border: 1px solid var(--p-line); }
.w-req__f > b { display: block; font-size: .86rem; margin-bottom: 8px; }
@media (max-width: 760px) { .w-req { grid-template-columns: 1fr; } }

/* ---------- D-061: fichas del asistente parejas y ordenadas ----------
   Opciones en una grilla de columnas iguales (todas del mismo ancho y alto), grupos de igual altura por fila. */
.w-body .choice { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.w-amb { align-items: stretch; }
.w-amb__g { display: flex; flex-direction: column; }
.w-amb__g .toggles { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.w-amb__g .toggles label { display: flex !important; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 8px 10px !important; line-height: 1.2; border-radius: 12px; }
.w-req { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.w-req__f .toggles { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.w-req__f .toggles label { display: flex !important; align-items: center; justify-content: center; min-height: 42px; }
.w-docs__l { display: flex; flex-direction: column; gap: 8px; }
.w-docs .w-check { align-items: flex-start; font-weight: 500; font-size: .86rem; line-height: 1.35; }
.w-docs .w-check input { margin-top: 1px; }
@media (max-width: 640px) {
  .w-body .choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-req { grid-template-columns: 1fr; }
}

/* D-061: todas las opciones con la misma altura */
.w-amb__g .toggles label { min-height: 58px; font-size: .82rem; }
.w-req__f { display: flex; flex-direction: column; justify-content: space-between; }

/* D-062: características en bloques con título (Ambientes, Superficie, Estacionamiento, Estado y condiciones) */
.w-sub { display: flex; align-items: center; gap: 10px; margin: 10px 0 -4px; padding-top: 14px; border-top: 1px solid var(--p-line-2, #eee8dc); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--p-muted); }
.fields > .w-sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.w-sub span { font-size: 1rem; letter-spacing: 0; }
.w-acip { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.12); font-size: .86rem; line-height: 1.45; }
.w-acip a { color: #f3b896; font-weight: 700; }

/* D-063: extras de estacionamiento en 3 tarjetas iguales */
.w-chips3 { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.w-chips3 label { display: flex !important; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px 10px !important; border-radius: 12px; font-size: .84rem; }
@media (max-width: 640px) { .w-chips3 { grid-template-columns: 1fr 1fr; } }

/* D-064: pill de la promo ACIP en /publicar */
.w-pill-acip { margin-left: 6px; background: #1f3d35 !important; color: #fff !important; text-decoration: none; }

/* D-065: requisitos en 3 tarjetas iguales y extras de estacionamiento + baulera en 4 */
.w-req { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.w-chips3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .w-req { grid-template-columns: 1fr; } .w-chips3 { grid-template-columns: 1fr 1fr; } }

/* D-066: baulera siempre visible, como tarjeta del mismo alto que los selects */
.w-chips3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.w-sino { display: grid !important; grid-template-columns: 1fr; }
.w-sino label { display: flex !important; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; }
@media (max-width: 760px) { .w-chips3 { grid-template-columns: 1fr 1fr; } }

/* D-067: nota discreta de ACIP al final del paso 4 */
.w-nota-acip { margin: 18px 4px 0; font-size: .8rem; line-height: 1.5; color: var(--p-muted); }
.w-nota-acip a { color: var(--p-ink-2); font-weight: 700; }

/* D-067: el pill de ACIP en /publicar, discreto (la promo de lanzamiento es para todos) */
.w-pill-acip { background: transparent !important; color: var(--p-muted) !important; border: 1px solid var(--p-line); font-weight: 600; }
.w-pill-acip:hover { color: var(--p-ink-2) !important; }

/* D-070: video en el asistente */
.w-video h3 em { font-style: normal; font-weight: 500; color: var(--muted); font-size: .85em; }
.drop--sm { padding: 22px 16px; }
.w-vprog { height: 8px; border-radius: 99px; background: rgba(24,34,31,.08); overflow: hidden; }
.w-vprog span { display: block; height: 100%; width: 0; background: var(--brand-clay); transition: width .3s; }
.w-vid { display: block; width: 100%; max-height: 420px; border-radius: 16px; background: #111; }
.w-vid--prev { max-height: 220px; margin-top: 12px; object-fit: contain; }

/* Paneles: la columna principal nunca empuja la página de costado (al abrir #anunciantes el navegador la corría y cortaba el menú) */
.p-shell { overflow-x: clip; }
.p-main > *, .p-card { min-width: 0; max-width: 100%; }
.p-tw { max-width: 100%; }
/* El menú de la izquierda solo se desplaza hacia abajo: nunca de costado (se corría y cortaba los textos) */
.p-side { overflow-x: hidden; }
.p-side > *, .p-side a { min-width: 0; }
.p-shell { width: 100%; max-width: 100vw; }
/* Acciones de la tabla de anunciantes apiladas: la tabla entra sin deslizar de costado */
.p-acts--col { flex-direction: column; align-items: stretch; gap: 6px; }
.p-acts--col .p-btn { justify-content: center; white-space: nowrap; }
.p-acts-cell { width: 1%; }

/* Menú del celular: 4 secciones + «Más» (las demás se abren en una grilla) */
.p-nav__mas { display: none; }
@media (max-width: 900px) {
  .p-nav { overflow: visible; justify-content: space-between; gap: 2px; flex-wrap: wrap; }
  .p-nav a, .p-nav__mas { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: .68rem; position: relative; }
  .p-nav a span, .p-nav__mas span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .p-nav__mas { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: inherit; font: inherit; font-size: .68rem; font-weight: 700; border-radius: 10px; cursor: pointer; }
  .p-nav__mas svg { width: 20px; height: 20px; }
  .p-nav a.p-nav__extra { display: none; }
  .p-side.is-mas .p-nav a.p-nav__extra { display: flex; order: -1; flex: 0 0 calc(20% - 2px); }
  .p-side.is-mas { box-shadow: 0 -18px 40px -10px rgba(0,0,0,.45); border-radius: 18px 18px 0 0; padding-top: 12px; }
  .p-side.is-mas .p-nav__mas { color: #fff; background: rgba(255,255,255,.08); }
}

/* ---------- D-071: CRM (clientes, cobros) ---------- */
.c-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.c-head .p-who strong { font-size: 1.15rem; }
.c-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.c-contact { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.c-doc { color: var(--p-muted); font-size: .82rem; }
.c-kv { font-size: 1.35rem !important; }
.c-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.c-grid { margin-bottom: 18px; }
.c-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: .9rem; }
.c-dl dt { color: var(--p-muted); } .c-dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.c-tareas { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.c-tareas li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--p-line-2); }
.c-tareas li:last-child { border-bottom: 0; }
.c-tareas label { display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 600; font-size: .9rem; }
.c-tareas input { width: 18px; height: 18px; accent-color: var(--p-acc, #c9653f); }
.c-tareas small { color: var(--p-muted); white-space: nowrap; } .c-tareas li.is-done span { text-decoration: line-through; color: var(--p-muted); }
.c-late { color: var(--bad) !important; font-weight: 700; }
.c-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.c-hist li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.c-hist__t { align-self: start; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 8px; background: #f1ede6; color: var(--p-muted); text-align: center; }
.c-hist--llamada .c-hist__t, .c-hist--whatsapp .c-hist__t { background: #e3f3ea; color: #1f6b45; }
.c-hist--sistema .c-hist__t { background: #efe9f8; color: #5b3f8c; }
.c-hist p { margin: 0 0 2px; font-size: .9rem; } .c-hist small { color: var(--p-muted); font-size: .76rem; }
.c-filtros { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; align-items: center; }
.c-filtros .p-seg { flex-wrap: wrap; }
.c-buscar { display: flex; gap: 8px; } .c-buscar input, .c-buscar select, .c-mes select { height: 40px; border: 1px solid var(--p-line); border-radius: 11px; padding: 0 12px; font: 600 .86rem var(--ff-body); background: #fff; }
.c-buscar input { width: 240px; }
.c-row { cursor: pointer; }
.c-anulado td { opacity: .55; } .c-anulado td:last-child { opacity: 1; }
.c-nota { margin: 0; padding: 12px 18px 16px; color: var(--p-muted); font-size: .8rem; }
.c-dlg { width: min(520px, calc(100vw - 24px)); } .c-dlg h3 { margin: 0 0 14px; font: 600 1.25rem var(--ff-display); }
.c-fs { display: grid; gap: 12px; max-height: 62vh; overflow: auto; padding-right: 2px; }
.c-f { display: grid; gap: 5px; } .c-f > span { font-weight: 700; font-size: .82rem; } .c-f em { font-style: normal; font-weight: 500; color: var(--p-muted); }
.c-f input, .c-f select, .c-f textarea { width: 100%; height: 42px; margin: 0 !important; padding: 0 12px; border: 1px solid var(--p-line); border-radius: 11px; background: #fff; font: 600 .9rem var(--ff-body); color: var(--p-ink); }
.c-f textarea { height: auto; padding: 10px 12px; resize: vertical; }
.c-f small { color: var(--p-muted); font-size: .75rem; }
.c-f--chk { display: flex; align-items: center; gap: 8px; font-weight: 600; } .c-f--chk input { width: 18px; height: 18px; }
.c-checks { display: flex; flex-wrap: wrap; gap: 8px; } .c-checks label { display: flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--p-line); border-radius: 999px; font-size: .84rem; font-weight: 600; cursor: pointer; }
.c-checks input { width: 16px; height: 16px; }
@media (max-width: 640px) { .c-buscar { width: 100%; } .c-buscar input { flex: 1; width: auto; } .c-hist li { grid-template-columns: 1fr; gap: 4px; } .c-hist__t { justify-self: start; } .c-acts .p-btn { flex: 1 1 calc(50% - 8px); justify-content: center; } }
.u-plan { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.u-plan b.u-plan__n { font: 600 1.25rem var(--ff-display); display: block; }
.u-plan small { color: var(--p-muted); }
.u-bar { height: 8px; border-radius: 99px; background: #eee7dd; overflow: hidden; margin-top: 8px; width: 220px; max-width: 100%; } .u-bar span { display: block; height: 100%; background: var(--p-acc, #c9653f); }
.u-pagar { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #fff6ef; border: 1px solid #f2d8c6; font-size: .9rem; white-space: pre-line; }
.c-head .p-who small { display: block; margin-top: 2px; }
.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.c-grid > .p-card { margin: 0; }
@media (max-width: 900px) { .c-grid { grid-template-columns: 1fr; } }

/* ---------- Pulido de proporciones (2026-11-24) ---------- */
.p-grid > .p-card + .p-card, .c-grid > .p-card + .p-card { margin-top: 0; }
.p-grid { align-items: stretch; }
.p-grid > .p-card { display: flex; flex-direction: column; }
.p-grid > .p-card > .p-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.p-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.p-view > .p-card, .p-view > .p-grid, .p-view > .c-grid, .p-view > .p-kpis, .p-view > .p-banner { margin-bottom: 18px; }
.p-view > .p-card + .p-card { margin-top: 0; }
.p-view > *:last-child { margin-bottom: 0; }
.p-meters { gap: 16px; }
.p-list > div { gap: 14px; }
.p-card--flush .p-tw { margin-top: 12px; }
@media (max-width: 1180px) { .p-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); } }
@media (max-width: 900px) {
  .p-view > .p-card, .p-view > .p-grid, .p-view > .c-grid, .p-view > .p-kpis, .p-view > .p-banner { margin-bottom: 14px; }
  .p-grid, .c-grid { gap: 14px; }
  .p-card__h { flex-wrap: wrap; }
  .p-top__t h1 { font-size: 1.45rem; }
}
.p-grid > .p-card > .p-chart { flex: 1; min-height: 200px; display: flex; align-items: flex-end; }
.p-grid > .p-card > .p-chart > svg { width: 100%; }
