
#page-rplanificacion{padding-bottom:32px}.rp-page-header{gap:18px;align-items:flex-start}.rp-page-header .page-title i{margin-right:8px}.rp-actions{display:flex;gap:8px;flex-wrap:wrap}.rp-filter-card{display:grid;grid-template-columns:150px 150px minmax(190px,240px) minmax(260px,1fr) auto;gap:12px;align-items:end;background:#fff;border:1px solid #dde5ef;border-radius:14px;padding:16px;margin-bottom:14px;box-shadow:0 5px 16px rgba(15,23,42,.04)}.rp-filter-field{display:flex;flex-direction:column;gap:6px}.rp-filter-field label{font-size:11px;font-weight:800;color:#52627a;text-transform:uppercase;letter-spacing:.04em}.rp-filter-field input,.rp-filter-field select{height:38px;border:1px solid #d7e0ec;border-radius:9px;padding:0 10px;background:#fff;color:#172033;outline:none}.rp-search-wrap{height:38px;display:flex;align-items:center;border:1px solid #d7e0ec;border-radius:9px;padding:0 10px;gap:8px}.rp-search-wrap input{border:0!important;height:34px!important;padding:0!important;width:100%}.rp-search-wrap i{color:#94a3b8}.rp-today-btn{height:38px}.rp-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin-bottom:14px}.rp-kpi{background:#fff;border:1px solid #dde5ef;border-radius:13px;padding:15px;display:flex;align-items:center;gap:12px}.rp-kpi-icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:#eef5ff;color:#2563eb}.rp-kpi strong{display:block;font-size:22px;color:#0f172a;line-height:1}.rp-kpi small{display:block;margin-top:5px;color:#64748b;font-size:11px}.rp-table-card{overflow:hidden}.rp-table td{vertical-align:top}.rp-detail{max-width:560px;white-space:pre-wrap;line-height:1.45;color:#334155}.rp-account strong{display:block;color:#0f172a}.rp-account small{color:#64748b}.rp-date strong{display:block;color:#0f172a}.rp-date small{color:#64748b}.rp-status{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.rp-status.pending{background:#fff7ed;color:#c2410c}.rp-status.done{background:#ecfdf5;color:#047857}.rp-status.cancelled{background:#fef2f2;color:#b91c1c}.rp-day-row td{background:#f7f9fc!important;color:#334155!important;font-weight:800!important;padding:9px 12px!important;border-top:1px solid #dce5f0!important;border-bottom:1px solid #dce5f0!important}.rp-empty{text-align:center!important;padding:34px!important;color:#8492a6!important}.rp-error{padding:14px;border-radius:10px;background:#fff1f2;color:#b42318;border:1px solid #fecdd3}.rp-own-note{font-size:11px;color:#64748b;margin-top:5px}
@media(max-width:1100px){.rp-filter-card{grid-template-columns:repeat(2,minmax(0,1fr))}.rp-filter-search{grid-column:1/-1}.rp-today-btn{justify-self:start}.rp-kpi-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.rp-filter-card,.rp-kpi-grid{grid-template-columns:1fr}.rp-filter-search{grid-column:auto}.rp-actions{width:100%}.rp-actions button{flex:1}}

