/* =====================================================================
   REMOOX UI — capa visual moderna para todo el panel.
   Se carga después de app.css. Solo estilos: no cambia estructura ni
   comportamiento. Guía para nuevas vistas: .ai_agents/frontend/views_agent.md
   ===================================================================== */

:root {
    --rx-primary: #00b6dc;
    --rx-primary-dark: #11849d;
    --rx-primary-soft: #e8f8fc;
    --rx-text: #34404b;
    --rx-muted: #7b8792;
    --rx-border: #e4e9ee;
    --rx-input-border: #d3dce3;
    --rx-soft: #f6f9fb;
    --rx-bg: #f3f6f8;
    --rx-radius: 10px;
    --rx-radius-sm: 6px;
    --rx-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
    --rx-shadow-hover: 0 6px 16px rgba(16, 24, 40, .09);
    --rx-ring: 0 0 0 3px rgba(0, 182, 220, .16);
    --rx-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base: textos pequeños en todas las pantallas ---------- */
body {
    background-color: var(--rx-bg) !important;
    color: var(--rx-text);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}
h1 { font-size: 17px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
h4, h5, h6 { font-size: 13px; }
::selection { background: rgba(0, 182, 220, .2); }

/* ---------- Encabezado de vista ---------- */
.rx-title { font-size: 17px !important; font-weight: 600; color: var(--rx-text); letter-spacing: .1px; }
.rx-subtitle { font-size: 12px; color: var(--rx-muted); max-width: 820px; line-height: 1.45; }
.rx-title-icon { font-size: 26px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); border-radius: 10px; padding: 8px; }

/* ---------- Botones (mismos colores de marca, tamaño compacto) ---------- */
.btn {
    min-width: 0;
    min-height: 34px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--rx-radius-sm);
    gap: 4px;
    letter-spacing: .1px;
    transition: background-color .15s var(--rx-ease), color .15s var(--rx-ease), border-color .15s var(--rx-ease), box-shadow .15s var(--rx-ease), transform .1s var(--rx-ease);
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { box-shadow: var(--rx-ring) !important; outline: 0; }
.btn .material-symbols-outlined { font-size: 18px; padding: 0; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 11.5px; }
.btn-primary {
    background-color: var(--rx-primary) !important;
    border: 1px solid var(--rx-primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 120, 150, .25);
}
.btn-primary:hover { background-color: #fff !important; color: var(--rx-primary) !important; border-color: var(--rx-primary) !important; }
.btn-secondary { background-color: #fff !important; border: 1px solid var(--rx-primary); color: var(--rx-primary-dark); }
.btn-secondary:hover { background-color: var(--rx-primary) !important; color: #fff !important; border-color: var(--rx-primary); box-shadow: 0 2px 6px rgba(0, 182, 220, .25); }

/* Foco después de un clic: Materialize pinta .btn:focus de verde (#1d7d74) y
   Bootstrap cambia bordes y anillos a gris/azul propio. El clic no deja
   rastro; solo el foco por teclado muestra el anillo de marca (.btn:focus-visible). */
.btn:focus:not(:focus-visible) { box-shadow: none !important; outline: 0; }
.btn-primary:focus:not(:focus-visible) { box-shadow: 0 1px 2px rgba(0, 120, 150, .25) !important; }
.btn-primary:focus, .btn-primary:active, .btn-secondary:focus, .btn-secondary:active { border-color: var(--rx-primary) !important; }
.btn-secondary:focus:not(:hover) { color: var(--rx-primary-dark); }
.btn[class*="btn-outline-"]:focus:not(:hover):not(:active), .btn-link:focus:not(:hover) { background-color: transparent; }

/* btn-outline-secondary: Bootstrap lo rellena de gris (#6c757d) al pasar el
   cursor y al presionarlo; aquí toma el celeste suave de la marca, igual que
   los botones de icono de la barra superior. */
.btn.btn-outline-secondary:hover {
    background-color: var(--rx-primary-soft); border-color: var(--rx-primary); color: var(--rx-primary-dark);
}
.btn.btn-outline-secondary:not(:disabled):not(.disabled):active,
.btn.btn-outline-secondary:not(:disabled):not(.disabled).active,
.show > .btn.btn-outline-secondary.dropdown-toggle {
    background-color: #c7eef8; border-color: var(--rx-primary); color: #0b6f85;
}

/* Deshabilitados: Materialize fuerza gris (#DFDFDF / #9F9F9F, con !important)
   en todo .btn deshabilitado; aquí, un celeste muy suave de la marca, igual
   para todas las variantes y también al pasar el cursor. */
.btn.disabled, .btn:disabled, .btn[disabled],
.btn.disabled:hover, .btn:disabled:hover, .btn[disabled]:hover {
    background-color: #f2fafc !important; border-color: #cdebf2 !important; color: #8cc3d1 !important;
    box-shadow: none !important; opacity: 1; cursor: not-allowed;
}

/* btn-outline-primary: el azul de Bootstrap (#007bff / #0d6efd) pasa al
   celeste de la marca. Al pasar el cursor se rellena, igual que btn-secondary. */
.btn.btn-outline-primary { border-color: var(--rx-primary); color: var(--rx-primary-dark); }
.btn.btn-outline-primary:hover {
    background-color: var(--rx-primary); border-color: var(--rx-primary); color: #fff;
    box-shadow: 0 2px 6px rgba(0, 182, 220, .25);
}
.btn.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn.btn-outline-primary.dropdown-toggle {
    background-color: var(--rx-primary-dark); border-color: var(--rx-primary-dark); color: #fff;
}

/* Botón cuadrado solo icono (acciones: editar, eliminar, descargar…) */
.btn.rx-btn-icon, .btn.hr-btn-icon {
    width: 32px !important; max-width: 32px; height: 32px; min-width: 32px !important; min-height: 32px !important;
    padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; vertical-align: middle;
}

/* ---------- Franjas grises antiguas (barras de botones) -> barra blanca moderna ---------- */
[style*="background-color: lightgrey"], [style*="background-color:lightgrey"],
[style*="background-color: #d3d3d3"], [style*="background-color:#d3d3d3"],
[style*="background-color: #e7e7e7"] {
    background-color: #fff !important;
    border: 1px solid var(--rx-border);
    border-radius: var(--rx-radius) !important;
    box-shadow: var(--rx-shadow);
}

/* ---------- Tarjetas ---------- */
.card {
    border: 1px solid var(--rx-border);
    border-radius: var(--rx-radius);
    box-shadow: var(--rx-shadow);
}

/* ---------- Formularios: borde izquierdo de marca ---------- */
form.card,
.card.hr-form,
.card[style*="cfe7ec"],
form[style*="cfe7ec"] {
    background: linear-gradient(180deg, #fbfdfe 0%, #f4f9fb 100%) !important;
    border-left: 3px solid var(--rx-primary) !important;
}
.form-control, .form-select {
    font-size: 13px !important;
    color: var(--rx-text);
    border: 1px solid var(--rx-input-border) !important;
    border-radius: var(--rx-radius-sm) !important;
    background-color: #fff;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: border-color .15s var(--rx-ease), box-shadow .15s var(--rx-ease);
}
input.form-control:not([type=file]):not([type=color]):not([type=checkbox]):not([type=radio]) { margin-bottom: 0 !important; }
.form-control:focus, .form-select:focus {
    border-color: var(--rx-primary) !important;
    box-shadow: var(--rx-ring) !important;
    outline: 0;
}
.form-control-sm, .form-select-sm { font-size: 12px !important; }
form.card label, .card form label { color: #5b6772; letter-spacing: .2px; }

/* Contenedores de campos con ancho acorde al dato (usar m-3 y w-100-md) */
.rx-field { flex: 0 0 auto; width: 220px; max-width: 100%; display: flex; flex-direction: column; }
.rx-field .form-control, .rx-field .form-select, .rx-field .select2-container { width: 100% !important; min-width: 0 !important; }
/* el <select> original que select2 oculta debe seguir midiendo 1px (si no, desborda la página) */
select.select2-hidden-accessible { width: 1px !important; min-width: 0 !important; max-width: 1px !important; }
/* filas de DataTables: cebra muy suave */
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd, table.dataTable tbody tr.odd { background-color: #fbfcfd; }
/* la ayuda va entre etiqueta y control: todos los campos terminan en su control y alinean por la base */
.rx-field > small { order: 1; margin: -2px 0 4px; line-height: 1.3; }
.rx-field > .form-control, .rx-field > .form-select, .rx-field > select, .rx-field > input, .rx-field > textarea, .rx-field > .select2-container { order: 2; }
.rx-f-text { width: 240px; } .rx-f-wide { width: 380px; } .rx-f-email { width: 260px; }
.rx-f-select { width: 220px; } .rx-f-select2 { width: 280px; } .rx-f-date { width: 170px; }
.rx-f-datetime { width: 220px; } .rx-f-time { width: 130px; } .rx-f-number { width: 150px; }
.rx-f-file { width: 300px; } .rx-f-check { width: auto; } .rx-f-textarea { flex: 1 1 100%; width: auto; }
@media screen and (max-width: 768px) {
    .rx-field.w-100-md { width: calc(100% - 2rem) !important; flex: 1 1 calc(100% - 2rem); }
}

/* ---------- Cajas de mensaje en la vista (noty se mantiene igual) ---------- */
.alert {
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 12px;
    padding: 10px 14px;
}
.alert-info { background: var(--rx-primary-soft) !important; border-color: #c9eef7 !important; color: #135f70 !important; }
.alert-warning { background: #fff7e6 !important; border-color: #ffe2a8 !important; color: #7a5300 !important; }
.alert-success { background: #ecfbf3 !important; border-color: #bdeccf !important; color: #146c3c !important; }
.alert-danger { background: #fdf0ef !important; border-color: #f6c9c5 !important; color: #8c2a20 !important; }
.alert-secondary, .alert-light { background: var(--rx-soft) !important; border-color: var(--rx-border) !important; color: var(--rx-text) !important; }
.alert ul { padding-left: 18px; }

/* ---------- Insignias ---------- */
.badge { border-radius: 999px; font-weight: 600; padding: 3px 8px; }
.badge.bg-primary, .badge.bg-secondary, .badge.bg-success, .badge.bg-danger, .badge.bg-info, .badge.badge-primary, .badge.badge-success, .badge.badge-danger, .badge.badge-info { color: #fff !important; }

/* ---------- Pestañas ---------- */
.nav-tabs { border-bottom: 1px solid var(--rx-border); }
.nav-tabs .nav-link { font-size: 12.5px; color: var(--rx-muted); border: 0; border-bottom: 2px solid transparent; background: transparent; }
.nav-tabs .nav-link:hover { color: var(--rx-primary-dark); }
.nav-tabs .nav-link.active { color: var(--rx-primary-dark); font-weight: 600; border-bottom-color: var(--rx-primary); background: transparent; }

/* ---------- DataTables ---------- */
table.dataTable { border-collapse: separate !important; border-spacing: 0; font-size: 12.5px; width: 100% !important; }
table.dataTable thead th, table.dataTable thead td {
    background: var(--rx-soft); color: #6b7782; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
    border-bottom: 1px solid var(--rx-border) !important; border-top: 0 !important; padding: 10px !important; white-space: nowrap;
}
table.dataTable thead th:first-child { border-top-left-radius: 8px; }
table.dataTable thead th:last-child { border-top-right-radius: 8px; }
table.dataTable tbody td { padding: 9px 10px !important; border-top: 1px solid #eef2f5 !important; vertical-align: middle; }
table.dataTable tbody tr { background: #fff; transition: background-color .12s; }
table.dataTable tbody tr:hover > td { background: #f6fbfd; }
table.dataTable.no-footer { border-bottom: 0 !important; }
.dataTables_wrapper { font-size: 12px; }

/* Barra superior: buscador moderno a la izquierda de PDF / Excel / CSV… */
.rx-dt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 10px; }
.rx-dt-toolbar .dataTables_filter { float: none !important; text-align: left !important; margin: 0 !important; }
.rx-dt-toolbar .dataTables_filter label { display: flex; align-items: center; margin: 0; position: relative; font-size: 0; }
.rx-dt-toolbar .dataTables_filter .rx-dt-search-icon { position: absolute; left: 11px; font-size: 18px; color: #8a949e; pointer-events: none; z-index: 1; }
.rx-dt-toolbar .dataTables_filter input,
.dataTables_wrapper .rx-dt-toolbar .dataTables_filter input[type=search].form-control {
    margin: 0 !important; height: 36px !important; width: 260px !important; max-width: 100%;
    padding: 0 14px 0 36px !important; font-size: 12.5px !important; letter-spacing: 0;
    border: 1px solid var(--rx-input-border) !important; border-radius: 999px !important; background: #fff !important;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, .04) !important; transition: width .2s var(--rx-ease), border-color .15s, box-shadow .15s;
}
.rx-dt-toolbar .dataTables_filter input:focus, .dataTables_wrapper .rx-dt-toolbar .dataTables_filter input[type=search].form-control:focus { width: 320px !important; border-color: var(--rx-primary) !important; box-shadow: var(--rx-ring) !important; }
.dt-buttons { display: flex !important; flex-wrap: wrap; gap: 4px; float: none !important; }
.dt-buttons .dt-button, .dt-buttons button {
    margin: 0 !important; min-height: 34px; padding: 6px 12px !important; font-size: 11.5px !important; font-weight: 500;
    color: #4b5863 !important; background: #fff !important; border: 1px solid var(--rx-border) !important; border-radius: var(--rx-radius-sm) !important;
    transition: border-color .15s, color .15s, box-shadow .15s;
}
.dt-buttons .dt-button:hover, .dt-buttons button:hover { border-color: var(--rx-primary) !important; color: var(--rx-primary-dark) !important; box-shadow: 0 2px 6px rgba(0, 182, 220, .15); }
.dataTables_length { font-size: 11.5px; color: var(--rx-muted); }
.dataTables_length select { height: 30px; border: 1px solid var(--rx-input-border) !important; border-radius: var(--rx-radius-sm); padding: 0 6px; margin: 0 4px; display: inline-block !important; width: auto !important; background: #fff; }
.dataTables_info { font-size: 11.5px !important; color: var(--rx-muted); padding-top: 12px !important; }
.dataTables_paginate { padding-top: 8px !important; }
.dataTables_paginate .page-link, .dataTables_paginate .paginate_button {
    border-radius: var(--rx-radius-sm) !important; margin: 0 2px; font-size: 12px; color: var(--rx-text) !important;
    border: 1px solid var(--rx-border) !important; background: #fff !important; padding: 4px 10px !important;
}
.dataTables_paginate .page-item.active .page-link, .dataTables_paginate .paginate_button.current {
    background: var(--rx-primary) !important; border-color: var(--rx-primary) !important; color: #fff !important; box-shadow: 0 1px 3px rgba(0, 182, 220, .35);
}
.dataTables_paginate .page-link:hover, .dataTables_paginate .paginate_button:hover { background: var(--rx-primary-soft) !important; color: var(--rx-primary-dark) !important; }
.dataTables_paginate .page-item.disabled .page-link { opacity: .5; }
.dataTables_processing {
    border: 0 !important; border-radius: var(--rx-radius) !important; box-shadow: var(--rx-shadow-hover) !important;
    background: rgba(255, 255, 255, .95) !important; font-size: 12px; color: var(--rx-primary-dark);
}

/* ---------- Animación de entrada: suave, rápida ---------- */
@keyframes rx-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); filter: blur(3px); }
    to { opacity: 1; transform: none; filter: none; }
}
@keyframes rx-fade { from { opacity: 0; } to { opacity: 1; } }
.rx-anim { animation: rx-in .38s var(--rx-ease) both; animation-delay: calc(var(--rx-i, 0) * 30ms); }
#rx-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100000; pointer-events: none;
    background: linear-gradient(90deg, #00b6dc, #7be3f5 50%, #00b6dc); background-size: 200% 100%;
    box-shadow: 0 0 10px rgba(0, 182, 220, .6); border-radius: 0 3px 3px 0;
    transition: width .3s var(--rx-ease), opacity .35s ease; animation: rx-shimmer 1.1s linear infinite;
}
@keyframes rx-shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
    .rx-anim { animation: none !important; }
    #rx-progress { display: none; }
}

/* ---------- Panel principal (/dashboard) ---------- */
#dashboard_index .rx-hero {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    margin: 8px; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--rx-border);
    background: radial-gradient(120% 140% at 0% 0%, #e9fafe 0%, #ffffff 55%), #fff; box-shadow: var(--rx-shadow);
}
#dashboard_index .rx-hero-title { display: flex; align-items: center; gap: 12px; }
#dashboard_index .rx-hero-title .material-symbols-outlined {
    /* discreto: no debe resaltar más que el logo de la marca */
    font-size: 18px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); border-radius: 9px; padding: 6px;
}
#dashboard_index .rx-hero h1 { font-size: 16px; font-weight: 700; margin: 0; color: var(--rx-text); letter-spacing: .1px; }
#dashboard_index .rx-hero .rx-hero-sub { font-size: 11.5px; color: var(--rx-muted); margin-top: 2px; }
#dashboard_index .rx-hero .rmx-ds-trigger-bar { max-width: 380px; min-height: 38px; border-radius: 999px; border-color: var(--rx-input-border); box-shadow: inset 0 1px 2px rgba(16, 24, 40, .04); font-size: 12.5px; }
#dashboard_index .rx-hero .rmx-ds-trigger-bar:hover { border-color: var(--rx-primary); box-shadow: var(--rx-ring); background: #fff; }
#dashboard_index .rx-hero-search { flex: 1 1 280px; display: flex; justify-content: flex-end; }
#dashboard_index .rx-section-title {
    display: flex; align-items: center; gap: 8px; margin: 40px 12px 12px; font-size: 11px; font-weight: 600;
    color: var(--rx-muted); text-transform: uppercase; letter-spacing: .7px;
}
#dashboard_index .rx-section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--rx-border), transparent); }
#dashboard_index .rx-tiles { margin: 0 8px; padding: 0; background: transparent; }
#dashboard_index .rx-tiles > .d-flex { gap: 8px; }
#dashboard_index .rx-tiles .btn {
    margin: 0 !important; min-width: 190px; min-height: 48px; padding: 8px 14px 8px 8px !important; justify-content: flex-start !important;
    font-size: 12.5px; font-weight: 500; border-radius: 12px; border: 1px solid var(--rx-border);
    box-shadow: var(--rx-shadow); transition: transform .18s var(--rx-ease), box-shadow .18s var(--rx-ease), border-color .18s, background-color .18s, color .18s;
}
#dashboard_index .rx-tiles .btn-secondary { background: #fff !important; color: var(--rx-text) !important; }
#dashboard_index .rx-tiles .btn .material-symbols-outlined {
    font-size: 19px !important; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; margin-right: 8px !important; background: var(--rx-primary-soft); color: var(--rx-primary-dark);
    transition: background-color .18s, color .18s;
}
#dashboard_index .rx-tiles .btn-primary .material-symbols-outlined { background: rgba(255, 255, 255, .2); color: #fff; }
/* mosaicos destacados (btn-primary con fondo blanco en línea): borde de marca e icono sólido */
#dashboard_index .rx-tiles .btn-primary[style*="#FFF"], #dashboard_index .rx-tiles .btn-primary[style*="#fff"] {
    color: var(--rx-primary-dark) !important; border: 1px solid var(--rx-primary) !important; font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 182, 220, .18);
}
#dashboard_index .rx-tiles .btn-primary[style*="#FFF"] .material-symbols-outlined, #dashboard_index .rx-tiles .btn-primary[style*="#fff"] .material-symbols-outlined {
    background: linear-gradient(135deg, #00b6dc, #11849d); color: #fff;
}
#dashboard_index .rx-tiles .btn:hover { transform: translateY(-2px); box-shadow: var(--rx-shadow-hover); border-color: var(--rx-primary); }
#dashboard_index .rx-tiles .btn-secondary:hover { background: #fff !important; color: var(--rx-primary-dark) !important; }
#dashboard_index .rx-tiles .btn-secondary:hover .material-symbols-outlined { background: var(--rx-primary); color: #fff; }
@media screen and (max-width: 500px) {
    #dashboard_index .rx-tiles .btn { min-width: 0; width: 100%; }
    #dashboard_index .rx-hero-search { justify-content: stretch; }
    #dashboard_index .rx-hero .rmx-ds-trigger-bar { max-width: none; }
}

/* Invitación a conectar la IA (solo si la empresa no tiene IA conectada): robot minimalista en azul neón con luz */
#dashboard_index .rx-ai-promo {
    display: flex; align-items: center; gap: 16px; margin: 12px 8px 0; padding: 14px 18px 14px 14px; border-radius: 14px;
    border: 1px solid #bfeaf5; background: radial-gradient(120% 160% at 0% 50%, #e3f8fd 0%, #ffffff 60%), #fff;
    box-shadow: 0 2px 10px rgba(0, 182, 220, .12); color: var(--rx-text) !important; text-decoration: none !important;
    transition: transform .18s var(--rx-ease), box-shadow .18s var(--rx-ease), border-color .18s;
}
#dashboard_index .rx-ai-promo:hover { transform: translateY(-2px); border-color: var(--rx-primary); box-shadow: 0 8px 22px rgba(0, 182, 220, .2); }
.rx-ai-bot {
    flex: 0 0 56px; width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px;
    background: radial-gradient(circle at 50% 35%, #0f3442 0%, #0a1d26 75%);
    box-shadow: 0 0 0 1px rgba(0, 182, 220, .35), 0 0 18px rgba(0, 182, 220, .45), inset 0 0 12px rgba(0, 182, 220, .18);
}
.rx-ai-bot svg { width: 42px; height: 42px; overflow: visible; filter: drop-shadow(0 0 3px rgba(0, 210, 255, .85)); }
.rx-ai-bot-line { stroke: #22d3f5; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rx-ai-bot-eyes { fill: #7ce8ff; transform-origin: 32px 31px; animation: rx-bot-blink 4.5s infinite; }
.rx-ai-bot-light { fill: #9cf0ff; filter: drop-shadow(0 0 4px #00d2ff) drop-shadow(0 0 8px #00b6dc); animation: rx-bot-light 1.8s ease-in-out infinite; }
@keyframes rx-bot-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes rx-bot-light { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.rx-ai-promo-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; line-height: 1.35; }
.rx-ai-promo-txt b { font-size: 13.5px; font-weight: 700; color: var(--rx-text); }
.rx-ai-promo-txt small { font-size: 12px; color: var(--rx-muted); }
.rx-ai-promo-btn { flex: 0 0 auto; display: inline-flex !important; align-items: center; gap: 4px; white-space: nowrap; }
.rx-ai-promo-btn .material-symbols-outlined { font-size: 17px; }
@media screen and (max-width: 600px) {
    #dashboard_index .rx-ai-promo { flex-wrap: wrap; gap: 12px; }
    .rx-ai-promo-txt { flex-basis: calc(100% - 72px); }
    .rx-ai-promo-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .rx-ai-bot-eyes, .rx-ai-bot-light { animation: none; }
}

/* ---------- Barra superior (include/header.blade.php) ---------- */
.rx-topbar {
    position: fixed; top: 0; left: 0; z-index: 1030; min-height: 54px; padding: 0 10px;
    background: rgba(255, 255, 255, .86) !important;
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(228, 233, 238, .9);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 4px 18px rgba(16, 24, 40, .04);
}
.rx-topbar-left, .rx-topbar-right { gap: 8px; min-width: 0; }
.rx-topbar-logo { display: inline-flex; align-items: center; padding: 6px 4px; border-radius: 10px; transition: transform .18s var(--rx-ease); }
.rx-topbar-logo:hover { transform: scale(1.04); }
.rx-topbar-logo img { width: 40px; height: auto; display: block; }
.rx-topbar-sep { width: 1px; height: 22px; background: var(--rx-border); margin: 0 4px; }
.rx-chip {
    display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: .3px; color: #6b7782 !important; text-decoration: none !important;
    background: var(--rx-soft); border: 1px solid var(--rx-border); white-space: nowrap;
    transition: border-color .15s, color .15s, background-color .15s;
}
.rx-chip .material-symbols-outlined { font-size: 16px; color: var(--rx-primary); }
a.rx-chip:hover { border-color: var(--rx-primary); color: var(--rx-primary-dark) !important; background: var(--rx-primary-soft); }
.rx-chip-muted { text-transform: uppercase; color: #9aa4ad !important; }
.rx-chip-accent { color: var(--rx-primary-dark) !important; background: var(--rx-primary-soft); border-color: #c9eef7; }
/* Empresa: minimalista, solo el nombre resumido (sin icono) */
.rx-company {
    display: inline-flex; align-items: center; gap: 4px; max-width: 220px; margin: 0 4px; min-width: 0;
    font-size: 10px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #7b8792;
}
.rx-company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Botones de icono (buscador y menú): borde redondeado como el chip de tokens, tono suave siempre;
   al presionar o con el menú abierto, más azul */
.rx-topbar .rx-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; min-height: 32px;
    padding: 0; border: 1px solid #c9eef7; border-radius: 999px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); cursor: pointer;
    transition: background-color .15s var(--rx-ease), color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.rx-topbar .rx-icon-btn .material-symbols-outlined { font-size: 18px; }
.rx-topbar .rx-icon-btn:hover { border-color: #9fdfee; background: var(--rx-primary-soft); }
.rx-topbar .rx-icon-btn:active, .rx-topbar .rx-menu.is-open .rx-menu-toggle {
    background: #c7eef8; border-color: var(--rx-primary); color: #0b6f85; box-shadow: 0 0 0 3px rgba(0, 182, 220, .12);
}
.rx-topbar .rx-icon-btn:active { transform: scale(.94); }
.rx-topbar .rx-icon-btn:focus-visible { outline: 0; box-shadow: var(--rx-ring); }

/* Menú principal */
.rx-menu { position: relative; }
.rx-menu-toggle .material-symbols-outlined { transition: transform .35s var(--rx-ease); }
.rx-menu.is-open .rx-menu-toggle .material-symbols-outlined { transform: rotate(45deg) scale(1.05); }
.rx-menu-panel {
    position: absolute; top: calc(100% + 10px); right: 0; width: 300px; padding: 8px; z-index: 1040;
    background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid rgba(228, 233, 238, .95); border-radius: 16px;
    box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .22), 0 8px 16px -8px rgba(16, 24, 40, .1);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.96); transform-origin: top right;
    transition: opacity .18s var(--rx-ease), transform .22s var(--rx-ease), visibility 0s linear .22s;
}
.rx-menu.is-open .rx-menu-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .18s var(--rx-ease), transform .26s var(--rx-ease), visibility 0s; }
.rx-menu-head {
    display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 6px; border-radius: 12px;
    background: radial-gradient(120% 160% at 0% 0%, #e3f8fd 0%, #f6fbfd 60%, #fff 100%); border: 1px solid #e6f4f8;
}
.rx-menu-avatar {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #00b6dc, #11849d); box-shadow: 0 4px 10px rgba(0, 182, 220, .3);
}
.rx-menu-who { min-width: 0; }
.rx-menu-name { font-size: 12.5px; font-weight: 700; color: var(--rx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-menu-sub { font-size: 11px; color: var(--rx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-menu-item {
    display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; color: var(--rx-text) !important; text-decoration: none !important;
    opacity: 0; transform: translateX(6px);
    transition: background-color .15s var(--rx-ease), opacity .2s var(--rx-ease), transform .25s var(--rx-ease);
}
.rx-menu.is-open .rx-menu-item { opacity: 1; transform: none; }
.rx-menu.is-open .rx-menu-item:nth-of-type(1) { transition-delay: .03s; }
.rx-menu.is-open .rx-menu-item:nth-of-type(2) { transition-delay: .06s; }
.rx-menu.is-open .rx-menu-item:nth-of-type(3) { transition-delay: .09s; }
.rx-menu.is-open .rx-menu-item:nth-of-type(4) { transition-delay: .12s; }
.rx-menu-item:hover, .rx-menu-item:focus-visible { background: var(--rx-primary-soft); outline: 0; }
.rx-menu-ico {
    width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
    font-size: 19px !important; color: var(--rx-primary-dark); background: #eef8fb; transition: background-color .15s, color .15s, transform .2s var(--rx-ease);
}
.rx-menu-item:hover .rx-menu-ico { background: var(--rx-primary); color: #fff; transform: scale(1.06); }
.rx-menu-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rx-menu-txt b { font-size: 12.5px; font-weight: 600; }
.rx-menu-txt small { font-size: 11px; color: var(--rx-muted); }
.rx-menu-ext { margin-left: auto; font-size: 16px !important; color: #9aa4ad; }
.rx-menu-divider { height: 1px; margin: 6px 4px; background: var(--rx-border); }
.rx-menu-danger .rx-menu-ico { color: #c0392b; background: #fdf0ef; }
.rx-menu-danger:hover { background: #fdf0ef; }
.rx-menu-danger:hover .rx-menu-ico { background: #c0392b; color: #fff; }
/* Configuración pendiente (icono de engrane con contador, solo en /dashboard) */
.rx-setup-btn { position: relative; }
.rx-setup-badge {
    position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; line-height: 1;
    color: #fff; background: var(--rx-primary); border: 2px solid #fff; box-shadow: 0 0 8px rgba(0, 182, 220, .7);
}
.rx-setup-badge::after {
    content: ''; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--rx-primary);
    animation: rx-setup-ping 2s var(--rx-ease) infinite;
}
@keyframes rx-setup-ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.rx-setup-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--rx-border); line-height: 1.3; }
.rx-setup-head b { font-size: 12.5px; font-weight: 700; color: var(--rx-text); }
.rx-setup-head small { font-size: 11px; color: var(--rx-muted); }
.rx-setup .rx-menu-panel { width: 320px; }
@media screen and (max-width: 600px) {
    .rx-company { max-width: 120px; }
    .rx-menu-panel { position: fixed; top: 60px; right: 8px; left: 8px; width: auto; }
    .rx-setup .rx-menu-panel { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .rx-menu-panel, .rx-menu-item, .rx-menu-toggle .material-symbols-outlined { transition: none !important; }
    .rx-setup-badge::after { animation: none; }
}

/* ---------- Modales modernos (.rx-modal sobre ModalBubble) ---------- */
/* Animación propia rápida: reemplaza la entrada "bond" (1.5s). Backdrop y panel animan
   tanto al abrir como al cerrar, porque modal-bubble.js espera ambos animationend. */
.mtd-modal.rx-modal { --mtd-w: min(1080px, 94vw); --mtd-h: 86vh; }
.mtd-modal.rx-modal .mtd-backdrop {
    background: rgba(15, 23, 32, .42) !important;
    -webkit-backdrop-filter: blur(6px) saturate(140%); backdrop-filter: blur(6px) saturate(140%);
    opacity: 0;
}
.mtd-modal.rx-modal .mtd-sheet {
    top: 6vh; left: 50%; width: var(--mtd-w); max-width: var(--mtd-w); height: auto; max-height: var(--mtd-h);
    display: flex; flex-direction: column; border-radius: 18px; border: 1px solid rgba(228, 233, 238, .9);
    background: #fff; box-shadow: 0 32px 64px -16px rgba(16, 24, 40, .35), 0 12px 24px -12px rgba(16, 24, 40, .18);
    transform: translate(-50%, 0); opacity: 0;
}
.mtd-modal.rx-modal.bond.is-active .mtd-backdrop { animation: rx-backdrop-in .25s ease forwards; }
.mtd-modal.rx-modal.bond.is-active .mtd-sheet { animation: rx-modal-in .34s cubic-bezier(.2, .9, .25, 1.05) forwards; }
.mtd-modal.rx-modal.bond.is-active .mtd-sheet .mtd-header,
.mtd-modal.rx-modal.bond.is-active .mtd-sheet .mtd-content { opacity: 1; animation: none; }
.mtd-modal.rx-modal.bond.is-closing .mtd-backdrop { animation: rx-backdrop-out .2s ease forwards; }
.mtd-modal.rx-modal.bond.is-closing .mtd-sheet { animation: rx-modal-out .2s ease forwards; }
.mtd-modal.rx-modal.bond.is-closing::after { display: none; }
@keyframes rx-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rx-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes rx-modal-in {
    from { opacity: 0; transform: translate(-50%, -18px) scale(.95); filter: blur(6px); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); filter: none; }
}
@keyframes rx-modal-out {
    from { opacity: 1; transform: translate(-50%, 0) scale(1); }
    to { opacity: 0; transform: translate(-50%, 12px) scale(.97); }
}
.rx-modal-header {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px !important;
    background: radial-gradient(120% 180% at 0% 0%, #e6f9fd 0%, #f7fbfd 55%, #fff 100%) !important; border-bottom: 1px solid var(--rx-border) !important;
}
.rx-modal-title { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-width: 0; }
.rx-modal-title h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--rx-text); }
.rx-modal-title p { margin: 2px 0 0; font-size: 11.5px; color: var(--rx-muted); }
.rx-modal-icon { font-size: 20px; color: var(--rx-primary-dark); background: #fff; border: 1px solid #d6f0f6; border-radius: 11px; padding: 8px; box-shadow: var(--rx-shadow); }
.rx-modal-search { position: relative; display: flex; align-items: center; margin: 0; flex: 0 1 300px; }
.rx-modal-search .material-symbols-outlined { position: absolute; left: 12px; font-size: 18px; color: #8a949e; pointer-events: none; }
.rx-modal-search input {
    width: 100%; height: 38px !important; margin: 0 !important; padding: 0 14px 0 38px !important; font-size: 12.5px !important;
    border: 1px solid var(--rx-input-border) !important; border-radius: 999px !important; background: #fff !important; box-shadow: none !important;
    transition: border-color .15s, box-shadow .15s;
}
.rx-modal-search input:focus { border-color: var(--rx-primary) !important; box-shadow: var(--rx-ring) !important; outline: 0; }
.rx-modal-close {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px;
    border: 1px solid var(--rx-border); background: #fff; color: #6b7782; cursor: pointer; transition: background-color .15s, color .15s, transform .15s var(--rx-ease);
}
.rx-modal-close:hover { background: #fdf0ef; color: #c0392b; border-color: #f6c9c5; transform: rotate(90deg); }
.rx-modal-content { flex: 1 1 auto; overflow: auto; max-height: none !important; padding: 6px 18px 20px !important; background: var(--rx-soft) !important; }

/* Rejilla de aplicaciones */
.rx-apps-group-title {
    display: flex; align-items: center; gap: 8px; margin: 16px 2px 10px; font-size: 11px; font-weight: 600;
    color: var(--rx-muted); text-transform: uppercase; letter-spacing: .7px;
}
.rx-apps-group-title span { font-size: 10.5px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--rx-border); color: var(--rx-muted); letter-spacing: 0; }
.rx-apps-group-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--rx-border), transparent); }
.rx-apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rx-app {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 34px 12px 12px; min-height: 76px;
    background: #fff; border: 1px solid var(--rx-border); border-radius: 14px; box-shadow: var(--rx-shadow);
    color: var(--rx-text) !important; text-decoration: none !important;
    transition: transform .18s var(--rx-ease), box-shadow .18s var(--rx-ease), border-color .18s;
}
.mtd-modal.rx-modal.is-active .rx-app { animation: rx-in .32s var(--rx-ease) both; animation-delay: calc(.12s + var(--rx-i, 0) * 25ms); }
.rx-app:hover, .rx-app:focus-visible { transform: translateY(-2px); border-color: var(--rx-primary); box-shadow: var(--rx-shadow-hover); outline: 0; }
.rx-app-media {
    width: 52px; height: 52px; flex: 0 0 52px; display: flex; align-items: center; justify-content: center;
    border-radius: 13px; background: linear-gradient(135deg, #f1fbfd, #e3f6fb); border: 1px solid #e0f2f7;
    transition: transform .25s var(--rx-ease);
}
.rx-app:hover .rx-app-media { transform: scale(1.06) rotate(-3deg); }
.rx-app-media img { width: 36px; height: 36px; object-fit: contain; }
.rx-app-body { display: flex; flex-direction: column; min-width: 0; }
.rx-app-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.rx-app-desc { font-size: 11px; color: var(--rx-muted); line-height: 1.35; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rx-app-open { position: absolute; top: 10px; right: 10px; font-size: 16px !important; color: #b3bcc4; transition: color .15s, transform .2s var(--rx-ease); }
.rx-app:hover .rx-app-open { color: var(--rx-primary); transform: translate(2px, -2px); }
.rx-apps-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 10px; font-size: 12px; color: var(--rx-muted); }
.rx-apps-empty .material-symbols-outlined { font-size: 32px; color: #b3bcc4; }
@media screen and (max-width: 600px) {
    .mtd-modal.rx-modal .mtd-sheet { top: 2vh; --mtd-h: 94vh; }
    .rx-modal-search { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .mtd-modal.rx-modal.bond.is-active .mtd-sheet, .mtd-modal.rx-modal.bond.is-active .mtd-backdrop { animation-duration: .01s; }
    .mtd-modal.rx-modal.is-active .rx-app { animation: none; }
}
/* el atributo hidden debe ganar al display de las tarjetas (filtro de búsqueda) */
.rx-app[hidden], .rx-apps-group[hidden], .rx-apps-empty[hidden] { display: none !important; }
/* cerrar siempre arriba a la derecha (no baja de línea en móvil) */
.rx-modal-header { position: relative; padding-right: 64px !important; }
.rx-modal-close { position: absolute; top: 14px; right: 14px; }

/* ---------- Inicio de sesión (auth/login, auth/login_client): minimalista ---------- */
body.rx-auth-body {
    background: radial-gradient(900px 500px at 50% -10%, #e4f7fc 0%, rgba(228, 247, 252, 0) 70%), var(--rx-bg) !important;
    min-height: 100vh;
}
.rx-auth { min-height: calc(100vh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px 40px; }
.rx-auth-card {
    width: 100%; max-width: 360px; padding: 32px 28px 24px; text-align: center;
    background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(228, 233, 238, .9); border-radius: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 24px 48px -24px rgba(16, 24, 40, .18);
    animation: rx-in .45s var(--rx-ease) both;
}
.rx-auth-brand { display: flex; justify-content: center; margin-bottom: 18px; }
.rx-auth-brand img { width: 44px; height: auto; }
.rx-auth-brand-company img { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; border: 1px solid var(--rx-border); }
.rx-auth-company { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--rx-muted); margin-bottom: 14px; }
.rx-auth-title { font-size: 18px !important; font-weight: 600; color: var(--rx-text); margin: 0; letter-spacing: -.1px; }
.rx-auth-sub { font-size: 12px; color: var(--rx-muted); margin: 4px 0 22px; }
.rx-auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.rx-auth-field { display: flex; flex-direction: column; gap: 4px; }
.rx-auth-field label { font-size: 11px; font-weight: 600; color: #5b6772; letter-spacing: .2px; margin: 0; }
.rx-auth-field .form-control { width: 100% !important; height: 40px !important; padding: 0 12px !important; border-radius: 10px !important; background: #fff; font-size: 13px !important; letter-spacing: 0; }
.rx-auth-btn { width: 100%; min-height: 40px; border-radius: 10px !important; font-size: 12.5px !important; justify-content: center; gap: 8px; margin-top: 2px; }
.rx-auth-btn .material-symbols-outlined { font-size: 18px; transition: transform .2s var(--rx-ease); }
.rx-auth-btn:hover .material-symbols-outlined { transform: translateX(3px); }
.rx-auth-or { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #a3adb6; }
.rx-auth-or::before, .rx-auth-or::after { content: ''; flex: 1; height: 1px; background: var(--rx-border); }
.rx-auth-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--rx-primary-dark) !important; margin-top: 4px; }
.rx-auth-link .material-symbols-outlined { font-size: 16px; }
.rx-auth-foot { font-size: 11px; color: var(--rx-muted); line-height: 1.5; margin: 22px 0 0; }
.rx-auth-foot strong { color: var(--rx-text); font-weight: 600; }
.rx-auth-version { margin-top: 16px; font-size: 10.5px; color: #a3adb6; letter-spacing: .4px; }
/* Registro con correo (auth/register, auth/register_verify) */
.rx-auth-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rx-auth-hint { font-size: 10.5px; color: #a3adb6; line-height: 1.4; }
.rx-auth-check { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 0; font-size: 11.5px; color: var(--rx-muted); line-height: 1.45; cursor: pointer; }
.rx-auth-check input { position: static !important; opacity: 1 !important; pointer-events: auto !important; flex: none; width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--rx-primary); }
.rx-auth-check a, .rx-auth-foot a { color: var(--rx-primary-dark) !important; font-weight: 500; }
.rx-auth-badge { width: 52px; height: 52px; border-radius: 16px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-size: 26px; display: inline-flex; align-items: center; justify-content: center; }
.rx-auth-email { color: var(--rx-text); font-weight: 600; word-break: break-all; }
.rx-auth-field input.form-control.rx-auth-code { height: 52px !important; text-align: center; font-size: 24px !important; font-weight: 600; letter-spacing: 10px; padding-left: 22px !important; font-variant-numeric: tabular-nums; }
.rx-auth-resend { margin: 16px 0 0; font-size: 11.5px; color: var(--rx-muted); line-height: 1.5; }
.rx-auth-textbtn { padding: 0; border: 0; background: none !important; color: var(--rx-primary-dark); font-size: inherit; font-weight: 500; text-decoration: underline; cursor: pointer; }
.rx-auth-textbtn:disabled { color: #a3adb6; text-decoration: none; cursor: default; }
/* app.css da width: 95% !important a los input (selector input[type=…]:not(.browser-default)):
   dentro de contenedores de campo el control ocupa todo su contenedor */
.hr-field input.form-control:not([type=checkbox]):not([type=radio]),
.rx-field input.form-control:not([type=checkbox]):not([type=radio]),
.rx-auth-field input.form-control:not([type=checkbox]):not([type=radio]) { width: 100% !important; box-sizing: border-box !important; }

/* ---------- Bases de datos (/tenants): tarjetas minimalistas ---------- */
.rx-dbs { max-width: 1100px; min-width: 290px; margin: auto; padding-right: .5rem; }
.rx-db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rx-db {
    display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 14px 12px;
    background: #fff; border: 1px solid var(--rx-border); border-radius: 12px; box-shadow: var(--rx-shadow);
    transition: border-color .18s, box-shadow .18s var(--rx-ease);
}
.rx-db:hover { border-color: #c9eef7; box-shadow: var(--rx-shadow-hover); }
.rx-db-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.rx-db-name { font-size: 13.5px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-db-status { flex: 0 1 auto; max-width: 45%; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--rx-muted); white-space: nowrap; }
.rx-db-status::before { flex: 0 0 auto; content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c3ccd3; }
.rx-db-ok::before { background: #1fb57a; }
.rx-db-busy::before { background: var(--rx-primary); animation: rx-db-pulse 1.2s ease-in-out infinite; }
.rx-db-paused::before { background: #e3a008; }
.rx-db-bad::before { background: #e5484d; }
@keyframes rx-db-pulse { 50% { opacity: .3; } }
/* Enlace: siempre en una línea y resumido, el completo va en title y se copia con un clic */
.rx-db-link {
    display: flex; align-items: center; gap: 4px; min-width: 0; height: 30px; padding: 0 4px 0 10px;
    background: var(--rx-soft); border: 1px solid var(--rx-border); border-radius: 8px; font-size: 11.5px;
}
.rx-db-link a { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--rx-primary-dark) !important; }
.rx-db-link-off { color: var(--rx-muted); padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 28px; }
.rx-db-copy {
    flex: 0 0 auto; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 6px; background: transparent; color: #9aa4ad; cursor: pointer; transition: color .15s, background-color .15s;
}
.rx-db-copy .material-symbols-outlined { font-size: 15px; }
.rx-db-copy:hover, .rx-db-copy:focus-visible { color: var(--rx-primary-dark); background: var(--rx-primary-soft); outline: 0; }
.rx-db-copy.is-done { color: #1fb57a; }
.rx-db-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.rx-db-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--rx-muted); white-space: nowrap; }
.rx-db-meta .material-symbols-outlined { font-size: 15px; color: var(--rx-primary); }
.rx-db-foot .btn-sm .material-symbols-outlined { font-size: 15px; }
.rx-db-empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center;
    background: #fff; border: 1px dashed var(--rx-input-border); border-radius: 12px; color: var(--rx-muted);
}
.rx-db-empty > .material-symbols-outlined { font-size: 28px; color: var(--rx-primary); }
.rx-db-empty p { margin: 0; font-size: 12.5px; }
.rx-db-preview { display: flex; align-items: flex-start; gap: 6px; margin: -6px 1rem 1rem; font-size: 12px; color: var(--rx-muted); line-height: 1.45; word-break: break-all; }
.rx-db-preview .material-symbols-outlined { font-size: 15px; color: var(--rx-primary); margin-top: 1px; }
.rx-db-progress { display: flex; flex-direction: column; gap: 6px; padding: 0 1rem 1rem; font-size: 12px; color: var(--rx-muted); }
.rx-db-progress #progress-percent { font-weight: 600; color: var(--rx-primary-dark); }
.rx-db-progress .progress { height: 6px; border-radius: 99px; background: var(--rx-border); }
.rx-db-progress .progress-bar { background: var(--rx-primary); border-radius: 99px; transition: width .4s var(--rx-ease); }
.rx-db-progress small { font-size: 11px; }

/* ---------- Ajustes de una base de datos (/tenants/{uuid}/edit) ---------- */
.rx-set-page { max-width: 1100px; min-width: 290px; margin: auto; padding-right: .5rem; }
.rx-set-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-set { padding: 16px; background: #fff; border: 1px solid var(--rx-border); border-radius: 12px; box-shadow: var(--rx-shadow); }
.rx-set-title { font-size: 13.5px !important; font-weight: 600; color: var(--rx-text); margin: 0 0 4px; }
.rx-set-desc { font-size: 12px; color: var(--rx-muted); line-height: 1.5; margin: 0 0 12px; }
.rx-set-desc strong { color: var(--rx-text); font-weight: 600; word-break: break-all; }
.rx-set-row { gap: 8px; }
.rx-set-row .rx-db-link { min-width: 200px; height: 34px; }
.rx-set-row .btn-sm .material-symbols-outlined { font-size: 15px; }
.rx-set-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rx-border); }
.rx-pm-track { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0 4px 12px; font-size: 13px; }
.rx-pm-track-name { flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-pm-track audio { height: 32px; max-width: 260px; }
.rx-set-link { font-size: 12px; font-weight: 500; color: var(--rx-primary-dark) !important; }
.rx-set-mono { font-size: 12px; color: var(--rx-text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-set-foot { font-size: 11.5px; color: var(--rx-muted); line-height: 1.5; padding: 4px 6px 16px; word-break: break-word; }
.rx-set-foot a { color: var(--rx-primary-dark) !important; }
.rx-set-foot .d-block { font-size: 10.5px; color: #a3adb6; }
.rx-vip-cred { margin-top: 14px; padding: 12px; border-radius: 10px; background: #f3fbf7; border: 1px solid #cdeedd; }
.rx-vip-cred-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #17714c; margin-bottom: 8px; }
.rx-vip-cred-head .material-symbols-outlined { font-size: 16px; }
.rx-vip-cred-row { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 4px 0 10px; margin-top: 6px; background: #fff; border: 1px solid #dcefe5; border-radius: 8px; }
.rx-vip-cred-label { flex: 0 0 76px; font-size: 11px; color: var(--rx-muted); }
.rx-vip-cred-value { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--rx-text); word-break: break-all; }
.rx-vip-cred-pass { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 600; letter-spacing: .3px; }
/* Campos de 36px en las vistas de bases de datos (app.css deja input 30px y select 46px) */
.rx-dbs .rx-field .form-control, .rx-dbs .rx-field .form-select,
.rx-set-page .rx-field .form-control, .rx-set-page .rx-field .form-select { height: 36px !important; min-height: 36px; padding-top: 0 !important; padding-bottom: 0 !important; box-sizing: border-box; }
.rx-spin { animation: rx-spin .9s linear infinite; }
@keyframes rx-spin { to { transform: rotate(360deg); } }

/* ---------- Cifras resumen (.rx-kpis) — ver views_agent.md §6.16 ---------- */
.rx-kpis { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.rx-kpi {
    flex: 1 1 140px; min-width: 120px; padding: 10px 14px; background: #fff; border: 1px solid var(--rx-border);
    border-radius: var(--rx-radius); box-shadow: var(--rx-shadow); display: flex; flex-direction: column; gap: 2px;
}
.rx-kpi span { font-size: 11px; color: var(--rx-muted); }
.rx-kpi b { font-size: 18px; font-weight: 600; color: var(--rx-text); line-height: 1.2; }
.rx-kpi-bad b { color: #c8383d; }
.rx-kpi-note { flex-basis: 100%; font-size: 10px; color: #a3adb6; padding-left: 2px; }

/* ---------- Bitácora del asistente IA (dashboard/assistant/logs) ---------- */
.rx-asst-paused-row { gap: 8px; padding: 6px 0; border-top: 1px solid rgba(0, 0, 0, .06); }
.rx-asst-paused-row .material-symbols-outlined { font-size: 16px; vertical-align: -3px; }
.rx-log-clip { font-size: 14px !important; color: var(--rx-muted); vertical-align: -2px; }
.rx-log-detail { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 12px; margin: 0 0 12px; font-size: 12.5px; }
.rx-log-detail dt { font-weight: 400; color: var(--rx-muted); }
.rx-log-detail dd { margin: 0; word-break: break-word; }
.rx-log-detail .rx-db-status { max-width: none; font-size: 12.5px; color: var(--rx-text); }
.rx-log-h { font-size: 12px !important; font-weight: 600; margin: 14px 0 6px; color: var(--rx-text); }
.rx-log-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 8px; background: var(--rx-soft); border: 1px solid var(--rx-border); max-height: 260px; overflow-y: auto; }
.rx-log-actions { margin: 0; padding-left: 18px; font-size: 13px; }
.rx-log-actions li { list-style: disc; }
@media (max-width: 576px) { .rx-log-detail { grid-template-columns: 1fr; } .rx-log-detail dd { margin-bottom: 6px; } }
/* Filtros: app.css deja los select en 46px; aquí todos los campos miden 36px. */
.rx-log-filters .form-control, .rx-log-filters .form-select { height: 36px !important; min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.rx-log-filters .select2-container .select2-selection--single { height: 36px !important; min-height: 36px; display: flex; align-items: center; font-size: 13px; }

/* ---------- Integración de IA (dashboard/integrations/ai) — tarjetas .rx-db ---------- */
.rx-ai-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rx-ai-icon { flex: 0 0 auto; font-size: 18px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); border-radius: 8px; padding: 5px; }
.rx-ai-desc { flex: 1 1 auto; margin: 0; font-size: 12px; line-height: 1.5; color: var(--rx-muted); }
.rx-ai-soon .rx-ai-icon { color: #9aa4ad; background: var(--rx-soft); }
.rx-ai-soon .rx-db-name { color: var(--rx-muted); }
.rx-ai-form { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.rx-ai-form .rx-field { width: 100%; margin: 0; }
.rx-ai-form .rx-field label { display: block; margin-bottom: 4px; }
.rx-ai-form .form-control { height: 36px !important; min-height: 36px; box-sizing: border-box; }
.rx-ai-opt { font-weight: 400; color: var(--rx-muted); text-transform: none; }
.rx-ai-section { font-size: 15px; font-weight: 600; color: var(--rx-text); }
.rx-ai-form-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rx-ai-form-foot .btn-sm .material-symbols-outlined { font-size: 15px; }

/* ---------- Punto de venta (dashboard/invoice/index y edit) — mobile first, ver views_agent.md §6.18 ---------- */
.rx-pos-page { max-width: 1200px; min-width: 290px; margin: auto; padding: 0 .5rem; }
.rx-pos-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.rx-pos-head-actions { display: flex; align-items: center; gap: 6px; margin: 8px; }
.rx-pos-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 8px;
    padding: 10px 14px; background: #fff; border: 1px solid var(--rx-border); border-radius: 12px; box-shadow: var(--rx-shadow); font-size: 12.5px;
}
.rx-pos-till { display: inline-flex; align-items: center; gap: 6px; color: var(--rx-muted); min-width: 0; }
.rx-pos-till b { color: var(--rx-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-pos-till .material-symbols-outlined { font-size: 18px; color: var(--rx-primary); }
.rx-pos-bar .btn-sm .material-symbols-outlined, .rx-pos-head .btn-sm .material-symbols-outlined { font-size: 16px; }

/* Formulario de venta: secciones separadas por una línea fina */
.rx-pos-form { flex-direction: column; margin: 8px; padding: 0 !important; font-size: 13px; overflow: hidden; }
.rx-pos-form-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 16px; }
.rx-pos-form-head h2 { margin: 0; font-size: 15px !important; font-weight: 600; color: var(--rx-text); }
.rx-pos-sec { padding: 14px 16px; border-top: 1px solid var(--rx-border); }
.rx-pos-sec-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 11px !important; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--rx-muted); }
.rx-pos-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rx-pos-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rx-pos-field > label { margin: 0; font-size: 11.5px; color: var(--rx-muted); }
.rx-pos-field small { font-size: 11px; color: var(--rx-muted); line-height: 1.4; }
.rx-pos-check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--rx-text); cursor: pointer; }
.rx-pos-check input { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 16px; height: 16px; margin: 0; accent-color: var(--rx-primary); }
.rx-pos-form .form-control, .rx-pos-form .form-select, .rx-pos-form input.form-control:not([type=checkbox]) {
    width: 100% !important; height: 38px !important; min-height: 38px; margin: 0 !important; padding: 0 10px !important;
    font-size: 13px !important; box-sizing: border-box;
}
.rx-pos-form .form-control[readonly], .rx-pos-form .form-control:disabled { background: var(--rx-soft) !important; color: var(--rx-text); }
.rx-pos-form input[type=number] { -moz-appearance: textfield; }
.rx-pos-form input[type=number]::-webkit-inner-spin-button, .rx-pos-form input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rx-pos-adv { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 12px; font-weight: 500; color: var(--rx-primary-dark) !important; }
.rx-pos-adv .material-symbols-outlined { font-size: 18px; }
#advanced_options.rx-pos-fields { margin-top: 12px; }
/* invoice.functions.js abre las opciones con display:flex en línea; aquí son una rejilla */
#advanced_options.rx-pos-fields[style*="flex"] { display: grid !important; }

/* Cliente: búsqueda + resultados en chips + el elegido */
.rx-pos-custs { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-pos-custs:empty { display: none; }
.rx-pos-cust {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border: 1px solid var(--rx-border);
    border-radius: 999px; background: #fff; font-size: 12px; color: var(--rx-text); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.rx-pos-cust small { color: var(--rx-muted); font-size: 11px; }
.rx-pos-cust:hover { border-color: #9fdfee; }
.rx-pos-cust.selected { background: var(--rx-primary-soft); border-color: var(--rx-primary); color: var(--rx-primary-dark); }
.rx-pos-cust-none { font-size: 11.5px; color: var(--rx-muted); }
.rx-pos-form .form-control.rx-pos-picked, .rx-pos-form input.form-control.rx-pos-picked { height: auto !important; min-height: 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 12px !important; color: var(--rx-primary-dark) !important; font-weight: 500; }
.rx-pos-form .form-control.rx-pos-picked::placeholder { color: var(--rx-muted); font-weight: 400; }

/* Agregar producto: 2 columnas en móvil, una fila en escritorio */
.rx-pos-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; background: var(--rx-soft); border: 1px solid var(--rx-border); border-radius: 10px; }
.rx-pos-picker .rx-pos-wide { grid-column: 1 / -1; }
.rx-pos-search { position: relative; }
.rx-pos-search > .material-symbols-outlined { position: absolute; left: 10px; bottom: 10px; font-size: 18px; color: var(--rx-primary); pointer-events: none; }
.rx-pos-form .rx-pos-search input.form-control { padding-left: 34px !important; background: #fff !important; }
.rx-pos-form .rx-pos-search input.reference_name { cursor: pointer; }
.rx-pos-picker .btn { height: 38px; width: 100%; margin: 0; align-self: end; }
@media (min-width: 768px) {
    .rx-pos-picker { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .rx-pos-picker .rx-pos-product { grid-column: span 3; }
    .rx-pos-picker .rx-pos-desc { grid-column: span 5; }
    .rx-pos-picker .rx-pos-addcol { grid-column: span 2; }
}

/* Líneas de la venta: lista vertical (sin scroll horizontal) */
.rx-pos-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rx-pos-line {
    display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 28px; align-items: center; gap: 10px;
    padding: 10px 8px 10px 12px; background: #fff; border: 1px solid var(--rx-border); border-radius: 10px;
}
.rx-pos-line-n { width: 22px; height: 22px; border-radius: 50%; background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.rx-pos-line-main { min-width: 0; }
.rx-pos-line-name { font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--rx-text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.rx-pos-line-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11.5px; color: var(--rx-muted); }
.rx-pos-line-desc { font-size: 11.5px; color: var(--rx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-pos-line-net { font-size: 13.5px; font-weight: 600; color: var(--rx-text); white-space: nowrap; }
.rx-pos-line-x { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #9aa4ad; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .15s, color .15s; }
.rx-pos-line-x .material-symbols-outlined { font-size: 18px; }
.rx-pos-line-x:hover, .rx-pos-line-x:focus-visible { background: #fdf0ef; color: #c0392b; outline: 0; }
.rx-pos-empty { margin-top: 10px; padding: 18px 12px; text-align: center; font-size: 12.5px; color: var(--rx-muted); border: 1px dashed var(--rx-input-border); border-radius: 10px; }
.rx-pos-lines:has(.item_reference_secondary) + .rx-pos-empty { display: none; }

/* Totales y cobro */
.rx-pos-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 768px) { .rx-pos-summary { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.rx-pos-totals { padding: 14px; background: var(--rx-soft); border: 1px solid var(--rx-border); border-radius: 12px; }
.rx-pos-trow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 12.5px; color: var(--rx-muted); }
.rx-pos-trow label { margin: 0; }
.rx-pos-form .rx-pos-trow input, .rx-pos-form .rx-pos-trow input.form-control:not([type=checkbox]) {
    width: 150px !important; height: auto !important; min-height: 0; padding: 0 !important; border: 0 !important; background: transparent !important;
    box-shadow: none !important; text-align: right; font-size: 13px !important; color: var(--rx-text) !important;
}
.rx-pos-trow.rx-pos-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rx-border); }
.rx-pos-trow.rx-pos-total label { font-size: 13px; font-weight: 600; color: var(--rx-text); }
.rx-pos-form .rx-pos-trow.rx-pos-total input, .rx-pos-form .rx-pos-trow.rx-pos-total input.form-control:not([type=checkbox]) { font-size: 22px !important; font-weight: 700; color: var(--rx-primary-dark) !important; }
.rx-pos-pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.rx-pos-form .rx-pos-pay .form-control { height: 44px !important; font-size: 17px !important; font-weight: 600; }
.rx-pos-form-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--rx-border); background: var(--rx-soft); }
.rx-pos-form-foot .btn { min-width: 200px; }
.rx-pos-form-foot .btn .material-symbols-outlined { font-size: 18px; }
@media (max-width: 575px) { .rx-pos-form-foot .btn { width: 100%; } }
@media (min-width: 576px) { .rx-pos-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .rx-pos-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Buscador de productos (modal jquery-modal #modal-search-reference) */
/* Bootstrap y Materialize también estilan .modal (alto 100%, posición fija): se fija el tamaño aquí. */
#modal-search-reference.rx-pos-modal { width: calc(100% - 24px) !important; max-width: 620px !important; height: auto !important; max-height: 85vh; overflow: visible; padding: 16px !important; border-radius: 16px; background: #fff !important; }
.rx-pos-modal .rx-pos-modal-title { margin: 0 0 10px; font-size: 14px !important; font-weight: 600; color: var(--rx-text); }
.rx-pos-modal #search_reference_input { width: 100% !important; height: 42px !important; margin: 0 !important; padding: 0 14px !important; font-size: 14px !important; border-radius: 999px !important; }
.rx-pos-results { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; margin-top: 10px; }
.rx-pos-results:empty { display: none; }
.rx-pos-results-msg { padding: 12px; text-align: center; font-size: 12.5px; color: var(--rx-muted); }
.rx-pos-result {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
    background: #fff; border: 1px solid var(--rx-border); border-radius: 10px; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.rx-pos-result:hover, .rx-pos-result:focus-visible { border-color: var(--rx-primary); background: var(--rx-primary-soft); outline: 0; }
.rx-pos-result-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rx-pos-result-main b { font-size: 13px; font-weight: 500; color: var(--rx-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-pos-result-main span, .rx-pos-result-side span { font-size: 11.5px; color: var(--rx-muted); }
.rx-pos-result-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.rx-pos-result-side b { font-size: 13.5px; font-weight: 600; color: var(--rx-primary-dark); }

/* Edición: bloques extra (e-CF, notas de crédito, anulación) */
.rx-pos-block { margin: 8px; }
.rx-pos-block .rx-set-title { display: flex; align-items: center; gap: 6px; }
.rx-pos-block .rx-set-title .material-symbols-outlined { font-size: 18px; color: var(--rx-primary); }
.rx-pos-block .table { font-size: 12px; margin-bottom: 12px; }
.rx-pos-block .form-control, .rx-pos-block .form-select { height: 36px !important; min-height: 36px; width: 100% !important; margin: 0 !important; font-size: 13px !important; }
.rx-pos-block .btn-sm .material-symbols-outlined { font-size: 16px; }
.rx-pos-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
@media (min-width: 768px) { .rx-pos-row { grid-template-columns: 160px 160px minmax(0, 1fr) auto; } .rx-pos-row.rx-pos-row-2 { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- Cuadre y cierre de caja (dashboard/terminal/arching/create) — ver views_agent.md §6.19 ---------- */
.rx-arch { max-width: 900px; }
.rx-arch-rows { display: flex; flex-direction: column; gap: 8px; }
.rx-arch-row {
    display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "ico name" "input input" "state state";
    align-items: center; gap: 8px 12px; padding: 12px; background: #fff; border: 1px solid var(--rx-border); border-radius: 12px;
    transition: border-color .15s;
}
.rx-arch-row:focus-within { border-color: #9fdfee; }
.rx-arch-ico { grid-area: ico; width: 36px; height: 36px; border-radius: 10px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.rx-arch-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; }
.rx-arch-name label { margin: 0; font-size: 13px; font-weight: 600; color: var(--rx-text); }
.rx-arch-name small { font-size: 11.5px; color: var(--rx-muted); }
.rx-arch-input { grid-area: input; display: flex; align-items: center; gap: 6px; }
.rx-pos-form .rx-arch-input input.form-control { height: 42px !important; font-size: 16px !important; font-weight: 600; text-align: right; }
.rx-arch-input .rx-btn-icon { flex: none; width: 42px; height: 42px; }
.rx-arch-state { grid-area: state; justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--rx-soft); font-size: 11.5px; color: var(--rx-muted); white-space: nowrap; }
.rx-arch-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c3ccd3; }
.rx-arch-ok { background: #e9f8f1; color: #138a5c; }
.rx-arch-short { background: #fdf0ef; color: #c0392b; }
.rx-arch-over { background: #fff6e6; color: #a8660b; }
.rx-arch-state.rx-arch-ok::before { background: #1fb57a; }
.rx-arch-state.rx-arch-short::before { background: #e5484d; }
.rx-arch-state.rx-arch-over::before { background: #f0a020; }
@media (min-width: 640px) {
    .rx-arch-row { grid-template-columns: 36px minmax(0, 1fr) 220px 190px; grid-template-areas: "ico name input state"; }
    .rx-arch-state { justify-self: end; }
}
@media (min-width: 576px) { .rx-arch-receipts.rx-pos-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rx-arch-opt { color: #a3adb6; }

/* Pie: resultado del cuadre + cerrar caja */
.rx-arch-foot { align-items: center; justify-content: space-between; }
.rx-arch-result { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rx-arch-result span { font-size: 11px; color: var(--rx-muted); }
.rx-arch-result b { font-size: 15px; font-weight: 600; color: var(--rx-text); }
.rx-arch-result.rx-arch-ok, .rx-arch-result.rx-arch-short, .rx-arch-result.rx-arch-over { background: transparent; }
.rx-arch-result.rx-arch-ok b { color: #138a5c; }
.rx-arch-result.rx-arch-short b { color: #c0392b; }
.rx-arch-result.rx-arch-over b { color: #a8660b; }

/* Modal de billetes y monedas */
.mtd-modal.rx-modal.rx-arch-modal { --mtd-w: min(620px, 94vw); }
.rx-arch-add { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 12px; margin-top: 8px; background: #fff; border: 1px solid var(--rx-border); border-radius: 12px; }
.rx-arch-add .form-control, .rx-arch-add .form-select, .rx-arch-add input.form-control { width: 100% !important; height: 38px !important; min-height: 38px; margin: 0 !important; padding: 0 10px !important; font-size: 13px !important; }
.rx-arch-add .form-control:disabled { background: var(--rx-soft) !important; color: var(--rx-text); }
.rx-arch-add .btn { grid-column: 1 / -1; height: 38px; margin: 0; }
@media (min-width: 576px) { .rx-arch-add { grid-template-columns: 110px 1fr 90px 1fr auto; } .rx-arch-add .btn { grid-column: auto; } }
.rx-arch-bills { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rx-arch-bills:empty { display: none; }
.rx-arch-bills-empty { margin-top: 10px; padding: 16px 12px; text-align: center; font-size: 12.5px; color: var(--rx-muted); border: 1px dashed var(--rx-input-border); border-radius: 10px; }
.rx-arch-bills:not(:empty) + .rx-arch-bills-empty { display: none; }
.rx-arch-bill { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto 28px; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; background: #fff; border: 1px solid var(--rx-border); border-radius: 10px; font-size: 12.5px; }
.rx-arch-bill-type { font-size: 11px; color: var(--rx-muted); }
.rx-arch-bill-value { font-size: 13.5px; font-weight: 600; color: var(--rx-text); }
.rx-arch-bill-qty { color: var(--rx-muted); white-space: nowrap; }
.rx-arch-bill-amount { font-weight: 600; color: var(--rx-primary-dark); white-space: nowrap; }
.rx-arch-bills-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rx-border); }
.rx-arch-bills-foot .rx-arch-result b { font-size: 18px; color: var(--rx-primary-dark); }

/* ---------- Planes de suscripción (tenants/subscriptions/shop) — ver views_agent.md §6.20 ---------- */
.rx-plans-head { margin: 22px 8px 12px; text-align: center; }
.rx-plans-head h3 { margin: 0; font-size: 15px !important; font-weight: 600; color: var(--rx-text); }
.rx-plans-head p { margin: 4px 0 0; font-size: 12px; color: var(--rx-muted); }
.rx-plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 14px 8px 8px; align-items: stretch; }
.rx-plans > .rx-plan { flex: 1 1 220px; max-width: 280px; }
@media (max-width: 575px) { .rx-plans > .rx-plan { max-width: none; } }
.rx-plan {
    position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px 18px 18px; text-align: left;
    background: #fff; border: 1px solid var(--rx-border); border-radius: 14px; box-shadow: var(--rx-shadow);
    transition: border-color .15s, box-shadow .2s var(--rx-ease), transform .2s var(--rx-ease);
}
.rx-plan:hover { box-shadow: var(--rx-shadow-hover); transform: translateY(-2px); }
.rx-plan.is-current { border-color: var(--rx-primary); box-shadow: 0 0 0 3px rgba(0, 182, 220, .12), var(--rx-shadow); }
.rx-plan.is-selected { border-color: var(--rx-primary); box-shadow: var(--rx-ring), var(--rx-shadow-hover); }
.rx-plan-badge { position: absolute; top: -10px; left: 18px; padding: 2px 10px; border-radius: 999px; background: var(--rx-primary); color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: .3px; }
.rx-plan-name { font-size: 11px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--rx-primary-dark); }
.rx-plan-desc { margin: -6px 0 0; min-height: 34px; font-size: 12px; line-height: 1.4; color: var(--rx-muted); }
.rx-plan-price { display: flex; align-items: baseline; gap: 6px; }
.rx-plan-price b { font-size: 26px; font-weight: 700; color: var(--rx-text); letter-spacing: -.5px; line-height: 1.1; }
.rx-plan-price span { font-size: 12px; color: var(--rx-muted); }
.rx-plan-tokens { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--rx-primary-soft); border-radius: 10px; }
.rx-plan-tokens > .material-symbols-outlined { font-size: 20px; color: var(--rx-primary-dark); }
.rx-plan-tokens b { display: block; font-size: 13px; font-weight: 600; color: var(--rx-primary-dark); }
.rx-plan-tokens small { display: block; font-size: 11px; color: var(--rx-muted); }
.rx-plan-feats { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rx-plan-feats li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--rx-text); list-style: none; }
.rx-plan-feats .material-symbols-outlined { font-size: 16px; color: #1fb57a; }
.rx-plan-foot { margin-top: auto; padding-top: 4px; }
.rx-plan-foot .btn { height: 38px; justify-content: center; }
.rx-plan-note { display: block; padding: 9px 0; text-align: center; font-size: 11.5px; color: var(--rx-muted); }
.rx-plans-pay { margin: 8px; padding: 16px; text-align: center; background: #fff; border: 1px solid var(--rx-primary); border-radius: 14px; box-shadow: var(--rx-shadow); }
.rx-plans-pay h4 { margin: 0; font-size: 14px !important; font-weight: 500; color: var(--rx-text); }
.rx-plans-pay p { margin: 4px 0 0; font-size: 12px; color: var(--rx-muted); }
.rx-plans-pay #paypal-button-container { max-width: 350px; margin: 14px auto 0; }

/* ---------- Recarga de tokens de una base de datos (tenants/tokens/shop) — ver views_agent.md §6.20 ---------- */
.rx-tok { max-width: 1200px; padding-bottom: 48px; margin-top: 36px !important; }
/* Más aire entre bloques (las clases m-2 de Bootstrap llevan !important) */
.rx-tok > .rx-pos-head { margin-bottom: 8px; }
.rx-tok > .rx-kpis, .rx-tok > .rx-tok-promo, .rx-tok > .alert { margin: 20px 8px 0 !important; }
.rx-tok .rx-kpis { gap: 14px; }
.rx-tok .rx-kpi { padding: 14px 18px; }
.rx-tok .rx-kpi-note { margin-top: 2px; }
.rx-tok .rx-plans-head { margin: 44px 8px 18px; }
.rx-tok .rx-plans { gap: 20px; margin: 0 8px; }
.rx-tok .rx-plans > .rx-plan { max-width: 300px; padding: 22px 20px 20px; }
.rx-tok .rx-plans-pay { margin: 0 8px 20px; }
.rx-tok .rx-kpi-note a { color: var(--rx-primary-dark) !important; }
.rx-tok-promo { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 20px; background: #fff; border: 1px solid var(--rx-border); border-radius: 12px; box-shadow: var(--rx-shadow); }
.rx-tok-promo-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-size: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rx-tok-promo-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rx-tok-promo-text b { font-size: 13px; font-weight: 600; color: var(--rx-text); }
.rx-tok-promo-text span { font-size: 12px; color: var(--rx-muted); line-height: 1.4; }
.rx-tok > .rx-tok-guide { margin: 48px 8px 0 !important; padding: 24px 26px; }
.rx-tok-guide .rx-set-title { font-size: 14px !important; }
.rx-tok-rules { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rx-border); }
.rx-tok-rules li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rx-border); font-size: 12.5px; color: var(--rx-text); list-style: none; }
.rx-tok-rules b { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rx-tok-rules b.rx-tok-free { background: #e9f8f1; color: #138a5c; }
.rx-tok-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 22px; }
.rx-tok-facts > div { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; background: var(--rx-soft); border: 1px solid var(--rx-border); border-radius: 10px; }
.rx-tok-facts .material-symbols-outlined { font-size: 18px; color: var(--rx-primary-dark); }
.rx-tok-facts p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--rx-muted); }
.rx-tok-facts p b { color: var(--rx-text); font-weight: 600; }

/* ---------- Marketing: inicio del módulo (/marketing) — ver views_agent.md §6.21 ---------- */
.rx-mkt { padding-bottom: 40px; }
.rx-mkt .rx-kpis { margin-top: 20px !important; }
.rx-mkt-group {
    display: flex; align-items: center; gap: 8px; margin: 32px 12px 12px; font-size: 11px; font-weight: 600;
    color: var(--rx-muted); text-transform: uppercase; letter-spacing: .7px;
}
.rx-mkt-group::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--rx-border), transparent); }
/* Marketing: acciones del encabezado, píldoras e iconos de canal (contactos) */
.rx-mkt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rx-mkt-actions .btn-sm .material-symbols-outlined { font-size: 16px; margin-right: 4px; }
.rx-mkt-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-size: 11px; font-weight: 500; white-space: nowrap; margin: 1px 2px; }
.rx-mkt-ch { font-size: 16px; color: var(--rx-primary-dark); margin-right: 3px; vertical-align: -3px; }
/* Línea de tiempo del contacto */
.rx-mkt-tl { list-style: none; margin: 0; padding: 0; }
.rx-mkt-tl li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rx-border); list-style: none; }
.rx-mkt-tl li:first-child { border-top: 0; }
.rx-mkt-tl-icon { flex: none; font-size: 16px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); border-radius: 8px; padding: 5px; }
.rx-mkt-tl-body { flex: 1 1 auto; min-width: 0; }
.rx-mkt-tl-title { font-size: 12.5px; color: var(--rx-text); }
.rx-mkt-tl-detail { font-size: 11.5px; color: var(--rx-muted); word-break: break-word; }
.rx-mkt-tl-at { flex: none; font-size: 11px; color: #a3adb6; white-space: nowrap; }
/* Pasos de un asistente (importar) */
.rx-mkt-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.rx-mkt-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--rx-border); background: #fff; font-size: 12px; color: var(--rx-muted); list-style: none; }
.rx-mkt-steps li span { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--rx-soft); font-size: 11px; font-weight: 600; }
.rx-mkt-steps li.is-current { border-color: var(--rx-primary); color: var(--rx-primary-dark); }
.rx-mkt-steps li.is-current span { background: var(--rx-primary); color: #fff; }
.rx-mkt-steps li.is-done span { background: #e9f8f1; color: #138a5c; }
/* Radios: Materialize oculta el radio nativo y lo dibuja en "+ span"; aquí se usa el nativo */
.rx-mkt-radio { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 12.5px; color: var(--rx-text); cursor: pointer; }
.rx-mkt-radio input[type=radio] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--rx-primary); flex: none; }
.rx-mkt-map select { min-width: 190px; height: 32px !important; }
/* Posibles duplicados */
.rx-mkt-dup { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; background: var(--rx-soft); border: 1px solid var(--rx-border); font-size: 11.5px; color: var(--rx-muted) !important; }
.rx-mkt-dup b { font-size: 12.5px; color: var(--rx-text); font-weight: 600; }
/* Editor de segmentos */
.rx-seg-match { gap: 8px; font-size: 12.5px; color: var(--rx-text); }
.rx-seg-match select { width: auto; height: 32px !important; }
.rx-seg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; margin-bottom: 8px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); }
.rx-seg-row > select, .rx-seg-row > input { flex: 1 1 160px; width: auto !important; max-width: 260px; height: 32px !important; }
.rx-seg-event { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--rx-muted); }
.rx-seg-event select { width: auto; max-width: 220px; height: 32px !important; }
.rx-seg-event input { width: 70px !important; height: 32px !important; }
.rx-seg-count { font-size: 13px; font-weight: 600; color: var(--rx-primary-dark); }
.rx-mkt-radio input[type=checkbox] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--rx-primary); flex: none; }
/* Marketing: Conexiones (/marketing/connections) — ver views_agent.md §6.24 */
.rx-conn-list { display: flex; flex-direction: column; gap: 6px; }
.rx-conn-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); min-width: 0; }
.rx-conn-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.rx-conn-avatar-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); }
.rx-conn-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rx-conn-text b { font-size: 12.5px; font-weight: 600; color: var(--rx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-conn-text > span { font-size: 11px; color: var(--rx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-conn-detail { max-width: 100% !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important; }
.rx-conn-row form { margin: 0; }
.rx-conn-packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding-top: 12px; }
.rx-conn-packages form { margin: 0; }
.rx-conn-package { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: 12px; border: 1px solid var(--rx-border); background: #fff; color: var(--rx-text); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rx-conn-package .material-symbols-outlined { font-size: 22px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); border-radius: 10px; padding: 7px; }
.rx-conn-package b { font-size: 12.5px; font-weight: 600; }
.rx-conn-package span:last-child { font-size: 11px; color: var(--rx-primary-dark); }
.rx-conn-package:hover:not(:disabled), .rx-conn-package:focus-visible { border-color: var(--rx-primary); box-shadow: var(--rx-ring); outline: 0; background: #fff; }
.rx-conn-package:disabled { cursor: not-allowed; opacity: .6; background: #fff; }
.rx-conn-package:disabled span:last-child { color: var(--rx-muted); }
.rx-conn-advanced { margin-top: 16px; font-size: 12px; color: var(--rx-muted); }
.rx-conn-advanced summary { cursor: pointer; color: var(--rx-primary-dark); }
.rx-conn-pick { align-items: center; border-bottom: 1px solid var(--rx-border); }
/* Marketing: WhatsApp (/marketing/whatsapp) — ver views_agent.md §6.25 */
.rx-mkt-pills { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.rx-mkt-pills::-webkit-scrollbar { display: none; }
.rx-mkt-pills a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rx-border); background: #fff; font-size: 12.5px; color: var(--rx-text) !important; white-space: nowrap; }
.rx-mkt-pills a .material-symbols-outlined { font-size: 16px; color: var(--rx-primary-dark); }
.rx-mkt-pills a:hover { border-color: var(--rx-primary); background: var(--rx-primary-soft); }
.rx-mkt-pills a.is-active { border-color: var(--rx-primary); background: var(--rx-primary-soft); color: var(--rx-primary-dark) !important; font-weight: 600; }
.rx-mkt-step { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: var(--rx-primary); color: #fff; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.rx-mkt-progress { height: 6px; border-radius: 99px; background: var(--rx-border); }
.rx-mkt-progress .progress-bar { background: var(--rx-primary); border-radius: 99px; transition: width .4s var(--rx-ease); }
a.rx-db-link-card, a.rx-db-link-card:hover { color: inherit !important; text-decoration: none; }
.rx-wa-snippet { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
/* Editor de plantillas: formulario + teléfono de vista previa */
.rx-wa-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.rx-wa-form { margin: 0 !important; }
.rx-wa-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.rx-wa-count { margin-left: auto; font-size: 11px; color: var(--rx-muted); }
.rx-wa-var, .rx-wa-btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 6px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); }
.rx-wa-var b { font-size: 12px; color: var(--rx-primary-dark); min-width: 38px; }
.rx-wa-var select, .rx-wa-var input, .rx-wa-btnrow input { flex: 1 1 160px; width: auto !important; height: 32px !important; }
.rx-wa-label { display: block; font-size: 11px; color: var(--rx-muted); margin-bottom: 6px; }
.rx-wa-ai .rx-set-title { display: flex; align-items: center; gap: 6px; }
.rx-wa-ai .rx-set-title .material-symbols-outlined { font-size: 18px; color: var(--rx-primary-dark); }
.rx-wa-phone { position: sticky; top: 70px; padding: 10px; border-radius: 22px; background: #fff; border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); }
.rx-wa-chat { min-height: 220px; padding: 14px 10px; border-radius: 14px; background: #efeae2; }
.rx-wa-bubble { position: relative; max-width: 92%; padding: 6px 8px 18px; border-radius: 8px 8px 8px 2px; background: #fff; box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13); font-size: 13px; color: #111b21; }
.rx-wa-header-img { display: flex; align-items: center; justify-content: center; height: 110px; margin: -2px -4px 6px; border-radius: 6px; background: #d9dee2; color: #8696a0; }
.rx-wa-title { font-weight: 700; margin-bottom: 4px; }
.rx-wa-text { line-height: 1.4; word-break: break-word; }
.rx-wa-text mark { background: #e8f8fc; color: var(--rx-primary-dark); padding: 0 2px; border-radius: 3px; }
.rx-wa-footer { margin-top: 4px; font-size: 11.5px; color: #667781; }
.rx-wa-time { position: absolute; right: 8px; bottom: 3px; font-size: 10.5px; color: #667781; }
.rx-wa-buttons { max-width: 92%; margin-top: 2px; }
.rx-wa-buttons > div { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 7px; margin-top: 2px; border-radius: 8px; background: #fff; color: #027eb5; font-size: 13px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13); }
.rx-wa-buttons .material-symbols-outlined { font-size: 15px; }
.rx-wa-phone-sm { position: static; }
/* Difusión: mensaje + vista previa; resultados: detalle + mensaje */
.rx-bc-message { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; align-items: start; padding-right: 1rem; }
.rx-bc-show { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.rx-bc-show > .rx-set { margin: 0; }
.rx-bc-audience .rx-kpis { margin-top: 4px; }
@media (max-width: 900px) {
    .rx-wa-editor, .rx-bc-message, .rx-bc-show { grid-template-columns: 1fr; }
    .rx-wa-phone { position: static; }
}
/* Materialize pinta todo <nav> (rojo, 64px de alto): se anula para las píldoras */
nav.rx-mkt-pills { background: transparent !important; height: auto; line-height: normal; box-shadow: none; width: auto; }
nav.rx-mkt-pills a { padding: 6px 14px; line-height: 1.4; font-size: 12.5px; transition: border-color .15s, background-color .15s; }
/* Caja del mensaje de plantilla: Materialize fija textarea a 3rem; los botones "Insertar" van debajo */
.rx-wa-body-field { display: flex; flex-direction: column; }
.rx-wa-body-field > label { order: 0; }
.rx-wa-body-field > textarea { order: 1; min-height: 120px !important; height: auto; resize: vertical !important; padding: 8px 10px !important; line-height: 1.45; }
.rx-wa-body-field > .rx-wa-tools { order: 2; }
/* Marketing: Correo — editor de bloques y vista previa (views_agent.md §6.26) */
.rx-em-editor { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 16px; align-items: start; }
.rx-em-block { margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--rx-border); }
.rx-em-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.rx-em-block-head > .material-symbols-outlined { font-size: 16px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); border-radius: 7px; padding: 4px; }
.rx-em-block-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.rx-em-block .rx-field label { font-size: 11px; color: var(--rx-muted); }
.rx-em-block textarea { min-height: 96px !important; height: auto; resize: vertical !important; padding: 6px 8px !important; }
.rx-em-color { width: 42px; height: 30px; padding: 2px; border: 1px solid var(--rx-border); border-radius: 8px; background: #fff; cursor: pointer; }
.rx-em-preview { position: sticky; top: 70px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); }
.rx-em-frame-wrap { display: flex; justify-content: center; border-radius: 10px; background: #f3f6f8; overflow: hidden; }
.rx-em-frame-wrap iframe { width: 100%; height: 640px; border: 0; background: #fff; transition: width .2s var(--rx-ease); }
.rx-em-frame-wrap.is-mobile iframe { width: 375px; max-width: 100%; }
.rx-em-ab { padding: 10px 12px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); }
.rx-dns-table td { vertical-align: middle; font-size: 12.5px; }
.rx-dns-help td { font-size: 11.5px; color: var(--rx-muted); border-top: 0 !important; padding-top: 0 !important; }
.rx-dns-help code { font-size: 11px; color: var(--rx-text); word-break: break-all; }
@media (max-width: 1100px) { .rx-em-editor { grid-template-columns: 1fr; } .rx-em-preview { position: static; } }
/* Marketing: Redes — calendario, compositor, medios y Estudio IA (views_agent.md §6.27) */
.rx-cal-label { font-size: 13.5px; font-weight: 600; margin-left: 6px; }
.rx-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rx-cal-head { font-size: 11px; color: var(--rx-muted); text-transform: uppercase; letter-spacing: .4px; padding: 0 4px; }
.rx-cal-day { min-height: 180px; padding: 6px; border-radius: var(--rx-radius); background: #fff; border: 1px solid var(--rx-border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rx-cal.is-month .rx-cal-day { min-height: 104px; }
.rx-cal-day.is-today { border-color: var(--rx-primary); box-shadow: var(--rx-ring); }
.rx-cal-day.is-out { background: var(--rx-soft); opacity: .65; }
.rx-cal-date { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--rx-text); }
.rx-cal-add { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 6px; color: var(--rx-muted) !important; opacity: 0; transition: opacity .15s, background-color .15s; }
.rx-cal-add .material-symbols-outlined { font-size: 16px; }
.rx-cal-day:hover .rx-cal-add, .rx-cal-add:focus-visible { opacity: 1; }
.rx-cal-add:hover { background: var(--rx-primary-soft); color: var(--rx-primary-dark) !important; }
.rx-cal-post { display: block; padding: 5px 7px; border-radius: 8px; background: var(--rx-soft); border: 1px solid var(--rx-border); color: var(--rx-text) !important; font-size: 11.5px; line-height: 1.3; transition: border-color .15s, box-shadow .15s; }
.rx-cal-post:hover { border-color: var(--rx-primary); box-shadow: var(--rx-shadow-hover); }
.rx-cal-post-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.rx-cal-post-top .rx-db-status { font-size: 11px; }
.rx-cal-icons { display: inline-flex; gap: 2px; color: var(--rx-muted); }
.rx-cal-icons .material-symbols-outlined { font-size: 13px; }
.rx-cal-post-title { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-cal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
@media (max-width: 900px) {
    .rx-cal { grid-template-columns: 1fr; }
    .rx-cal-head, .rx-cal-day.is-out { display: none; }
    .rx-cal-day, .rx-cal.is-month .rx-cal-day { min-height: 0; }
    .rx-cal-add { opacity: 1; }
}
.rx-so-editor { grid-template-columns: minmax(0, 1fr) 360px; }
.rx-so-accounts { display: flex; flex-wrap: wrap; gap: 8px; }
.rx-so-account { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--rx-border); background: #fff; cursor: pointer; font-size: 12.5px; transition: border-color .15s, background-color .15s; }
.rx-so-account input { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 16px; height: 16px; margin: 0; accent-color: var(--rx-primary); }
.rx-so-account > .material-symbols-outlined { font-size: 18px; color: var(--rx-primary-dark); }
.rx-so-account small { display: block; color: var(--rx-muted); font-size: 11px; }
.rx-so-account:has(input:checked) { border-color: var(--rx-primary); background: var(--rx-primary-soft); }
/* Materialize dibuja su propia casilla en el span que sigue a cada input (y la gira al marcarla): aquí se usa la casilla nativa o la tarjeta entera. */
.rx-so-account input + span, .rx-fa-format input + span, .rx-fa-level input + span, .rx-mkt-radio input + span { padding-left: 0 !important; height: auto !important; line-height: inherit !important; font-size: inherit !important; }
.rx-fa-format input + span.material-symbols-outlined { font-size: 20px !important; line-height: 1 !important; }
.rx-so-account input + span.material-symbols-outlined { font-size: 18px !important; line-height: 1 !important; }
.rx-so-account input + span::before, .rx-so-account input + span::after, .rx-fa-format input + span::before, .rx-fa-format input + span::after,
.rx-fa-level input + span::before, .rx-fa-level input + span::after, .rx-mkt-radio input + span::before, .rx-mkt-radio input + span::after { content: none !important; display: none !important; }
.rx-fa-level input + span { display: flex !important; }
.rx-so-override summary { cursor: pointer; font-size: 12.5px; color: var(--rx-primary-dark); margin-bottom: 4px; }
.rx-so-override textarea { min-height: 72px !important; height: auto; resize: vertical !important; padding: 6px 8px !important; }
.rx-so-media { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rx-so-thumb { position: relative; width: 88px; height: 88px; border-radius: 10px; background: var(--rx-soft) center/cover no-repeat; border: 1px solid var(--rx-border); display: flex; align-items: center; justify-content: center; color: var(--rx-muted); }
.rx-so-thumb-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rx-so-thumb-x .material-symbols-outlined { font-size: 14px; }
.rx-so-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto; }
.rx-so-lib-item { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; background: var(--rx-soft) center/cover no-repeat; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--rx-muted); padding: 0; }
.rx-so-lib-item.is-on { border-color: var(--rx-primary); box-shadow: var(--rx-ring); }
.rx-so-previews { position: sticky; top: 70px; display: flex; flex-direction: column; }
.rx-so-pv { margin-bottom: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); overflow: hidden; font-size: 12.5px; }
.rx-so-pv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.rx-so-pv-head small { display: block; color: var(--rx-muted); font-size: 11px; }
.rx-so-pv-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--rx-primary-soft), var(--rx-primary)); flex: none; }
.rx-so-pv-ig .rx-so-pv-avatar { background: linear-gradient(135deg, #feda75, #d62976 60%, #4f5bd5); }
.rx-so-pv-text { padding: 0 12px 10px; line-height: 1.45; word-break: break-word; }
.rx-so-pv-ig .rx-so-pv-text { padding-top: 4px; }
.rx-so-pv-img { position: relative; aspect-ratio: 1; background: var(--rx-soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--rx-muted); }
.rx-so-pv-fb .rx-so-pv-img { aspect-ratio: 4/3; }
.rx-so-pv-img.is-empty { font-size: 12px; }
.rx-so-pv-img .material-symbols-outlined { font-size: 40px; }
.rx-so-pv-count { position: absolute; top: 8px; right: 8px; padding: 1px 7px; border-radius: 10px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; }
.rx-so-pv-link { padding: 8px 12px; background: var(--rx-soft); color: var(--rx-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-so-pv-actions { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--rx-muted); border-top: 1px solid var(--rx-border); }
.rx-so-pv-ig .rx-so-pv-actions { border-top: 0; color: var(--rx-text); }
.rx-so-pv-actions .material-symbols-outlined { font-size: 18px; }
.rx-so-hash { color: #385898; }
.rx-so-show-text { white-space: pre-line; font-size: 13px; line-height: 1.5; }
.rx-so-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.rx-so-tile { margin: 0; border-radius: var(--rx-radius); background: #fff; border: 1px solid var(--rx-border); overflow: hidden; }
.rx-so-tile-img { aspect-ratio: 1; background: var(--rx-soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--rx-muted); }
.rx-so-tile-img .material-symbols-outlined { font-size: 36px; }
.rx-so-tile figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.rx-so-tile-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-so-tile-actions { display: flex; gap: 4px; margin-top: 4px; }
/* Biblioteca para contenido automático (Medios → "Para contenido automático") */
.rx-so-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rx-so-tile-media { position: relative; }
.rx-so-badge { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 3px; max-width: calc(100% - 12px); padding: 2px 8px 2px 5px; border-radius: 10px; background: rgba(255, 255, 255, .92); color: var(--rx-primary-dark); font-size: 11px; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.rx-so-badge .material-symbols-outlined { font-size: 14px; }
.rx-so-tile-desc { font-size: 11.5px; line-height: 1.4; color: var(--rx-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rx-so-tile-desc.is-error { color: #c62828; }
.rx-so-tile-actions .rx-btn-icon.is-on { background: var(--rx-primary-soft) !important; border-color: var(--rx-primary) !important; color: var(--rx-primary-dark) !important; }
.rx-so-lib-edit { padding: 10px 0 2px; margin-bottom: 8px; border-top: 1px solid var(--rx-border); }

/* ---------- Fábrica de contenido: personajes (marketing/factory/characters) ---------- */
.rx-ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rx-ch-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--rx-radius); background: #fff; border: 1px solid var(--rx-border); color: var(--rx-text) !important; text-decoration: none !important; min-width: 0; }
.rx-ch-card:hover { border-color: var(--rx-primary); box-shadow: var(--rx-ring); }
.rx-ch-card.is-off { opacity: .6; }
.rx-ch-thumb { flex: 0 0 64px; width: 64px; height: 80px; border-radius: 10px; background: var(--rx-soft) center top/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--rx-muted); }
.rx-ch-thumb .material-symbols-outlined { font-size: 28px; }
.rx-ch-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rx-ch-body .rx-db-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-ch-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-ch-style input { position: absolute; opacity: 0; pointer-events: none; }
.rx-ch-style span { display: inline-block; padding: 5px 12px; border-radius: 16px; border: 1px solid var(--rx-border); font-size: 12.5px; cursor: pointer; }
.rx-ch-style:has(input:checked) span { background: var(--rx-primary-soft); border-color: var(--rx-primary); color: var(--rx-primary-dark); }
.rx-ch-style:has(input:focus-visible) span { box-shadow: var(--rx-ring); }
.rx-ch-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rx-ch-sheet.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 576px) { .rx-ch-sheet, .rx-ch-sheet.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rx-ch-slot { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; border-radius: 10px; background: var(--rx-soft) center/cover no-repeat; border: 1px solid var(--rx-border); color: var(--rx-muted); }
.rx-ch-slot.is-loading { background-image: linear-gradient(100deg, var(--rx-soft) 30%, #fff 50%, var(--rx-soft) 70%); background-size: 300% 100%; animation: rx-ch-shimmer 1.4s infinite linear; }
@keyframes rx-ch-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.rx-ch-view { margin: 0; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.rx-ch-pick { display: flex; flex-direction: column; gap: 4px; text-align: center; cursor: pointer; margin: 0; }
.rx-ch-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rx-ch-pick:has(input:checked) .rx-ch-slot { border: 2px solid var(--rx-primary); box-shadow: var(--rx-ring); }
.rx-ch-pick:has(input:focus-visible) .rx-ch-slot { box-shadow: var(--rx-ring); }
.rx-ch-consent { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rx-ch-consent label { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.rx-ch-consent-check { padding: 8px 10px; border-radius: 8px; background: #fff8e1; border: 1px solid #ffe08a; }

/* ---------- Fábrica de contenido: series y episodios (marketing/factory) ---------- */
.rx-fa-card { color: var(--rx-text) !important; text-decoration: none !important; }
.rx-fa-card:hover { border-color: var(--rx-primary); }
.rx-dbs.rx-fa-wide { max-width: max(1100px, 90%); }
.rx-fa-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.rx-fa-editor textarea#instructions { min-height: 240px; resize: vertical; }
.rx-fa-main .rx-field { width: 100%; }
.rx-fa-main #name { max-width: 560px; }
.rx-fa-main .rx-field .rx-fa-hour { width: 128px !important; flex: 0 0 128px; }
@media (max-width: 1000px) { .rx-fa-editor { grid-template-columns: minmax(0, 1fr); } }
.rx-fa-main { min-width: 0; }
.rx-fa-estimate { position: sticky; top: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.rx-fa-estimate .alert { font-size: 12px; line-height: 1.4; }
.rx-fa-editor p.rx-db-meta, .rx-fa-editor small.rx-db-meta { display: block; white-space: normal; }
.rx-fa-editor label > small.rx-db-meta { display: inline; }
@media (max-width: 1000px) { .rx-fa-estimate { position: static; } }
.rx-fa-est-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.rx-fa-est-row > span { flex: none; }
.rx-fa-est-row b { min-width: 0; text-align: right; }
.rx-fa-est-row b { color: var(--rx-primary-dark); }
.rx-fa-est-parts { margin: 6px 0 0; padding-left: 16px; font-size: 12px; color: var(--rx-muted); }
.rx-fa-est-parts li { list-style: disc; }
.rx-fa-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rx-fa-format { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin: 0; border-radius: 10px; border: 1px solid var(--rx-border); background: #fff; cursor: pointer; font-size: 13px; }
.rx-fa-format input, .rx-fa-line input, .rx-fa-level input { position: absolute; opacity: 0; pointer-events: none; }
.rx-fa-format > .material-symbols-outlined { font-size: 20px; color: var(--rx-primary-dark); }
.rx-fa-format small, .rx-fa-line small, .rx-fa-level small { font-size: 11.5px; line-height: 1.35; color: var(--rx-muted); }
.rx-fa-format:has(input:checked), .rx-fa-line:has(input:checked), .rx-fa-level:has(input:checked) { background: var(--rx-primary-soft); border-color: var(--rx-primary); }
.rx-fa-format:has(input:focus-visible), .rx-fa-line:has(input:focus-visible), .rx-fa-level:has(input:focus-visible) { box-shadow: var(--rx-ring); }
.rx-fa-format.is-soon, .rx-fa-line.is-soon, .rx-fa-level.is-soon { opacity: .55; cursor: default; }
.rx-fa-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rx-fa-line { position: relative; display: flex; flex-direction: column; padding: 10px 12px; margin: 0; border-radius: 10px; border: 1px solid var(--rx-border); background: #fff; cursor: pointer; }
.rx-fa-levels { display: flex; flex-direction: column; gap: 6px; }
.rx-fa-level { position: relative; display: flex; padding: 8px 12px; margin: 0; border-radius: 10px; border: 1px solid var(--rx-border); background: #fff; cursor: pointer; }
.rx-fa-level > span { display: flex; flex-direction: column; font-size: 13px; }
.rx-fa-face { width: 26px; height: 32px; border-radius: 6px; background: var(--rx-soft) center top/cover no-repeat; }
.rx-fa-hour { width: 118px !important; height: 36px !important; }
.rx-fa-episodes { display: flex; flex-direction: column; gap: 6px; }
.rx-fa-episode { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--rx-border); background: #fff; color: var(--rx-text) !important; text-decoration: none !important; }
.rx-fa-episode:hover { border-color: var(--rx-primary); }
.rx-fa-ep-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--rx-soft); font-size: 12px; font-weight: 600; color: var(--rx-primary-dark); }
.rx-fa-ep-body { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.rx-fa-ep-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-fa-ep-body small { color: var(--rx-muted); font-size: 11.5px; }
.rx-fa-hook { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: #fff8e1; border: 1px solid #ffe08a; font-size: 13.5px; font-weight: 600; }
.rx-fa-hook .material-symbols-outlined { color: #b7791f; }
.rx-fa-line-text { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; }
.rx-fa-onscreen { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--rx-primary-dark); }
.rx-fa-onscreen .material-symbols-outlined { font-size: 16px; }
.rx-fa-shots { margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rx-fa-shots li { list-style: none; display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; background: var(--rx-soft); }
.rx-fa-shot-src { flex: 0 0 36px; height: 36px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--rx-primary-dark); overflow: hidden; }
.rx-fa-shot-thumb { width: 100%; height: 100%; background: center/cover no-repeat; }
.rx-fa-shot-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 12.5px; }
.rx-fa-shot-body small { color: var(--rx-muted); font-size: 11.5px; }
.rx-fa-prompt { font-style: italic; overflow-wrap: anywhere; }
.rx-fa-shots li.is-failed { background: #fdecea; }
.rx-fa-shot-state { color: #b7791f !important; }
.rx-fa-shot-state.is-error { color: #c62828 !important; }
a.rx-fa-shot-src:hover { box-shadow: var(--rx-ring); }
.rx-fa-audio { display: block; width: 100%; max-width: 360px; height: 32px; margin-top: 4px; }
.rx-fa-result { display: flex; flex-direction: row; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.rx-fa-player { flex: 0 0 auto; width: 100%; max-width: 300px; max-height: 70vh; aspect-ratio: 9 / 16; border-radius: 12px; background: #111; }
.rx-fa-carousel { display: flex; flex-direction: row; gap: 8px; overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.rx-fa-carousel img { height: 260px; width: auto; border-radius: 10px; border: 1px solid var(--rx-border); }
.rx-fa-result-info { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rx-fa-result-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.rx-fa-targets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rx-fa-targets li { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #f6f8fa; font-size: 12.5px; }
.rx-fa-targets li.is-failed { background: #fdecea; }
.rx-fa-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.rx-fa-checks li { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.rx-fa-checks .material-symbols-outlined { font-size: 16px; }
.rx-fa-checks li.is-ok .material-symbols-outlined { color: #2e7d32; }
.rx-fa-checks li.is-bad { color: #c62828; }
.rx-fa-issue { font-size: 12.5px; color: #b7791f; display: flex; flex-direction: row; align-items: flex-start; gap: 4px; }
.rx-fa-issue .material-symbols-outlined { font-size: 15px; margin-top: 1px; }
.rx-fa-scene.has-issue { border-left: 3px solid #e0a12b; }
.rx-fa-line-edit { border: 0; background: transparent; color: var(--rx-muted); padding: 0 2px; vertical-align: -3px; cursor: pointer; }
.rx-fa-line-edit:hover { color: var(--rx-primary-dark); }
.rx-fa-line-edit .material-symbols-outlined { font-size: 16px; }
.rx-fa-line-form { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; max-width: 560px; }
.rx-fa-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rx-fa-slide { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 10px; border: 1px solid var(--rx-border); background: #fff; font-size: 13px; }
.rx-fa-slide p { margin: 0; color: var(--rx-muted); }
.rx-fa-net { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--rx-border); font-size: 12.5px; }
.rx-fa-net p { margin: 0; font-size: 12.5px; }
.rx-st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.rx-st-card { margin: 0 !important; }
.rx-st-card .rx-set-title { display: flex; align-items: center; gap: 6px; }
.rx-st-card .rx-set-title .material-symbols-outlined { font-size: 18px; color: var(--rx-primary-dark); }
.rx-st-checks { display: flex; flex-wrap: wrap; column-gap: 14px; }
.rx-st-out:not(:empty) { margin-top: 10px; }
.rx-st-result { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); font-size: 12.5px; }
.rx-st-result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.rx-st-result p { margin: 0; line-height: 1.45; }
.rx-st-hint { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--rx-radius); background: var(--rx-primary-soft); font-size: 12.5px; }
.rx-st-hint > .material-symbols-outlined { color: var(--rx-primary-dark); }
.rx-st-mini { max-width: 170px; height: 32px !important; font-size: 12.5px; padding: 2px 8px !important; }
@media (max-width: 1100px) { .rx-so-editor { grid-template-columns: 1fr; } .rx-so-previews { position: static; } }

/* Marketing: Imágenes y video (views_agent.md §6.28) */
.rx-md-editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.rx-md-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.rx-md-tpl, .rx-md-format { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--rx-border); background: #fff; cursor: pointer; font-size: 12px; text-align: center; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.rx-md-tpl input, .rx-md-format input { position: absolute !important; opacity: 0 !important; pointer-events: none; }
.rx-md-tpl > .material-symbols-outlined { font-size: 22px; color: var(--rx-primary-dark); }
.rx-md-tpl:has(input:checked), .rx-md-format:has(input:checked) { border-color: var(--rx-primary); background: var(--rx-primary-soft); }
.rx-md-tpl:has(input:focus-visible), .rx-md-format:has(input:focus-visible) { box-shadow: var(--rx-ring); }
.rx-md-formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rx-md-ratio { display: block; height: 34px; max-width: 60px; border-radius: 4px; border: 2px solid var(--rx-primary-dark); background: #fff; }
.rx-md-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.rx-md-photo { display: flex; flex-wrap: wrap; gap: 8px; }
.rx-md-chosen:has(#tpl-chosen:empty, #ai-chosen:empty, #av-chosen:empty) { min-height: 0; }
.rx-md-chosen-thumb { display: inline-block; width: 44px; height: 44px; flex: none; border-radius: 8px; background: var(--rx-soft) center/cover no-repeat; border: 1px solid var(--rx-border); }
.rx-md-preview { position: sticky; top: 70px; }
.rx-md-preview-box { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); transition: opacity .15s; }
.rx-md-preview-box.is-loading { opacity: .6; }
.rx-md-preview-box img { max-width: 100%; max-height: 70vh; border-radius: 8px; box-shadow: 0 2px 10px rgba(16, 24, 40, .12); }
.rx-md-preview-box p { margin: 0; text-align: center; }
.rx-md-result { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); font-size: 12.5px; }
.rx-md-sslist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.rx-md-ssrow { display: flex; align-items: center; gap: 6px; }
.rx-md-ssrow input { flex: 1 1 auto; min-width: 0; }
.rx-md-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rx-md-job { display: flex; gap: 10px; padding: 8px; border-radius: var(--rx-radius); background: #fff; border: 1px solid var(--rx-border); }
.rx-md-job-thumb { width: 72px; height: 72px; flex: none; border-radius: 8px; background: var(--rx-soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; }
.rx-md-job-thumb .material-symbols-outlined { font-size: 28px; text-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.rx-md-job-thumb:not([style]) .material-symbols-outlined { color: var(--rx-muted); text-shadow: none; }
.rx-md-job-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; }
.rx-md-job-body .rx-db-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-md-job-error { font-size: 11.5px; color: #c62828; line-height: 1.35; }
.rx-md-job-actions { display: flex; gap: 4px; margin-top: 4px; }
.rx-brand-visual { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.rx-brand-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rx-brand-logo img, .rx-brand-logo > .material-symbols-outlined { width: 140px; height: 80px; object-fit: contain; border-radius: 10px; border: 1px dashed var(--rx-input-border); background: var(--rx-soft); padding: 6px; display: flex; align-items: center; justify-content: center; color: var(--rx-muted); font-size: 30px; }
.rx-brand-colors { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.rx-brand-color { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--rx-muted); cursor: pointer; }
.rx-brand-color .rx-em-color { width: 52px; height: 36px; }
@media (max-width: 1100px) { .rx-md-editor { grid-template-columns: 1fr; } .rx-md-preview { position: static; } }
@media (max-width: 600px) { .rx-md-formats, .rx-md-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Marketing: SEO del sitio (views_agent.md §6.29) */
.rx-seo-of { font-size: 13px; color: var(--rx-muted); font-weight: 400; margin-left: 2px; }
.rx-seo-trend { display: block; font-size: 11px; margin-top: 2px; }
.rx-seo-trend.is-up { color: #2e7d32; }
.rx-seo-trend.is-down { color: #c62828; }
.rx-seo-group { padding: 12px 14px; border-radius: var(--rx-radius); background: #fff; border: 1px solid var(--rx-border); }
.rx-seo-group > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.rx-seo-group > summary::-webkit-details-marker { display: none; }
.rx-seo-group-title { font-size: 13.5px; flex: 1 1 auto; }
.rx-seo-chev { color: var(--rx-muted); transition: transform .15s; }
.rx-seo-group[open] .rx-seo-chev { transform: rotate(180deg); }
.rx-seo-group[open] > summary { margin-bottom: 8px; }
.rx-seo-items { display: flex; flex-direction: column; gap: 6px; }
.rx-seo-item { padding: 8px 10px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); font-size: 12.5px; }
.rx-seo-item.is-done { opacity: .7; }
.rx-seo-item-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rx-seo-item-label { font-weight: 600; color: var(--rx-text); }
.rx-seo-item-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.rx-seo-suggestion { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--rx-border); }
.rx-seo-suggestion textarea { min-height: 54px !important; height: auto; resize: vertical !important; padding: 6px 8px !important; }
.rx-seo-row-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.rx-seo-row .rx-field label { font-size: 11.5px; color: var(--rx-muted); display: flex; justify-content: space-between; }
.rx-seo-desc { min-height: 54px !important; height: auto; resize: vertical !important; padding: 6px 8px !important; }
.rx-seo-count { font-size: 11px; color: var(--rx-muted); }
.rx-seo-count.is-bad { color: #c62828; }
.rx-seo-serp { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--rx-border); font-family: Arial, sans-serif; }
.rx-seo-serp-url { font-size: 12px; color: #202124; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-seo-serp-title { font-size: 18px; line-height: 1.3; color: #1a0dab; }
.rx-seo-serp-desc { font-size: 13px; line-height: 1.5; color: #4d5156; }
.rx-seo-gen > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; margin: 0; }
.rx-seo-gen > summary::-webkit-details-marker { display: none; }
.rx-seo-gen > summary .material-symbols-outlined { font-size: 18px; color: var(--rx-primary-dark); }
.rx-seo-gen[open] > summary { margin-bottom: 8px; }
.rx-seo-props { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.rx-seo-prop { display: grid; grid-template-columns: 20px minmax(0, 1fr) 140px; align-items: center; gap: 8px; }
.rx-seo-prop input[type=checkbox] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 16px; height: 16px; margin: 0; accent-color: var(--rx-primary); }
.rx-seo-prop.is-exists { opacity: .55; }
.rx-seo-landing-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px !important; }
.rx-seo-landing-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.rx-seo-landing-main .rx-db-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-seo-landing-flags { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.rx-seo-slug { display: flex; align-items: center; border: 1px solid var(--rx-input-border); border-radius: var(--rx-radius-sm); overflow: hidden; }
.rx-seo-slug span { padding: 0 8px; font-size: 12px; color: var(--rx-muted); background: var(--rx-soft); align-self: stretch; display: flex; align-items: center; white-space: nowrap; }
.rx-seo-slug input { border: 0 !important; box-shadow: none !important; }
.rx-seo-kw { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--rx-border); font-size: 12.5px; }
.rx-seo-kw:last-child { border-bottom: 0; }
.rx-seo-kw-text { flex: 1 1 auto; min-width: 0; }
.rx-seo-kw-actions { display: inline-flex; gap: 4px; }
.rx-seo-intent { font-size: 10.5px; padding: 1px 7px; border-radius: 10px; background: var(--rx-soft); color: var(--rx-muted); white-space: nowrap; }
.rx-seo-intent.is-transaccional { background: #e8f5e9; color: #2e7d32; }
.rx-seo-intent.is-comercial { background: #fff8e1; color: #8d6e00; }
.rx-seo-intent.is-local { background: var(--rx-primary-soft); color: var(--rx-primary-dark); }
@media (max-width: 1000px) { .rx-seo-row-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .rx-seo-prop { grid-template-columns: 20px minmax(0, 1fr); } .rx-seo-prop .rx-db-meta { grid-column: 2; } .rx-seo-landing-row { flex-wrap: wrap; } }

/* Marketing: Bandeja omnicanal (views_agent.md §6.30) */
.rx-ib { display: grid; grid-template-columns: 330px minmax(0, 1fr) 280px; height: calc(100vh - 190px); min-height: 520px; border-radius: var(--rx-radius); background: #fff; border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); overflow: hidden; }
.rx-ib-list { display: flex; flex-direction: column; border-right: 1px solid var(--rx-border); min-height: 0; }
.rx-ib-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--rx-border); }
.rx-ib-tabs button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 6px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 12.5px; color: var(--rx-muted); cursor: pointer; }
.rx-ib-tabs button.is-active { color: var(--rx-primary-dark); border-bottom-color: var(--rx-primary); font-weight: 600; }
.rx-ib-tabs .material-symbols-outlined { font-size: 17px; }
.rx-ib-count:not(:empty) { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--rx-primary); color: #fff; font-size: 10.5px; line-height: 18px; }
.rx-ib-filters { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-bottom: 1px solid var(--rx-border); }
.rx-ib-filters .rx-st-mini { max-width: none; flex: 1 1 0; }
.rx-ib-items { flex: 1 1 auto; overflow-y: auto; }
.rx-ib-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--rx-border); background: #fff; text-align: left; cursor: pointer; transition: background-color .12s; }
.rx-ib-item:hover { background: var(--rx-soft); }
.rx-ib-item.is-active { background: var(--rx-primary-soft); }
.rx-ib-item.is-unread b { color: var(--rx-text); }
.rx-ib-item.is-unread .rx-ib-item-preview { color: var(--rx-text); font-weight: 600; }
.rx-ib-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--rx-primary-soft); color: var(--rx-primary-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.rx-ib-avatar .material-symbols-outlined { font-size: 18px; }
.rx-ib-avatar.is-big { width: 56px; height: 56px; font-size: 22px; }
.rx-ib-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 2px; }
.rx-ib-item-top { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.rx-ib-item-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--rx-text); }
.rx-ib-time { flex: none; font-size: 11px; color: var(--rx-muted); }
.rx-ib-item-preview { font-size: 12px; color: var(--rx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-ib-item-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rx-ib-tag { font-size: 10.5px; padding: 0 6px; border-radius: 8px; background: var(--rx-soft); color: var(--rx-muted); }
.rx-ib-tag.is-urgent { background: #fdecea; color: #c62828; }
.rx-ib-unread { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rx-primary); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.rx-ib-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f6f8fa; }
.rx-ib-empty { margin: auto; text-align: center; color: var(--rx-muted); }
.rx-ib-empty .material-symbols-outlined { font-size: 42px; color: var(--rx-primary); }
.rx-ib-thread { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.rx-ib-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--rx-border); }
.rx-ib-head-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; font-size: 13.5px; }
.rx-ib-head-main .rx-db-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-ib-head-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.rx-ib-head-actions .rx-st-mini { max-width: 150px; }
.rx-ib-head-actions .is-on { background: var(--rx-primary) !important; color: #fff !important; }
#th-urgent.is-on { background: #c62828 !important; border-color: #c62828; }
.rx-ib-back, .rx-ib-info-btn { display: none !important; }
.rx-ib-messages { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.rx-ib-msg { display: flex; }
.rx-ib-msg.is-out { justify-content: flex-end; }
.rx-ib-bubble { max-width: min(75%, 560px); padding: 8px 10px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--rx-border); font-size: 13px; line-height: 1.45; word-break: break-word; }
.rx-ib-msg.is-out .rx-ib-bubble { background: #e3f7fb; border-color: #c9eef6; }
.rx-ib-msg.is-note .rx-ib-bubble { background: #fff8e1; border-color: #f3e2a6; }
.rx-ib-msg.is-failed .rx-ib-bubble { border-color: #f1b9b4; }
.rx-ib-bubble img, .rx-ib-bubble video { display: block; max-width: 100%; max-height: 300px; border-radius: 8px; margin-bottom: 4px; }
.rx-ib-bubble audio { max-width: 260px; }
.rx-ib-file-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rx-ib-note-label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #8d6e00; font-weight: 600; margin-bottom: 2px; }
.rx-ib-note-label .material-symbols-outlined { font-size: 13px; }
.rx-ib-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 2px; font-size: 10.5px; color: var(--rx-muted); }
.rx-ib-status { font-size: 14px; }
.rx-ib-status.is-read { color: #34b7f1; }
.rx-ib-error { margin-top: 4px; font-size: 11.5px; color: #c62828; }
.rx-ib-system { align-self: center; padding: 2px 10px; border-radius: 10px; background: rgba(0, 0, 0, .05); color: var(--rx-muted); font-size: 11.5px; }
.rx-ib-banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff8e1; border-top: 1px solid #f3e2a6; font-size: 12.5px; }
.rx-ib-banner.is-ai { background: var(--rx-primary-soft); border-color: #c9eef6; }
.rx-ib-banner .btn { margin-left: auto; }
.rx-ib-composer { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 10px; background: #fff; border-top: 1px solid var(--rx-border); }
.rx-ib-composer.is-note textarea { background: #fffdf3; }
.rx-ib-composer textarea { min-height: 54px !important; max-height: 200px; height: auto; resize: vertical !important; padding: 8px 10px !important; }
.rx-ib-modes { display: flex; gap: 4px; }
.rx-ib-modes button { padding: 3px 10px; border-radius: 14px; border: 1px solid var(--rx-border); background: #fff; font-size: 11.5px; color: var(--rx-muted); cursor: pointer; }
.rx-ib-modes button.is-active { border-color: var(--rx-primary); background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-weight: 600; }
.rx-ib-composer-bar { display: flex; align-items: center; gap: 6px; }
.rx-ib-suggestions, .rx-ib-canned { display: flex; flex-direction: column; gap: 4px; }
.rx-ib-suggestions button, .rx-ib-canned button { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--rx-border); background: var(--rx-soft); text-align: left; font-size: 12.5px; cursor: pointer; }
.rx-ib-suggestions button:hover, .rx-ib-canned button:hover { border-color: var(--rx-primary); background: var(--rx-primary-soft); }
.rx-ib-file { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.rx-ib-side { padding: 14px; border-left: 1px solid var(--rx-border); overflow-y: auto; }
.rx-ib-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin-bottom: 12px; }
.rx-ib-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 12.5px; margin: 0; }
.rx-ib-dl dt { color: var(--rx-muted); font-weight: 400; }
.rx-ib-dl dd { margin: 0; word-break: break-all; }
.rx-ib-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.rx-ib-tpl-preview { white-space: pre-line; padding: 10px; border-radius: 10px; background: #e3f7fb; font-size: 13px; min-height: 40px; }
.rx-ib-hours { display: flex; flex-direction: column; gap: 6px; }
.rx-ib-hours-row { display: grid; grid-template-columns: 130px 110px auto 110px; align-items: center; gap: 8px; }
@media (max-width: 1200px) { .rx-ib { grid-template-columns: 300px minmax(0, 1fr); } .rx-ib-side { display: none; } .rx-ib[data-view="side"] .rx-ib-side { display: block; } .rx-ib-info-btn { display: inline-flex !important; } }
@media (max-width: 800px) {
    .rx-ib { grid-template-columns: 1fr; height: calc(100vh - 150px); }
    .rx-ib > section, .rx-ib > aside { display: none !important; }
    .rx-ib[data-view="list"] .rx-ib-list, .rx-ib[data-view="chat"] .rx-ib-chat, .rx-ib[data-view="side"] .rx-ib-side { display: flex !important; flex-direction: column; }
    .rx-ib-back { display: inline-flex !important; }
    .rx-ib-head-actions .rx-st-mini { max-width: 110px; }
    .rx-ib-hours-row { grid-template-columns: 1fr 1fr auto 1fr; }
}

/* ---------- Captación: visitas del sitio (.rx-cap-*) — ver views_agent.md §6.30 ---------- */
.rx-cap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.rx-cap-filters .rx-st-mini { min-width: 160px; padding-right: 28px !important; }
.rx-cap-grid .rx-set { min-width: 0; }
.rx-cap-rank, .rx-cap-actions, .rx-cap-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.rx-cap-rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; align-items: baseline; }
.rx-cap-rank-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--rx-text); }
.rx-cap-rank-n { font-size: 13px; font-weight: 600; color: var(--rx-text); font-variant-numeric: tabular-nums; }
.rx-cap-rank-bar { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--rx-soft); overflow: hidden; }
.rx-cap-rank-bar i { display: block; height: 100%; border-radius: 4px; background: var(--rx-primary); }
.rx-cap-actions li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rx-cap-actions .material-symbols-outlined { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); }
.rx-cap-actions li.is-zero { opacity: .55; }
.rx-cap-people li { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rx-cap-people a.rx-cap-rank-label { font-weight: 600; }
@media (max-width: 900px) { .rx-cap-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Captación: formularios (.rx-fb-*) — ver views_agent.md §6.30 ---------- */
.rx-fb-editor { grid-template-columns: minmax(0, 1fr) 380px; }
.rx-fb-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) 130px auto; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 6px; border-radius: 10px; background: var(--rx-soft); border: 1px solid var(--rx-border); }
.rx-fb-row input.form-control, .rx-fb-row select.form-select { height: 32px !important; font-size: 13px; }
.rx-fb-row input[hidden] { display: none; }
.rx-fb-name { font-size: 12.5px; font-weight: 600; color: var(--rx-primary-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-fb-actions { display: inline-flex; gap: 4px; }
.rx-fb-actions .rx-btn-icon { width: 30px; height: 30px; }
.rx-fb-consent { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rx-border); }
.rx-fb-text { min-height: 56px !important; }
.rx-fb-preview { position: sticky; top: 70px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); }
.rx-fb-preview iframe { display: block; width: 100%; min-height: 320px; border: 1px solid var(--rx-border); border-radius: 10px; background: #fff; }
.rx-fb-subs { display: flex; flex-direction: column; gap: 10px; }
.rx-fb-sub { padding: 14px 16px; background: #fff; border: 1px solid var(--rx-border); border-radius: var(--rx-radius); box-shadow: var(--rx-shadow); }
.rx-fb-sub-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.rx-fb-sub-name { font-weight: 600; font-size: 14px; }
.rx-fb-sub-data { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.rx-fb-sub-data dt { font-weight: 400; color: var(--rx-muted); }
.rx-fb-sub-data dd { margin: 0; color: var(--rx-text); white-space: pre-line; overflow-wrap: anywhere; }
.rx-fb-sub-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
@media (max-width: 1100px) { .rx-fb-editor { grid-template-columns: minmax(0, 1fr); } .rx-fb-preview { position: static; } }
@media (max-width: 700px) {
    .rx-fb-row { grid-template-columns: minmax(0, 1fr) auto; }
    .rx-fb-row .rx-fb-name { grid-column: 1 / -1; }
    .rx-fb-row input.form-control, .rx-fb-row select.form-select { grid-column: 1 / -1; }
    .rx-fb-sub-data { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Captación: pop-ups (.rx-pop-stage) — ver views_agent.md §6.30 ---------- */
.rx-pop-stage { display: flex; justify-content: center; padding: 8px; border-radius: 10px; background: var(--rx-soft); }
.rx-pop-stage iframe { display: block; width: 100%; height: 540px; border: 1px solid var(--rx-border); border-radius: 10px; background: #fff; transition: width .2s ease; }
.rx-pop-stage.is-mobile iframe { width: 300px; }
.rx-pop-device a { padding: 4px 10px !important; }
.rx-pop-device a .material-symbols-outlined { margin: 0 !important; }

/* ---------- Captación: enlaces y QR (.rx-lk-*) — ver views_agent.md §6.30 ---------- */
.rx-lk-short { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 4px 0 6px; }
.rx-lk-url { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); font-size: 12.5px; font-weight: 600; }
.rx-lk-url-lg { font-size: 14px; }
.rx-lk-final { white-space: normal !important; word-break: break-all; overflow-wrap: anywhere; font-size: 12px; color: var(--rx-text); }
.rx-lk-qr { display: flex; justify-content: center; }
.rx-lk-qr svg { width: 100%; max-width: 260px; height: auto; border-radius: 10px; border: 1px solid var(--rx-border); }
.rx-lk-preview .rx-lk-qr svg { max-width: 300px; }
.rx-lk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 10px; align-items: start; }
.rx-lk-chart { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding-top: 8px; border-bottom: 1px solid var(--rx-border); }
.rx-lk-col { position: relative; flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; cursor: default; outline: none; }
.rx-lk-col i { display: block; width: 100%; max-width: 22px; margin: 0 auto; border-radius: 4px 4px 0 0; background: var(--rx-primary); }
.rx-lk-col:hover i, .rx-lk-col:focus i { background: var(--rx-primary-dark); }
.rx-lk-col:hover::after, .rx-lk-col:focus::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 2;
    white-space: nowrap; padding: 4px 8px; border-radius: 6px; background: #1f2937; color: #fff; font-size: 11px; pointer-events: none;
}
.rx-lk-col:first-child:hover::after, .rx-lk-col:first-child:focus::after { left: 0; transform: none; }
.rx-lk-col:last-child:hover::after, .rx-lk-col:last-child:focus::after { left: auto; right: 0; transform: none; }
.rx-lk-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--rx-muted); }
@media (max-width: 900px) { .rx-lk-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Automatizaciones (.rx-wf-*) — ver views_agent.md §6.31 ---------- */
.rx-wf-when { display: inline-flex; align-items: center; gap: 4px; color: var(--rx-text); font-weight: 600; }
.rx-wf-when .material-symbols-outlined { font-size: 16px; color: var(--rx-primary-dark); }
.mtd-modal.rx-modal .mtd-sheet.rx-wf-new-sheet { max-width: 860px; }
.mtd-modal.rx-modal .mtd-sheet.rx-wf-sheet { max-width: 620px; }
.rx-wf-recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rx-wf-recipes form { margin: 0; }
.rx-wf-recipe { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; height: 100%; padding: 14px; text-align: left; border: 1px solid var(--rx-border); border-radius: var(--rx-radius); background: #fff; color: var(--rx-text); cursor: pointer; transition: border-color .15s var(--rx-ease), box-shadow .15s var(--rx-ease), transform .1s var(--rx-ease); }
.rx-wf-recipe:hover, .rx-wf-recipe:focus-visible { border-color: var(--rx-primary); box-shadow: var(--rx-shadow-hover); outline: 0; }
.rx-wf-recipe .material-symbols-outlined { font-size: 22px; color: var(--rx-primary-dark); background: var(--rx-primary-soft); border-radius: 8px; padding: 6px; margin-bottom: 4px; }
.rx-wf-recipe b { font-size: 13.5px; }
.rx-wf-recipe small { font-size: 12px; line-height: 1.45; color: var(--rx-muted); }
.rx-wf-recipe-blank { border-style: dashed; background: var(--rx-soft); }

.rx-wf-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--rx-border); border-radius: var(--rx-radius); box-shadow: var(--rx-shadow); }
.rx-wf-top .rx-wf-name-field { flex: 1 1 260px; width: auto; }
.rx-wf-top .rx-db-status { align-self: center; }
.rx-wf-tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--rx-soft); border: 1px solid var(--rx-border); }
.rx-wf-tabs button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 12.5px; color: var(--rx-muted); cursor: pointer; }
.rx-wf-tabs button .material-symbols-outlined { font-size: 17px; }
.rx-wf-tabs button b { font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--rx-primary); color: #fff; }
.rx-wf-tabs button.is-on { background: #fff; color: var(--rx-text); font-weight: 600; box-shadow: var(--rx-shadow); }
.rx-wf-dirty { align-self: center; margin-left: auto; }
.rx-wf-issues { margin-top: 10px; padding: 10px 14px; border-radius: var(--rx-radius); background: #fff8e6; border: 1px solid #f6d58b; color: #7a5600; font-size: 12.5px; }
.rx-wf-issues b { display: inline-flex; align-items: center; gap: 4px; }
.rx-wf-issues b .material-symbols-outlined { font-size: 17px; }
.rx-wf-issues ul { margin: 4px 0 0; padding-left: 22px; }
.rx-wf-issues li button { border: 0; background: none; padding: 0; color: inherit; text-align: left; text-decoration: underline dotted; cursor: pointer; }

.rx-wf-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; margin-top: 12px; }
.rx-wf-canvas {
    flex: 1 1 520px; min-width: 0; min-height: 420px; overflow-x: auto; padding: 22px 16px 28px; border-radius: var(--rx-radius); border: 1px solid var(--rx-border);
    background-color: var(--rx-soft); background-image: radial-gradient(#d7e0e7 1px, transparent 1px); background-size: 18px 18px;
}
.rx-wf-panel { flex: 0 1 380px; min-width: 280px; position: sticky; top: 66px; max-height: calc(100vh - 80px); overflow-x: hidden; overflow-y: auto; padding: 16px; background: #fff; border: 1px solid var(--rx-border); border-radius: var(--rx-radius); box-shadow: var(--rx-shadow); }
@media (max-width: 991px) { .rx-wf-panel { flex-basis: 100%; position: static; max-height: none; } }

.rx-wf-flow { display: flex; flex-direction: column; align-items: center; min-width: max-content; margin: 0 auto; }
.rx-wf-node {
    position: relative; display: flex; align-items: flex-start; gap: 10px; width: 300px; max-width: calc(100vw - 72px); padding: 10px 12px; text-align: left;
    background: #fff; border: 1px solid var(--rx-border); border-radius: 12px; box-shadow: var(--rx-shadow); cursor: pointer; outline: 0;
    transition: border-color .15s var(--rx-ease), box-shadow .15s var(--rx-ease);
}
.rx-wf-node:hover { box-shadow: var(--rx-shadow-hover); }
.rx-wf-node:focus-visible, .rx-wf-node.is-sel { border-color: var(--rx-primary); box-shadow: var(--rx-ring), var(--rx-shadow-hover); }
.rx-wf-node.has-issue { border-left: 4px solid #f0a92e; }
.rx-wf-ic { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--rx-primary-soft); color: var(--rx-primary-dark); }
.rx-wf-ic .material-symbols-outlined { font-size: 20px; }
.rx-wf-t-wait .rx-wf-ic, .rx-wf-t-condition .rx-wf-ic, .rx-wf-t-exit .rx-wf-ic { background: #eef1f4; color: #55626d; }
.rx-wf-t-notify .rx-wf-ic, .rx-wf-t-tag .rx-wf-ic, .rx-wf-t-stage .rx-wf-ic { background: #f1edfc; color: #6a4fc7; }
.rx-wf-start { border-top: 4px solid var(--rx-primary); }
.rx-wf-start .rx-wf-ic { background: var(--rx-primary); color: #fff; }
.rx-wf-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rx-wf-k { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rx-muted); }
.rx-wf-txt b { font-size: 13px; font-weight: 600; color: var(--rx-text); line-height: 1.35; overflow-wrap: anywhere; }
.rx-wf-stat { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; font-size: 11.5px; color: #11849d; }
.rx-wf-stat .material-symbols-outlined { font-size: 14px; }
.rx-wf-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rx-wf-chips span { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 9px; background: var(--rx-soft); border: 1px solid var(--rx-border); font-size: 11px; color: var(--rx-muted); }
.rx-wf-chips .material-symbols-outlined { font-size: 13px; }
.rx-wf-warn { color: #d98a00; }
.rx-wf-warn .material-symbols-outlined { font-size: 19px; }
.rx-wf-tools { position: absolute; top: -12px; right: 8px; display: none; gap: 2px; padding: 2px; border-radius: 8px; background: #fff; border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); }
.rx-wf-node:hover .rx-wf-tools, .rx-wf-node.is-sel .rx-wf-tools, .rx-wf-node:focus-within .rx-wf-tools { display: inline-flex; }
.rx-wf-tools button { display: inline-flex; border: 0; background: none; padding: 2px; border-radius: 5px; color: var(--rx-muted); cursor: pointer; }
.rx-wf-tools button:hover { background: var(--rx-soft); color: var(--rx-text); }
.rx-wf-tools button.is-confirm { background: #fde8e8; color: #c0392b; }
.rx-wf-tools .material-symbols-outlined { font-size: 17px; }
@media (hover: none) { .rx-wf-tools { display: inline-flex; position: static; margin-left: 4px; align-self: center; border: 0; box-shadow: none; } }

.rx-wf-link { position: relative; display: flex; justify-content: center; align-items: center; width: 2px; height: 38px; background: #c3ced7; }
.rx-wf-add {
    position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border-radius: 50%;
    border: 1px solid #c3ced7; background: #fff; color: var(--rx-muted); cursor: pointer; transition: transform .1s var(--rx-ease), color .15s, border-color .15s;
}
.rx-wf-add:hover, .rx-wf-add:focus-visible { color: #fff; background: var(--rx-primary); border-color: var(--rx-primary); transform: scale(1.12); outline: 0; }
.rx-wf-add .material-symbols-outlined { font-size: 17px; }
.rx-wf-branches { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; padding: 12px 0; }
.rx-wf-branches::before, .rx-wf-branches::after { content: ""; position: absolute; left: 50%; width: 2px; height: 12px; margin-left: -1px; background: #c3ced7; }
.rx-wf-branches::before { top: 0; }
.rx-wf-branches::after { bottom: 0; }
.rx-wf-branch { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 280px; padding: 14px 0; }
.rx-wf-branch .rx-wf-node { width: 268px; }
.rx-wf-branch::before, .rx-wf-branch::after { content: ""; position: absolute; height: 14px; border: 0 solid #c3ced7; }
.rx-wf-branch::before { top: 0; border-top-width: 2px; }
.rx-wf-branch::after { bottom: 0; border-bottom-width: 2px; }
.rx-wf-branch:first-child::before, .rx-wf-branch:first-child::after { left: 50%; right: -13px; border-left-width: 2px; }
.rx-wf-branch:last-child::before, .rx-wf-branch:last-child::after { right: 50%; left: -13px; border-right-width: 2px; }
.rx-wf-branch:first-child::before { border-top-left-radius: 10px; }
.rx-wf-branch:last-child::before { border-top-right-radius: 10px; }
.rx-wf-branch:first-child::after { border-bottom-left-radius: 10px; }
.rx-wf-branch:last-child::after { border-bottom-right-radius: 10px; }
.rx-wf-fill { flex: 1 1 auto; width: 2px; min-height: 0; background: #c3ced7; }
.rx-wf-branch-k { padding: 1px 12px; border-radius: 10px; font-size: 11.5px; font-weight: 700; }
.rx-wf-branch-k.is-yes { background: #e3f7ee; color: #157a52; }
.rx-wf-branch-k.is-no { background: #fdecec; color: #b03a2e; }
.rx-wf-end { display: inline-flex; align-items: center; gap: 4px; padding: 5px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--rx-border); font-size: 12px; color: var(--rx-muted); }
.rx-wf-end .material-symbols-outlined { font-size: 16px; }

.rx-wf-menu { position: absolute; z-index: 1300; width: 220px; padding: 6px; background: #fff; border: 1px solid var(--rx-border); border-radius: 10px; box-shadow: 0 14px 34px rgba(16, 24, 40, .18); }
.rx-wf-menu[hidden] { display: none; }
.rx-wf-mg { padding: 6px 8px 2px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--rx-muted); }
.rx-wf-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: none; font-size: 13px; color: var(--rx-text); text-align: left; cursor: pointer; }
.rx-wf-menu button:hover, .rx-wf-menu button:focus-visible { background: var(--rx-primary-soft); outline: 0; }
.rx-wf-menu .material-symbols-outlined { font-size: 18px; color: var(--rx-primary-dark); }

.rx-wf-ph { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rx-wf-ph > div { display: flex; flex-direction: column; min-width: 0; }
.rx-wf-ph b { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.rx-wf-panel .rx-wf-f { width: 100%; margin-bottom: 12px; }
.rx-wf-panel .d-flex .rx-wf-f { flex: 1 1 0; }
.rx-wf-help { display: block !important; order: 3 !important; margin: 4px 0 0 !important; line-height: 1.4; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
.rx-wf-sep { height: 1px; margin: 4px 0 14px; background: var(--rx-border); }
.rx-wf-pissues { margin-bottom: 12px; padding: 8px 10px; border-radius: 8px; background: #fff8e6; color: #7a5600; font-size: 12px; }
.rx-wf-pissues p { display: flex; gap: 5px; margin: 0; }
.rx-wf-pissues p + p { margin-top: 4px; }
.rx-wf-pissues .material-symbols-outlined { font-size: 16px; }
.rx-wf-wa { margin: 0 0 12px; padding: 10px 12px; border-radius: 0 10px 10px 10px; background: #dcf8c6; color: #1f2c34; font-size: 13px; line-height: 1.45; white-space: pre-line; }

.rx-wf-people { margin-top: 12px; }
.rx-wf-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.rx-wf-person { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: #fff; border: 1px solid var(--rx-border); border-radius: var(--rx-radius); box-shadow: var(--rx-shadow); }
.rx-wf-person .btn { align-self: flex-start; }
.rx-wf-pmain { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.rx-wf-pmain a, .rx-wf-pmain b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rx-wf-results { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.rx-wf-results button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--rx-border); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.rx-wf-results button:hover, .rx-wf-results button:focus-visible { border-color: var(--rx-primary); background: var(--rx-primary-soft); outline: 0; }
.rx-wf-results span:not(.material-symbols-outlined) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--rx-muted); }
.rx-wf-results .material-symbols-outlined { color: var(--rx-primary-dark); }
.rx-wf-journey { list-style: none; margin: 0; padding: 0; }
.rx-wf-journey li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rx-border); }
.rx-wf-journey li:last-child { border-bottom: 0; }
.rx-wf-journey li > div { display: flex; flex-direction: column; min-width: 0; }
.rx-wf-journey li span:not(.material-symbols-outlined) { font-size: 12.5px; color: var(--rx-muted); overflow-wrap: anywhere; }
.rx-wf-journey .material-symbols-outlined { font-size: 20px; color: #1fb57a; }
.rx-wf-journey .is-skipped .material-symbols-outlined { color: #9aa6b0; }
.rx-wf-journey .is-failed .material-symbols-outlined { color: #c0392b; }
.rx-wf-journey .is-waiting .material-symbols-outlined { color: #d98a00; }
