/* ================================================================
   PDM — Réplica del panel cx.wismify.com para la web pública.
   Se usa en dos sitios (mismo motor, /assets/pdm.js):
   - home (#what-is): variante .pdm--dash (solo Dashboard, full-bleed)
   - /demo: experiencia completa de 10 fases scroll-driven
   Colores calcados de app/globals.css del panel real.
================================================================ */
.pdm { position: relative; height: 1050vh; }
.pdm-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 92px 24px 20px; /* hueco para el navbar flotante */
  box-sizing: border-box;
}
.pdm-frame {
  width: min(1220px, 100%);
  height: calc(100vh - 112px);
  max-height: 820px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8,10,14,0.9);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(0,0,0,0.3);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  opacity: 0; transform: translateY(28px) scale(0.97);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', -apple-system, sans-serif;
}
.pdm.on .pdm-frame { opacity: 1; transform: none; }
.pdm-frame::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 40;
  background:
    radial-gradient(180px 110px at 0% 0%, rgba(255,255,255,0.07), rgba(255,255,255,0.02) 45%, transparent 75%),
    radial-gradient(180px 110px at 100% 100%, rgba(255,255,255,0.055), rgba(255,255,255,0.02) 45%, transparent 75%);
}
.pdm-chrome {
  height: 36px; flex: 0 0 36px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.3);
  font-size: 11px; color: rgba(255,255,255,0.4);
}
.pdm-dots { display: inline-flex; gap: 6px; }
.pdm-dots i { width: 9px; height: 9px; border-radius: 50%; }
.pdm-dots i:nth-child(1) { background: #f66; opacity: 0.75; }
.pdm-dots i:nth-child(2) { background: #fb5; opacity: 0.75; }
.pdm-dots i:nth-child(3) { background: #2c5; opacity: 0.75; }
.pdm-url { flex: 1; text-align: center; letter-spacing: 0.02em; }
.pdm-chrome-r { min-width: 130px; text-align: right; color: rgba(255,255,255,0.3); }
.pdm-body { flex: 1; display: flex; min-height: 0; position: relative; }

/* ── SIDEBAR (réplica) ── */
.pdm-side {
  width: 176px; flex: 0 0 176px;
  border-right: 1px solid rgba(255,255,255,0.07);
  background: rgba(3,4,6,0.5);
  padding: 12px 9px 10px;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11.5px; color: #94a3b8;
  min-height: 0; overflow: hidden;
}
.pd-slogo { display: flex; align-items: center; gap: 6px; padding: 2px 5px 11px; }
.pd-slogo img { height: 14px; opacity: 0.95; }
.pd-slogo b { font-size: 11px; font-weight: 800; color: #f1f5f9; letter-spacing: 0.05em; }
.pd-slogo .cx { font-size: 8px; font-weight: 700; color: #34d399; border: 1px solid rgba(16,185,129,0.45); border-radius: 999px; padding: 1px 6px; }
.pd-slogo .bell { margin-left: auto; color: #64748b; display: inline-flex; }
.pd-slogo .bell svg { width: 12px; height: 12px; }
.pd-store svg { width: 13px; height: 13px; flex: 0 0 13px; }
.pd-store {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 9px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid rgba(16,185,129,0.45); color: #34d399;
  font-weight: 700; font-size: 10.5px; letter-spacing: 0.04em;
}
.pdm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; border-radius: 9px;
  border: 1px solid transparent;
  color: #94a3b8; font-weight: 600; font-size: 11px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}
.pdm-item svg { width: 13px; height: 13px; flex: 0 0 13px; }
.pdm-item .chev { margin-left: auto; opacity: 0; transition: opacity 0.3s; }
.pdm-item .chev svg { width: 10px; height: 10px; }
.pdm-item.active { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.4); color: #eafff6; }
.pdm-item.active .chev { opacity: 0.8; }
.pd-side-label { margin: 9px 5px 3px; font-size: 8px; letter-spacing: 0.14em; color: #475569; font-weight: 700; }
.pd-side-sp { flex: 1 1 auto; min-height: 4px; }
.pd-side-pill {
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  padding: 6px 10px; display: flex; gap: 8px; align-items: center;
  font-size: 10.5px; color: #94a3b8; margin-top: 5px;
}
.pd-side-pill svg { width: 12px; height: 12px; }
.pd-tokens { padding: 7px 10px; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; margin-top: 5px; font-size: 10px; }
.pd-tokens .row { display: flex; justify-content: space-between; align-items: center; color: #cbd5e1; font-weight: 600; }
.pd-tokens .row span { color: #64748b; font-weight: 500; font-variant-numeric: tabular-nums; }
.pd-tokens .bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); margin-top: 6px; overflow: hidden; }
.pd-tokens .bar i { display: block; height: 100%; width: 0%; background: #10B981; border-radius: 2px; transition: width 1.1s cubic-bezier(0.22,0.8,0.28,1); }
.pd-user { display: flex; align-items: center; gap: 8px; margin-top: 5px; padding: 7px 10px; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; }
.pd-user .av { width: 20px; height: 20px; border-radius: 50%; background: #dc2626; flex: 0 0 20px; position: relative; }
.pd-user .av::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #0b0d12; }
.pd-user .nm b { display: block; font-size: 10.5px; color: #e2e8f0; font-weight: 700; line-height: 1.2; }
.pd-user .nm small { font-size: 9px; color: #64748b; }
.pd-user .ac { margin-left: auto; display: inline-flex; gap: 7px; color: #64748b; }
.pd-user .ac svg { width: 11px; height: 11px; }

/* ── MAIN / vistas ── */
.pdm-main { flex: 1; min-width: 0; position: relative; overflow: hidden; }
.pdm-view {
  position: absolute; inset: 0; padding: 14px 16px;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22,0.8,0.28,1);
  pointer-events: none; overflow: hidden;
  display: flex; flex-direction: column;
}
.pdm-view.active { opacity: 1; transform: none; pointer-events: auto; }
.pd-in { opacity: 0; transform: translateY(10px); transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22,0.8,0.28,1); }
.pd-in.in { opacity: 1; transform: none; }

/* genéricos réplica */
.pd-card { background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; }
.pd-ch { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 9px; letter-spacing: 0.12em; font-weight: 700; color: #64748b; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.pd-ch svg { width: 10px; height: 10px; flex: 0 0 auto; }
.pd-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex: 0 0 auto; }
.pd-h .tt h3 { margin: 0; font-size: 17px; font-weight: 800; color: #f1f5f9; letter-spacing: -0.01em; line-height: 1.15; }
.pd-h .tt span { font-size: 10px; color: #64748b; }
.pd-h .sp { flex: 1; }
.pd-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 9px;
  background: rgba(255,255,255,0.03); color: #cbd5e1;
  font-size: 10px; font-weight: 600; padding: 6px 10px; white-space: nowrap;
}
.pd-btn svg { width: 11px; height: 11px; }
.pd-btn.green { background: rgba(16,185,129,0.9); border-color: rgba(16,185,129,0.9); color: #04140d; font-weight: 700; }
.pd-btn.greenline { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.4); color: #34d399; }
.pd-btn.fav { color: #fbbf24; border-color: rgba(251,191,36,0.45); background: rgba(251,191,36,0.08); }
.pd-btn.dim { opacity: 0.45; }
.pd-btn.redline { background: rgba(239,68,68,0.07); border-color: rgba(239,68,68,0.35); color: #f87171; }
.pd-input {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,0.09); border-radius: 9px;
  background: rgba(0,0,0,0.25); color: #64748b;
  font-size: 10px; padding: 6px 10px;
}
.pd-input svg { width: 11px; height: 11px; }
.pd-sel { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,0.09); border-radius: 9px; background: rgba(255,255,255,0.03); color: #94a3b8; font-size: 10px; font-weight: 600; padding: 6px 9px; white-space: nowrap; }
.pd-sel::after { content: ''; width: 5px; height: 5px; border-right: 1.4px solid #64748b; border-bottom: 1.4px solid #64748b; transform: rotate(45deg) translateY(-1px); }

/* tags (colores EXACTOS del panel, tema oscuro) */
.pd-tag { display: inline-flex; align-items: center; font-size: 8px; font-weight: 700; padding: 2.5px 7px; border-radius: 999px; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.pd-tag.u-baja { background: #052e16; color: #86efac; }
.pd-tag.u-media { background: #422006; color: #fde047; }
.pd-tag.u-alta { background: #450a0a; color: #fca5a5; }
.pd-tag.s-pos { background: #172554; color: #93c5fd; }
.pd-tag.s-mol { background: #431407; color: #fdba74; }
.pd-tag.s-enf { background: #450a0a; color: #fca5a5; }
.pd-tag.cat { background: rgba(255,255,255,0.06); color: #94a3b8; }
.pd-tag.esc { background: rgba(239,68,68,0.2); color: #ef4444; }

/* badges cabecera de ticket */
.pd-b { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; font-weight: 700; padding: 2.5px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.pd-b svg { width: 9px; height: 9px; }
.pd-b.new { background: rgba(59,130,246,0.09); border-color: rgba(147,197,253,0.3); color: #bfdbfe; }
.pd-b.res { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.4); color: #34d399; }
.pd-b.voice { background: rgba(139,92,246,0.13); border-color: rgba(196,181,253,0.35); color: #c4b5fd; }
.pd-b.wa { background: rgba(16,185,129,0.1); border-color: rgba(74,222,128,0.35); color: #4ade80; }
.pd-b.mail { background: rgba(59,130,246,0.1); border-color: rgba(96,165,250,0.35); color: #93c5fd; }
.pd-b.ord { background: rgba(16,185,129,0.07); border-color: rgba(16,185,129,0.35); color: #6ee7b7; font-family: 'SF Mono', ui-monospace, monospace; letter-spacing: 0.02em; }

/* ── VISTA: DASHBOARD (réplica del dashboard real del panel) ── */
.pd-seg { display: inline-flex; border: 1px solid rgba(255,255,255,0.09); border-radius: 9px; overflow: hidden; font-size: 9.5px; font-weight: 700; }
.pd-seg i { padding: 5px 9px; color: #64748b; font-style: normal; }
.pd-seg i.on { background: rgba(255,255,255,0.09); color: #f1f5f9; }
.pd-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-bottom: 10px; flex: 0 0 auto; }
.pd-kpi { border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); border-radius: 12px; padding: 11px 13px; }
.pd-kpi small { display: block; font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #64748b; margin-bottom: 7px; font-weight: 600; }
.pd-kpi b { font-size: 23px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pd-kpi em { display: block; font-style: normal; font-size: 9px; margin-top: 6px; color: #475569; }
.pd-kpi em.up { color: #34d399; }
.pd-kpi em.warn { color: #fca5a5; }
.pd-dkpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-bottom: 9px; flex: 0 0 auto; }
.pd-dk { border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.pd-dk .r1 { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.pd-dk .r1 span { font-size: 9px; color: #94a3b8; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-dk .ic { width: 21px; height: 21px; flex: 0 0 21px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; }
.pd-dk .ic svg { width: 10px; height: 10px; }
.pd-dk .ic.blue { background: rgba(59,130,246,0.14); color: #60a5fa; }
.pd-dk .ic.amber { background: rgba(245,158,11,0.13); color: #fbbf24; }
.pd-dk .ic.red { background: rgba(239,68,68,0.13); color: #f87171; }
.pd-dk .ic.green { background: rgba(16,185,129,0.13); color: #34d399; }
.pd-dk b { font-size: 21px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pd-dk em { display: block; font-style: normal; font-size: 8.5px; color: #475569; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-dk.hot { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.3); }
.pd-dk.hot b { color: #f87171; }
.pd-dg2 { display: grid; grid-template-columns: 1.65fr 1.2fr; gap: 9px; margin-bottom: 9px; flex: 1.12; min-height: 0; }
.pd-dg3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; flex: 1; min-height: 0; }
.pd-dcard { border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.025); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pd-dch { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 10.5px; font-weight: 700; color: #e2e8f0; flex: 0 0 auto; }
.pd-dch svg { width: 11px; height: 11px; color: #94a3b8; flex: 0 0 11px; }
.pd-dch .cnt { margin-left: auto; font-size: 9px; font-weight: 500; color: #64748b; }
.pd-att { flex: 1; min-height: 0; overflow: hidden; }
.pd-att-row { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.045); }
.pd-att-row .l { flex: 1; min-width: 0; }
.pd-att-row .r1 { display: flex; align-items: center; gap: 6px; }
.pd-att-row .id { font-size: 10.5px; font-weight: 800; color: #e2e8f0; }
.pd-att-row .t { font-size: 9.5px; color: #94a3b8; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-att-row .chev { color: #475569; display: inline-flex; }
.pd-att-row .chev svg { width: 10px; height: 10px; }
.pd-dpill { display: inline-flex; font-size: 7.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.pd-dpill.org { color: #fdba74; border-color: rgba(251,146,60,0.35); background: rgba(251,146,60,0.07); }
.pd-dpill.yel { color: #fde047; border-color: rgba(234,179,8,0.35); background: rgba(234,179,8,0.06); }
.pd-dpill.blu { color: #93c5fd; border-color: rgba(96,165,250,0.35); background: rgba(59,130,246,0.07); }
.pd-dpill.red { color: #fca5a5; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.07); }
.pd-dpill.gry { color: #94a3b8; border-color: rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); }
.pd-viewall { padding: 8px 12px; font-size: 10px; font-weight: 600; color: #34d399; flex: 0 0 auto; }
.pd-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #64748b; font-size: 10.5px; }
.pd-empty .ring { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; color: #64748b; }
.pd-empty .ring svg { width: 14px; height: 14px; }
.pd-cat { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; overflow: hidden; }
.pd-cat-row .r { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; }
.pd-cat-row .r span { color: var(--c, #e2e8f0); }
.pd-cat-row .r b { color: #e2e8f0; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-cbar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.07); overflow: hidden; margin-top: 5px; }
.pd-cbar i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--c, #cbd5e1); transition: width 1s cubic-bezier(0.22,0.8,0.28,1); }
.pd-sent { padding: 9px 11px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow: hidden; }
.pd-sent-row { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.025); }
.pd-sent-row > svg { width: 13px; height: 13px; color: #94a3b8; flex: 0 0 13px; }
.pd-sent-row .l b { display: block; font-size: 10px; color: #e2e8f0; font-weight: 700; }
.pd-sent-row .l small { font-size: 8px; color: #64748b; }
.pd-sent-row .n { margin-left: auto; font-size: 15px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.pd-sent-row.hl { border-color: rgba(234,179,8,0.35); background: rgba(234,179,8,0.06); }
.pd-sent-row.hl > svg { color: #fbbf24; }
.pd-dcol { display: flex; flex-direction: column; gap: 9px; min-height: 0; }
.pd-aiauto { padding: 9px 12px 11px; }
.pd-aiauto .r { display: flex; justify-content: space-between; align-items: baseline; font-size: 9.5px; color: #94a3b8; }
.pd-aiauto .r b { font-size: 15px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.pd-aiauto .ft { display: flex; justify-content: space-between; margin-top: 7px; font-size: 8px; color: #64748b; }
.pd-aiauto .ft .ph2 { color: #fbbf24; display: inline-flex; align-items: center; gap: 4px; }
.pd-aiauto .ft .ph2 svg { width: 8px; height: 8px; }
.pd-qa { padding: 7px 8px; display: flex; flex-direction: column; gap: 5px; flex: 1; min-height: 0; overflow: hidden; }
.pd-qa-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.025); font-size: 10px; font-weight: 600; color: #e2e8f0; }
.pd-qa-row svg { width: 11px; height: 11px; color: #94a3b8; flex: 0 0 11px; }
.pd-qa-row .chev { margin-left: auto; display: inline-flex; color: #475569; }

/* ── VISTA: TICKETS (lista) ── */
.pd-filters { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; flex: 0 0 auto; flex-wrap: nowrap; overflow: hidden; }
.pd-inboxbar { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgba(255,255,255,0.07); border-radius: 12px 12px 0 0; border-bottom: none; background: rgba(255,255,255,0.025); font-size: 11px; color: #e2e8f0; font-weight: 700; flex: 0 0 auto; }
.pd-inboxbar .pill { font-size: 8.5px; font-weight: 700; border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; padding: 2px 8px; color: #94a3b8; }
.pd-inboxbar .tot { color: #64748b; font-weight: 500; font-size: 10px; }
.pd-tkwrap { border: 1px solid rgba(255,255,255,0.07); border-radius: 0 0 12px 12px; background: rgba(0,0,0,0.14); padding: 11px; flex: 1; min-height: 0; overflow: hidden; }
.pd-tkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-tkcard {
  position: relative; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; background: rgba(255,255,255,0.028);
  padding: 12px 13px 11px; overflow: hidden;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22,0.8,0.28,1), border-color 0.6s ease;
}
.pd-tkcard.in { opacity: 1; transform: none; }
.pd-tkcard::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--tc, #22c55e); transition: background 0.7s ease; }
.pd-tkcard .hd { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; }
.pd-tkcard .hd .id { font-size: 10.5px; font-weight: 800; color: #e2e8f0; }
.pd-tkcard .hd .sp { flex: 1; }
.pd-tkcard .acts { display: inline-flex; gap: 6px; color: #475569; }
.pd-tkcard .acts svg { width: 10px; height: 10px; }
.pd-tkcard .acts .no { color: #b91c1c; }
.pd-tkcard h4 { margin: 0 0 4px; font-size: 13px; font-weight: 800; color: #f1f5f9; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-tkcard .who { font-size: 10px; color: #94a3b8; font-weight: 600; }
.pd-tkcard .who span { color: #64748b; font-weight: 400; }
.pd-tkcard .meta { font-size: 9.5px; color: #64748b; margin-top: 2px; }
.pd-tkcard .chips { display: flex; align-items: center; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.pd-tkcard .chips .pd-tag, .pd-tkcard .chips .pd-sel { opacity: 0; transform: scale(0.85); transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.22,0.8,0.28,1); }
.pd-tkcard.chips-in .chips .pd-tag, .pd-tkcard.chips-in .chips .pd-sel { opacity: 1; transform: none; }
.pd-tkcard .chips .pd-sel { font-size: 8.5px; padding: 3px 8px; }
.pd-ai { margin-top: 9px; background: rgba(255,255,255,0.028); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 8px 10px; }
.pd-ai .t { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; color: #e2e8f0; }
.pd-ai .t svg { width: 10px; height: 10px; color: #64748b; flex: 0 0 10px; }
.pd-ai .t b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.pd-ai .conf { font-size: 8.5px; font-weight: 700; border: 1px solid rgba(255,255,255,0.12); border-radius: 7px; padding: 1.5px 6px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.pd-ai p { margin: 5px 0 0; font-size: 9.5px; line-height: 1.5; color: #94a3b8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pd-ai .act { margin-top: 4px; font-size: 9px; font-style: italic; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* transición New → Auto-resolved */
.b-swap { position: relative; display: inline-flex; }
.b-swap .pd-b { transition: opacity 0.4s ease, transform 0.45s ease; }
.b-swap .pd-b.res { position: absolute; left: 0; top: 0; opacity: 0; transform: scale(0.8); }
.b-swap.solved .pd-b.new { opacity: 0; transform: scale(0.8); }
.b-swap.solved .pd-b.res { position: static; opacity: 1; transform: none; }
.pd-tkcard.solved::before { background: #22c55e; }
.pd-tkcard.solved { border-color: rgba(34,197,94,0.28); }

/* ── VISTA: TICKET (detalle) ── */
.pd-t-cols { display: flex; gap: 11px; flex: 1; min-height: 0; }
.pd-t-main { flex: 1; min-width: 0; overflow: hidden; position: relative; }
.pd-t-scroll { display: flex; flex-direction: column; gap: 11px; transition: transform 1.25s cubic-bezier(0.22,0.8,0.28,1); will-change: transform; }
.pd-t-rail { width: 216px; flex: 0 0 216px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.pd-rc { background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 9px 11px; }
.pd-rc .lbl { font-size: 8.5px; letter-spacing: 0.12em; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 7px; }
.pd-rc .kv { display: flex; justify-content: space-between; font-size: 10px; color: #64748b; padding: 3px 0; }
.pd-rc .kv b { color: #e2e8f0; font-weight: 600; max-width: 60%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-rc .wbtn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; box-sizing: border-box; margin-top: 6px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); border-radius: 9px; color: #cbd5e1; font-size: 10px; font-weight: 700; padding: 7px 8px; }
.pd-rc .wbtn svg { width: 11px; height: 11px; }
.pd-rc .wbtn.res { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.4); color: #34d399; }
.pd-rc .wbtn.spam { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.35); color: #f87171; }
.pd-tgl { width: 30px; height: 16px; border-radius: 999px; background: rgba(255,255,255,0.12); position: relative; transition: background 0.35s ease; flex: 0 0 30px; }
.pd-tgl::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; transition: left 0.35s cubic-bezier(0.22,0.8,0.28,1), background 0.35s; }
.pd-tgl.on { background: rgba(16,185,129,0.85); }
.pd-tgl.on::after { left: 16px; background: #04140d; }
.pd-rc .mut { font-size: 9.5px; color: #64748b; }
.pd-note { border: 1px dashed rgba(255,255,255,0.14); border-radius: 9px; padding: 7px 9px; font-size: 9.5px; color: #475569; line-height: 1.45; min-height: 34px; }
.pd-actv { display: none; gap: 7px; font-size: 9.5px; color: #94a3b8; line-height: 1.5; }
.pd-actv.in { display: flex; animation: pdFadeUp 0.5s ease backwards; }
.pd-actv-mt { font-size: 9.5px; color: #475569; }
.pd-actv.in + .pd-actv-mt { display: none; }
.pd-actv .dot { width: 6px; height: 6px; border-radius: 50%; background: #10B981; margin-top: 4px; flex: 0 0 6px; }
.pd-actv b { color: #e2e8f0; }
.pd-actv small { display: block; color: #475569; font-size: 8.5px; margin-top: 2px; }
.pd-aist { font-size: 10px; display: none; }
.pd-aist.in { display: block; animation: pdFadeUp 0.5s ease backwards; }
@keyframes pdFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pd-aist h5 { margin: 0 0 5px; font-size: 11.5px; font-weight: 800; color: #f1f5f9; }
.pd-aist p { margin: 0; font-size: 9.5px; line-height: 1.55; color: #94a3b8; }
.pd-aist .cf { margin-top: 6px; font-size: 9px; color: #64748b; }

/* hilo de email */
.pd-thread .bd {
  padding: 13px 14px; min-height: 168px;
  display: flex; flex-direction: column; gap: 11px;
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 15px 15px;
}
.pd-bub { max-width: 74%; border-radius: 12px; padding: 9px 12px; font-size: 10.5px; line-height: 1.55; opacity: 0; transform: translateY(9px) scale(0.985); transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22,0.8,0.28,1); }
.pd-bub.in { opacity: 1; transform: none; }
.pd-bub small { display: block; font-size: 8.5px; color: rgba(255,255,255,0.45); margin-bottom: 4px; font-weight: 600; }
.pd-bub .ts { display: block; text-align: right; font-size: 8px; margin-top: 5px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.pd-bub.cust { align-self: flex-start; background: #171b22; border: 1px solid rgba(255,255,255,0.07); color: #e2e8f0; border-top-left-radius: 4px; }
.pd-bub.ai { align-self: flex-end; background: linear-gradient(180deg, #4f46e5, #4338ca); color: #eef2ff; border-bottom-right-radius: 4px; }
.pd-bub.ai small { color: rgba(238,242,255,0.6); }
.pd-typing { align-self: flex-end; display: inline-flex; gap: 4px; padding: 8px 12px; border-radius: 12px; background: rgba(79,70,229,0.25); border: 1px solid rgba(99,102,241,0.35); opacity: 0; transition: opacity 0.3s; }
.pd-typing.in { opacity: 1; }
.pd-typing i { width: 4px; height: 4px; border-radius: 50%; background: #c7d2fe; animation: pdDot 1s ease infinite; }
.pd-typing i:nth-child(2) { animation-delay: 0.15s; }
.pd-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pdDot { 50% { opacity: 0.3; transform: translateY(-2.5px); } }
.pd-fb { display: inline-flex; gap: 4px; margin-top: 6px; justify-content: flex-end; width: 100%; }
.pd-fb i { width: 17px; height: 15px; border: 1px solid rgba(238,242,255,0.3); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; }
.pd-fb svg { width: 8px; height: 8px; }

/* reply + cowriter */
.pd-reply { position: relative; }
.pd-rt { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-bottom: 1px solid rgba(255,255,255,0.06); flex-wrap: nowrap; overflow: hidden; }
.pd-rt-pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.035); color: #cbd5e1; font-size: 9.5px; font-weight: 700; padding: 5px 8px; white-space: nowrap; transition: border-color 0.3s, background 0.3s; }
.pd-rt-pill svg { width: 10px; height: 10px; }
.pd-rt-pill .tk { font-size: 8px; border: 1px solid rgba(255,255,255,0.14); border-radius: 6px; padding: 0.5px 5px; color: #94a3b8; display: inline-flex; align-items: center; gap: 3px; }
.pd-rt-pill .tk svg { width: 7px; height: 7px; }
.pd-rt-pill.hot { border-color: rgba(139,92,246,0.55); background: rgba(139,92,246,0.12); color: #ddd6fe; }
.pd-rt-ico { display: inline-flex; gap: 8px; align-items: center; color: #64748b; margin-left: 6px; }
.pd-rt-ico b { font-size: 10px; font-weight: 800; font-style: normal; }
.pd-rt-ico .it { font-style: italic; font-family: Georgia, serif; }
.pd-rt-ico .un { text-decoration: underline; }
.pd-rt-ico svg { width: 11px; height: 11px; }
.pd-ta { margin: 10px 11px 0; min-height: 58px; border: 1px solid rgba(255,255,255,0.08); border-radius: 9px; background: rgba(0,0,0,0.22); padding: 8px 10px; font-size: 10.5px; line-height: 1.55; color: #e2e8f0; position: relative; }
.pd-ta .ph { color: #475569; }
.pd-caret { display: inline-block; width: 1.5px; height: 11px; background: #a5b4fc; vertical-align: -1.5px; margin-left: 1px; animation: pdCaret 0.85s step-end infinite; }
@keyframes pdCaret { 50% { opacity: 0; } }
.pd-qrrow { display: flex; align-items: center; gap: 6px; padding: 9px 11px 11px; flex-wrap: nowrap; overflow: hidden; }
.pd-qr { display: inline-flex; align-items: stretch; --c: #a78bfa; }
.pd-qr b { border: 1px solid var(--c); color: var(--c); border-radius: 8px 0 0 8px; padding: 4.5px 9px; font-weight: 600; font-size: 9.5px; background: rgba(0,0,0,0.2); white-space: nowrap; }
.pd-qr i { border: 1px solid var(--c); border-left: none; border-radius: 0 8px 8px 0; padding: 0 5px; color: var(--c); display: inline-flex; align-items: center; opacity: 0.85; }
.pd-qr i svg { width: 8px; height: 8px; }
.pd-qr.blue { --c: #60a5fa; }
.pd-qr.org { --c: #fb923c; }
.pd-qr-empty { width: 20px; height: 22px; border: 1.5px dashed rgba(255,255,255,0.16); border-radius: 8px; }
.pd-send { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.pd-send .ic { color: #64748b; display: inline-flex; }
.pd-send .ic svg { width: 12px; height: 12px; }
.pd-send .go { border-radius: 9px; background: rgba(16,185,129,0.35); color: #d1fae5; font-size: 10.5px; font-weight: 700; padding: 6px 15px; border: 1px solid rgba(16,185,129,0.4); transition: background 0.35s, color 0.35s; }
.pd-send .go.ready { background: rgba(16,185,129,0.92); color: #04140d; }
/* popover cowriter */
.pd-cw {
  position: absolute; left: 10px; top: 34px; z-index: 8;
  width: 300px; background: #0d1016; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 10px 11px; box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.22,0.8,0.28,1);
}
.pd-cw.open { opacity: 1; transform: none; }
.pd-cw .row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.pd-cw .row .pd-sel { font-size: 9.5px; }
.pd-cw .gen { margin-left: auto; border-radius: 8px; background: rgba(139,92,246,0.85); border: 1px solid rgba(139,92,246,0.9); color: #0d0518; font-size: 9.5px; font-weight: 800; padding: 5px 12px; transition: transform 0.15s ease, filter 0.2s; }
.pd-cw .gen.pressed { transform: scale(0.94); filter: brightness(1.25); }
.pd-cw .inst { border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(0,0,0,0.28); padding: 7px 9px; font-size: 10px; color: #e2e8f0; min-height: 26px; line-height: 1.5; }
.pd-cw .inst .ph { color: #475569; }
.pd-cw .think { display: none; align-items: center; gap: 6px; margin-top: 7px; font-size: 9px; color: #a78bfa; }
.pd-cw.thinking .think { display: flex; }
.pd-cw .think i { width: 4px; height: 4px; border-radius: 50%; background: #a78bfa; animation: pdDot 0.9s ease infinite; }
.pd-cw .think i:nth-child(2) { animation-delay: 0.15s; }
.pd-cw .think i:nth-child(3) { animation-delay: 0.3s; }

/* shopify dentro del ticket */
.pd-shop .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 10px; }
.pd-sc { background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; overflow: hidden; transition: border-color 0.5s ease, box-shadow 0.5s ease; }
.pd-sc.hl { border-color: rgba(16,185,129,0.4); box-shadow: 0 0 0 3px rgba(16,185,129,0.06); }
.pd-sc .in2 { padding: 9px 10px; font-size: 9.5px; color: #94a3b8; display: flex; flex-direction: column; gap: 5px; }
.pd-sc .nm { font-size: 11px; font-weight: 800; color: #34d399; }
.pd-sc .addr { margin-top: 3px; padding: 7px 8px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; line-height: 1.5; font-size: 9px; }
.pd-sc .addr b { color: #e2e8f0; }
.pd-ord { padding: 8px 9px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); border-radius: 9px; }
.pd-ord + .pd-ord { margin-top: 6px; }
.pd-ord .r1 { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.pd-ord .r1 b { font-size: 10px; font-weight: 800; color: #6ee7b7; }
.pd-ord .st { font-size: 7.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: 0.04em; }
.pd-ord .st.ful { background: rgba(16,185,129,0.12); color: #10b981; }
.pd-ord .st.rep { background: rgba(139,92,246,0.12); color: #a78bfa; }
.pd-ord .st.dlv { background: rgba(16,185,129,0.12); color: #10b981; }
.pd-ord .st.tra { background: rgba(59,130,246,0.12); color: #60a5fa; }
.pd-ord .dt { font-size: 8.5px; color: #475569; margin-bottom: 4px; }
.pd-ord .li { font-size: 9px; color: #e2e8f0; line-height: 1.55; }
.pd-ord .trk { font-size: 9px; color: #94a3b8; margin-top: 3px; }
.pd-ord .trk a { color: #3b82f6; text-decoration: none; }
.pd-ord .cs { display: flex; align-items: center; gap: 5px; font-size: 8.5px; color: #64748b; margin-top: 3px; }
.pd-ord .cs i { width: 5px; height: 5px; border-radius: 50%; background: var(--c, #10b981); }
.pd-ord .cs b { color: #e2e8f0; font-weight: 600; }

/* ── VISTA: LLAMADAS ── */
.pd-cstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 9px; flex: 0 0 auto; }
.pd-clist { border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; background: rgba(255,255,255,0.02); overflow: hidden; flex: 1; min-height: 0; }
.pd-crow { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-bottom: 1px solid rgba(255,255,255,0.055); opacity: 0; transform: translateY(10px); transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22,0.8,0.28,1), background 0.4s; }
.pd-crow.in { opacity: 1; transform: none; }
.pd-crow .av { width: 28px; height: 28px; border-radius: 50%; background: rgba(16,185,129,0.15); color: #10B981; display: flex; align-items: center; justify-content: center; flex: 0 0 28px; }
.pd-crow .av svg { width: 12px; height: 12px; }
.pd-crow .av.red { background: rgba(239,68,68,0.15); color: #ef4444; }
.pd-crow .ph { min-width: 132px; }
.pd-crow .ph .n { font-size: 10.5px; font-weight: 700; color: #f1f5f9; display: flex; align-items: center; gap: 5px; }
.pd-crow .ph .n .tk { font-size: 8px; font-weight: 700; padding: 0.5px 5px; border-radius: 4px; background: rgba(255,255,255,0.06); color: #64748b; border: 1px solid rgba(255,255,255,0.08); }
.pd-crow .ph .d { font-size: 8.5px; color: #64748b; margin-top: 2px; }
.pd-crow .sum { flex: 1; min-width: 0; }
.pd-crow .sum .s { font-size: 10px; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-crow .sum .tags { display: flex; gap: 5px; margin-top: 4px; }
.pd-crow .ac { display: inline-flex; gap: 5px; }
.pd-crow .ac i { width: 22px; height: 22px; border: 1px solid rgba(255,255,255,0.09); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #64748b; background: rgba(255,255,255,0.03); }
.pd-crow .ac svg { width: 10px; height: 10px; }
.pd-crow.ringing { background: rgba(16,185,129,0.05); animation: pdRing 1.1s ease infinite; }
@keyframes pdRing { 50% { box-shadow: inset 0 0 0 1px rgba(16,185,129,0.35); } }
.pd-crow.ringing .av { animation: pdRingAv 1.1s ease infinite; }
@keyframes pdRingAv { 50% { box-shadow: 0 0 0 5px rgba(16,185,129,0.12); } }

/* modal de llamada (réplica PlayerModal) */
.pd-ov {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.pd-ov.open { opacity: 1; }
.pd-modal {
  width: min(760px, 96%); max-height: 94%;
  background: #0b0d12; border: 1px solid rgba(255,255,255,0.11);
  border-radius: 14px; padding: 13px 15px; overflow: hidden;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.45s cubic-bezier(0.22,0.8,0.28,1);
  display: flex; flex-direction: column;
}
.pd-ov.open .pd-modal { transform: none; }
.pd-modal .mh { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.pd-modal .mh h4 { margin: 0; font-size: 12.5px; font-weight: 700; color: #f1f5f9; flex: 1; }
.pd-modal .mh .x { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: #64748b; border-radius: 6px; }
.pd-modal .mh .x svg { width: 12px; height: 12px; }
.pd-cm-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 12px; min-height: 0; }
.pd-cm-l { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.pd-cm-who { display: flex; align-items: center; gap: 9px; }
.pd-cm-who .av { width: 32px; height: 32px; border-radius: 50%; background: rgba(16,185,129,0.15); color: #10B981; display: flex; align-items: center; justify-content: center; }
.pd-cm-who .av svg { width: 14px; height: 14px; }
.pd-cm-who b { display: block; font-size: 12px; color: #f1f5f9; font-weight: 700; }
.pd-cm-who small { font-size: 9px; color: #64748b; }
.pd-cm-who .tm { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #34d399; font-variant-numeric: tabular-nums; }
.pd-cm-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pd-cm-tags .pd-tag { opacity: 0; transform: scale(0.85); transition: opacity 0.35s, transform 0.4s; }
.pd-cm-tags.in .pd-tag { opacity: 1; transform: none; }
.pd-wave { display: flex; align-items: center; gap: 2.5px; height: 30px; padding: 8px 11px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); border-radius: 10px; box-sizing: content-box; }
.pd-wave i { flex: 1; border-radius: 2px; background: #10B981; height: 16%; opacity: 0.9; }
.pd-ov.open .pd-wave i { animation: pdWave 0.9s ease-in-out infinite; }
@keyframes pdWave { 0%, 100% { height: 14%; } 50% { height: var(--wh, 80%); } }
.pd-cm-sum { padding: 9px 11px; background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; font-size: 10px; line-height: 1.55; color: #94a3b8; min-height: 44px; }
.pd-cm-sum .lbl { font-size: 8px; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; font-weight: 700; margin-bottom: 4px; }
.pd-cm-done { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; color: #34d399; opacity: 0; transition: opacity 0.5s ease; }
.pd-cm-done svg { width: 11px; height: 11px; }
.pd-cm-done.in { opacity: 1; }
.pd-cm-r { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 10px 11px; display: flex; flex-direction: column; gap: 7px; overflow: hidden; min-height: 224px; }
.pd-cm-r .lbl { font-size: 8px; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; font-weight: 700; }
.pd-turn { padding: 6px 8px; border-radius: 8px; border-left: 2px solid transparent; opacity: 0; transform: translateY(7px); transition: opacity 0.4s ease, transform 0.45s ease, background 0.4s, border-color 0.4s; }
.pd-turn.in { opacity: 1; transform: none; }
.pd-turn.live { background: rgba(16,185,129,0.08); border-left-color: #10B981; }
.pd-turn .r { display: flex; justify-content: space-between; margin-bottom: 2px; }
.pd-turn .r b { font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.pd-turn.ia .r b { color: #10B981; }
.pd-turn.cli .r b { color: #60a5fa; }
.pd-turn .r span { font-size: 8px; color: #475569; font-variant-numeric: tabular-nums; }
.pd-turn p { margin: 0; font-size: 10px; line-height: 1.5; color: #e2e8f0; }

/* ── VISTA: ANALYTICS ── */
.pd-an-h { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; flex: 0 0 auto; }
.pd-an-h .tt h3 { margin: 0; font-size: 16px; font-weight: 800; color: #f1f5f9; }
.pd-an-h .tt span { font-size: 9.5px; color: #64748b; }
.pd-an-h .sp { flex: 1; }
.pd-tabs { display: flex; gap: 15px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 8px; flex: 0 0 auto; }
.pd-tab { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: #64748b; padding: 4px 1px 7px; border-bottom: 2px solid transparent; white-space: nowrap; }
.pd-tab svg { width: 10px; height: 10px; }
.pd-tab.on { color: #f1f5f9; border-bottom-color: #10B981; }
.pd-ranges { display: flex; align-items: center; gap: 5px; margin-bottom: 9px; flex: 0 0 auto; overflow: hidden; }
.pd-rng { font-size: 9px; font-weight: 600; color: #94a3b8; border: 1px solid rgba(255,255,255,0.09); background: rgba(255,255,255,0.03); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pd-rng.on { border-color: rgba(16,185,129,0.5); color: #34d399; background: rgba(16,185,129,0.07); }
.pd-rng-lbl { font-size: 9px; color: #64748b; margin: 0 2px 0 6px; white-space: nowrap; }
.pd-favs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 9px; flex: 0 0 auto; }
.pd-fav { border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); border-radius: 11px; padding: 9px 11px; min-width: 0; }
.pd-fav .t { display: flex; align-items: flex-start; gap: 4px; font-size: 7.5px; letter-spacing: 0.08em; font-weight: 700; color: #64748b; text-transform: uppercase; }
.pd-fav .t b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.pd-fav .t i { font-style: normal; color: #475569; }
.pd-fav .v { font-size: 19px; font-weight: 800; color: #f1f5f9; margin: 3px 0 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pd-cbrow { display: flex; align-items: center; gap: 5px; font-size: 7.5px; color: #64748b; margin-top: 3px; }
.pd-cbrow em { width: 42px; flex: 0 0 42px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-cbrow .tr { flex: 1; height: 3.5px; border-radius: 2px; background: rgba(255,255,255,0.07); overflow: hidden; }
.pd-cbrow .tr i { display: block; height: 100%; width: 0%; background: var(--c, #10B981); border-radius: 2px; transition: width 0.9s cubic-bezier(0.22,0.8,0.28,1); }
.pd-cbrow span { width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.pd-stars { display: flex; gap: 3px; margin-top: 5px; }
.pd-stars svg { width: 13px; height: 13px; color: #34d399; fill: #34d399; opacity: 0; transform: scale(0.5); transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1); }
.pd-stars.in svg { opacity: 1; transform: none; }
.pd-occblock { height: 26px; border-radius: 6px; background: linear-gradient(180deg, #aab4c4, #8b96a8); opacity: 0.85; margin-top: 4px; }
.pd-occblock + em { display: block; font-size: 7px; color: #475569; text-align: center; margin-top: 2px; font-style: normal; letter-spacing: 0.08em; }
.pd-an-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 9px; flex: 1; min-height: 0; margin-bottom: 9px; }
.pd-anc { border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); border-radius: 12px; padding: 11px 13px; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.pd-anc .th { display: flex; align-items: flex-start; gap: 6px; }
.pd-anc .th b { font-size: 11px; font-weight: 700; color: #f1f5f9; flex: 1; }
.pd-anc .th .ic { display: inline-flex; gap: 6px; color: #475569; }
.pd-anc .th .ic svg { width: 10px; height: 10px; }
.pd-anc .ds { font-size: 8.5px; color: #64748b; margin-top: 2px; line-height: 1.45; }
.pd-tgt { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 700; border-radius: 7px; padding: 2.5px 7px; margin-top: 6px; align-self: flex-start; }
.pd-tgt.red { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.pd-tgt.grn { background: rgba(16,185,129,0.08); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.pd-tgt.yel { background: rgba(234,179,8,0.09); color: #facc15; border: 1px solid rgba(234,179,8,0.3); }
.pd-tgt.gry { background: rgba(255,255,255,0.035); color: #94a3b8; border: 1px solid rgba(255,255,255,0.12); }
.pd-bigv { font-size: 24px; font-weight: 800; color: #f1f5f9; margin-top: 7px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pd-bigv small { font-size: 11px; color: #64748b; font-weight: 600; }
.pd-pb { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; margin-top: 8px; }
.pd-pb i { display: block; height: 100%; width: 0%; border-radius: 3px; background: var(--c, #10B981); transition: width 1.1s cubic-bezier(0.22,0.8,0.28,1); }
.pd-frt-chart { flex: 1; min-height: 90px; margin-top: 8px; position: relative; }
.pd-frt-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pd-frt-chart .gl { stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1.7s cubic-bezier(0.4,0,0.2,1) 0.3s; }
.pdm-view.active .pd-frt-chart .gl { stroke-dashoffset: 0; }
.pd-frt-x { display: flex; justify-content: space-between; font-size: 7.5px; color: #475569; margin-top: 4px; }
.pd-fnote { font-size: 8px; color: #64748b; line-height: 1.5; margin-top: 7px; }
.pd-an-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; flex: 0 0 auto; }
.pd-an-row3 .pd-anc { padding: 10px 12px; }
.pd-an-row3 .pd-bigv { font-size: 20px; margin-top: 5px; }

/* modal detalle KPI */
.pd-km { width: min(880px, 97%); max-height: 96%; }
.pd-km .mh .pl { display: inline-flex; gap: 5px; }
.pd-km .mh .pl i { font-style: normal; font-size: 8.5px; font-weight: 600; color: #94a3b8; border: 1px solid rgba(255,255,255,0.1); border-radius: 7px; padding: 2px 8px; }
.pd-km .sub { font-size: 9.5px; color: #64748b; margin: -6px 0 10px; }
.pd-km-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; min-height: 0; overflow: hidden; }
.pd-km-l { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.pd-km-vals { display: flex; align-items: flex-start; gap: 18px; }
.pd-km-vals .c small { display: block; font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #64748b; font-weight: 700; border-bottom: 1px dashed rgba(255,255,255,0.15); padding-bottom: 2px; margin-bottom: 5px; }
.pd-km-vals .c b { font-size: 26px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pd-km-vals .c .dl { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; color: #34d399; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.35); border-radius: 7px; padding: 2.5px 7px; margin-left: 7px; vertical-align: 6px; }
.pd-km-vals .c .mut { display: block; font-size: 8px; color: #475569; margin-top: 3px; }
.pd-km-vals .tr { margin-left: auto; text-align: right; }
.pd-km-chart { border: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.18); border-radius: 10px; padding: 9px 10px 6px; }
.pd-km-chart svg { width: 100%; height: 108px; display: block; }
.pd-km-chart .gl2 { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.8s cubic-bezier(0.4,0,0.2,1) 0.25s; }
.pd-ov.open .pd-km-chart .gl2 { stroke-dashoffset: 0; }
.pd-km-leg { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.pd-km-leg i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; font-size: 8px; color: #94a3b8; border: 1px solid rgba(255,255,255,0.09); border-radius: 999px; padding: 2.5px 8px; }
.pd-km-leg i::before { content: ''; width: 10px; height: 2px; border-radius: 1px; background: var(--c, #10B981); }
.pd-km-leg i.dash::before { background: repeating-linear-gradient(90deg, var(--c) 0 3px, transparent 3px 5px); }
.pd-km-sum small.hd { display: block; font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: #64748b; font-weight: 700; margin-bottom: 6px; }
.pd-km-sum .g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.pd-km-sum .sc { border: 1px solid rgba(255,255,255,0.08); border-radius: 9px; padding: 7px 9px; background: rgba(255,255,255,0.02); }
.pd-km-sum .sc.grn { border-color: rgba(16,185,129,0.4); }
.pd-km-sum .sc.blu { border-color: rgba(59,130,246,0.45); }
.pd-km-sum .sc small { display: block; font-size: 8px; color: #94a3b8; font-weight: 700; border-bottom: 1px dashed rgba(255,255,255,0.12); padding-bottom: 2px; margin-bottom: 4px; }
.pd-km-sum .sc b { font-size: 16px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.pd-km-sum .sc.grn b { color: #34d399; }
.pd-km-sum .sc.blu b { color: #93c5fd; }
.pd-km-sum .sc em { display: block; font-style: normal; font-size: 7.5px; color: #475569; margin-top: 3px; }
.pd-km-sum .sc em a { color: #60a5fa; text-decoration: none; }
.pd-km-r { border-left: 1px solid rgba(255,255,255,0.07); padding-left: 12px; min-width: 0; overflow: hidden; font-size: 9px; }
.pd-km-r .sec { margin-bottom: 10px; }
.pd-km-r .sec > small { display: block; font-size: 7.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #64748b; font-weight: 700; margin-bottom: 6px; }
.pd-km-r .prow { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: #e2e8f0; font-weight: 600; }
.pd-km-r .prow svg { width: 10px; height: 10px; color: #64748b; }
.pd-km-r .pmut { font-size: 8px; color: #475569; margin-top: 3px; line-height: 1.5; }
.pd-st { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 3.5px 0; }
.pd-st .lw { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pd-st em { font-style: normal; font-size: 8.5px; color: #94a3b8; border-bottom: 1px dashed rgba(255,255,255,0.14); align-self: flex-start; }
.pd-st b { font-size: 10px; font-weight: 800; color: #f1f5f9; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-st small { font-size: 7px; color: #475569; line-height: 1.35; }
.pd-def { font-size: 8.5px; color: #94a3b8; line-height: 1.55; }
.pd-qbox { margin-top: 7px; border: 1px solid rgba(255,255,255,0.08); border-left: 2px solid #10B981; border-radius: 8px; padding: 7px 9px; background: rgba(255,255,255,0.02); }
.pd-qbox b { display: block; font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: #e2e8f0; margin-bottom: 3px; }
.pd-qbox p { margin: 0; font-size: 8px; color: #64748b; line-height: 1.55; }

/* cursor fake */
.pd-cursor {
  position: absolute; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: 16px; height: 20px; opacity: 0;
  transition: transform 0.75s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.3s ease;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
}
.pd-cursor.show { opacity: 1; }
.pd-cursor svg { width: 100%; height: 100%; }
.pd-cursor::after { content: ''; position: absolute; left: -7px; top: -7px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.75); opacity: 0; transform: scale(0.4); }
.pd-cursor.click::after { animation: pdClick 0.4s ease forwards; }
@keyframes pdClick { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.15); } }

/* ── responsive móvil: versión simple ── */
@media (max-width: 900px) {
  .pdm { height: auto; }
  .pdm-sticky { position: relative; height: auto; padding: 88px 12px 8px; align-items: stretch; }
  .pdm-frame { height: 620px; max-height: none; border-radius: 14px; }
  .pdm-side { width: 46px; flex: 0 0 46px; padding: 10px 5px; }
  .pd-slogo { justify-content: center; padding: 2px 0 10px; }
  .pd-slogo img, .pd-slogo b, .pd-slogo .cx { display: none; }
  .pd-slogo .bell { margin: 0; }
  .pd-h .pd-btn, .pd-h .pd-input, .pd-h .pd-seg, .pd-h .pd-sel,
  .pd-an-h .pd-btn { display: none; }
  .pd-store { justify-content: center; padding: 6px 0; font-size: 0; gap: 0; }
  .pdm-item { justify-content: center; padding: 8px 0; }
  .pdm-item span, .pdm-item .chev { display: none; }
  .pd-side-label, .pd-side-pill, .pd-tokens, .pd-user { display: none; }
  .pd-side-sp { flex: 1; }
  .pdm-view { padding: 11px; }
  .pd-kpis { grid-template-columns: repeat(2, 1fr); overflow: hidden; max-height: 132px; }
  .pd-dash-grid { grid-template-columns: 1fr; }
  .pd-filters .pd-input, .pd-filters .pd-sel:nth-child(n+4) { display: none; }
  .pd-tkgrid { grid-template-columns: 1fr; }
  .pd-tkcard:nth-child(n+3) { display: none; }
  .pd-t-rail { display: none; }
  .pd-shop .grid3 { grid-template-columns: 1fr; }
  .pd-sc:nth-child(3) { display: none; }
  .pd-cstats { grid-template-columns: repeat(3, 1fr); }
  .pd-crow .sum .s { font-size: 9px; }
  .pd-cm-grid { grid-template-columns: 1fr; }
  .pd-cm-r { min-height: 150px; }
  .pd-favs { grid-template-columns: repeat(2, 1fr); }
  .pd-fav:nth-child(n+5) { display: none; }
  .pd-an-grid { grid-template-columns: 1fr; }
  .pd-an-grid .pd-anc:nth-child(n+2) { display: none; }
  .pd-an-row3 { display: none; }
  .pd-ranges .pd-rng:nth-child(n+4), .pd-rng-lbl { display: none; }
  .pd-tabs .pd-tab:nth-child(n+3) { display: none; }
  .pd-km-grid { grid-template-columns: 1fr; }
  .pd-km-r { display: none; }
  .pd-cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pdm-frame, .pdm-view, .pd-in, .pd-tkcard, .pd-bub, .pd-turn, .pd-crow,
  .pd-bars i, .pd-pb i, .pd-cbrow .tr i, .pd-chan .r .tr i, .pd-modal, .pd-ov { transition: none !important; }
  .pd-crow.ringing, .pd-wave i, .pd-typing i, .pd-cw .think i, .pd-caret { animation: none !important; }
  .pd-frt-chart .gl, .pd-km-chart .gl2 { transition: none !important; stroke-dashoffset: 0 !important; }
  .pd-stars svg { transition: none !important; }
}

/* ── variante home (.pdm--dash): solo la pantalla de Dashboard,
   full-bleed a todo el ancho y fundido a oscuro por abajo ── */
.pdm--dash {
  height: auto;
  /* full-bleed: rompe el padding lateral de la sección contenedora */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.pdm--dash .pdm-sticky { position: relative; height: auto; padding: 0; display: block; }
.pdm--dash .pdm-frame {
  width: 100%; max-height: none; height: 660px;
  border-radius: 0; border-left: none; border-right: none; border-bottom: none;
  transform: translateY(20px) scale(1);
}
.pdm--dash.on .pdm-frame { transform: none; }
.pdm--dash .pdm-frame::before { border-radius: 0; }
.pdm--dash .pdm-sticky::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 58%;
  background: linear-gradient(180deg,
    rgba(8,8,11,0) 0%,
    rgba(8,8,11,0.45) 34%,
    rgba(8,8,11,0.85) 62%,
    #08080b 88%);
  pointer-events: none; z-index: 55;
}
@media (max-width: 900px) {
  .pdm--dash .pdm-sticky { padding: 0; }
  .pdm--dash .pdm-frame { height: 520px; border-radius: 0; }
}

/* ── skin de la home: monocromo liquid-glass (pauta wismify-glass).
   Acentos verdes contados: pill CX, botón "Ver tickets" y la barra de
   auto-resolución. Todo lo demás, blanco/gris con sheen de cristal. ── */
.pdm--dash .pd-dk,
.pdm--dash .pd-dcard {
  background: linear-gradient(160deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.014) 42%, rgba(6,8,11,0.4) 100%);
  border-color: rgba(255,255,255,0.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.pdm--dash .pd-dk .ic { background: rgba(255,255,255,0.07) !important; color: #cbd5e1 !important; }
.pdm--dash .pd-dk.hot { border-color: rgba(255,255,255,0.2); }
.pdm--dash .pd-dk.hot b { color: #f1f5f9; }
.pdm--dash .pd-dpill { color: #cbd5e1 !important; border-color: rgba(255,255,255,0.16) !important; background: rgba(255,255,255,0.05) !important; }
.pdm--dash .pd-cat-row .r span { color: #e2e8f0; }
.pdm--dash .pd-cbar i { background: rgba(255,255,255,0.42) !important; }
.pdm--dash .pd-sent-row.hl { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }
.pdm--dash .pd-sent-row.hl > svg { color: #cbd5e1; }
.pdm--dash .pd-aiauto .ft .ph2 { color: #94a3b8; }
.pdm--dash .pd-viewall { color: #cbd5e1; }
.pdm--dash .pd-store { border-color: rgba(255,255,255,0.14); color: #cbd5e1; }
.pdm--dash .pdm-item.active { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); color: #f1f5f9; }
.pdm--dash .pd-tokens .bar i { background: rgba(255,255,255,0.45); }
.pdm--dash .pd-user .av { background: rgba(255,255,255,0.25); }

/* ── Móvil: el dashboard muestra SOLO 2 KPIs (abiertos + auto-resueltos),
   a 2 columnas con más aire — 6 columnas era ilegible ── */
@media (max-width: 900px) {
  .pd-dkpis { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
  .pd-dkpis .pd-dk { padding: 15px 16px 13px; border-radius: 14px; }
  .pd-dkpis .pd-dk:not(:nth-child(1)):not(:nth-child(4)) { display: none; }
  .pd-dk .r1 { margin-bottom: 8px; }
  .pd-dk .r1 span { font-size: 10.5px; }
  .pd-dk .ic { width: 26px; height: 26px; border-radius: 9px; }
  .pd-dk .ic svg { width: 12px; height: 12px; }
  .pd-dk b { font-size: 27px; }
  .pd-dk em { font-size: 10px; margin-top: 5px; }
}