/* V599 - destinatarios WhatsApp en R. Planificación */
.rp-wa-cell{min-width:210px}.rp-wa-list{display:flex;flex-direction:column;gap:7px}.rp-wa-recipient{padding:7px 9px;border:1px solid #dcfce7;background:#f8fffb;border-radius:9px}.rp-wa-name{font-weight:800;color:#1f2937;line-height:1.25}.rp-wa-name i{color:#16a34a;margin-right:4px}.rp-wa-phone{margin-top:3px;color:#64748b;font-size:11px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}.rp-wa-status{display:inline-flex;padding:2px 6px;border-radius:999px;font-size:9px;font-weight:800;text-transform:uppercase}.rp-wa-status.sent{background:#dcfce7;color:#15803d}.rp-wa-status.failed{background:#fee2e2;color:#b91c1c}.rp-wa-none{color:#94a3b8;font-size:11px;font-style:italic}

.rp-wa-status.historical{background:#e0f2fe;color:#0369a1}.rp-wa-status.registered{background:#f1f5f9;color:#475569}

/* V601 estados reales de Meta */
.rp-wa-status.delivered{background:#dcfce7;color:#166534}.rp-wa-status.read{background:#dbeafe;color:#1d4ed8}.rp-wa-status.failed{background:#fee2e2;color:#b91c1c}

/* V656 - Reenvío controlado de WhatsApp fallidos */
#page-rplanificacion .rp-retry-btn{display:none;align-items:center;gap:7px}
.rp-retry-backdrop{position:fixed;inset:0;z-index:10050;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:24px}
.rp-retry-modal{width:min(1180px,96vw);max-height:92vh;background:#fff;border-radius:16px;box-shadow:0 24px 70px rgba(15,23,42,.28);display:flex;flex-direction:column;overflow:hidden}
.rp-retry-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:18px 20px;border-bottom:1px solid #e2e8f0}
.rp-retry-head h3{margin:0;color:#0f172a;font-size:18px}.rp-retry-head h3 i{color:#16a34a;margin-right:7px}.rp-retry-head p{margin:5px 0 0;color:#64748b;font-size:12px}
.rp-retry-close{border:0;background:transparent;color:#64748b;font-size:28px;line-height:1;cursor:pointer;padding:0 4px}
.rp-retry-filters{display:grid;grid-template-columns:160px 160px minmax(210px,260px) auto;gap:12px;align-items:end;padding:15px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.rp-retry-filters>div{display:flex;flex-direction:column;gap:6px}.rp-retry-filters label{font-size:11px;font-weight:800;color:#52627a;text-transform:uppercase}.rp-retry-filters input,.rp-retry-filters select{height:38px;border:1px solid #cfd8e5;border-radius:9px;padding:0 10px;background:#fff}
.rp-retry-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 20px;border-bottom:1px solid #e2e8f0;font-size:12px;color:#475569}.rp-retry-toolbar label{display:flex;align-items:center;gap:7px;font-weight:700}
.rp-retry-table-wrap{overflow:auto;min-height:180px}.rp-retry-table{min-width:980px}.rp-retry-table td{vertical-align:top}.rp-retry-table td small{display:block;margin-top:4px;color:#64748b;font-size:10px;max-width:280px}.rp-retry-table td strong{color:#0f172a}.rp-retry-recovered{opacity:.62;background:#f8fafc}
.rp-retry-state{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.rp-retry-state.failed{background:#fef2f2;color:#b91c1c}.rp-retry-state.recovered{background:#ecfdf5;color:#047857}
.rp-retry-foot{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 20px;border-top:1px solid #e2e8f0;background:#fff}.rp-retry-actions{display:flex;gap:8px;flex-wrap:wrap}.rp-retry-processing{color:#2563eb}.rp-retry-error{color:#b91c1c;font-weight:700}
@media(max-width:760px){.rp-retry-backdrop{padding:8px}.rp-retry-modal{width:100%;max-height:96vh}.rp-retry-filters{grid-template-columns:1fr 1fr}.rp-retry-filters .primary-btn{grid-column:1/-1}.rp-retry-foot{align-items:flex-start;flex-direction:column}.rp-retry-actions{width:100%}.rp-retry-actions button{flex:1}.rp-retry-toolbar{align-items:flex-start;flex-direction:column}}
/* V658 - trazabilidad visible de reintentos WhatsApp */
.rp-wa-retry-note{display:block;margin-top:3px;font-size:10px;line-height:1.25;color:#52606d;font-weight:600}
.rp-retry-detail-list{margin-top:6px;max-height:150px;overflow:auto;font-size:11px;line-height:1.35}
.rp-retry-detail-error{color:#b42318;margin:2px 0}.rp-retry-detail-ok{color:#067647;margin:2px 0}
