/* ═══════════════════════════════════════════════════════════════════════
   REGISTRAR GESTIÓN  —  Estilos reestructurados, intuitivos, compactos
   Prefijo: rg-  (registrar gestión)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Header ─────────────────────────────────────────────────────────── */
.rg-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.rg-header-text {
    flex: 1;
    min-width: 0;
}

.rg-eyebrow {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--primary, #2563eb);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.rg-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text, #111827);
    margin: 0;
    line-height: 1.2;
}

/* ── Controles superiores ─────────────────────────────────────────── */
.rg-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.rg-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 160px;
    flex: 1;
}

.rg-field label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #6b7280);
}

.rg-req {
    color: #dc2626;
    margin-left: 0.1rem;
}

.rg-input,
.rg-select {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    background: #fff;
    color: var(--text, #111827);
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.rg-input:focus,
.rg-select:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Layout principal (2 columnas) ────────────────────────────────── */
.rg-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .rg-layout {
        grid-template-columns: 1fr;
    }
}

.rg-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rg-col--left {
    min-width: 0;
}

.rg-col--right {
    min-width: 0;
}

/* ── Buscador de cliente ──────────────────────────────────────────── */
.rg-search-box {
    position: relative;
}

.rg-search-wrap {
    position: relative;
}

.rg-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

.rg-search-wrap .rg-input {
    padding-left: 2.25rem;
}

/* Autocomplete dropdown */
.rg-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.rg-autocomplete:has(> *) {
    display: block;
}

.rg-ac-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.rg-ac-item:last-child {
    border-bottom: none;
}

.rg-ac-item:hover {
    background: #f8fafc;
}

.rg-ac-item.rg-ac-empty {
    color: #94a3b8;
    cursor: default;
    justify-content: center;
}

.rg-ac-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.rg-ac-main strong {
    font-size: 0.82rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rg-ac-main span {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rg-ac-status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.rg-ac-status.pending {
    background: #fef3c7;
    color: #b45309;
}

.rg-ac-status.done {
    background: #dcfce7;
    color: #15803d;
}

/* ── Resultado ─────────────────────────────────────────────────────── */
.rg-result-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ── Contexto dinámico ──────────────────────────────────────────── */
.rg-context-box {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
    transition: all 0.2s;
}

.rg-context-box p {
    margin: 0;
}

.rg-context-box strong {
    color: #334155;
}

.rg-context-box small {
    display: block;
    margin-top: 0.2rem;
    color: #94a3b8;
}

.rg-context-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    background: #e2e8f0;
    color: #64748b;
}

.rg-context--pending .rg-context-icon {
    background: #fef3c7;
    color: #b45309;
}

.rg-context--history .rg-context-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

/* ── Rule box ─────────────────────────────────────────────────────── */
.rg-rule {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
    transition: all 0.2s;
}

.rg-rule p {
    margin: 0;
}

.rg-rule strong {
    color: #334155;
}

.rg-rule-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: #e2e8f0;
    color: #64748b;
}

.rg-rule--info .rg-rule-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.rg-rule--info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.rg-rule--success .rg-rule-icon {
    background: #dcfce7;
    color: #15803d;
}

.rg-rule--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.rg-rule--money .rg-rule-icon {
    background: #ffedd5;
    color: #c2410c;
}

.rg-rule--money {
    background: #fff7ed;
    border-color: #fed7aa;
}

.rg-rule--warn .rg-rule-icon {
    background: #fef3c7;
    color: #b45309;
}

.rg-rule--warn {
    background: #fffbeb;
    border-color: #fde68a;
}

.rg-rule--ok .rg-rule-icon {
    background: #dcfce7;
    color: #15803d;
}

.rg-rule--ok {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* ── Tarjeta de cliente ───────────────────────────────────────────── */
.rg-client-card {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 0.875rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Estado vacío */
.rg-client-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #94a3b8;
}

.rg-client-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.25;
}

.rg-client-empty strong {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.25rem;
}

.rg-client-empty span {
    font-size: 0.78rem;
    max-width: 280px;
    line-height: 1.4;
}

/* Estado con datos */
.rg-client-info {
    padding: 1rem 1.25rem;
}

.rg-client-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.rg-client-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, var(--primary, #2563eb), #4f8efc);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rg-client-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.rg-client-meta h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rg-client-phone {
    font-size: 0.78rem;
    color: #64748b;
}

.rg-client-balance {
    font-size: 0.78rem;
    font-weight: 700;
    color: #15803d;
}

.rg-client-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rg-client-sections {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 1rem;
}

.rg-info-section {
    padding: 0.8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
}

.rg-info-section-title {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.65rem;
}

.rg-info-grid {
    display: grid;
    gap: 0.55rem;
}

.rg-info-grid--personal {
    grid-template-columns: 1fr;
}

.rg-info-cell {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.rg-info-cell span {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
}

.rg-info-cell strong {
    font-size: 0.76rem;
    color: #334155;
    overflow-wrap: anywhere;
}

.rg-credit-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 250px;
    overflow-y: auto;
}

.rg-credit-card { cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
}

.rg-credit-card:hover { border-color: #bfdbfe; background: #f8fbff; }

.rg-credit-card.selected {
    border-color: #93c5fd;
    box-shadow: inset 3px 0 0 #2563eb;
}

.rg-credit-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.rg-credit-label {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    color: #2563eb;
}

.rg-credit-main strong {
    font-size: 0.75rem;
    color: #334155;
    line-height: 1.3;
}

.rg-credit-main small {
    font-size: 0.68rem;
    color: #64748b;
}

.rg-credit-balance {
    flex-shrink: 0;
    text-align: right;
}

.rg-credit-balance span {
    display: block;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    color: #94a3b8;
}

.rg-credit-balance strong {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.85rem;
    color: #15803d;
}

.rg-credit-note {
    margin-top: 0.55rem;
    font-size: 0.64rem;
    line-height: 1.4;
    color: #64748b;
}

@media (max-width: 850px) {
    .rg-client-sections { grid-template-columns: 1fr; }
}

.rg-client-status {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.rg-client-status.pending {
    background: #fef3c7;
    color: #b45309;
}

.rg-client-status.done {
    background: #dcfce7;
    color: #15803d;
}

/* ── Campos condicionales ─────────────────────────────────────────── */
.rg-conditional {
    min-height: 0;
}

.rg-cond-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .rg-cond-grid {
        grid-template-columns: 1fr;
    }
}

.rg-cond-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 1;
    max-height: 80px;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.25s ease;
}

.rg-cond-field.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
}

.rg-cond-field label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

/* Input con prefijo $ */
.rg-input-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.rg-input-prefix span {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
}

.rg-input-prefix .rg-input {
    padding-left: 1.75rem;
}


/* ── Seguimiento estratégico ─────────────────────────────────────── */
.rg-followup-box {
    margin-top: 0.85rem;
    padding: 0.9rem;
    border: 1px solid #dbeafe;
    border-radius: 0.7rem;
    background: #f8fbff;
}
.rg-followup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.rg-followup-head > div { display:flex; flex-direction:column; gap:.18rem; }
.rg-followup-head strong { font-size:.78rem; color:#1e293b; }
.rg-followup-head span { font-size:.68rem; color:#64748b; }
.rg-followup-fields { margin-top:.8rem; }
.rg-followup-grid { display:grid; grid-template-columns:1.35fr 1fr .75fr; gap:.7rem; }
@media (max-width:700px){ .rg-followup-grid{grid-template-columns:1fr;} }
.rg-switch-label { position:relative; display:inline-flex; align-items:center; cursor:pointer; }
.rg-switch-label input { position:absolute; opacity:0; pointer-events:none; }
.rg-switch { width:2.7rem; height:1.5rem; border-radius:999px; background:#b91c1c; border:2px solid #7f1d1d; position:relative; transition:.2s; box-shadow:0 0 0 2px rgba(185,28,28,.08); }
.rg-switch::after { content:""; position:absolute; top:2px; left:2px; width:1.05rem; height:1.05rem; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.28); transition:.2s; }
.rg-switch-label input:checked + .rg-switch { background:#16a34a; border-color:#15803d; box-shadow:0 0 0 2px rgba(22,163,74,.12); }
.rg-switch-label input:checked + .rg-switch::after { transform:translateX(1.2rem); }
.rg-switch-label:focus-within .rg-switch { box-shadow:0 0 0 3px rgba(37,99,235,.18); }

/* ── Observaciones ────────────────────────────────────────────────── */
.rg-notes-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rg-textarea {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    background: #fff;
    color: var(--text, #111827);
    resize: vertical;
    min-height: 60px;
    max-height: 100px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.rg-textarea:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.rg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.5rem;
    margin-top: auto;
}

.rg-footer-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* ── Utilidades ───────────────────────────────────────────────────── */
.hidden {
    display: none !important;
}
/* ── Telefonía RECUPERO ───────────────────────────────────────────── */
.rg-call-box{border:1px solid #dbeafe;background:linear-gradient(180deg,#f8fbff,#fff);border-radius:.8rem;padding:1rem;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.rg-call-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.75rem}
.rg-call-title{display:flex;align-items:center;gap:.55rem;font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#1e3a8a}
.rg-call-dot{width:.55rem;height:.55rem;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 4px #e2e8f0}
.rg-call-dot.ready{background:#2563eb;box-shadow:0 0 0 4px #dbeafe}.rg-call-dot.active{background:#16a34a;box-shadow:0 0 0 4px #dcfce7;animation:rgPulse 1.4s infinite}.rg-call-dot.ended{background:#64748b;box-shadow:0 0 0 4px #e2e8f0}
@keyframes rgPulse{50%{opacity:.45}}
.rg-call-target{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem .8rem;border:1px solid #e5e7eb;border-radius:.65rem;background:#fff;margin-bottom:.75rem}.rg-call-target-copy{display:flex;flex-direction:column;gap:.15rem;min-width:0}.rg-call-target-copy span{font-size:.63rem;font-weight:700;letter-spacing:.08em;color:#94a3b8;text-transform:uppercase}.rg-call-target-copy strong{font-size:.9rem;color:#0f172a}.rg-call-target-copy small{font-size:.72rem;color:#64748b}.rg-call-timer{font-variant-numeric:tabular-nums;font-size:1.15rem;font-weight:800;color:#0f172a;white-space:nowrap}.rg-call-actions{display:flex;gap:.55rem;flex-wrap:wrap}.rg-call-actions .btn{min-width:150px}.rg-call-note{margin:.65rem 0 0;font-size:.7rem;color:#64748b;line-height:1.45}.rg-call-note.warning{color:#b45309}.rg-call-note.success{color:#166534}
.rg-call-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:4.1rem;height:4.1rem;padding:.2rem;border:none;background:transparent;border-radius:999px;cursor:pointer;transition:transform .16s ease, filter .16s ease, opacity .16s ease, box-shadow .16s ease;box-shadow:none;flex:0 0 auto}
.rg-call-icon-btn img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.rg-call-icon-btn:hover:not(:disabled){transform:translateY(-1px) scale(1.03);filter:brightness(1.03)}
.rg-call-icon-btn:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(59,130,246,.18);background:rgba(255,255,255,.5)}
.rg-call-icon-btn:disabled{opacity:.48;cursor:not-allowed;transform:none;filter:grayscale(.15)}
.rg-call-icon-btn.hidden{display:none!important}
.rg-call-actions #reg-call-hangup,.rg-call-actions #reg-call-phone,.rg-call-actions #rg-call-history{min-width:150px}
.rg-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.rg-call-box.calling{border-color:#bbf7d0;background:#f7fff9}.rg-call-box.ended{border-color:#cbd5e1;background:#f8fafc}
.rg-call-lock{display:none;margin-top:.6rem;padding:.55rem .7rem;border-radius:.55rem;background:#fff7ed;color:#9a3412;font-size:.7rem;font-weight:600}.rg-call-lock.show{display:block}

/* modal de selección de número */
.rg-phone-modal{max-width:560px}.rg-phone-list{display:flex;flex-direction:column;gap:.55rem;margin:1rem 0}.rg-phone-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem .9rem;border:1px solid #e2e8f0;background:#fff;border-radius:.65rem;cursor:pointer;text-align:left;transition:.15s}.rg-phone-option:hover{border-color:#93c5fd;background:#f8fbff;transform:translateY(-1px)}.rg-phone-option-main{display:flex;flex-direction:column;gap:.15rem}.rg-phone-option-main strong{font-size:.84rem;color:#0f172a}.rg-phone-option-main small{font-size:.68rem;color:#64748b}.rg-phone-option-arrow{font-size:1.1rem;color:#2563eb}.rg-phone-add{border-top:1px solid #e5e7eb;padding-top:.85rem;margin-top:.8rem}.rg-phone-add-grid{display:grid;grid-template-columns:1fr 150px;gap:.6rem}@media(max-width:600px){.rg-phone-add-grid{grid-template-columns:1fr}.rg-call-target{align-items:flex-start;flex-direction:column}}

/* Sesiones telefónicas abiertas / recuperables */
.rg-active-call-panel{margin:0 0 14px;padding:14px 16px;border:1px solid #fed7aa;border-left:4px solid #f59e0b;border-radius:11px;background:#fffaf2}
.rg-active-call-panel.hidden{display:none}
.rg-active-call-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.rg-active-call-eyebrow{display:block;font-size:.62rem;font-weight:900;letter-spacing:.1em;color:#b45309;margin-bottom:3px}
.rg-active-call-head strong{display:block;font-size:.8rem;color:#334155}
.rg-active-call-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:12px;border:1px solid #f3dfbd;border-radius:9px;background:#fff}
.rg-active-call-main{min-width:0}
.rg-active-call-main strong{display:block;font-size:.82rem;color:#172b4d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-active-call-main small{display:block;margin-top:4px;color:#64748b;font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-active-call-status{font-size:.62rem;font-weight:900;letter-spacing:.06em;color:#b45309;background:#fef3c7;padding:5px 8px;border-radius:999px;white-space:nowrap}
.rg-active-call-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.rg-active-call-actions .btn{padding:8px 11px;font-size:.68rem}
.rg-active-call-actions .btn-danger{border:1px solid #fecaca;background:#fff;color:#b91c1c}
.rg-active-call-empty{font-size:.72rem;color:#64748b;padding:5px 0}
@media(max-width:700px){.rg-active-call-row{grid-template-columns:1fr}.rg-active-call-actions{justify-content:flex-start}.rg-active-call-head{align-items:flex-start;flex-direction:column}}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0 · REGISTRAR MODERN UX
   ═══════════════════════════════════════════════════════════════════════ */
.rg-step-card{position:relative;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.98));border:1px solid #dbe4ef;border-radius:16px;padding:14px;box-shadow:0 8px 28px rgba(15,23,42,.05)}
.rg-step-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}
.rg-step-head>div:last-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.rg-step-index{width:30px;height:30px;border-radius:10px;background:linear-gradient(135deg,#0b2c66,#2d6ff1);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800;box-shadow:0 8px 18px rgba(37,99,235,.18);flex:0 0 auto}
.rg-step-eyebrow{font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#2563eb}
.rg-step-head strong{font-size:14px;color:#0f172a}
.rg-step-head small{font-size:11px;color:#64748b;line-height:1.4}
.rg-step-label{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#64748b;margin-bottom:6px}
.rg-client-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.rg-client-kicker{font-size:9px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#64748b;margin-bottom:2px}
.rg-action-btn{border:1px solid #dbe4ef;background:#fff;color:#12305f;border-radius:12px;padding:9px 12px;display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:800;cursor:pointer;box-shadow:0 4px 14px rgba(15,23,42,.05);transition:.2s ease}
.rg-action-btn:hover{transform:translateY(-1px);border-color:#8fb4f9;box-shadow:0 8px 20px rgba(37,99,235,.14)}
.rg-action-btn--call{background:linear-gradient(135deg,#0b2c66,#2468da);border-color:transparent;color:#fff;box-shadow:0 10px 24px rgba(37,99,235,.22)}
.rg-action-icon{font-size:14px}
.rg-action-arrow{opacity:.7}
.rg-call-box{border:1px solid #cfe0f7!important;border-radius:16px!important;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;box-shadow:0 10px 28px rgba(37,99,235,.08)!important;overflow:hidden;transition:opacity .25s ease,transform .25s ease,max-height .3s ease}
.rg-call-box--revealed{animation:rgReveal .28s ease both}
@keyframes rgReveal{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.rg-conditional{border:1px solid #dbe4ef;border-radius:16px;background:#fff;padding:14px;box-shadow:0 8px 24px rgba(15,23,42,.05);animation:rgReveal .25s ease both}
.rg-dynamic-section-head{display:flex;align-items:flex-start;gap:12px;padding-bottom:13px;margin-bottom:12px;border-bottom:1px solid #e8eef6}
.rg-dynamic-summary{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #cce8df;background:#f0fdf8;border-radius:14px}
.rg-dynamic-summary-icon{width:30px;height:30px;border-radius:10px;background:#d1fae5;color:#0f9f77;display:grid;place-items:center;font-weight:900}
.rg-dynamic-summary div:last-child{display:flex;flex-direction:column;gap:2px}
.rg-dynamic-summary strong{font-size:12px;color:#0f513c}
.rg-dynamic-summary span{font-size:11px;color:#52756a}
.rg-notes-box{border-radius:16px!important;padding:14px!important}

/* Make empty state feel intentional */
#rg-call-box.hidden,#rg-conditional.hidden,#rg-dynamic-summary.hidden{display:none!important}

/* Dark theme */
[data-theme="dark"] .rg-step-card,
body.dark .rg-step-card{background:linear-gradient(180deg,#12223a,#0f1c2f);border-color:#27405f;box-shadow:0 10px 28px rgba(0,0,0,.22)}
[data-theme="dark"] .rg-step-head strong,
body.dark .rg-step-head strong{color:#f8fbff}
[data-theme="dark"] .rg-step-head small,
body.dark .rg-step-head small{color:#a9bad1}
[data-theme="dark"] .rg-step-label,
body.dark .rg-step-label{color:#b4c4da}
[data-theme="dark"] .rg-step-eyebrow,
body.dark .rg-step-eyebrow{color:#6da8ff}
[data-theme="dark"] .rg-action-btn,
body.dark .rg-action-btn{background:#14243a;border-color:#2b4668;color:#f5f9ff}
[data-theme="dark"] .rg-action-btn--call,
body.dark .rg-action-btn--call{background:linear-gradient(135deg,#0f397f,#2f72e6);color:#fff;border-color:transparent}
[data-theme="dark"] .rg-call-box,
body.dark .rg-call-box{background:linear-gradient(180deg,#111f33,#0e1a2d)!important;border-color:#27405f!important}
[data-theme="dark"] .rg-conditional,
body.dark .rg-conditional{background:#111f33;border-color:#27405f}
[data-theme="dark"] .rg-dynamic-section-head,
body.dark .rg-dynamic-section-head{border-color:#263d5a}
[data-theme="dark"] .rg-dynamic-summary,
body.dark .rg-dynamic-summary{background:#102d28;border-color:#1f705f}
[data-theme="dark"] .rg-dynamic-summary strong,
body.dark .rg-dynamic-summary strong{color:#d6fff2}
[data-theme="dark"] .rg-dynamic-summary span,
body.dark .rg-dynamic-summary span{color:#9dd5c5}

@media(max-width:900px){
  .rg-client-head-actions{width:100%;justify-content:space-between}
}

.rg-client-step-head{display:flex;align-items:flex-start;gap:12px;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #e8eef6}
.rg-client-step-head>div:last-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.rg-client-step-head strong{font-size:14px;color:#0f172a}
.rg-client-step-head small{font-size:11px;color:#64748b;line-height:1.4}
[data-theme="dark"] .rg-client-step-head{border-color:#263d5a}
[data-theme="dark"] .rg-client-step-head strong{color:#f8fbff}
[data-theme="dark"] .rg-client-step-head small{color:#a9bad1}
[data-theme="dark"] .rg-search-box.rg-step-card{background:linear-gradient(180deg,#12223a,#0f1c2f);border-color:#27405f}

/* Estados visuales del interruptor */
.rg-switch-label::after{content:"OFF"; margin-left:.45rem; font-size:.62rem; font-weight:800; letter-spacing:.08em; color:#b91c1c;}
.rg-switch-label:has(input:checked)::after{content:"ON"; color:#15803d;}

[data-theme="dark"] .rg-switch-label::after,
body.dark .rg-switch-label::after{color:#f87171;}
[data-theme="dark"] .rg-switch-label:has(input:checked)::after,
body.dark .rg-switch-label:has(input:checked)::after{color:#4ade80;}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0 · MODERN RESULT CARDS + REVEALS + TOASTS
   ═══════════════════════════════════════════════════════════════════════ */
@keyframes rgRevealUp2 {
  from { opacity:0; transform:translateY(16px) scale(.985); filter:blur(2px); }
  to { opacity:1; transform:none; filter:blur(0); }
}
@keyframes rgDropdownIn2 { from{opacity:0;transform:scaleY(.94) translateY(-5px)} to{opacity:1;transform:none} }
@keyframes rgPulseDot2 { 0%,100%{box-shadow:0 0 0 4px rgba(99,102,241,.15),0 0 16px rgba(99,102,241,.26)} 50%{box-shadow:0 0 0 8px rgba(99,102,241,.07),0 0 22px rgba(99,102,241,.35)} }
@keyframes rgShimmer2 { from{transform:translateX(-100%)} to{transform:translateX(100%)} }
.rg-reveal { animation:rgRevealUp2 .42s cubic-bezier(.16,1,.3,1) forwards; opacity:0; }
.rg-reveal-d1{animation-delay:.05s}.rg-reveal-d2{animation-delay:.1s}.rg-reveal-d3{animation-delay:.15s}.rg-reveal-d4{animation-delay:.2s}
.hidden.rg-reveal,.hidden .rg-reveal{animation:none;opacity:0}

.rg-step-line{position:absolute;left:24px;top:44px;bottom:-20px;width:2px;background:linear-gradient(180deg,var(--border,#dbe4ef),transparent);z-index:0;pointer-events:none}

.rg-result-grid{display:grid;grid-template-columns:1fr;gap:.5rem}
.rg-result-option{position:relative;display:flex;align-items:center;gap:.75rem;padding:.72rem .78rem;border:1px solid var(--border,#e2e8f0);border-radius:.75rem;background:var(--surface-1,#fff);cursor:pointer;overflow:hidden;transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease,background .22s ease}
.rg-result-option::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(37,99,235,.08),transparent);transform:translateX(-110%);transition:transform .55s ease}
.rg-result-option:hover{transform:translateY(-2px);border-color:#7aa9f8;box-shadow:0 10px 22px rgba(15,23,42,.08)}
.rg-result-option:hover::before{transform:translateX(110%)}
.rg-result-option.selected{border-color:#2563eb;background:rgba(37,99,235,.07);box-shadow:0 0 0 2px rgba(37,99,235,.14),0 10px 24px rgba(37,99,235,.10)}
.rg-result-icon{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;flex:0 0 auto;font-size:.82rem;font-weight:900;background:rgba(37,99,235,.08);color:#2563eb;border:1px solid rgba(37,99,235,.12)}
.rg-result-option:nth-child(2) .rg-result-icon,.rg-result-option:nth-child(8) .rg-result-icon{background:rgba(245,158,11,.1);color:#b45309;border-color:rgba(245,158,11,.18)}
.rg-result-option:nth-child(3) .rg-result-icon{background:rgba(16,185,129,.1);color:#047857;border-color:rgba(16,185,129,.18)}
.rg-result-option:nth-child(4) .rg-result-icon{background:rgba(239,68,68,.1);color:#b91c1c;border-color:rgba(239,68,68,.18)}
.rg-result-option:nth-child(5) .rg-result-icon{background:rgba(139,92,246,.1);color:#6d28d9;border-color:rgba(139,92,246,.18)}
.rg-result-option:nth-child(6) .rg-result-icon{background:rgba(16,185,129,.1);color:#047857;border-color:rgba(16,185,129,.18)}
.rg-result-option:nth-child(7) .rg-result-icon{background:rgba(14,165,233,.1);color:#0369a1;border-color:rgba(14,165,233,.18)}
.rg-result-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.rg-result-text strong{font-size:.8rem;color:var(--text,#111827);line-height:1.2}
.rg-result-text span{font-size:.67rem;color:var(--text-muted,#6b7280);line-height:1.35}
.rg-check-icon{margin-left:auto;width:24px;height:24px;border-radius:50%;background:#2563eb;color:#fff;display:grid;place-items:center;font-size:.68rem;font-weight:900;opacity:0;transform:scale(.5);transition:all .25s cubic-bezier(.34,1.56,.64,1);flex:0 0 auto}
.rg-result-option.selected .rg-check-icon{opacity:1;transform:scale(1)}

.rg-credit-card{transition:all .28s cubic-bezier(.4,0,.2,1)}
.rg-credit-card:hover{transform:translateX(4px);border-color:#8fb4f9;box-shadow:0 6px 18px rgba(37,99,235,.09)}
.rg-credit-card.selected{box-shadow:0 0 0 2px rgba(37,99,235,.14),inset 3px 0 0 #2563eb}

.rg-call-dot.ready{background:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.15),0 0 16px rgba(37,99,235,.28)}
.rg-call-dot.active{background:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.15),0 0 18px rgba(52,211,153,.28);animation:rgPulseDot2 2s infinite}
.rg-call-dot.ended{background:#64748b;box-shadow:0 0 0 4px rgba(100,116,139,.15)}

.rg-rule{transition:all .28s ease}
.rg-rule--info{border-left-color:#3b82f6}.rg-rule--warn{border-left-color:#f59e0b}.rg-rule--success{border-left-color:#10b981}.rg-rule--money{border-left-color:#f97316}.rg-rule--ok{border-left-color:#10b981}

.rg-toast-container{position:fixed;right:1.25rem;bottom:1.25rem;z-index:9999;display:flex;flex-direction:column;gap:.5rem;pointer-events:none}
.rg-toast{pointer-events:auto;min-width:230px;max-width:330px;padding:.78rem 1rem;border-radius:.8rem;background:rgba(15,23,42,.96);color:#fff;border:1px solid rgba(255,255,255,.08);box-shadow:0 12px 28px rgba(15,23,42,.22);font-size:.8rem;font-weight:700;backdrop-filter:blur(14px);animation:rgRevealUp2 .32s ease forwards}
.rg-toast--success{border-left:3px solid #34d399}.rg-toast--error{border-left:3px solid #f87171}.rg-toast--info{border-left:3px solid #60a5fa}

.rg-client-status.pill{position:relative;overflow:hidden}
.rg-client-status.pill::after{content:'';position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,transparent,rgba(255,255,255,.16),transparent);transform:translateX(-100%);animation:rgShimmer2 3s infinite}
.rg-autocomplete:not(:empty){animation:rgDropdownIn2 .22s cubic-bezier(.16,1,.3,1) forwards;transform-origin:top center}

[data-theme="dark"] .rg-result-option,body.dark .rg-result-option{background:linear-gradient(180deg,#12223a,#0f1c2f);border-color:#294361;color:#f8fbff}
[data-theme="dark"] .rg-result-option:hover,body.dark .rg-result-option:hover{border-color:#4d83d7;box-shadow:0 10px 24px rgba(0,0,0,.24)}
[data-theme="dark"] .rg-result-option.selected,body.dark .rg-result-option.selected{background:linear-gradient(180deg,#152c4c,#11233b);border-color:#4d83ff;box-shadow:0 0 0 2px rgba(77,131,255,.16),0 12px 24px rgba(0,0,0,.22)}
[data-theme="dark"] .rg-result-text strong,body.dark .rg-result-text strong{color:#f8fbff}
[data-theme="dark"] .rg-result-text span,body.dark .rg-result-text span{color:#9db1cb}
[data-theme="dark"] .rg-result-icon,body.dark .rg-result-icon{background:rgba(255,255,255,.05);border-color:#2b4567;color:#9ec2ff}
[data-theme="dark"] .rg-rule,body.dark .rg-rule{background:linear-gradient(180deg,#12223a,#0f1c2f);border-color:#294361;color:#a9bad1}
[data-theme="dark"] .rg-rule strong,body.dark .rg-rule strong{color:#f8fbff}
[data-theme="dark"] .rg-toast,body.dark .rg-toast{background:rgba(8,18,32,.97);border-color:#2b4567}
[data-theme="dark"] .rg-step-line,body.dark .rg-step-line{background:linear-gradient(180deg,#294361,transparent)}

@media(prefers-reduced-motion:reduce){.rg-reveal,.rg-result-option,.rg-check-icon,.rg-toast{animation:none!important;transition:none!important}.rg-result-option::before,.rg-client-status.pill::after{display:none}}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0 · REGISTRAR THEME ISOLATION
   ═══════════════════════════════════════════════════════════════════════ */
html[data-theme="dark"] #tab-registrar .rg-step-card,
html[data-theme="dark"] #tab-registrar .rg-client-card,
html[data-theme="dark"] #tab-registrar .rg-context-box,
html[data-theme="dark"] #tab-registrar .rg-rule,
html[data-theme="dark"] #tab-registrar .rg-dynamic-summary,
html[data-theme="dark"] #tab-registrar .rg-conditional,
html[data-theme="dark"] #tab-registrar .rg-notes-box,
html[data-theme="dark"] #tab-registrar .rg-followup-box,
html[data-theme="dark"] #tab-registrar .rg-call-box {
  background:linear-gradient(180deg,#132236 0%,#0f1d30 100%) !important;
  border-color:#304860 !important;
  color:#f3f7ff !important;
}
html[data-theme="dark"] #tab-registrar .rg-step-head strong,
html[data-theme="dark"] #tab-registrar .rg-client-meta h4,
html[data-theme="dark"] #tab-registrar .rg-info-section-title,
html[data-theme="dark"] #tab-registrar .rg-info-cell strong,
html[data-theme="dark"] #tab-registrar .rg-credit-main strong,
html[data-theme="dark"] #tab-registrar .rg-call-target-copy strong,
html[data-theme="dark"] #tab-registrar .rg-call-timer,
html[data-theme="dark"] #tab-registrar .rg-followup-head strong,
html[data-theme="dark"] #tab-registrar .rg-dynamic-summary strong,
html[data-theme="dark"] #tab-registrar .rg-notes-box label {
  color:#f3f7ff !important;
}
html[data-theme="dark"] #tab-registrar .rg-step-head small,
html[data-theme="dark"] #tab-registrar .rg-step-label,
html[data-theme="dark"] #tab-registrar .rg-client-kicker,
html[data-theme="dark"] #tab-registrar .rg-client-subtitle,
html[data-theme="dark"] #tab-registrar .rg-info-cell span,
html[data-theme="dark"] #tab-registrar .rg-credit-main small,
html[data-theme="dark"] #tab-registrar .rg-credit-balance span,
html[data-theme="dark"] #tab-registrar .rg-credit-note,
html[data-theme="dark"] #tab-registrar .rg-followup-head span,
html[data-theme="dark"] #tab-registrar .rg-call-target-copy span,
html[data-theme="dark"] #tab-registrar .rg-call-target-copy small,
html[data-theme="dark"] #tab-registrar .rg-call-note,
html[data-theme="dark"] #tab-registrar .rg-footer-hint {
  color:#9fb2c8 !important;
}
html[data-theme="dark"] #tab-registrar .rg-info-section,
html[data-theme="dark"] #tab-registrar .rg-credit-card,
html[data-theme="dark"] #tab-registrar .rg-call-target,
html[data-theme="dark"] #tab-registrar .rg-phone-option,
html[data-theme="dark"] #tab-registrar .rg-active-call-row {
  background:#0e1a2b !important;
  border-color:#304860 !important;
  color:#f3f7ff !important;
}
html[data-theme="dark"] #tab-registrar .rg-credit-card:hover,
html[data-theme="dark"] #tab-registrar .rg-phone-option:hover,
html[data-theme="dark"] #tab-registrar .rg-active-call-row:hover {
  background:#172b43 !important;
  border-color:#4b78ac !important;
}
html[data-theme="dark"] #tab-registrar .rg-select,
html[data-theme="dark"] #tab-registrar .rg-input,
html[data-theme="dark"] #tab-registrar .rg-textarea {
  background:#0e1a2b !important;
  color:#f3f7ff !important;
  border-color:#36506f !important;
}
html[data-theme="dark"] #tab-registrar .rg-select:focus,
html[data-theme="dark"] #tab-registrar .rg-input:focus,
html[data-theme="dark"] #tab-registrar .rg-textarea:focus {
  border-color:#4b8df8 !important;
  box-shadow:0 0 0 3px rgba(75,141,248,.16) !important;
}
html[data-theme="dark"] #tab-registrar .rg-client-card .rg-client-empty,
html[data-theme="dark"] #tab-registrar .rg-client-card .rg-client-info { color:#f3f7ff !important; }
html[data-theme="dark"] #tab-registrar .rg-client-empty span { color:#9fb2c8 !important; }
html[data-theme="dark"] #tab-registrar .rg-rule p,
html[data-theme="dark"] #tab-registrar .rg-dynamic-summary span { color:#d8e4f0 !important; }

html[data-theme="claro"] #tab-registrar .rg-step-card,
html[data-theme="claro"] #tab-registrar .rg-client-card,
html[data-theme="claro"] #tab-registrar .rg-context-box,
html[data-theme="claro"] #tab-registrar .rg-rule,
html[data-theme="claro"] #tab-registrar .rg-dynamic-summary,
html[data-theme="claro"] #tab-registrar .rg-conditional,
html[data-theme="claro"] #tab-registrar .rg-notes-box,
html[data-theme="claro"] #tab-registrar .rg-followup-box,
html[data-theme="claro"] #tab-registrar .rg-call-box {
  color:#11233e !important;
}
html[data-theme="claro"] #tab-registrar .rg-client-meta h4,
html[data-theme="claro"] #tab-registrar .rg-step-head strong,
html[data-theme="claro"] #tab-registrar .rg-info-cell strong,
html[data-theme="claro"] #tab-registrar .rg-credit-main strong,
html[data-theme="claro"] #tab-registrar .rg-call-target-copy strong,
html[data-theme="claro"] #tab-registrar .rg-call-timer { color:#11233e !important; }
html[data-theme="claro"] #tab-registrar .rg-step-head small,
html[data-theme="claro"] #tab-registrar .rg-info-cell span,
html[data-theme="claro"] #tab-registrar .rg-credit-main small,
html[data-theme="claro"] #tab-registrar .rg-credit-note,
html[data-theme="claro"] #tab-registrar .rg-followup-head span,
html[data-theme="claro"] #tab-registrar .rg-call-note { color:#64748b !important; }

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.6+ · Registrar compacto + Cola Inteligente
   La cola acompaña la captura; no desplaza ni domina el formulario.
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-top-grid{
    display:grid;
    grid-template-columns:minmax(250px,300px) minmax(0,1fr);
    gap:1rem;
    align-items:stretch;
    margin:0 0 1rem;
}
#tab-registrar .rg-data-card,
#tab-registrar .rg-queue-card{
    min-width:0;
    border:1px solid var(--border,#dbe4ef);
    border-radius:16px;
    background:linear-gradient(180deg,#fff,#fbfdff);
    box-shadow:0 7px 22px rgba(22,51,90,.055);
}
#tab-registrar .rg-data-card{padding:14px 15px 15px}
#tab-registrar .rg-card-kicker,
#tab-registrar .rg-queue-eyebrow{
    font-size:.62rem;
    line-height:1;
    font-weight:900;
    letter-spacing:.13em;
    text-transform:uppercase;
    color:#2f6df6;
}
#tab-registrar .rg-data-fields{display:flex;flex-direction:column;gap:10px;margin-top:12px}
#tab-registrar .rg-data-fields .rg-field{min-width:0}
#tab-registrar .rg-data-fields .rg-field label{margin-bottom:4px}
#tab-registrar .rg-data-fields .rg-input,
#tab-registrar .rg-data-fields .rg-select{height:40px;padding:.48rem .72rem;font-size:.82rem}
#tab-registrar .rg-admin-gestor-field{margin-top:0}

#tab-registrar .rg-queue-card{padding:14px 15px 12px;display:flex;flex-direction:column;justify-content:center}
#tab-registrar .rg-queue-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
#tab-registrar .rg-queue-title-wrap{min-width:0;display:flex;flex-direction:column;gap:3px}
#tab-registrar .rg-queue-title-wrap strong{font-size:.98rem;line-height:1.15;color:#11233e}
#tab-registrar .rg-queue-title-wrap small{font-size:.68rem;color:#8090a4;line-height:1.25}
#tab-registrar .rg-queue-count{flex:0 0 auto;padding:5px 9px;border-radius:999px;border:1px solid #d8e3f0;background:#f6f9fd;color:#49617d;font-size:.62rem;font-weight:800;white-space:nowrap}
#tab-registrar .rg-queue-case{min-height:57px;border:1px solid #e2eaf3;border-radius:12px;background:#f9fbfe;padding:9px 11px;display:flex;align-items:center}
#tab-registrar .rg-queue-case.is-taken{border-color:#b9ead9;background:#f2fcf8}
#tab-registrar .rg-queue-case.is-empty{justify-content:center}
#tab-registrar .rg-queue-empty{display:flex;align-items:center;gap:8px;color:#8b9aab;font-size:.7rem}
#tab-registrar .rg-queue-empty-icon{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:#edf3fa;color:#6b86a6;font-weight:900}
#tab-registrar .rg-queue-case-inner{width:100%;display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:9px;align-items:center}
#tab-registrar .rg-queue-avatar{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:linear-gradient(135deg,#2f6df6,#1b4fae);color:#fff;font-size:.78rem;font-weight:900;box-shadow:0 5px 12px rgba(47,109,246,.18)}
#tab-registrar .rg-queue-copy{min-width:0;display:flex;flex-direction:column;gap:2px}
#tab-registrar .rg-queue-copy strong{font-size:.78rem;color:#112d52;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tab-registrar .rg-queue-copy span{font-size:.63rem;color:#8090a4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tab-registrar .rg-queue-copy em{font-style:normal;font-size:.6rem;color:#5f7c9d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tab-registrar .rg-queue-badge{font-size:.58rem;font-weight:900;letter-spacing:.04em;padding:5px 8px;border-radius:999px;background:#e8f8f1;border:1px solid #bfe9d8;color:#13845d;white-space:nowrap}
#tab-registrar .rg-queue-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:8px;min-height:31px}
#tab-registrar .rg-queue-switch{display:flex;align-items:center;gap:6px;font-size:.62rem;font-weight:800;color:#667990;cursor:pointer;user-select:none;margin-right:auto}
#tab-registrar .rg-queue-switch input{position:absolute;opacity:0;pointer-events:none}
#tab-registrar .rg-queue-switch .rg-switch{width:28px;height:17px;border-radius:999px;background:#cbd5e1;position:relative;transition:.18s;flex:0 0 auto}
#tab-registrar .rg-queue-switch .rg-switch:after{content:"";position:absolute;top:3px;left:3px;width:11px;height:11px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.18);transition:.18s}
#tab-registrar .rg-queue-switch input:checked + .rg-switch{background:#159b6d}
#tab-registrar .rg-queue-switch input:checked + .rg-switch:after{transform:translateX(11px)}
#tab-registrar .rg-queue-btn{height:31px;padding:0 11px;border-radius:9px;background:#fff;border:1px solid #cbd8e8;color:#17375e;font-size:.64rem;font-weight:900;cursor:pointer;transition:.16s}
#tab-registrar .rg-queue-btn:hover:not(:disabled){transform:translateY(-1px);border-color:#9fb8d6}
#tab-registrar .rg-queue-btn:disabled{opacity:.48;cursor:not-allowed}
#tab-registrar .rg-queue-btn--primary{background:linear-gradient(135deg,#0d356e,#173f78);color:#fff;border-color:transparent;box-shadow:0 5px 12px rgba(13,53,110,.14)}
#tab-registrar .rg-queue-btn--ghost{background:#fff}

/* Alineación inferior con el bloque superior: menos aire y más simetría. */
#tab-registrar .rg-layout{grid-template-columns:300px minmax(0,1fr);gap:1rem}
#tab-registrar .rg-col{gap:.85rem}

@media (max-width:900px){
  #tab-registrar .rg-top-grid{grid-template-columns:1fr}
  #tab-registrar .rg-data-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  #tab-registrar .rg-admin-gestor-field{grid-column:1/-1}
  #tab-registrar .rg-layout{grid-template-columns:1fr}
}
@media (max-width:600px){
  #tab-registrar .rg-data-fields{grid-template-columns:1fr}
  #tab-registrar .rg-admin-gestor-field{grid-column:auto}
  #tab-registrar .rg-queue-case-inner{grid-template-columns:30px minmax(0,1fr)}
  #tab-registrar .rg-queue-badge{display:none}
  #tab-registrar .rg-queue-actions{flex-wrap:wrap;justify-content:flex-start}
  #tab-registrar .rg-queue-switch{width:100%}
}

/* Dark mode preparado desde el componente, sin depender de fondos globales. */
html[data-theme="dark"] #tab-registrar .rg-data-card,
html[data-theme="dark"] #tab-registrar .rg-queue-card{background:linear-gradient(180deg,#12243a,#0f1c2f)!important;border-color:#2a4562!important;box-shadow:0 10px 28px rgba(0,0,0,.22)!important}
html[data-theme="dark"] #tab-registrar .rg-queue-title-wrap strong{color:#f4f8ff!important}
html[data-theme="dark"] #tab-registrar .rg-queue-title-wrap small,
html[data-theme="dark"] #tab-registrar .rg-queue-switch{color:#9fb2c8!important}
html[data-theme="dark"] #tab-registrar .rg-queue-count{background:#152a43!important;border-color:#34516f!important;color:#c1d1e2!important}
html[data-theme="dark"] #tab-registrar .rg-queue-case{background:#0d1a2b!important;border-color:#2d4865!important}
html[data-theme="dark"] #tab-registrar .rg-queue-case.is-taken{background:#102d28!important;border-color:#246d5d!important}
html[data-theme="dark"] #tab-registrar .rg-queue-empty{color:#9aadc2!important}
html[data-theme="dark"] #tab-registrar .rg-queue-empty-icon{background:#172c44!important;color:#9db5ce!important}
html[data-theme="dark"] #tab-registrar .rg-queue-copy strong{color:#f2f7ff!important}
html[data-theme="dark"] #tab-registrar .rg-queue-copy span,
html[data-theme="dark"] #tab-registrar .rg-queue-copy em{color:#9eb2c9!important}
html[data-theme="dark"] #tab-registrar .rg-queue-btn{background:#14273e!important;border-color:#34516f!important;color:#edf5ff!important}
html[data-theme="dark"] #tab-registrar .rg-queue-btn--primary{background:linear-gradient(135deg,#174a8e,#2867c7)!important;border-color:transparent!important}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.8 · Cola Inteligente ON/OFF + Mascota de orientación
   ON  = cola protagonista / datos compactos
   OFF = datos protagonistas / cola compacta
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-top-grid{
    grid-template-columns:minmax(245px,300px) minmax(0,1fr);
    transition:grid-template-columns .42s cubic-bezier(.22,.61,.36,1),gap .3s ease;
}
#tab-registrar .rg-top-grid.rg-queue-off{
    grid-template-columns:minmax(0,1fr) minmax(260px,410px);
}
#tab-registrar .rg-data-card,
#tab-registrar .rg-queue-card{
    overflow:hidden;
    transition:box-shadow .35s ease,border-color .35s ease,transform .35s ease,background .35s ease;
}
#tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-queue-card{
    box-shadow:0 10px 30px rgba(21,112,246,.08);
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
    box-shadow:0 10px 30px rgba(21,112,246,.08);
}
#tab-registrar .rg-queue-hint{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) 122px;
    align-items:center;
    min-height:108px;
    margin-top:12px;
    padding:12px 12px 10px 14px;
    border:1px solid #dce8f6;
    border-radius:13px;
    background:linear-gradient(135deg,#f7fbff 0%,#edf6ff 100%);
    opacity:0;
    max-height:0;
    overflow:hidden;
    transform:translateY(8px);
    transition:opacity .35s ease,max-height .45s ease,transform .45s ease,margin-top .35s ease,padding .35s ease;
}
#tab-registrar .rg-queue-hint-copy{min-width:0;position:relative;z-index:2}
#tab-registrar .rg-queue-hint-kicker{
    display:block;
    font-size:.55rem;
    font-weight:900;
    letter-spacing:.13em;
    color:#2f6df6;
    margin-bottom:4px;
}
#tab-registrar .rg-queue-hint strong{display:block;font-size:.76rem;line-height:1.2;color:#16365e;margin-bottom:3px}
#tab-registrar .rg-queue-hint p{margin:0;max-width:280px;font-size:.64rem;line-height:1.4;color:#6e8199}
#tab-registrar .rg-queue-hint img{
    width:142px;
    max-width:none;
    height:142px;
    object-fit:contain;
    align-self:end;
    justify-self:end;
    transform:translate(4px,14px);
    filter:drop-shadow(0 10px 13px rgba(17,54,92,.12));
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
    opacity:1;
    max-height:155px;
    transform:translateY(0);
}
#tab-registrar .rg-queue-switch{transition:color .2s ease}
#tab-registrar .rg-queue-switch .rg-switch{transition:background .22s ease,box-shadow .22s ease}
#tab-registrar .rg-queue-switch input:checked + .rg-switch{box-shadow:0 0 0 3px rgba(21,155,109,.10)}
#tab-registrar .rg-queue-switch input:not(:checked) + .rg-switch{background:#aebdce}
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-card{transform:scale(.995)}

@media (max-width:1100px) and (min-width:901px){
  #tab-registrar .rg-top-grid.rg-queue-off{grid-template-columns:minmax(0,1fr) 330px}
  #tab-registrar .rg-queue-hint{grid-template-columns:minmax(0,1fr) 100px}
  #tab-registrar .rg-queue-hint img{width:120px;height:120px}
}
@media (max-width:900px){
  #tab-registrar .rg-top-grid,
  #tab-registrar .rg-top-grid.rg-queue-off{grid-template-columns:1fr;transition:none}
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-card{transform:none}
  #tab-registrar .rg-queue-hint{max-height:none}
}

html[data-theme="dark"] #tab-registrar .rg-queue-hint{
    border-color:#2a4968!important;
    background:linear-gradient(135deg,#12283f 0%,#0d1e32 100%)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
html[data-theme="dark"] #tab-registrar .rg-queue-hint strong{color:#f2f7ff!important}
html[data-theme="dark"] #tab-registrar .rg-queue-hint p{color:#9bb0c7!important}
html[data-theme="dark"] #tab-registrar .rg-queue-hint-kicker{color:#61a1ff!important}

/* En ADMIN la cola está oculta: Datos de la gestión recupera todo el ancho. */
#tab-registrar .rg-top-grid:has(.rg-queue-card.hidden){
    grid-template-columns:1fr!important;
}
#tab-registrar .rg-top-grid:has(.rg-queue-card.hidden) .rg-data-card{width:100%}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.9 · Ajuste fino Cola ON/OFF
   OFF: Proyecto + Fecha + recomendación quedan en una sola línea.
   ON: Datos compactos y Cola protagonista.
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-data-fields{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
}

#tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(245px,1.08fr);
    grid-template-rows:auto auto;
    column-gap:12px;
    row-gap:10px;
    align-items:end;
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-card-kicker{
    grid-column:1/-1;
    grid-row:1;
    align-self:start;
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields{
    display:contents;
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields .rg-field{
    grid-row:2;
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
    grid-column:3;
    grid-row:2;
    margin-top:0;
    min-height:74px;
    max-height:110px;
    height:100%;
    padding:9px 10px 8px 12px;
    grid-template-columns:minmax(0,1fr) 82px;
    align-self:stretch;
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint img{
    width:94px;
    height:94px;
    transform:translate(2px,9px);
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint strong{font-size:.71rem}
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint p{font-size:.59rem;line-height:1.35}

/* El switch se comporta como un control real: limpio, amplio y sin borde rojo. */
#tab-registrar .rg-queue-switch{
    gap:8px;
    color:#334b68;
    font-size:.64rem;
    font-weight:850;
}
#tab-registrar .rg-queue-switch .rg-switch{
    width:44px;
    height:24px;
    border-radius:999px;
    background:#c8d3e0;
    border:1px solid #b7c4d3;
    box-shadow:inset 0 1px 2px rgba(22,51,90,.10);
    position:relative;
    flex:0 0 auto;
    transition:background .24s ease,border-color .24s ease,box-shadow .24s ease;
}
#tab-registrar .rg-queue-switch .rg-switch::after{
    content:"";
    position:absolute;
    top:3px;
    left:3px;
    width:16px;
    height:16px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 2px 5px rgba(15,35,60,.22);
    transition:transform .24s cubic-bezier(.22,.61,.36,1);
}
#tab-registrar .rg-queue-switch input:checked + .rg-switch{
    background:#159b6d;
    border-color:#12865f;
    box-shadow:inset 0 1px 2px rgba(0,0,0,.10),0 0 0 3px rgba(21,155,109,.09);
}
#tab-registrar .rg-queue-switch input:checked + .rg-switch::after{
    transform:translateX(20px);
}
#tab-registrar .rg-queue-switch input:focus-visible + .rg-switch{
    outline:3px solid rgba(47,109,246,.20);
    outline-offset:2px;
}
#tab-registrar .rg-queue-switch:hover .rg-switch{border-color:#8fa8c2}
#tab-registrar .rg-queue-switch input:checked:hover + .rg-switch{border-color:#0e7b56}

/* En ADMIN no hay cola ni recomendación de cola. */
#tab-registrar .rg-top-grid:has(.rg-queue-card.hidden) .rg-queue-hint{display:none!important}

html[data-theme="dark"] #tab-registrar .rg-queue-switch{color:#d7e4f2!important}
html[data-theme="dark"] #tab-registrar .rg-queue-switch .rg-switch{background:#263b53;border-color:#3b5570;box-shadow:inset 0 1px 2px rgba(0,0,0,.25)}
html[data-theme="dark"] #tab-registrar .rg-queue-switch input:checked + .rg-switch{background:#159b6d;border-color:#159b6d}

@media (max-width:1100px) and (min-width:901px){
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
      grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
      grid-column:1/-1;
      grid-row:3;
  }
}
@media (max-width:900px){
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
      display:block;
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields{
      display:grid;
      grid-template-columns:1fr 1fr;
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
      margin-top:12px;
      min-height:92px;
  }
}
@media (max-width:600px){
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields{grid-template-columns:1fr}
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.9 · AJUSTE FINAL DE SELECTORES
   Base: 1.0.0.4.9_COLA_LAYOUT_SWITCH

   OFF  → Proyecto + Fecha en línea, centrados y con la recomendación lateral.
   ON   → Datos de la gestión compacto: Proyecto arriba, Fecha abajo.
   La animación exterior existente NO se modifica.
   ═══════════════════════════════════════════════════════════════════════ */

/* Estado ON: el bloque compacto necesita que los controles vuelvan a su
   estructura vertical natural. */
#tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-card{
    display:block;
}

#tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-fields{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:12px;
}

#tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-fields .rg-field{
    width:100%;
    min-width:0;
}

/* Estado OFF: tres zonas equilibradas dentro de Datos de la gestión.
   Proyecto y Fecha comparten una fila; no se fuerza ningún desplazamiento
   extraño cuando la tarjeta cambia de tamaño. */
#tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(255px,0.95fr);
    grid-template-rows:auto auto;
    column-gap:14px;
    row-gap:10px;
    /* OFF: los selectores deben quedar centrados verticalmente con
       la cápsula de recomendación, no pegados al borde inferior. */
    align-items:center;
}

#tab-registrar .rg-top-grid.rg-queue-off .rg-card-kicker{
    grid-column:1/-1;
    grid-row:1;
    align-self:start;
}

#tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields{
    display:contents;
}

#tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields .rg-field{
    grid-row:2;
    width:100%;
    min-width:0;
}

#tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields .rg-field label{
    display:block;
    margin-bottom:5px;
}

/* La recomendación conserva una geometría compacta y estable a la derecha. */
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
    grid-column:3;
    grid-row:2;
    width:100%;
    min-width:0;
    min-height:76px;
    max-height:104px;
    height:100%;
    margin:0;
    padding:9px 10px 8px 12px;
    grid-template-columns:minmax(0,1fr) 88px;
    align-self:stretch;
}

#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint-copy{
    min-width:0;
    align-self:center;
}

#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint img{
    width:98px;
    height:98px;
    max-width:none;
    align-self:end;
    justify-self:end;
    transform:translate(1px,8px);
}

/* Evita que un tercer campo administrativo rompa la fila de Proyecto/Fecha.
   En ADMIN el campo gestor ocupa el ancho completo de su propia fila. */
#tab-registrar .rg-top-grid.rg-queue-off .rg-admin-gestor-field{
    grid-column:1/-1;
    grid-row:3;
}

@media (max-width:1100px) and (min-width:901px){
    #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    }
    #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
        grid-column:1/-1;
        grid-row:3;
    }
    #tab-registrar .rg-top-grid.rg-queue-off .rg-admin-gestor-field{
        grid-column:1/-1;
        grid-row:4;
    }
}

@media (max-width:900px){
    #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card,
    #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-card{
        display:block;
    }

    #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields,
    #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-fields{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
        width:100%;
        margin-top:12px;
        min-height:92px;
        max-height:none;
        display:grid;
    }
}

@media (max-width:600px){
    #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields,
    #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-fields{
        grid-template-columns:1fr;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.11 · Registrar / Cola ON · Altura natural de tarjetas
   Cuando la Cola Inteligente está encendida, las tarjetas no deben
   estirarse en Y por el comportamiento stretch del grid padre.
   Cada card conserva únicamente la altura que necesita su contenido.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid:not(.rg-queue-off){
    align-items:start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.10 · Registrar / Cola OFF · Alineación vertical final
   Proyecto y Fecha se centran respecto a la cápsula de recomendación.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
    align-items:center;
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields .rg-field{
    align-self:center;
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
    align-self:center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.12 · Registrar / Cola ON · Datos sin estiramiento
   La tarjeta de Datos de la gestión debe conservar su altura natural
   independientemente de la altura de la tarjeta de Cola Inteligente.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-card{
    align-self:start;
    height:max-content;
    min-height:0;
  }

  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-queue-hint{
    display:none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.13 · Registrar / Cola ON · Alineación de cards
   En escritorio, Datos de la gestión conserva la misma altura visual
   que la tarjeta de Cola Inteligente. No se estira por contenido vacío.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-card{
    height:236px;
    min-height:236px;
    max-height:236px;
    box-sizing:border-box;
    align-self:start;
  }
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.14 · Registrar / Cola ON · Altura acoplada
   La Cola Inteligente se estira únicamente para igualar la altura natural
   de Datos de la gestión, sin modificar la altura de Datos.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-queue-card{
    align-self:stretch;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.15 · Registrar / Cola ON · Altura simétrica definitiva
   La card de Cola Inteligente debe acoplarse exactamente a Datos de la
   gestión. Ambas usan la misma altura de referencia en escritorio.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-queue-card{
    height:236px;
    min-height:236px;
    max-height:236px;
    box-sizing:border-box;
    align-self:start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.16 · Registrar / Cola ON · Cards realmente simétricas
   En escritorio, ambas tarjetas pertenecen a la misma fila del grid y
   deben ocupar exactamente la misma altura. No se fija una altura en px:
   la fila toma la altura real del contenido y ambas cards la comparten.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid:not(.rg-queue-off){
    align-items:stretch;
  }

  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-card,
  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-queue-card{
    height:auto;
    min-height:0;
    max-height:none;
    align-self:stretch;
    box-sizing:border-box;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.17 · Registrar / Transición ON ↔ OFF pulida
   La fila superior anima su ancho y, al cambiar de modo, su altura real.
   Se evita el salto visual producido por intentar transicionar height:auto.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid{
    will-change:grid-template-columns,grid-template-rows;
  }

  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-data-card,
  #tab-registrar .rg-top-grid:not(.rg-queue-off) .rg-queue-card,
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card,
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-card{
    backface-visibility:hidden;
  }
}

@media (prefers-reduced-motion:reduce){
  #tab-registrar .rg-top-grid{transition:none!important;}
  #tab-registrar .rg-data-card,
  #tab-registrar .rg-queue-card,
  #tab-registrar .rg-queue-hint{transition:none!important;}
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.18 · Registrar ADMIN · Datos en línea
   En ADMIN no existe Cola Inteligente: Proyecto, Fecha y Gestor se
   presentan en una sola fila horizontal dentro de Datos de la gestión.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid:has(.rg-queue-card.hidden) .rg-data-card{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:auto auto;
    column-gap:14px;
    row-gap:10px;
    align-items:center;
    width:100%;
    box-sizing:border-box;
  }

  #tab-registrar .rg-top-grid:has(.rg-queue-card.hidden) .rg-card-kicker{
    grid-column:1/-1;
    grid-row:1;
    align-self:start;
  }

  #tab-registrar .rg-top-grid:has(.rg-queue-card.hidden) .rg-data-fields{
    display:contents;
  }

  #tab-registrar .rg-top-grid:has(.rg-queue-card.hidden) .rg-data-fields .rg-field{
    grid-row:2;
    width:100%;
    min-width:0;
    align-self:center;
  }

  #tab-registrar .rg-top-grid:has(.rg-queue-card.hidden) .rg-data-fields .rg-field label{
    display:block;
    margin-bottom:5px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.0.0.4.18 · Transición Registrar · render estable
   La fila es la única superficie que anima su geometría; las cards no
   interpolan propiedades que puedan competir con el reflow del grid.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid{
    contain:layout style;
    transform:translateZ(0);
  }
}

/* El modal de bienvenida nunca debe mostrarse en estado parcialmente cargado. */
.agenda-login-modal.hidden{display:none!important;}

.rg-info-classification{margin:0 0 .8rem;padding:.8rem;border:1px solid #dbeafe;border-radius:.7rem;background:#f8fbff}.rg-info-classification>label{display:block;margin-bottom:.45rem;font-size:.78rem;font-weight:700;color:#1e293b}.rg-info-classification-row{display:flex;align-items:center;gap:.5rem}.rg-info-classification-row .rg-select{flex:1;min-width:0}.rg-info-add-btn{width:2.4rem;height:2.4rem;border:1px solid #bfdbfe;border-radius:.65rem;background:#fff;color:#1557a6;font-size:1.3rem;font-weight:700;cursor:pointer}.rg-info-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.6rem;min-height:1.8rem}.rg-info-chip{border:1px solid #bfdbfe;background:#fff;color:#17365d;border-radius:999px;padding:.35rem .6rem;font:600 .72rem/1.1 inherit;cursor:pointer}.rg-info-chip span{margin-left:.3rem;opacity:.65}.rg-info-classification>small{display:block;margin-top:.45rem;color:#64748b;font-size:.68rem}
/* BETA 1.0.0.4.24 · Clasificación Información incompleta: disponible para GESTOR y ADMIN. */
#tab-registrar .rg-info-classification.hidden{display:none!important}
html[data-theme="dark"] #tab-registrar .rg-info-classification,
body.dark #tab-registrar .rg-info-classification{background:linear-gradient(180deg,#13243b,#101d30);border-color:#294361;color:#eef5ff}
html[data-theme="dark"] #tab-registrar .rg-info-classification>label,
body.dark #tab-registrar .rg-info-classification>label{color:#eef5ff}
html[data-theme="dark"] #tab-registrar .rg-info-classification>small,
body.dark #tab-registrar .rg-info-classification>small{color:#a8bad0}
html[data-theme="dark"] #tab-registrar .rg-info-add-btn,
body.dark #tab-registrar .rg-info-add-btn{background:#14243a;border-color:#3a5c84;color:#9ec2ff}
html[data-theme="dark"] #tab-registrar .rg-info-chip,
body.dark #tab-registrar .rg-info-chip{background:#162945;border-color:#3b5d86;color:#e7f0fb}


/* BETA 1.0.0.4.25 · Registrar / Info incompleta · aislamiento de layout GESTOR
   Refuerza la composición del selector multicausa para evitar que reglas
   heredadas del shell del gestor desplacen el botón + fuera de la fila.
*/
#tab-registrar .rg-info-classification-row{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:stretch !important;
  gap:.5rem !important;
  width:100% !important;
  min-width:0 !important;
}
#tab-registrar .rg-info-classification-row > .rg-select{
  display:block !important;
  position:static !important;
  flex:1 1 auto !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 !important;
  transform:none !important;
}
#tab-registrar .rg-info-classification-row > .rg-info-add-btn{
  display:inline-flex !important;
  position:static !important;
  flex:0 0 2.4rem !important;
  width:2.4rem !important;
  min-width:2.4rem !important;
  max-width:2.4rem !important;
  height:2.4rem !important;
  margin:0 !important;
  padding:0 !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  border-radius:.65rem !important;
  transform:none !important;
}
#tab-registrar .rg-info-chips{
  width:100% !important;
  min-width:0 !important;
  overflow:visible !important;
}
#tab-registrar .rg-info-chips .rg-info-chip{
  position:static !important;
  transform:none !important;
  margin:0 !important;
}
@media (max-width:600px){
  #tab-registrar .rg-info-classification-row > .rg-info-add-btn{
    flex-basis:2.4rem !important;
    width:2.4rem !important;
    min-width:2.4rem !important;
  }
}


/* BETA 1.1 · Retroceder + bloqueo de seguimientos pendientes */
#tab-registrar .rg-queue-actions{flex-wrap:wrap}
#tab-registrar #rg-queue-back{order:1}
#tab-registrar #rg-queue-release{order:2}
#tab-registrar #rg-queue-open{order:3}
#tab-registrar #rg-queue-back:disabled{opacity:.38;cursor:not-allowed;transform:none}

.rg-agenda-blocker{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:24px}
.rg-agenda-blocker.hidden{display:none!important}
.rg-agenda-blocker-backdrop{position:absolute;inset:0;background:rgba(8,24,42,.58);backdrop-filter:blur(4px)}
.rg-agenda-blocker-card{position:relative;width:min(620px,calc(100vw - 32px));max-height:min(760px,calc(100vh - 48px));overflow:auto;background:#fff;border:1px solid #d7e1ec;border-radius:22px;box-shadow:0 28px 80px rgba(10,35,65,.28);padding:25px}
.rg-agenda-blocker-icon{width:46px;height:46px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#fff4df;border:1px solid #f1d49b;color:#a96800;font-size:1.25rem;font-weight:900;float:left;margin:0 14px 8px 0}
.rg-agenda-blocker-copy{min-height:56px}
.rg-agenda-blocker-kicker{display:block;font-size:.62rem;letter-spacing:.12em;font-weight:900;color:#b06b00;margin-bottom:4px}
.rg-agenda-blocker-copy h3{margin:0;color:#17375e;font-size:1.05rem;line-height:1.25}
.rg-agenda-blocker-copy p{clear:both;margin:15px 0 17px;color:#61758d;font-size:.78rem;line-height:1.5}
.rg-agenda-blocker-list{display:flex;flex-direction:column;gap:9px;max-height:360px;overflow:auto;padding-right:2px}
.rg-agenda-pending-item{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:11px;align-items:center;text-align:left;border:1px solid #dbe5ef;background:#f8fbfe;border-radius:13px;padding:11px 12px;cursor:pointer;transition:.16s ease}
.rg-agenda-pending-item:hover{border-color:#9fb9d4;background:#f2f7fc;transform:translateY(-1px)}
.rg-agenda-pending-icon{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#e8f1fb;color:#245d95;font-weight:900;font-size:.75rem}
.rg-agenda-pending-main{min-width:0}
.rg-agenda-pending-main strong{display:block;color:#17375e;font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-agenda-pending-main span{display:block;color:#71849a;font-size:.64rem;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-agenda-pending-date{text-align:right;color:#48647f;font-size:.64rem;font-weight:800;white-space:nowrap}
.rg-agenda-blocker-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:18px;padding-top:15px;border-top:1px solid #e6edf4}
.rg-agenda-blocker-footer small{color:#7b8ea3;font-size:.62rem;line-height:1.35}
html[data-theme="dark"] .rg-agenda-blocker-card{background:#102039;border-color:#29435f;box-shadow:0 28px 80px rgba(0,0,0,.42)}
html[data-theme="dark"] .rg-agenda-blocker-copy h3{color:#f3f7ff}
html[data-theme="dark"] .rg-agenda-blocker-copy p,.rg-agenda-blocker-footer small{color:#a6b8cb}
html[data-theme="dark"] .rg-agenda-pending-item{background:#142a43;border-color:#2d4864}
html[data-theme="dark"] .rg-agenda-pending-item:hover{background:#18314d;border-color:#426788}
html[data-theme="dark"] .rg-agenda-pending-main strong{color:#f0f5fb}
html[data-theme="dark"] .rg-agenda-pending-main span,html[data-theme="dark"] .rg-agenda-pending-date{color:#a9bbcd}
html[data-theme="dark"] .rg-agenda-pending-icon{background:#1b3553;color:#9fc5ed}
@media(max-width:600px){
  .rg-agenda-blocker{padding:12px}
  .rg-agenda-blocker-card{padding:19px;border-radius:18px}
  .rg-agenda-pending-item{grid-template-columns:34px minmax(0,1fr)}
  .rg-agenda-pending-date{grid-column:2;text-align:left}
  .rg-agenda-blocker-footer{align-items:stretch;flex-direction:column}
  .rg-agenda-blocker-footer button{width:100%}
}


/* ═══════════════════════════════════════════════════════════════════
   BETA 1.2.2.2 · Telefonía UX: métricas + selector de número
   ═══════════════════════════════════════════════════════════════════ */
body.rg-modal-open{overflow:hidden!important}
.rg-phone-picker-layer{z-index:5200!important;padding:clamp(14px,3vw,34px)!important;background:rgba(7,23,44,.64)!important;backdrop-filter:blur(8px) saturate(115%)!important;-webkit-backdrop-filter:blur(8px) saturate(115%)!important}
.rg-phone-modal{width:min(680px,calc(100vw - 28px))!important;max-width:680px!important;max-height:min(82vh,760px)!important;padding:0!important;overflow:hidden!important;border:1px solid rgba(203,216,232,.95)!important;border-radius:24px!important;background:#fff!important;box-shadow:0 32px 90px rgba(6,25,52,.34),0 2px 10px rgba(6,25,52,.08)!important}
.rg-phone-modal-head{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:22px;padding:24px 26px 21px;background:linear-gradient(135deg,#f8fbff 0%,#eef5ff 100%);border-bottom:1px solid #dce7f3}
.rg-phone-modal-title-wrap{min-width:0}.rg-phone-modal-kicker{display:flex;align-items:center;gap:8px;margin-bottom:7px;color:#2454a4;font-size:10px;font-weight:950;letter-spacing:.13em;text-transform:uppercase}.rg-phone-live-dot{width:8px;height:8px;border-radius:50%;background:#4388ff;box-shadow:0 0 0 5px rgba(67,136,255,.12)}
.rg-phone-modal-head h2{margin:0!important;color:#102a4e!important;font-size:25px!important;line-height:1.15;font-weight:900!important;letter-spacing:-.025em}.rg-phone-modal-head p{max-width:540px;margin:7px 0 0;color:#60758f;font-size:12.5px;line-height:1.55}
.rg-phone-modal-close{flex:0 0 auto;width:38px;height:38px;border:1px solid #d5e1ee;border-radius:12px;background:rgba(255,255,255,.8);color:#63788f;font-size:25px;line-height:1;cursor:pointer;display:grid;place-items:center;transition:.18s ease;box-shadow:0 5px 14px rgba(19,55,94,.06)}.rg-phone-modal-close:hover{background:#fff;color:#153a68;border-color:#b7cce3;transform:translateY(-1px)}
.rg-phone-modal-body{max-height:calc(min(82vh,760px) - 126px);overflow:auto;padding:20px 26px 24px;scrollbar-width:thin;scrollbar-color:#b8c9dc transparent}
.rg-phone-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.rg-phone-section-head>div{display:flex;flex-direction:column;gap:3px}.rg-phone-section-head span{font-size:10px;font-weight:950;letter-spacing:.11em;color:#284b7b}.rg-phone-section-head small{font-size:11px;color:#8293a8}.rg-phone-count{min-width:30px;height:26px;padding:0 9px;border-radius:999px;background:#edf4ff;color:#2c65c8!important;display:grid;place-items:center;font-size:11px!important;font-weight:900!important;letter-spacing:0!important}
.rg-phone-list{display:flex;flex-direction:column;gap:10px;margin:0!important}
.rg-phone-option{display:flex!important;align-items:stretch!important;gap:8px!important;width:100%!important;padding:0!important;border:1px solid #dde7f1!important;background:#fff!important;border-radius:15px!important;cursor:default!important;text-align:left!important;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;box-shadow:0 2px 8px rgba(18,47,82,.025)}
.rg-phone-option:hover{transform:translateY(-1px)!important;border-color:#a9c7ef!important;background:#fff!important;box-shadow:0 10px 24px rgba(31,83,147,.08)!important}.rg-phone-option.is-selected{border-color:#5b91e8!important;box-shadow:0 0 0 3px rgba(72,132,229,.11),0 10px 24px rgba(31,83,147,.08)!important;background:linear-gradient(90deg,#f6faff,#fff)!important}
.rg-phone-select{appearance:none;-webkit-appearance:none;min-width:0;flex:1;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 13px 14px 15px;border:0!important;background:transparent!important;color:inherit;text-align:left;cursor:pointer;font:inherit;border-radius:0!important;box-shadow:none!important}.rg-phone-select:focus-visible{outline:3px solid rgba(54,123,232,.25);outline-offset:-3px}
.rg-phone-option-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#eef5ff;color:#2b69ce;font-size:16px;border:1px solid #dfebfb}.rg-phone-option.is-selected .rg-phone-option-icon{background:#e7f1ff;color:#1557bc;border-color:#c9ddfb}
.rg-phone-option-main{min-width:0;display:flex!important;flex-direction:column!important;gap:3px!important}.rg-phone-option-title{display:flex;align-items:center;gap:8px;min-width:0}.rg-phone-option-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#122b4e!important;font-size:13px!important;font-weight:850}.rg-phone-option-title em{font-style:normal;font-size:8px;font-weight:950;letter-spacing:.08em;color:#176a50;background:#e8f8f2;border:1px solid #c6eadc;border-radius:999px;padding:3px 6px;white-space:nowrap}.rg-phone-option-main small{color:#71849a!important;font-size:11px!important;line-height:1.35}.rg-phone-option-main small b{font-weight:500;color:#b0bece}.rg-phone-dial-preview{color:#3f6da5!important;font-size:9.5px!important;font-weight:700}.rg-phone-option-arrow{color:#2e70d8!important;font-size:18px!important;font-weight:900;line-height:1}.rg-phone-option.is-selected .rg-phone-option-arrow{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#e5f6ef;color:#13805d!important;font-size:13px!important}
.rg-phone-delete{appearance:none;-webkit-appearance:none;flex:0 0 auto;align-self:center;margin-right:11px;padding:7px 9px;border:1px solid transparent;background:transparent;color:#8493a5;border-radius:10px;cursor:pointer;display:flex;align-items:center;gap:5px;font:inherit;transition:.18s ease}.rg-phone-delete span{font-size:18px;line-height:1}.rg-phone-delete b{font-size:9px;font-weight:850;letter-spacing:.04em}.rg-phone-delete:hover{color:#b52a3c;background:#fff1f3;border-color:#f3cbd2}
.rg-phone-empty{min-height:130px;border:1px dashed #c8d8e9;border-radius:15px;background:#f9fbfe;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;color:#7c8fa6}.rg-phone-empty>span{width:38px;height:38px;border-radius:12px;background:#edf4ff;color:#3a72c8;display:grid;place-items:center;margin-bottom:8px;font-size:16px}.rg-phone-empty strong{font-size:12px;color:#294766}.rg-phone-empty small{font-size:10px;margin-top:4px}.rg-phone-empty.is-error>span{background:#fff0f2;color:#b12e41}
.rg-phone-add{margin-top:18px!important;padding:17px!important;border:1px solid #dbe7f3!important;border-radius:16px;background:linear-gradient(135deg,#f8fbff,#f5f9fd);border-top:1px solid #dbe7f3!important}.rg-phone-add-copy{display:flex;flex-direction:column;gap:3px;margin-bottom:11px}.rg-phone-add-copy span{font-size:9px;font-weight:950;letter-spacing:.11em;color:#315884}.rg-phone-add-copy small{font-size:10.5px;color:#8192a5}.rg-phone-add-grid{display:grid!important;grid-template-columns:minmax(0,1fr) 158px!important;gap:9px!important}.rg-phone-input-wrap{display:flex;align-items:center;border:1px solid #ccd9e7;border-radius:11px;background:#fff;overflow:hidden;transition:.18s ease}.rg-phone-input-wrap:focus-within{border-color:#6193e3;box-shadow:0 0 0 3px rgba(67,126,219,.12)}.rg-phone-input-wrap>span{flex:0 0 auto;padding:0 0 0 13px;color:#667b93;font-size:12px;font-weight:850}.rg-phone-input-wrap .rg-input{border:0!important;box-shadow:none!important;background:transparent!important;padding-left:7px!important;min-height:42px}.rg-phone-add-grid .btn{min-height:42px;border-radius:11px;font-size:10px;font-weight:900;letter-spacing:.035em}

/* Métricas de una llamada realmente conectada. */
.rg-call-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:12px;padding:0!important}.rg-call-metrics.hidden{display:none!important}.rg-call-metrics>div{position:relative;min-width:0;padding:11px 12px;border:1px solid #dfe8f2;border-radius:12px;background:#f8fbff;overflow:hidden}.rg-call-metrics>div::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#8cb6ef}.rg-call-metrics>div:nth-child(3)::before{background:#4fb18d}.rg-call-metrics>div:nth-child(4)::before{background:#9b8bdc}.rg-call-metrics span{display:block;margin-bottom:4px;color:#8495a9;font-size:8px;font-weight:950;letter-spacing:.1em;text-transform:uppercase}.rg-call-metrics strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#17365c;font-size:11.5px;font-weight:900;font-variant-numeric:tabular-nums}
.rg-call-recording{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;margin-top:12px;padding:13px 14px;border:1px solid #cfe9df;border-radius:13px;background:linear-gradient(135deg,#f2fbf7,#f8fcff)}.rg-call-recording.hidden{display:none!important}.rg-recording-copy{display:flex;flex-direction:column;gap:3px}.rg-recording-copy span{font-size:8px;font-weight:950;letter-spacing:.1em;color:#238261}.rg-recording-copy strong{font-size:11px;color:#315b51}.rg-recording-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}.rg-recording-actions audio{height:34px;width:min(260px,30vw)}.rg-recording-actions .btn{min-width:auto!important;padding:9px 11px;font-size:9px}

@media(max-width:760px){.rg-phone-modal-head{padding:20px 18px 17px}.rg-phone-modal-body{padding:16px 18px 20px}.rg-phone-add-grid{grid-template-columns:1fr!important}.rg-call-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.rg-call-recording{grid-template-columns:1fr}.rg-recording-actions{justify-content:flex-start}.rg-recording-actions audio{width:100%}.rg-phone-delete b{display:none}.rg-phone-delete{padding:7px;margin-right:7px}.rg-phone-select{grid-template-columns:36px minmax(0,1fr) auto;padding:12px 8px 12px 10px}.rg-phone-option-icon{width:36px;height:36px}}

html[data-theme="dark"] .rg-phone-modal,body.dark .rg-phone-modal{background:#101d2f!important;border-color:#304862!important;color:#f4f8fd!important}html[data-theme="dark"] .rg-phone-modal-head,body.dark .rg-phone-modal-head{background:linear-gradient(135deg,#13243a,#102036);border-color:#2b435e}html[data-theme="dark"] .rg-phone-modal-head h2,body.dark .rg-phone-modal-head h2{color:#f5f9ff!important}html[data-theme="dark"] .rg-phone-modal-head p,body.dark .rg-phone-modal-head p,html[data-theme="dark"] .rg-phone-section-head small,body.dark .rg-phone-section-head small{color:#9fb0c5}html[data-theme="dark"] .rg-phone-modal-close,body.dark .rg-phone-modal-close{background:#172a42;color:#cbd8e6;border-color:#36526e}html[data-theme="dark"] .rg-phone-option,body.dark .rg-phone-option{background:#122237!important;border-color:#2d4662!important}html[data-theme="dark"] .rg-phone-option:hover,body.dark .rg-phone-option:hover{background:#162a43!important;border-color:#4979ae!important}html[data-theme="dark"] .rg-phone-option.is-selected,body.dark .rg-phone-option.is-selected{background:linear-gradient(90deg,#142a45,#122237)!important;border-color:#4f84cf!important}html[data-theme="dark"] .rg-phone-option-main strong,body.dark .rg-phone-option-main strong{color:#f3f8ff!important}html[data-theme="dark"] .rg-phone-option-main small,body.dark .rg-phone-option-main small{color:#9fb0c5!important}html[data-theme="dark"] .rg-phone-option-icon,body.dark .rg-phone-option-icon{background:#182f4c;color:#9fc3ff;border-color:#294b70}html[data-theme="dark"] .rg-phone-delete:hover,body.dark .rg-phone-delete:hover{background:#3a1e29;border-color:#6d3445;color:#ff9bab}html[data-theme="dark"] .rg-phone-add,body.dark .rg-phone-add{background:linear-gradient(135deg,#12243a,#102035);border-color:#2d4662!important}html[data-theme="dark"] .rg-phone-input-wrap,body.dark .rg-phone-input-wrap{background:#0d1a2b;border-color:#36516d}html[data-theme="dark"] .rg-phone-input-wrap .rg-input,body.dark .rg-phone-input-wrap .rg-input{color:#f1f6fc!important}html[data-theme="dark"] .rg-phone-empty,body.dark .rg-phone-empty{background:#102035;border-color:#36516d;color:#9fb0c5}html[data-theme="dark"] .rg-phone-empty strong,body.dark .rg-phone-empty strong{color:#dce8f6}html[data-theme="dark"] #tab-registrar .rg-call-metrics>div,body.dark #tab-registrar .rg-call-metrics>div{background:#102035;border-color:#2d4662}html[data-theme="dark"] #tab-registrar .rg-call-metrics strong,body.dark #tab-registrar .rg-call-metrics strong{color:#eef5fd}html[data-theme="dark"] #tab-registrar .rg-call-recording,body.dark #tab-registrar .rg-call-recording{background:linear-gradient(135deg,#102b29,#102035);border-color:#2b5c53}html[data-theme="dark"] #tab-registrar .rg-recording-copy strong,body.dark #tab-registrar .rg-recording-copy strong{color:#c9e8df}

/* Compatibilidad: el selector histórico del expediente usa las mismas clases,
   pero otra estructura. Evitamos que el rediseño de Registrar lo deforme. */
#phone-picker-modal .rg-phone-modal{width:min(560px,100%)!important;max-width:560px!important;max-height:90vh!important;padding:27px!important;overflow:auto!important;border-radius:20px!important;background:#fff!important}
#phone-picker-modal .rg-phone-list{display:flex!important;flex-direction:column!important;gap:.55rem!important;margin:1rem 0!important}
#phone-picker-modal .rg-phone-option{width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:1rem!important;padding:.8rem .9rem!important;border:1px solid #e2e8f0!important;background:#fff!important;border-radius:.65rem!important;cursor:pointer!important;text-align:left!important;box-shadow:none!important}
#phone-picker-modal .rg-phone-option:hover{border-color:#93c5fd!important;background:#f8fbff!important;transform:translateY(-1px)!important}
#phone-picker-modal .rg-phone-add{border:0!important;border-top:1px solid #e5e7eb!important;border-radius:0!important;background:transparent!important;padding:.85rem 0 0!important;margin-top:.8rem!important}
#phone-picker-modal .rg-phone-add-grid{display:grid!important;grid-template-columns:1fr 150px!important;gap:.6rem!important}
html[data-theme="dark"] #phone-picker-modal .rg-phone-modal,body.dark #phone-picker-modal .rg-phone-modal{background:#101d2f!important;border-color:#304862!important}
html[data-theme="dark"] #phone-picker-modal .rg-phone-option,body.dark #phone-picker-modal .rg-phone-option{background:#0e1a2b!important;border-color:#304860!important;color:#f3f7ff!important}

/* BETA 1.2.2.4 · consola telefónica unificada */
#tab-registrar .rg-call-live-label{
  min-height:58px;padding:0 20px;border-radius:15px;display:inline-flex;align-items:center;gap:11px;
  border:1px solid #bfdbfe;background:#eff6ff;color:#123663;font-size:.82rem;font-weight:900;letter-spacing:.035em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)
}
#tab-registrar .rg-call-live-label.hidden{display:none!important}
#tab-registrar .rg-call-live-pulse{width:10px;height:10px;border-radius:50%;background:#3b82f6;box-shadow:0 0 0 0 rgba(59,130,246,.35);animation:rgCallPulse 1.6s infinite}
#tab-registrar .rg-call-live-label.is-connected{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
#tab-registrar .rg-call-live-label.is-connected .rg-call-live-pulse{background:#22c55e;box-shadow:0 0 0 0 rgba(34,197,94,.35)}
@keyframes rgCallPulse{0%{box-shadow:0 0 0 0 currentColor}65%{box-shadow:0 0 0 7px transparent}100%{box-shadow:0 0 0 0 transparent}}
#tab-registrar .rg-call-box.calling .rg-call-actions{align-items:center}
#tab-registrar .rg-call-box.calling #reg-call-hangup{min-height:58px}
html[data-theme="dark"] #tab-registrar .rg-call-live-label,body.dark #tab-registrar .rg-call-live-label{background:#14253a;border-color:#365776;color:#dbeafe}
html[data-theme="dark"] #tab-registrar .rg-call-live-label.is-connected,body.dark #tab-registrar .rg-call-live-label.is-connected{background:#102b22;border-color:#2f6f57;color:#bbf7d0}

/* BETA 1.2.3.2 · Gestión transaccional llamada → resultado → guardado */
.rg-unsaved-call-modal{position:fixed;inset:0;z-index:1260;display:flex;align-items:center;justify-content:center;padding:24px}
.rg-unsaved-call-modal.hidden{display:none!important}
.rg-unsaved-call-backdrop{position:absolute;inset:0;background:rgba(7,20,39,.62);backdrop-filter:blur(5px)}
.rg-unsaved-call-card{position:relative;width:min(590px,calc(100vw - 32px));background:#fff;border:1px solid #d9e3ef;border-radius:22px;box-shadow:0 30px 90px rgba(10,35,65,.3);padding:25px}
.rg-unsaved-call-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:15px;background:#fff1e8;border:1px solid #f1c9ae;color:#b84f0b;font-size:1.35rem;font-weight:950;float:left;margin:0 14px 10px 0}
.rg-unsaved-call-copy{min-height:58px}
.rg-unsaved-call-kicker{display:block;font-size:.62rem;letter-spacing:.13em;font-weight:950;color:#b84f0b;margin-bottom:4px}
.rg-unsaved-call-copy h3{margin:0;color:#17375e;font-size:1.08rem;line-height:1.25}
.rg-unsaved-call-copy p{clear:both;margin:16px 0 15px;color:#61758d;font-size:.79rem;line-height:1.55}
.rg-unsaved-call-warning{display:flex;flex-direction:column;gap:5px;padding:13px 14px;border:1px solid #f0d7c5;background:#fff9f5;border-radius:14px;color:#6c4a35}
.rg-unsaved-call-warning strong{font-size:.72rem;color:#7a3a12}
.rg-unsaved-call-warning span{font-size:.72rem;line-height:1.45}
.rg-unsaved-call-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid #e7edf5}
.rg-discard-btn{background:#a94313;color:#fff;border:1px solid #a94313;box-shadow:none}
.rg-discard-btn:hover{background:#8f3710;border-color:#8f3710}
html[data-theme="dark"] .rg-unsaved-call-card{background:#102039;border-color:#29435f;box-shadow:0 30px 90px rgba(0,0,0,.45)}
html[data-theme="dark"] .rg-unsaved-call-copy h3{color:#f3f7ff}
html[data-theme="dark"] .rg-unsaved-call-copy p{color:#a8bbcf}
html[data-theme="dark"] .rg-unsaved-call-warning{background:#271d19;border-color:#5e4030;color:#d8beae}
html[data-theme="dark"] .rg-unsaved-call-warning strong{color:#f2b48c}
@media(max-width:680px){.rg-unsaved-call-modal{padding:12px}.rg-unsaved-call-card{padding:19px;border-radius:18px}.rg-unsaved-call-actions{flex-direction:column-reverse}.rg-unsaved-call-actions button{width:100%}}
.rg-result-box.rg-step-locked{border-style:dashed;opacity:.78}
.rg-result-box.rg-step-locked .rg-step-index{filter:grayscale(.25);opacity:.72}
.rg-result-box.rg-step-locked .rg-result-select:disabled{cursor:not-allowed;background:rgba(236,242,249,.72);color:#8091a7}
html[data-theme="dark"] .rg-result-box.rg-step-locked .rg-result-select:disabled{background:#15273e;color:#758ba4}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.3 · Gestión por correo / Outlook
   ═══════════════════════════════════════════════════════════════════════ */
.rg-action-btn--email{background:linear-gradient(135deg,#0c4a6e,#0f6f9f);border-color:transparent;color:#fff;box-shadow:0 10px 24px rgba(14,116,144,.20)}
.rg-action-btn--email:hover{border-color:transparent;box-shadow:0 12px 26px rgba(14,116,144,.26)}
.rg-action-btn:disabled{opacity:.55;cursor:not-allowed;transform:none!important;box-shadow:none!important}
.rg-email-contact{display:flex;align-items:center;gap:14px;border:1px solid #bfe7d8;background:linear-gradient(180deg,#f7fffb,#f1fbf7);border-radius:16px;padding:14px 16px;box-shadow:0 8px 22px rgba(16,128,91,.07)}
.rg-email-contact.hidden{display:none!important}
.rg-email-contact-icon{width:38px;height:38px;border-radius:12px;background:#dff7ec;color:#13845f;display:flex;align-items:center;justify-content:center;font-weight:950;font-size:1rem;flex:0 0 auto}
.rg-email-contact-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.rg-email-contact-copy>span,.rg-email-contact-meta>span{font-size:.61rem;letter-spacing:.13em;font-weight:950;color:#208366}
.rg-email-contact-copy strong{font-size:.8rem;color:#17375e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-email-contact-copy small{font-size:.72rem;color:#61758d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rg-email-contact-meta{display:flex;flex-direction:column;align-items:flex-end;gap:2px;min-width:150px}
.rg-email-contact-meta strong{font-size:.72rem;color:#17375e;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.rg-email-modal{position:fixed;inset:0;z-index:1270;display:flex;align-items:center;justify-content:center;padding:22px}
.rg-email-modal.hidden{display:none!important}
.rg-email-modal-backdrop{position:absolute;inset:0;background:rgba(7,20,39,.64);backdrop-filter:blur(6px)}
.rg-email-modal-card{position:relative;width:min(760px,calc(100vw - 30px));max-height:calc(100vh - 34px);overflow:auto;background:#fff;border:1px solid #d8e4f1;border-radius:22px;box-shadow:0 32px 100px rgba(8,34,65,.34);padding:24px}
.rg-email-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:17px;border-bottom:1px solid #e5edf6}
.rg-email-modal-kicker{display:block;font-size:.62rem;letter-spacing:.14em;font-weight:950;color:#0f6f9f;margin-bottom:4px}
.rg-email-modal-head h3{margin:0;color:#17375e;font-size:1.18rem}
.rg-email-modal-head p{margin:6px 0 0;color:#6b7f96;font-size:.76rem;line-height:1.48;max-width:620px}
.rg-email-close{border:0;background:#eff4f9;color:#49627e;width:36px;height:36px;border-radius:11px;font-size:1.35rem;line-height:1;cursor:pointer;flex:0 0 auto}
.rg-email-account{margin:17px 0 14px;padding:13px 14px;border:1px solid #dce7f2;background:#f8fbfe;border-radius:14px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.rg-email-account>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.rg-email-account span{font-size:.59rem;letter-spacing:.12em;color:#7890aa;font-weight:950}
.rg-email-account strong{font-size:.78rem;color:#17375e}
.rg-email-account small{font-size:.69rem;color:#6b7f96}
.rg-email-config-warning{display:flex;flex-direction:column;gap:3px;padding:12px 14px;border-radius:13px;border:1px solid #f1d59f;background:#fff9ec;color:#76551b;margin-bottom:14px}
.rg-email-config-warning.hidden{display:none!important}
.rg-email-config-warning strong{font-size:.75rem}.rg-email-config-warning span{font-size:.69rem;line-height:1.4}
.rg-email-form{display:flex;flex-direction:column;gap:13px}
.rg-email-form label{display:flex;flex-direction:column;gap:6px;color:#344e6d;font-size:.72rem;font-weight:850}
.rg-email-body{min-height:210px;resize:vertical;line-height:1.5;font-family:inherit}
.rg-email-footnote{font-size:.67rem;color:#71859c;line-height:1.45;padding:10px 12px;border-radius:11px;background:#f6f9fc;border:1px solid #e7edf5}
.rg-email-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:15px;border-top:1px solid #e7edf5}

html[data-theme="dark"] .rg-action-btn--email,body.dark .rg-action-btn--email{background:linear-gradient(135deg,#0c496c,#147ba8);color:#fff;border-color:transparent}
html[data-theme="dark"] .rg-email-contact{background:linear-gradient(180deg,#102a27,#0e2424);border-color:#24564c}
html[data-theme="dark"] .rg-email-contact-copy strong,html[data-theme="dark"] .rg-email-contact-meta strong{color:#eef8ff}
html[data-theme="dark"] .rg-email-contact-copy small{color:#9eb3c8}
html[data-theme="dark"] .rg-email-modal-card{background:#102039;border-color:#29435f;box-shadow:0 32px 100px rgba(0,0,0,.48)}
html[data-theme="dark"] .rg-email-modal-head{border-color:#29435f}
html[data-theme="dark"] .rg-email-modal-head h3,html[data-theme="dark"] .rg-email-account strong{color:#f3f7ff}
html[data-theme="dark"] .rg-email-modal-head p,html[data-theme="dark"] .rg-email-account small{color:#a8bbcf}
html[data-theme="dark"] .rg-email-close{background:#182e49;color:#dbe8f6}
html[data-theme="dark"] .rg-email-account{background:#14263c;border-color:#2b4664}
html[data-theme="dark"] .rg-email-form label{color:#c4d4e4}
html[data-theme="dark"] .rg-email-footnote{background:#13243a;border-color:#29435f;color:#9eb3c8}
html[data-theme="dark"] .rg-email-config-warning{background:#2a2418;border-color:#5d4d27;color:#dec894}
@media(max-width:680px){.rg-email-modal{padding:10px}.rg-email-modal-card{padding:18px;border-radius:18px}.rg-email-account{align-items:stretch;flex-direction:column}.rg-email-actions{flex-direction:column-reverse}.rg-email-actions button{width:100%}.rg-email-contact{align-items:flex-start}.rg-email-contact-meta{display:none}}

/* TWILIO LAB 5001 · control nativo solo para el proveedor Twilio */
#tab-registrar #reg-call-hangup.hidden{display:none!important}
#tab-registrar #reg-call-hangup{min-height:58px;font-weight:900;letter-spacing:.02em}


/* RECUPERO · acción finalizar llamada · icon-only */
#tab-registrar .rg-call-actions #reg-call-start.rg-call-icon-btn,
#tab-registrar .rg-call-actions #reg-call-hangup.rg-call-icon-btn{
    appearance:none!important;-webkit-appearance:none!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    width:58px!important;height:58px!important;min-width:58px!important;max-width:58px!important;
    min-height:58px!important;padding:0!important;margin:0!important;border:0!important;
    border-radius:50%!important;background:transparent!important;box-shadow:none!important;
    overflow:visible!important;font-size:0!important;line-height:0!important;letter-spacing:0!important;
    text-indent:-9999px!important;color:transparent!important;flex:0 0 58px!important;
}
#tab-registrar .rg-call-actions #reg-call-start.rg-call-icon-btn img,
#tab-registrar .rg-call-actions #reg-call-hangup.rg-call-icon-btn img{
    display:block!important;width:58px!important;height:58px!important;max-width:none!important;object-fit:contain!important;
}
#tab-registrar .rg-call-actions #reg-call-hangup.rg-call-icon-btn:focus-visible{box-shadow:0 0 0 4px rgba(239,68,68,.20)!important}
#tab-registrar .rg-call-actions #reg-call-hangup.rg-call-icon-btn.hidden{display:none!important}
#tab-registrar .rg-call-actions #reg-call-phone,
#tab-registrar .rg-call-actions #rg-call-history{min-width:150px}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.24 · Telefonía RECUPERO · consola circular en llamada
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-call-actions{display:flex;align-items:center;gap:14px;min-height:66px}
#tab-registrar .rg-call-secondary-actions{margin-left:auto;display:flex;flex-direction:column;gap:6px;width:184px;max-width:42vw}
#tab-registrar .rg-call-secondary-btn{appearance:none;border:1px solid #d6e1ee;background:#fff;color:#17365c;border-radius:10px;min-height:34px;padding:7px 11px;display:flex;align-items:center;justify-content:flex-start;gap:8px;font:800 9px/1.1 inherit;letter-spacing:.035em;cursor:pointer;box-shadow:0 3px 10px rgba(15,35,65,.035);transition:.16s ease;text-align:left}
#tab-registrar .rg-call-secondary-btn span{width:17px;height:17px;border-radius:6px;background:#eef5ff;color:#2e6bc5;display:grid;place-items:center;font-size:10px;flex:0 0 auto}
#tab-registrar .rg-call-secondary-btn:hover{border-color:#9ebce7;background:#fbfdff;transform:translateY(-1px);box-shadow:0 6px 15px rgba(37,99,235,.08)}
#tab-registrar .rg-call-secondary-btn.hidden{display:none!important}

#tab-registrar .rg-call-live-orb{display:none;position:relative;width:min(540px,92%);aspect-ratio:1;margin:8px auto 12px;align-items:center;justify-content:center;border-radius:50%;background:radial-gradient(circle at 50% 42%,#fff 0 58%,#fbfffc 72%,#f4fbf7 100%);border:1px solid #d8e5df;box-shadow:0 0 0 14px rgba(34,197,94,.025),0 0 55px rgba(68,167,92,.18),inset 0 0 0 1px rgba(255,255,255,.9);animation:rgCallOrbIn .28s ease both}
#tab-registrar .rg-call-live-orb::before{content:'';position:absolute;inset:10px;border-radius:50%;border:1px solid rgba(49,119,190,.11);pointer-events:none}
#tab-registrar .rg-call-live-orb::after{content:'';position:absolute;left:-28px;top:50%;width:92px;height:92px;transform:translateY(-50%);border-radius:50%;border:1px solid rgba(91,170,71,.18);background:rgba(255,255,255,.94);box-shadow:0 0 24px rgba(85,169,74,.14);pointer-events:none}
@keyframes rgCallOrbIn{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
#tab-registrar .rg-call-live-orb-inner{position:relative;z-index:2;width:74%;display:flex;align-items:center;flex-direction:column;text-align:center}
#tab-registrar .rg-call-live-icon{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;background:#eaf8e8;margin-bottom:12px;box-shadow:0 6px 18px rgba(72,166,64,.12)}
#tab-registrar .rg-call-live-icon img{width:38px;height:38px;object-fit:contain}
#tab-registrar .rg-call-live-kicker{font-size:9px;font-weight:950;letter-spacing:.1em;color:#8799b0}
#tab-registrar .rg-call-live-number{margin-top:5px;color:#112f5c;font-size:28px;line-height:1;font-weight:950;letter-spacing:.015em;font-variant-numeric:tabular-nums}
#tab-registrar .rg-call-live-type{margin-top:7px;color:#7c8fa6;font-size:11px}
#tab-registrar .rg-call-live-divider{width:68%;height:1px;background:#dce6ef;margin:15px 0 10px}
#tab-registrar .rg-call-live-timer{font-size:47px;line-height:1;font-weight:950;color:#102f5c;font-variant-numeric:tabular-nums;letter-spacing:.02em}
#tab-registrar .rg-call-live-label{margin-top:10px;min-width:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:12px!important;color:#24933a!important}
#tab-registrar .rg-call-live-label .rg-call-live-pulse{width:8px;height:8px;background:#33a93f;box-shadow:0 0 0 5px rgba(51,169,63,.10)}
#tab-registrar .rg-call-live-cost-card{width:min(310px,100%);margin-top:18px;padding:12px 15px;border:1px solid #cfe3d3;border-radius:13px;background:linear-gradient(135deg,#f4fbf5,#fbfefe);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;text-align:left;box-shadow:0 7px 20px rgba(42,135,62,.05)}
#tab-registrar .rg-call-live-cost-card>div{display:flex;flex-direction:column;gap:3px}
#tab-registrar .rg-call-live-cost-card span{font-size:8px;font-weight:950;letter-spacing:.1em;color:#7b90a5}
#tab-registrar .rg-call-live-cost-card strong{font-size:24px;line-height:1;color:#22853a;font-weight:950;font-variant-numeric:tabular-nums}
#tab-registrar .rg-call-live-cost-card small{max-width:120px;color:#6e8198;font-size:8px;line-height:1.35;text-align:right}
#tab-registrar .rg-call-live-orb #reg-call-hangup{margin-top:15px!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;display:inline-flex!important}
#tab-registrar .rg-call-live-orb #reg-call-hangup.hidden{display:none!important}

#tab-registrar .rg-call-box.calling{padding-bottom:18px!important;background:radial-gradient(circle at 50% 52%,rgba(242,253,246,.95),rgba(255,255,255,.98) 62%)!important;border-color:#cfe7d6!important}
#tab-registrar .rg-call-box.calling .rg-call-target,
#tab-registrar .rg-call-box.calling>.rg-call-actions,
#tab-registrar .rg-call-box.calling>.rg-call-metrics,
#tab-registrar .rg-call-box.calling>.rg-call-note,
#tab-registrar .rg-call-box.calling>.rg-call-recording,
#tab-registrar .rg-call-box.calling .rg-call-live-orb{display:flex}

#tab-registrar .rg-call-metrics>div:nth-child(4)::before{background:#8b5cf6}

html[data-theme="dark"] #tab-registrar .rg-call-secondary-btn,body.dark #tab-registrar .rg-call-secondary-btn{background:#13253a;border-color:#2d4662;color:#e9f2fc}
html[data-theme="dark"] #tab-registrar .rg-call-secondary-btn span,body.dark #tab-registrar .rg-call-secondary-btn span{background:#1a3655;color:#a8c9ff}
html[data-theme="dark"] #tab-registrar .rg-call-live-orb,body.dark #tab-registrar .rg-call-live-orb{background:radial-gradient(circle at 50% 42%,#14283d 0 58%,#102237 78%,#0e1c2e 100%);border-color:#2a4b5c;box-shadow:0 0 0 14px rgba(34,197,94,.025),0 0 55px rgba(42,148,83,.12)}
html[data-theme="dark"] #tab-registrar .rg-call-live-number,html[data-theme="dark"] #tab-registrar .rg-call-live-timer,body.dark #tab-registrar .rg-call-live-number,body.dark #tab-registrar .rg-call-live-timer{color:#f1f7ff}
html[data-theme="dark"] #tab-registrar .rg-call-live-divider,body.dark #tab-registrar .rg-call-live-divider{background:#31506c}
html[data-theme="dark"] #tab-registrar .rg-call-live-cost-card,body.dark #tab-registrar .rg-call-live-cost-card{background:linear-gradient(135deg,#112f2a,#14283b);border-color:#28594b}
html[data-theme="dark"] #tab-registrar .rg-call-live-cost-card strong,body.dark #tab-registrar .rg-call-live-cost-card strong{color:#73d77e}

@media(max-width:720px){
  #tab-registrar .rg-call-secondary-actions{width:165px;max-width:56vw}
  #tab-registrar .rg-call-live-orb{width:min(470px,96%)}
  #tab-registrar .rg-call-live-number{font-size:23px}
  #tab-registrar .rg-call-live-timer{font-size:40px}
  #tab-registrar .rg-call-live-cost-card{grid-template-columns:1fr;text-align:center}
  #tab-registrar .rg-call-live-cost-card small{max-width:none;text-align:center}
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.25 · llamada modal + modo gestión compacto
   ═══════════════════════════════════════════════════════════════════════ */
body.rg-call-overlay-open{overflow:hidden!important}
#tab-registrar .rg-call-live-backdrop{display:none;position:fixed;inset:0;z-index:12040;background:rgba(11,31,54,.24);backdrop-filter:blur(9px) saturate(.88);-webkit-backdrop-filter:blur(9px) saturate(.88)}
#tab-registrar .rg-call-box.calling:not(.call-compact) .rg-call-live-backdrop{display:block;animation:rgCallBackdropIn .22s ease both}
@keyframes rgCallBackdropIn{from{opacity:0}to{opacity:1}}

#tab-registrar .rg-call-box.calling:not(.call-compact) .rg-call-live-orb{
    display:flex!important;position:fixed!important;left:50%!important;top:50%!important;z-index:12050!important;
    width:min(620px,82vh,88vw)!important;height:auto!important;aspect-ratio:1!important;margin:0!important;
    transform:translate(-50%,-50%);box-shadow:0 0 0 18px rgba(52,180,84,.045),0 28px 80px rgba(14,48,82,.23),0 0 55px rgba(68,167,92,.18),inset 0 0 0 1px rgba(255,255,255,.92)!important;
    animation:rgCallOrbBounceIn .58s cubic-bezier(.22,.85,.25,1.15) both!important;
}
#tab-registrar .rg-call-box.calling:not(.call-compact) .rg-call-live-orb.rg-call-orb-reenter{animation:rgCallOrbBounceIn .58s cubic-bezier(.22,.85,.25,1.15) both!important}
@keyframes rgCallOrbBounceIn{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.72)}
  58%{opacity:1;transform:translate(-50%,-50%) scale(1.045)}
  78%{transform:translate(-50%,-50%) scale(.975)}
  100%{opacity:1;transform:translate(-50%,-50%) scale(1)}
}
#tab-registrar .rg-call-live-orb::after{display:none!important}
#tab-registrar .rg-call-live-side-bubble{position:absolute;left:-48px;top:50%;transform:translateY(-50%);width:104px;height:104px;border-radius:50%;background:rgba(255,255,255,.98);border:1px solid rgba(91,170,71,.20);box-shadow:0 0 0 13px rgba(79,169,67,.045),0 8px 30px rgba(67,153,61,.16);display:grid;place-items:center;z-index:4}
#tab-registrar .rg-call-live-side-bubble img{width:76px;height:76px;object-fit:contain;display:block}
#tab-registrar .rg-call-live-icon{display:none!important}
#tab-registrar .rg-call-live-orb-inner{width:72%!important}
#tab-registrar .rg-call-live-controls{display:flex;flex-direction:column;align-items:center;gap:9px;margin-top:14px}
#tab-registrar .rg-call-live-orb #reg-call-hangup{margin-top:0!important}
#tab-registrar .rg-call-go-management{appearance:none;border:1px solid #d7e2ee;background:rgba(255,255,255,.92);color:#234d78;border-radius:999px;padding:8px 18px;min-width:126px;font:900 9px/1 inherit;letter-spacing:.065em;cursor:pointer;box-shadow:0 4px 14px rgba(17,59,98,.055);transition:.16s ease}
#tab-registrar .rg-call-go-management:hover{background:#f7fbff;border-color:#9ebfe7;transform:translateY(-1px);box-shadow:0 7px 18px rgba(37,99,235,.11)}

/* Modo compacto: libera Registrar y deja un control flotante persistente. */
#tab-registrar .rg-call-box.calling.call-compact{padding-bottom:18px!important;background:#fff!important;border-color:#d9e4f1!important}
#tab-registrar .rg-call-box.calling.call-compact .rg-call-live-backdrop,
#tab-registrar .rg-call-box.calling.call-compact .rg-call-live-orb{display:none!important}
#tab-registrar .rg-call-box.calling.call-compact .rg-call-target,
#tab-registrar .rg-call-box.calling.call-compact>.rg-call-actions,
#tab-registrar .rg-call-box.calling.call-compact>.rg-call-metrics,
#tab-registrar .rg-call-box.calling.call-compact>.rg-call-note,
#tab-registrar .rg-call-box.calling.call-compact>.rg-call-recording,
#tab-registrar .rg-call-mini{display:none;position:fixed;right:22px;bottom:20px;z-index:11980;width:260px;min-height:84px;padding:13px 13px 13px 16px;border:1px solid #ceddeb;border-radius:17px;background:rgba(255,255,255,.97);box-shadow:0 18px 48px rgba(18,55,92,.22),0 3px 12px rgba(16,54,93,.10);align-items:center;gap:14px;cursor:pointer;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);animation:rgCallMiniIn .28s cubic-bezier(.2,.85,.3,1.12) both}
#tab-registrar .rg-call-box.calling.call-compact .rg-call-mini{display:flex}
@keyframes rgCallMiniIn{from{opacity:0;transform:translateY(18px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
#tab-registrar .rg-call-mini-copy{display:flex;min-width:0;flex:1;flex-direction:column;align-items:flex-start}
#tab-registrar .rg-call-mini-copy>span{font-size:8px;font-weight:950;letter-spacing:.09em;color:#4f6f93}
#tab-registrar .rg-call-mini-copy>strong{margin-top:3px;font-size:24px;line-height:1;color:#112f5c;font-weight:950;font-variant-numeric:tabular-nums}
#tab-registrar .rg-call-mini-copy>small{margin-top:4px;color:#778da5;font-size:9px}
#tab-registrar .rg-call-mini-copy b{color:#24833a;font-size:11px;font-weight:950;font-variant-numeric:tabular-nums}
#tab-registrar .rg-call-mini-hangup{appearance:none;width:48px;height:48px;min-width:48px;border:0;border-radius:50%;padding:0;background:transparent;cursor:pointer;display:grid;place-items:center;transition:transform .15s ease,filter .15s ease}
#tab-registrar .rg-call-mini-hangup:hover{transform:scale(1.06);filter:brightness(1.03)}
#tab-registrar .rg-call-mini-hangup img{display:block;width:48px;height:48px;object-fit:contain}
#tab-registrar .rg-call-mini-hangup:disabled{opacity:.45;cursor:not-allowed;transform:none}

html[data-theme="dark"] #tab-registrar .rg-call-live-backdrop,body.dark #tab-registrar .rg-call-live-backdrop{background:rgba(2,12,24,.52)}
html[data-theme="dark"] #tab-registrar .rg-call-live-side-bubble,body.dark #tab-registrar .rg-call-live-side-bubble{background:#152a3d;border-color:#315645}
html[data-theme="dark"] #tab-registrar .rg-call-go-management,body.dark #tab-registrar .rg-call-go-management{background:#162b40;border-color:#34506d;color:#dbeaff}
html[data-theme="dark"] #tab-registrar .rg-call-box.calling.call-compact,body.dark #tab-registrar .rg-call-box.calling.call-compact{background:#102033!important;border-color:#29445e!important}
html[data-theme="dark"] #tab-registrar .rg-call-mini,body.dark #tab-registrar .rg-call-mini{background:rgba(16,34,52,.97);border-color:#31506d;box-shadow:0 18px 48px rgba(0,0,0,.38)}
html[data-theme="dark"] #tab-registrar .rg-call-mini-copy>strong,body.dark #tab-registrar .rg-call-mini-copy>strong{color:#eef6ff}

@media(max-width:720px){
  #tab-registrar .rg-call-box.calling:not(.call-compact) .rg-call-live-orb{width:min(540px,78vh,86vw)!important}
  #tab-registrar .rg-call-live-side-bubble{left:-34px;width:82px;height:82px}
  #tab-registrar .rg-call-live-side-bubble img{width:60px;height:60px}
  #tab-registrar .rg-call-mini{right:12px;bottom:12px;width:min(270px,calc(100vw - 24px))}
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.26 · llamada en portal real de viewport
   Los tres nodos se mueven directamente a <body> para evitar que transforms,
   overflow o stacking contexts de Registrar recorten el modal.
   ═══════════════════════════════════════════════════════════════════════ */
body.rg-call-overlay-open{overflow:hidden!important}
body>.rg-call-live-backdrop{
  display:none;position:fixed!important;inset:0!important;z-index:24000!important;
  background:rgba(9,27,49,.30)!important;backdrop-filter:blur(10px) saturate(.88)!important;
  -webkit-backdrop-filter:blur(10px) saturate(.88)!important;opacity:0;
}
body.rg-call-overlay-open>.rg-call-live-backdrop{display:block!important;animation:rgCallBackdropIn .22s ease both!important}

body>.rg-call-live-orb{
  display:none!important;position:fixed!important;left:50%!important;top:50%!important;z-index:24010!important;
  width:min(620px,82vh,88vw)!important;height:auto!important;aspect-ratio:1!important;margin:0!important;
  align-items:center!important;justify-content:center!important;border-radius:50%!important;
  background:radial-gradient(circle at 50% 42%,#fff 0 58%,#fbfffc 72%,#f4fbf7 100%)!important;
  border:1px solid #d8e5df!important;
  box-shadow:0 0 0 18px rgba(52,180,84,.045),0 28px 80px rgba(14,48,82,.23),0 0 55px rgba(68,167,92,.18),inset 0 0 0 1px rgba(255,255,255,.92)!important;
  transform:translate(-50%,-50%);overflow:visible!important;
}
body.rg-call-overlay-open>.rg-call-live-orb{display:flex!important;animation:rgCallOrbBounceIn .58s cubic-bezier(.22,.85,.25,1.15) both!important}
body.rg-call-overlay-open>.rg-call-live-orb.rg-call-orb-reenter{animation:rgCallOrbBounceIn .58s cubic-bezier(.22,.85,.25,1.15) both!important}
body>.rg-call-live-orb::before{content:'';position:absolute;inset:10px;border-radius:50%;border:1px solid rgba(49,119,190,.11);pointer-events:none}
body>.rg-call-live-orb::after{display:none!important}
body>.rg-call-live-orb .rg-call-live-side-bubble{position:absolute;left:-48px;top:50%;transform:translateY(-50%);width:104px;height:104px;border-radius:50%;background:rgba(255,255,255,.98);border:1px solid rgba(91,170,71,.20);box-shadow:0 0 0 13px rgba(79,169,67,.045),0 8px 30px rgba(67,153,61,.16);display:grid;place-items:center;z-index:4}
body>.rg-call-live-orb .rg-call-live-side-bubble img{width:76px;height:76px;object-fit:contain;display:block}
body>.rg-call-live-orb .rg-call-live-orb-inner{position:relative;z-index:2;width:72%!important;display:flex;align-items:center;flex-direction:column;text-align:center}
body>.rg-call-live-orb .rg-call-live-kicker{font-size:9px;font-weight:950;letter-spacing:.1em;color:#8799b0}
body>.rg-call-live-orb .rg-call-live-number{margin-top:5px;color:#112f5c;font-size:28px;line-height:1;font-weight:950;letter-spacing:.015em;font-variant-numeric:tabular-nums}
body>.rg-call-live-orb .rg-call-live-type{margin-top:7px;color:#7c8fa6;font-size:11px}
body>.rg-call-live-orb .rg-call-live-divider{width:68%;height:1px;background:#dce6ef;margin:15px 0 10px}
body>.rg-call-live-orb .rg-call-live-timer{font-size:47px;line-height:1;font-weight:950;color:#102f5c;font-variant-numeric:tabular-nums;letter-spacing:.02em}
body>.rg-call-live-orb .rg-call-live-label{margin-top:10px;min-width:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:12px!important;color:#24933a!important}
body>.rg-call-live-orb .rg-call-live-label .rg-call-live-pulse{width:8px;height:8px;background:#33a93f;box-shadow:0 0 0 5px rgba(51,169,63,.10)}
body>.rg-call-live-orb .rg-call-live-cost-card{width:min(310px,100%);margin-top:18px;padding:12px 15px;border:1px solid #cfe3d3;border-radius:13px;background:linear-gradient(135deg,#f4fbf5,#fbfefe);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;text-align:left;box-shadow:0 7px 20px rgba(42,135,62,.05)}
body>.rg-call-live-orb .rg-call-live-cost-card>div{display:flex;flex-direction:column;gap:3px}
body>.rg-call-live-orb .rg-call-live-cost-card span{font-size:8px;font-weight:950;letter-spacing:.1em;color:#7b90a5}
body>.rg-call-live-orb .rg-call-live-cost-card strong{font-size:24px;line-height:1;color:#22853a;font-weight:950;font-variant-numeric:tabular-nums}
body>.rg-call-live-orb .rg-call-live-cost-card small{max-width:120px;color:#6e8198;font-size:8px;line-height:1.35;text-align:right}
body>.rg-call-live-orb .rg-call-live-controls{display:flex;flex-direction:column;align-items:center;gap:9px;margin-top:14px}
body>.rg-call-live-orb #reg-call-hangup{margin-top:0!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;display:inline-flex!important}
body>.rg-call-live-orb #reg-call-hangup.hidden{display:none!important}
body>.rg-call-live-orb .rg-call-go-management{appearance:none;border:1px solid #d7e2ee;background:rgba(255,255,255,.92);color:#234d78;border-radius:999px;padding:8px 18px;min-width:126px;font:900 9px/1 inherit;letter-spacing:.065em;cursor:pointer;box-shadow:0 4px 14px rgba(17,59,98,.055);transition:.16s ease}
body>.rg-call-live-orb .rg-call-go-management:hover{background:#f7fbff;border-color:#9ebfe7;transform:translateY(-1px);box-shadow:0 7px 18px rgba(37,99,235,.11)}

body>.rg-call-mini{display:none!important;position:fixed!important;right:22px!important;bottom:20px!important;z-index:23990!important;width:260px;min-height:84px;padding:13px 13px 13px 16px;border:1px solid #ceddeb;border-radius:17px;background:rgba(255,255,255,.97);box-shadow:0 18px 48px rgba(18,55,92,.22),0 3px 12px rgba(16,54,93,.10);align-items:center;gap:14px;cursor:pointer;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
body.rg-call-compact-open>.rg-call-mini{display:flex!important;animation:rgCallMiniIn .28s cubic-bezier(.2,.85,.3,1.12) both!important}
body>.rg-call-mini .rg-call-mini-copy{display:flex;min-width:0;flex:1;flex-direction:column;align-items:flex-start}
body>.rg-call-mini .rg-call-mini-copy>span{font-size:8px;font-weight:950;letter-spacing:.09em;color:#4f6f93}
body>.rg-call-mini .rg-call-mini-copy>strong{margin-top:3px;font-size:24px;line-height:1;color:#112f5c;font-weight:950;font-variant-numeric:tabular-nums}
body>.rg-call-mini .rg-call-mini-copy>small{margin-top:4px;color:#778da5;font-size:9px}
body>.rg-call-mini .rg-call-mini-copy b{color:#24833a;font-size:11px;font-weight:950;font-variant-numeric:tabular-nums}
body>.rg-call-mini .rg-call-mini-hangup{appearance:none;width:48px;height:48px;min-width:48px;border:0;border-radius:50%;padding:0;background:transparent;cursor:pointer;display:grid;place-items:center;transition:transform .15s ease,filter .15s ease}
body>.rg-call-mini .rg-call-mini-hangup:hover{transform:scale(1.06);filter:brightness(1.03)}
body>.rg-call-mini .rg-call-mini-hangup img{display:block;width:48px;height:48px;object-fit:contain}
body>.rg-call-mini .rg-call-mini-hangup:disabled{opacity:.45;cursor:not-allowed;transform:none}

html[data-theme="dark"] body>.rg-call-live-backdrop,body.dark>.rg-call-live-backdrop{background:rgba(2,12,24,.58)!important}
html[data-theme="dark"] body>.rg-call-live-orb,body.dark>.rg-call-live-orb{background:radial-gradient(circle at 50% 42%,#14283d 0 58%,#102237 78%,#0e1c2e 100%)!important;border-color:#2a4b5c!important;box-shadow:0 0 0 14px rgba(34,197,94,.025),0 0 55px rgba(42,148,83,.12)!important}
html[data-theme="dark"] body>.rg-call-live-orb .rg-call-live-number,html[data-theme="dark"] body>.rg-call-live-orb .rg-call-live-timer,body.dark>.rg-call-live-orb .rg-call-live-number,body.dark>.rg-call-live-orb .rg-call-live-timer{color:#f1f7ff}
html[data-theme="dark"] body>.rg-call-live-orb .rg-call-live-divider,body.dark>.rg-call-live-orb .rg-call-live-divider{background:#31506c}
html[data-theme="dark"] body>.rg-call-live-orb .rg-call-live-cost-card,body.dark>.rg-call-live-orb .rg-call-live-cost-card{background:linear-gradient(135deg,#112f2a,#14283b);border-color:#28594b}
html[data-theme="dark"] body>.rg-call-live-orb .rg-call-live-cost-card strong,body.dark>.rg-call-live-orb .rg-call-live-cost-card strong{color:#73d77e}
html[data-theme="dark"] body>.rg-call-live-orb .rg-call-live-side-bubble,body.dark>.rg-call-live-orb .rg-call-live-side-bubble{background:#152a3d;border-color:#315645}
html[data-theme="dark"] body>.rg-call-live-orb .rg-call-go-management,body.dark>.rg-call-live-orb .rg-call-go-management{background:#162b40;border-color:#34506d;color:#dbeaff}
html[data-theme="dark"] body>.rg-call-mini,body.dark>.rg-call-mini{background:rgba(16,34,52,.97);border-color:#31506d;box-shadow:0 18px 48px rgba(0,0,0,.38)}
html[data-theme="dark"] body>.rg-call-mini .rg-call-mini-copy>strong,body.dark>.rg-call-mini .rg-call-mini-copy>strong{color:#eef6ff}

@media(max-width:720px){
  body>.rg-call-live-orb{width:min(540px,78vh,86vw)!important}
  body>.rg-call-live-orb .rg-call-live-side-bubble{left:-34px;width:82px;height:82px}
  body>.rg-call-live-orb .rg-call-live-side-bubble img{width:60px;height:60px}
  body>.rg-call-live-orb .rg-call-live-number{font-size:23px}
  body>.rg-call-live-orb .rg-call-live-timer{font-size:40px}
  body>.rg-call-live-orb .rg-call-live-cost-card{grid-template-columns:1fr;text-align:center}
  body>.rg-call-live-orb .rg-call-live-cost-card small{max-width:none;text-align:center}
  body>.rg-call-mini{right:12px!important;bottom:12px!important;width:min(270px,calc(100vw - 24px))}
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.27 · Telefonía RECUPERO · estados estáticos premium
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-call-box{padding:18px!important;border-radius:20px!important;background:linear-gradient(180deg,#fff,#fbfdff)!important;box-shadow:0 14px 38px rgba(25,55,92,.08)!important;overflow:visible!important}
#tab-registrar .rg-call-head{margin:0 0 16px;padding:0 2px}
#tab-registrar .rg-call-title{font-size:13px!important;letter-spacing:.06em!important;font-weight:950!important;color:#123575!important}
#tab-registrar .rg-client-status{padding:6px 12px!important;border-radius:999px!important;font-size:9px!important;font-weight:950!important;letter-spacing:.06em!important}
#tab-registrar .rg-call-status-ready{background:#f2faee!important;color:#17315e!important;border:1px solid #d8ead1!important}
#tab-registrar .rg-call-status-success{background:#f0faef!important;color:#27882f!important;border:1px solid #cfe7ca!important}
#tab-registrar .rg-call-status-muted{background:#f5f7fa!important;color:#17315e!important;border:1px solid #dde5ef!important}
#tab-registrar .rg-call-static-shell{display:block}
#tab-registrar .rg-call-box.calling .rg-call-static-shell{display:none!important}
#tab-registrar .rg-call-summary-card{display:grid;grid-template-columns:minmax(330px,1.1fr) minmax(0,2fr);align-items:stretch;border:1px solid #d8e4f1;border-radius:16px;background:#fff;box-shadow:0 7px 20px rgba(19,48,87,.045);overflow:hidden;min-height:150px}
#tab-registrar .rg-call-number-cell{display:flex;align-items:center;gap:18px;padding:24px 26px;min-width:0}
#tab-registrar .rg-call-summary-phone-icon{width:68px;height:68px;flex:0 0 68px;border-radius:50%;display:grid;place-items:center;background:#f0fae9}
#tab-registrar .rg-call-summary-phone-icon img{width:60px;height:60px;object-fit:contain}
#tab-registrar .rg-call-number-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
#tab-registrar .rg-call-number-copy span,#tab-registrar .rg-call-summary-stat span{font-size:10px;font-weight:950;letter-spacing:.08em;color:#7487a2}
#tab-registrar .rg-call-number-copy strong{font-size:29px;line-height:1.08;color:#0f2f66;font-weight:950;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tab-registrar .rg-call-number-copy small{font-size:14px;color:#70849e}
#tab-registrar .rg-call-ready-tips{display:grid;grid-template-columns:repeat(3,1fr);align-items:center}
#tab-registrar .rg-call-tip{min-height:110px;padding:18px 15px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-left:1px dashed #dce5f0}
#tab-registrar .rg-call-tip-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;margin-bottom:10px}
#tab-registrar .rg-call-tip-icon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#tab-registrar .rg-call-tip--blue .rg-call-tip-icon{background:#edf4ff;color:#1f6aec}#tab-registrar .rg-call-tip--green .rg-call-tip-icon{background:#eff9e9;color:#48a624}#tab-registrar .rg-call-tip--purple .rg-call-tip-icon{background:#f3edff;color:#7b3ee9}
#tab-registrar .rg-call-tip p{margin:0;color:#15356a;font-size:12px;line-height:1.45}
#tab-registrar .rg-call-unconnected-summary,#tab-registrar .rg-call-connected-summary{display:none;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center}
#tab-registrar .rg-call-summary-stat{min-height:110px;padding:25px 34px;display:flex;flex-direction:column;justify-content:center;border-left:1px dashed #dce5f0}
#tab-registrar .rg-call-summary-stat strong{margin-top:10px;color:#0d2e63;font-size:24px;line-height:1;font-weight:950}
#tab-registrar .rg-call-summary-stat small{margin-top:8px;color:#7b8da6;font-size:12px}
#tab-registrar .rg-call-summary-stat--cost strong{color:#143169}
#tab-registrar .rg-call-lower-grid{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(330px,1.1fr);gap:34px;align-items:center;margin-top:22px;padding:8px 22px 4px}
#tab-registrar .rg-call-ready-hero{position:relative;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-right:1px solid #e0e8f1}
#tab-registrar .rg-call-ready-button{position:relative;z-index:2;width:108px;height:108px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer;box-shadow:0 0 0 14px rgba(101,174,50,.08),0 0 0 32px rgba(101,174,50,.04);transition:.18s ease}
#tab-registrar .rg-call-ready-button:hover:not(:disabled){transform:scale(1.04)}#tab-registrar .rg-call-ready-button:disabled{opacity:.4;cursor:not-allowed}
#tab-registrar .rg-call-ready-button img{width:108px;height:108px;object-fit:contain}
#tab-registrar .rg-call-ready-hero>strong{margin-top:25px;color:#12326a;font-size:21px;font-weight:950}
#tab-registrar .rg-call-wave{position:absolute;top:78px;width:36%;height:44px;opacity:.28;background:repeating-radial-gradient(ellipse at center,transparent 0 8px,rgba(102,174,53,.22) 9px 10px,transparent 11px 17px);pointer-events:none}
#tab-registrar .rg-call-wave--left{right:62%}#tab-registrar .rg-call-wave--right{left:62%}
#tab-registrar .rg-call-secondary-actions{width:100%!important;max-width:none!important;margin:0!important;display:flex!important;flex-direction:column!important;gap:14px!important}
#tab-registrar .rg-call-secondary-btn{width:100%;min-height:66px!important;border-radius:13px!important;padding:0 18px!important;display:grid!important;grid-template-columns:46px minmax(0,1fr) 24px!important;align-items:center!important;gap:12px!important;text-align:left!important;background:#fff!important;border:1px solid #d8e3ef!important;color:#12326a!important;box-shadow:0 5px 15px rgba(18,50,95,.045)!important;font:inherit!important}
#tab-registrar .rg-call-secondary-btn b{font-size:14px;font-weight:950;letter-spacing:.015em}#tab-registrar .rg-call-secondary-btn i{font-style:normal;font-size:31px;font-weight:300;text-align:right;color:#0b68e8}
#tab-registrar .rg-call-secondary-icon{width:42px!important;height:42px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#edf4ff!important;color:#1769ea!important;font-size:22px!important}
#tab-registrar .rg-call-secondary-btn--primary{background:linear-gradient(135deg,#239909,#4baa1b)!important;border-color:#45a31d!important;color:#fff!important;box-shadow:0 8px 20px rgba(49,150,24,.15)!important}
#tab-registrar .rg-call-secondary-btn--primary .rg-call-secondary-icon{background:#fff!important;color:#379c16!important}#tab-registrar .rg-call-secondary-btn--primary i{color:#fff!important}
#tab-registrar .rg-call-terminal-hero{display:none;min-height:220px;align-items:center;gap:24px;border-right:1px solid #e0e8f1;padding:5px 14px 5px 0}
#tab-registrar .rg-call-retry{display:none;width:265px;max-width:52%;padding:0;border:0;background:transparent;cursor:pointer;transition:.18s ease;flex:0 0 auto}#tab-registrar .rg-call-retry:hover{transform:scale(1.02)}#tab-registrar .rg-call-retry img{display:block;width:100%;height:auto;object-fit:contain}
#tab-registrar .rg-call-success-visual{display:none;position:relative;width:150px;height:150px;flex:0 0 150px;align-items:center;justify-content:center;border-radius:50%;background:radial-gradient(circle,#fff 45%,#f1faee 46% 68%,transparent 69%)}
#tab-registrar .rg-call-success-ring{width:95px;height:95px;border:2px solid #bfe0b7;border-radius:50%;display:grid;place-items:center}#tab-registrar .rg-call-success-ring img{width:82px;height:82px;object-fit:contain}
#tab-registrar .rg-call-success-visual>span{position:absolute;right:16px;bottom:18px;width:38px;height:38px;border-radius:50%;background:#42a523;color:#fff;display:grid;place-items:center;font-size:24px;font-weight:950;box-shadow:0 0 0 6px #fff}
#tab-registrar .rg-call-terminal-copy{min-width:0;display:flex;flex-direction:column;gap:10px}#tab-registrar .rg-call-terminal-copy>strong{font-size:22px;color:#102f65;font-weight:950;line-height:1.15}
#tab-registrar .rg-call-terminal-copy .rg-call-note{margin:0!important;font-size:13px!important;color:#647a98!important;line-height:1.55!important}
#tab-registrar .rg-call-data-bridge,#tab-registrar .rg-call-timer-bridge{display:none!important}
#tab-registrar .rg-call-box.ended .rg-call-ready-tips,#tab-registrar .rg-call-box.ended .rg-call-ready-hero{display:none!important}
#tab-registrar .rg-call-box.ended .rg-call-terminal-hero{display:flex!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary{display:grid!important}#tab-registrar .rg-call-box.call-unconnected .rg-call-connected-summary{display:none!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-summary-phone-icon{display:none!important}#tab-registrar .rg-call-box.call-unconnected .rg-call-retry{display:block!important}#tab-registrar .rg-call-box.call-unconnected .rg-call-success-visual{display:none!important}
#tab-registrar .rg-call-box.call-connected .rg-call-ready-tips,#tab-registrar .rg-call-box.call-connected .rg-call-unconnected-summary{display:none!important}#tab-registrar .rg-call-box.call-connected .rg-call-connected-summary{display:grid!important}
#tab-registrar .rg-call-box.call-connected .rg-call-summary-phone-icon{background:#edf4ff}#tab-registrar .rg-call-box.call-connected .rg-call-summary-phone-icon img{filter:hue-rotate(160deg) saturate(1.3)}
#tab-registrar .rg-call-box.call-connected .rg-call-success-visual{display:flex!important}#tab-registrar .rg-call-box.call-connected .rg-call-retry{display:none!important}
#tab-registrar .rg-call-box.ended #reg-call-start{display:none!important}
#tab-registrar .rg-call-recording{grid-template-columns:56px minmax(170px,.75fr) minmax(280px,1.6fr)!important;gap:18px!important;align-items:center!important;margin-top:24px!important;padding:16px 18px!important;border:1px solid #d7e3f1!important;border-radius:15px!important;background:#fff!important;box-shadow:0 5px 15px rgba(18,50,95,.035)!important}
#tab-registrar .rg-recording-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#edf4ff;color:#1269e8;font-size:27px}
#tab-registrar .rg-recording-copy span{font-size:13px!important;color:#12326a!important;font-weight:950!important;letter-spacing:0!important}#tab-registrar .rg-recording-copy strong{font-size:11px!important;color:#647a98!important;line-height:1.45}
#tab-registrar .rg-recording-actions{display:grid!important;grid-template-columns:minmax(220px,1fr) auto!important;gap:16px!important}#tab-registrar .rg-recording-actions audio{width:100%!important;height:38px!important}#tab-registrar .rg-recording-actions .btn{min-height:42px!important;border-radius:12px!important;padding:10px 15px!important;font-size:10px!important;font-weight:900!important}
@media(max-width:1000px){#tab-registrar .rg-call-summary-card{grid-template-columns:1fr}#tab-registrar .rg-call-ready-tips,#tab-registrar .rg-call-unconnected-summary,#tab-registrar .rg-call-connected-summary{border-top:1px solid #e2e9f2}#tab-registrar .rg-call-lower-grid{grid-template-columns:1fr;gap:18px}#tab-registrar .rg-call-ready-hero,#tab-registrar .rg-call-terminal-hero{border-right:0;border-bottom:1px solid #e2e9f2;padding-bottom:22px}#tab-registrar .rg-call-recording{grid-template-columns:48px 1fr}#tab-registrar .rg-recording-actions{grid-column:1/-1}}
@media(max-width:640px){#tab-registrar .rg-call-ready-tips{grid-template-columns:1fr}#tab-registrar .rg-call-tip{min-height:auto;flex-direction:row;justify-content:flex-start;text-align:left;gap:12px;border-left:0;border-top:1px dashed #dce5f0}#tab-registrar .rg-call-tip-icon{margin:0}#tab-registrar .rg-call-unconnected-summary,#tab-registrar .rg-call-connected-summary{grid-template-columns:1fr}#tab-registrar .rg-call-summary-stat{border-left:0;border-top:1px dashed #dce5f0}#tab-registrar .rg-call-number-copy strong{font-size:23px}#tab-registrar .rg-call-terminal-hero{flex-direction:column;text-align:center}#tab-registrar .rg-call-retry{max-width:85%;width:250px}#tab-registrar .rg-call-recording{grid-template-columns:1fr;text-align:center}#tab-registrar .rg-recording-icon{margin:auto}#tab-registrar .rg-recording-actions{grid-template-columns:1fr}}
html[data-theme="dark"] #tab-registrar .rg-call-summary-card,html[data-theme="dark"] #tab-registrar .rg-call-secondary-btn,html[data-theme="dark"] #tab-registrar .rg-call-recording,body.dark #tab-registrar .rg-call-summary-card,body.dark #tab-registrar .rg-call-secondary-btn,body.dark #tab-registrar .rg-call-recording{background:#12243a!important;border-color:#2d4662!important}html[data-theme="dark"] #tab-registrar .rg-call-number-copy strong,html[data-theme="dark"] #tab-registrar .rg-call-terminal-copy>strong,html[data-theme="dark"] #tab-registrar .rg-call-summary-stat strong,body.dark #tab-registrar .rg-call-number-copy strong,body.dark #tab-registrar .rg-call-terminal-copy>strong,body.dark #tab-registrar .rg-call-summary-stat strong{color:#f1f7ff!important}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.28 · Telefonía estática compacta + simetría visual
   Mantiene la identidad premium de 5.27 sin sobredimensionar el módulo.
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-call-box:not(.calling){
    padding:13px!important;border-radius:17px!important;
    box-shadow:0 10px 28px rgba(25,55,92,.065)!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-head{margin-bottom:10px!important;padding:0 1px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-title{font-size:11px!important;letter-spacing:.055em!important}
#tab-registrar .rg-call-box:not(.calling) .rg-client-status{padding:4px 10px!important;font-size:8px!important}

#tab-registrar .rg-call-box:not(.calling) .rg-call-summary-card{
    grid-template-columns:minmax(270px,.95fr) minmax(0,1.75fr)!important;
    min-height:104px!important;border-radius:13px!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-cell{gap:13px!important;padding:15px 18px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-summary-phone-icon{width:52px!important;height:52px!important;flex-basis:52px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-summary-phone-icon img{width:46px!important;height:46px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy{gap:2px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy span,
#tab-registrar .rg-call-box:not(.calling) .rg-call-summary-stat span{font-size:8px!important;letter-spacing:.075em!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy strong{font-size:22px!important;line-height:1.05!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy small{font-size:10px!important}

#tab-registrar .rg-call-box:not(.calling) .rg-call-tip{min-height:78px!important;padding:10px 9px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-tip-icon{width:34px!important;height:34px!important;margin-bottom:6px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-tip-icon svg{width:19px!important;height:19px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-tip p{font-size:9px!important;line-height:1.35!important}

#tab-registrar .rg-call-box:not(.calling) .rg-call-summary-stat{min-height:78px!important;padding:14px 20px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-summary-stat strong{margin-top:6px!important;font-size:18px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-summary-stat small{margin-top:5px!important;font-size:9px!important}

#tab-registrar .rg-call-box:not(.calling) .rg-call-lower-grid{
    grid-template-columns:minmax(220px,.78fr) minmax(300px,1.22fr)!important;
    gap:22px!important;margin-top:13px!important;padding:3px 12px 2px!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-ready-hero{min-height:122px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-ready-button{
    width:76px!important;height:76px!important;
    box-shadow:0 0 0 10px rgba(101,174,50,.075),0 0 0 22px rgba(101,174,50,.035)!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-ready-button img{width:76px!important;height:76px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-ready-hero>strong{margin-top:15px!important;font-size:15px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-wave{top:52px!important;height:31px!important;opacity:.22!important}

#tab-registrar .rg-call-box:not(.calling) .rg-call-secondary-actions{gap:8px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-secondary-btn{
    min-height:48px!important;border-radius:10px!important;padding:0 12px!important;
    grid-template-columns:32px minmax(0,1fr) 18px!important;gap:9px!important;
    box-shadow:0 3px 10px rgba(18,50,95,.035)!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-secondary-icon{width:30px!important;height:30px!important;font-size:16px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-secondary-btn b{font-size:10.5px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-secondary-btn i{font-size:22px!important}

#tab-registrar .rg-call-box:not(.calling) .rg-call-terminal-hero{
    min-height:136px!important;gap:17px!important;padding:3px 10px 3px 0!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-retry{width:166px!important;max-width:46%!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-success-visual{width:104px!important;height:104px!important;flex-basis:104px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-success-ring{width:68px!important;height:68px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-success-ring img{width:58px!important;height:58px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-success-visual>span{
    right:7px!important;bottom:9px!important;width:28px!important;height:28px!important;font-size:17px!important;box-shadow:0 0 0 4px #fff!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-terminal-copy{gap:6px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-terminal-copy>strong{font-size:16px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-call-terminal-copy .rg-call-note{font-size:10px!important;line-height:1.45!important}

#tab-registrar .rg-call-box:not(.calling) .rg-call-recording{
    grid-template-columns:42px minmax(145px,.65fr) minmax(260px,1.55fr)!important;
    gap:12px!important;margin-top:14px!important;padding:11px 13px!important;border-radius:12px!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-recording-icon{width:38px!important;height:38px!important;font-size:21px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-recording-copy span{font-size:10px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-recording-copy strong{font-size:9px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-recording-actions{grid-template-columns:minmax(190px,1fr) auto!important;gap:10px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-recording-actions audio{height:34px!important}
#tab-registrar .rg-call-box:not(.calling) .rg-recording-actions .btn{min-height:36px!important;padding:8px 12px!important;font-size:9px!important;border-radius:9px!important}

@media(max-width:1000px){
  #tab-registrar .rg-call-box:not(.calling) .rg-call-summary-card{grid-template-columns:1fr!important}
  #tab-registrar .rg-call-box:not(.calling) .rg-call-lower-grid{grid-template-columns:1fr!important;gap:12px!important}
  #tab-registrar .rg-call-box:not(.calling) .rg-call-ready-hero,
  #tab-registrar .rg-call-box:not(.calling) .rg-call-terminal-hero{border-right:0!important;padding-bottom:14px!important}
}
@media(max-width:640px){
  #tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy strong{font-size:19px!important}
  #tab-registrar .rg-call-box:not(.calling) .rg-call-retry{width:150px!important;max-width:80%!important}
  #tab-registrar .rg-call-box:not(.calling) .rg-call-recording{grid-template-columns:1fr!important}
  #tab-registrar .rg-call-box:not(.calling) .rg-recording-actions{grid-template-columns:1fr!important}
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.30 · Telefonía: jerarquía terminal + botones compactos + dark
   ═══════════════════════════════════════════════════════════════════════ */
/* El número ya no necesita iconografía lateral: queda limpio y dominante. */
#tab-registrar .rg-call-summary-phone-icon{display:none!important}
#tab-registrar .rg-call-number-cell{gap:0!important;padding-left:22px!important}
#tab-registrar .rg-call-number-copy{padding-left:0!important}

/* Acciones secundarias más cortas y con identidad diferenciada. */
#tab-registrar .rg-call-secondary-actions{align-items:center!important}
#tab-registrar .rg-call-secondary-btn{width:min(88%,390px)!important;max-width:390px!important}
#tab-registrar .rg-call-secondary-btn--primary{
  background:linear-gradient(135deg,#2877e8,#175bc7)!important;
  border-color:#2d6ed0!important;color:#fff!important;
  box-shadow:0 6px 17px rgba(37,99,180,.16)!important;
}
#tab-registrar .rg-call-secondary-btn--primary .rg-call-secondary-icon{background:rgba(255,255,255,.95)!important;color:#1d63cf!important}
#tab-registrar .rg-call-secondary-btn--primary i{color:#fff!important}
#tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary){
  background:linear-gradient(135deg,#f4f6f8,#e5e9ee)!important;
  border-color:#cbd3dc!important;color:#243b5b!important;
  box-shadow:0 5px 14px rgba(48,65,85,.08)!important;
}
#tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary) .rg-call-secondary-icon{background:#e2e8ef!important;color:#315b91!important}
#tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary) i{color:#5c728d!important}

/* Intento fallido: verde = volver a llamar; gris = información visual. */
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-hero{align-items:center!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-retry{
  display:grid!important;place-items:center!important;
  width:82px!important;height:82px!important;max-width:none!important;flex:0 0 82px!important;
  padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;
  animation:rg-call-retry-pulse 1.65s ease-in-out infinite!important;
  filter:drop-shadow(0 8px 13px rgba(74,155,35,.16));
}
#tab-registrar .rg-call-box.call-unconnected .rg-call-retry img{width:82px!important;height:82px!important;object-fit:contain!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-retry:hover{animation-play-state:paused!important;transform:scale(1.07)!important}
@keyframes rg-call-retry-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.075)}}
#tab-registrar .rg-call-unconnected-visual{display:none;align-items:center;justify-content:flex-start;width:175px;max-width:100%;height:66px;overflow:visible;margin:0 0 7px -9px;pointer-events:none}
#tab-registrar .rg-call-unconnected-visual img{display:block;width:175px;height:auto;object-fit:contain;pointer-events:none;user-select:none}
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-visual{display:flex!important}
#tab-registrar .rg-call-box.call-connected .rg-call-unconnected-visual{display:none!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-copy{padding-top:7px!important;gap:7px!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-copy>strong{margin-top:2px!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-copy .rg-call-note{padding-top:2px!important}

/* Tema oscuro completo de Telefonía RECUPERO estática. */
html[data-theme="dark"] #tab-registrar .rg-call-box:not(.calling),body.dark #tab-registrar .rg-call-box:not(.calling){
  background:linear-gradient(180deg,#101e31,#0d192a)!important;border-color:#29435f!important;
  box-shadow:0 12px 32px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] #tab-registrar .rg-call-title,body.dark #tab-registrar .rg-call-title{color:#dbeaff!important}
html[data-theme="dark"] #tab-registrar .rg-call-summary-card,body.dark #tab-registrar .rg-call-summary-card{
  background:#12243a!important;border-color:#304963!important;box-shadow:0 8px 20px rgba(0,0,0,.15)!important;
}
html[data-theme="dark"] #tab-registrar .rg-call-number-copy span,html[data-theme="dark"] #tab-registrar .rg-call-summary-stat span,
body.dark #tab-registrar .rg-call-number-copy span,body.dark #tab-registrar .rg-call-summary-stat span{color:#91a8c0!important}
html[data-theme="dark"] #tab-registrar .rg-call-number-copy strong,html[data-theme="dark"] #tab-registrar .rg-call-summary-stat strong,
body.dark #tab-registrar .rg-call-number-copy strong,body.dark #tab-registrar .rg-call-summary-stat strong{color:#f2f7fd!important}
html[data-theme="dark"] #tab-registrar .rg-call-number-copy small,html[data-theme="dark"] #tab-registrar .rg-call-summary-stat small,
body.dark #tab-registrar .rg-call-number-copy small,body.dark #tab-registrar .rg-call-summary-stat small{color:#a6b8cb!important}
html[data-theme="dark"] #tab-registrar .rg-call-tip,html[data-theme="dark"] #tab-registrar .rg-call-summary-stat,
body.dark #tab-registrar .rg-call-tip,body.dark #tab-registrar .rg-call-summary-stat{border-color:#304861!important}
html[data-theme="dark"] #tab-registrar .rg-call-tip p,body.dark #tab-registrar .rg-call-tip p{color:#cfdae8!important}
html[data-theme="dark"] #tab-registrar .rg-call-tip--blue .rg-call-tip-icon,body.dark #tab-registrar .rg-call-tip--blue .rg-call-tip-icon{background:#183457!important;color:#76a8ff!important}
html[data-theme="dark"] #tab-registrar .rg-call-tip--green .rg-call-tip-icon,body.dark #tab-registrar .rg-call-tip--green .rg-call-tip-icon{background:#183a2b!important;color:#72cf71!important}
html[data-theme="dark"] #tab-registrar .rg-call-tip--purple .rg-call-tip-icon,body.dark #tab-registrar .rg-call-tip--purple .rg-call-tip-icon{background:#30254a!important;color:#b69bff!important}
html[data-theme="dark"] #tab-registrar .rg-call-ready-hero,html[data-theme="dark"] #tab-registrar .rg-call-terminal-hero,
body.dark #tab-registrar .rg-call-ready-hero,body.dark #tab-registrar .rg-call-terminal-hero{border-color:#304861!important}
html[data-theme="dark"] #tab-registrar .rg-call-ready-hero>strong,html[data-theme="dark"] #tab-registrar .rg-call-terminal-copy>strong,
body.dark #tab-registrar .rg-call-ready-hero>strong,body.dark #tab-registrar .rg-call-terminal-copy>strong{color:#eef5fd!important}
html[data-theme="dark"] #tab-registrar .rg-call-terminal-copy .rg-call-note,body.dark #tab-registrar .rg-call-terminal-copy .rg-call-note{color:#a7b9cd!important}
html[data-theme="dark"] #tab-registrar .rg-call-secondary-btn--primary,body.dark #tab-registrar .rg-call-secondary-btn--primary{
  background:linear-gradient(135deg,#2168c9,#174e9f)!important;border-color:#397bcb!important;color:#fff!important;
}
html[data-theme="dark"] #tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary),body.dark #tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary){
  background:linear-gradient(135deg,#26384b,#1d2d3f)!important;border-color:#41566b!important;color:#e8eff7!important;
  box-shadow:0 5px 14px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] #tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary) .rg-call-secondary-icon,
body.dark #tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary) .rg-call-secondary-icon{background:#34495e!important;color:#d7e1eb!important}
html[data-theme="dark"] #tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary) i,
body.dark #tab-registrar .rg-call-secondary-btn:not(.rg-call-secondary-btn--primary) i{color:#b9c5d2!important}
html[data-theme="dark"] #tab-registrar .rg-call-success-visual,body.dark #tab-registrar .rg-call-success-visual{
  background:radial-gradient(circle,#13283b 45%,#18372d 46% 68%,transparent 69%)!important;
}
html[data-theme="dark"] #tab-registrar .rg-call-success-ring,body.dark #tab-registrar .rg-call-success-ring{border-color:#3c7050!important}
html[data-theme="dark"] #tab-registrar .rg-call-success-visual>span,body.dark #tab-registrar .rg-call-success-visual>span{box-shadow:0 0 0 4px #102033!important}
html[data-theme="dark"] #tab-registrar .rg-call-recording,body.dark #tab-registrar .rg-call-recording{
  background:#12263a!important;border-color:#31506a!important;box-shadow:0 5px 15px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] #tab-registrar .rg-recording-copy span,body.dark #tab-registrar .rg-recording-copy span{color:#d9e9fb!important}
html[data-theme="dark"] #tab-registrar .rg-recording-copy strong,body.dark #tab-registrar .rg-recording-copy strong{color:#a8bbcf!important}
html[data-theme="dark"] #tab-registrar .rg-recording-icon,body.dark #tab-registrar .rg-recording-icon{background:#18375b!important;color:#83b4ff!important}
html[data-theme="dark"] #tab-registrar .rg-call-status-ready,body.dark #tab-registrar .rg-call-status-ready{background:#163326!important;color:#bde7c3!important;border-color:#315942!important}
html[data-theme="dark"] #tab-registrar .rg-call-status-muted,body.dark #tab-registrar .rg-call-status-muted{background:#1b2b3d!important;color:#d1dce8!important;border-color:#3a5067!important}
html[data-theme="dark"] #tab-registrar .rg-call-status-success,body.dark #tab-registrar .rg-call-status-success{background:#163326!important;color:#9ee4a6!important;border-color:#315942!important}

@media(max-width:640px){
  #tab-registrar .rg-call-secondary-btn{width:min(100%,390px)!important}
  #tab-registrar .rg-call-box.call-unconnected .rg-call-retry{width:72px!important;height:72px!important;flex-basis:72px!important}
  #tab-registrar .rg-call-box.call-unconnected .rg-call-retry img{width:72px!important;height:72px!important}
  #tab-registrar .rg-call-unconnected-visual{margin-left:auto;margin-right:auto;justify-content:center}
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.31 · Telefonía terminal refinada
   número/estado centrados · retry gris->verde · iconografía limpia
   ═══════════════════════════════════════════════════════════════════════ */
/* Resumen superior: composición simétrica y centrada. */
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-cell{
  justify-content:center!important;text-align:center!important;padding-left:18px!important;padding-right:18px!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy{
  width:100%!important;align-items:center!important;text-align:center!important;padding-left:0!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy span,
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy strong,
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy small{width:100%;text-align:center!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat{
  align-items:center!important;text-align:center!important;padding-left:16px!important;padding-right:16px!important;
}
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat span,
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat strong,
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat small{
  width:100%;text-align:center!important;
}

/* Fallo/no contacto: un único control visual, limpio y centrado. */
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-hero{
  flex-direction:column!important;justify-content:center!important;align-items:center!important;
  text-align:center!important;gap:8px!important;padding:8px 18px 10px!important;border-right:1px solid #e0e8f1!important;
}
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-copy{
  width:100%!important;align-items:center!important;text-align:center!important;padding:4px 10px 0!important;gap:6px!important;
}
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-copy>strong{
  width:100%!important;text-align:center!important;margin:2px 0 0!important;
}
#tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-copy .rg-call-note{
  max-width:430px!important;margin:0 auto!important;text-align:center!important;padding-top:2px!important;
}
#tab-registrar .rg-call-unconnected-visual{display:none!important}

#tab-registrar .rg-call-box.call-unconnected .rg-call-retry{
  position:relative!important;display:grid!important;place-items:center!important;
  width:96px!important;height:96px!important;max-width:none!important;flex:0 0 96px!important;
  margin:0 auto 1px!important;padding:0!important;border:0!important;border-radius:50%!important;
  background:transparent!important;cursor:pointer!important;overflow:visible!important;
  animation:rg-r31-retry-pulse 1.7s ease-in-out infinite!important;
  filter:drop-shadow(0 8px 18px rgba(38,61,96,.12));
}
#tab-registrar .rg-call-retry-icon{position:relative!important;display:block!important;width:96px!important;height:96px!important}
#tab-registrar .rg-call-retry-icon img{
  position:absolute!important;inset:0!important;width:96px!important;height:96px!important;object-fit:contain!important;
  transition:opacity .22s ease,transform .22s ease,filter .22s ease!important;pointer-events:none!important;
}
#tab-registrar .rg-call-retry-gray{opacity:1!important;transform:scale(1)!important}
#tab-registrar .rg-call-retry-green{opacity:0!important;transform:scale(.90)!important}
#tab-registrar .rg-call-box.call-unconnected .rg-call-retry:hover,
#tab-registrar .rg-call-box.call-unconnected .rg-call-retry:focus-visible{
  animation-play-state:paused!important;transform:scale(1.055)!important;filter:drop-shadow(0 10px 20px rgba(79,160,40,.20));
}
#tab-registrar .rg-call-retry:hover .rg-call-retry-gray,
#tab-registrar .rg-call-retry:focus-visible .rg-call-retry-gray{opacity:0!important;transform:scale(.90)!important}
#tab-registrar .rg-call-retry:hover .rg-call-retry-green,
#tab-registrar .rg-call-retry:focus-visible .rg-call-retry-green{opacity:1!important;transform:scale(1)!important}
@keyframes rg-r31-retry-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.055)}}

/* En conectado seguimos usando el visual de éxito; nunca aparece el retry gris. */
#tab-registrar .rg-call-box.call-connected .rg-call-retry{display:none!important}

/* Dark mode: el ícono gris tiene halo neutro y el verde mantiene transparencia real. */
html[data-theme="dark"] #tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-hero,
body.dark #tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-hero{border-color:#304861!important}
html[data-theme="dark"] #tab-registrar .rg-call-box.call-unconnected .rg-call-retry,
body.dark #tab-registrar .rg-call-box.call-unconnected .rg-call-retry{filter:drop-shadow(0 8px 18px rgba(0,0,0,.28))}
html[data-theme="dark"] #tab-registrar .rg-call-retry:hover,
body.dark #tab-registrar .rg-call-retry:hover{filter:drop-shadow(0 10px 22px rgba(93,185,46,.22))}

@media(max-width:640px){
  #tab-registrar .rg-call-box.call-unconnected .rg-call-terminal-hero{border-right:0!important;padding-top:12px!important}
  #tab-registrar .rg-call-box.call-unconnected .rg-call-retry,
  #tab-registrar .rg-call-retry-icon,
  #tab-registrar .rg-call-retry-icon img{width:88px!important;height:88px!important}
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.32 · Cola Inteligente APAGADA real
   Sin datos de caso ni navegación mientras el interruptor está apagado.
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{display:none!important}
#tab-registrar .rg-queue-card.is-off{
    padding:18px 20px 16px!important;
    min-height:300px;
    justify-content:flex-start!important;
    border-color:#dbe6f3!important;
    background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
}
#tab-registrar .rg-queue-card.is-off .rg-queue-head{margin-bottom:12px}
#tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap{gap:5px}
#tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap strong{font-size:1.18rem;letter-spacing:-.025em;color:#10284c}
#tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap small{font-size:.72rem;color:#7b8ca5}
#tab-registrar .rg-queue-card.is-off .rg-queue-count{font-size:.68rem;padding:7px 12px;background:#f8fafc}
#tab-registrar .rg-queue-case.is-off{
    flex:1;
    min-height:205px;
    padding:0!important;
    overflow:hidden;
    border:1px solid #dbe6f3!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%)!important;
}
#tab-registrar .rg-queue-off-state{
    width:100%;height:100%;min-height:205px;
    display:grid;grid-template-columns:minmax(210px,42%) minmax(0,1fr);
    align-items:center;gap:18px;padding:4px 26px 0 12px;
}
#tab-registrar .rg-queue-off-mascot-wrap{
    align-self:stretch;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;
}
#tab-registrar .rg-queue-off-mascot-wrap img{
    display:block;width:min(100%,330px);height:auto;max-height:230px;object-fit:contain;object-position:center bottom;
    filter:drop-shadow(0 12px 18px rgba(17,54,92,.10));
}
#tab-registrar .rg-queue-off-copy{min-width:0;padding:10px 0 8px}
#tab-registrar .rg-queue-off-copy strong{
    display:block;margin-bottom:9px;font-size:1.03rem;line-height:1.15;color:#10284c;font-weight:900;letter-spacing:-.015em;
}
#tab-registrar .rg-queue-off-copy p{
    margin:0;max-width:470px;font-size:.75rem;line-height:1.55;color:#71839c;
}
#tab-registrar .rg-queue-card.is-off .rg-queue-actions{
    margin-top:12px;justify-content:flex-start;min-height:36px;
}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch{font-size:.72rem;color:#203b61;gap:9px}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch .rg-switch{width:38px;height:22px}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch .rg-switch:after{width:16px;height:16px;top:3px;left:3px}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch input:checked + .rg-switch:after{transform:translateX(16px)}
#tab-registrar .rg-queue-action-hidden{display:none!important}

@media (min-width:1180px){
  #tab-registrar .rg-top-grid.rg-queue-off{grid-template-columns:minmax(245px,300px) minmax(0,1fr)!important}
}
@media (max-width:900px){
  #tab-registrar .rg-queue-card.is-off{min-height:0}
  #tab-registrar .rg-queue-off-state{grid-template-columns:1fr;min-height:0;padding:12px 18px 16px;text-align:center}
  #tab-registrar .rg-queue-off-mascot-wrap{max-height:210px;align-items:center}
  #tab-registrar .rg-queue-off-mascot-wrap img{max-height:205px;width:auto;max-width:100%}
  #tab-registrar .rg-queue-off-copy p{margin-inline:auto}
  #tab-registrar .rg-queue-card.is-off .rg-queue-actions{justify-content:center}
  #tab-registrar .rg-queue-card.is-off .rg-queue-switch{width:auto}
}

html[data-theme="dark"] #tab-registrar .rg-queue-card.is-off{
    background:linear-gradient(180deg,#12243a,#0f1c2f)!important;border-color:#294966!important;
}
html[data-theme="dark"] #tab-registrar .rg-queue-case.is-off{
    background:linear-gradient(135deg,#0d1a2b,#102239)!important;border-color:#2d4b69!important;
}
html[data-theme="dark"] #tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap strong,
html[data-theme="dark"] #tab-registrar .rg-queue-off-copy strong{color:#f2f7ff!important}
html[data-theme="dark"] #tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap small,
html[data-theme="dark"] #tab-registrar .rg-queue-off-copy p{color:#9fb2c8!important}
html[data-theme="dark"] #tab-registrar .rg-queue-card.is-off .rg-queue-count{background:#152a43!important;border-color:#34516f!important;color:#c8d7e7!important}
html[data-theme="dark"] #tab-registrar .rg-queue-card.is-off .rg-queue-switch{color:#d5e2ef!important}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.33 · Cola OFF compacta
   Conserva el OFF real de 5.32, pero recupera la contracción física
   original del bloque cuando la Cola Inteligente está apagada.
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-top-grid.rg-queue-off{
    grid-template-columns:minmax(0,1fr) minmax(320px,410px)!important;
    align-items:start!important;
    gap:1rem!important;
}
#tab-registrar .rg-top-grid.rg-queue-off .rg-data-card,
#tab-registrar .rg-top-grid.rg-queue-off .rg-queue-card{
    align-self:start!important;
    height:auto!important;
}
#tab-registrar .rg-queue-card.is-off{
    min-height:0!important;
    padding:12px 13px 10px!important;
    justify-content:flex-start!important;
}
#tab-registrar .rg-queue-card.is-off .rg-queue-head{
    margin-bottom:8px!important;
    align-items:flex-start!important;
}
#tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap{gap:3px!important}
#tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap strong{font-size:.93rem!important}
#tab-registrar .rg-queue-card.is-off .rg-queue-title-wrap small{font-size:.64rem!important;line-height:1.25!important}
#tab-registrar .rg-queue-card.is-off .rg-queue-count{font-size:.60rem!important;padding:5px 8px!important}
#tab-registrar .rg-queue-case.is-off{
    flex:0 0 auto!important;
    min-height:108px!important;
    height:108px!important;
    border-radius:13px!important;
}
#tab-registrar .rg-queue-off-state{
    width:100%!important;
    height:108px!important;
    min-height:108px!important;
    display:grid!important;
    grid-template-columns:118px minmax(0,1fr)!important;
    align-items:center!important;
    gap:10px!important;
    padding:3px 12px 2px 5px!important;
}
#tab-registrar .rg-queue-off-mascot-wrap{
    height:105px!important;
    align-self:end!important;
    overflow:hidden!important;
}
#tab-registrar .rg-queue-off-mascot-wrap img{
    width:auto!important;
    max-width:124px!important;
    height:116px!important;
    max-height:116px!important;
    object-fit:contain!important;
    object-position:center bottom!important;
}
#tab-registrar .rg-queue-off-copy{padding:4px 0!important}
#tab-registrar .rg-queue-off-copy strong{
    margin-bottom:5px!important;
    font-size:.78rem!important;
    line-height:1.18!important;
}
#tab-registrar .rg-queue-off-copy p{
    font-size:.61rem!important;
    line-height:1.38!important;
    max-width:250px!important;
}
#tab-registrar .rg-queue-card.is-off .rg-queue-actions{
    margin-top:8px!important;
    min-height:27px!important;
    justify-content:flex-start!important;
}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch{font-size:.64rem!important;gap:7px!important}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch .rg-switch{width:36px!important;height:21px!important}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch .rg-switch:after{width:15px!important;height:15px!important;top:2px!important;left:2px!important}
#tab-registrar .rg-queue-card.is-off .rg-queue-switch input:checked + .rg-switch:after{transform:translateX(15px)!important}

/* La tarjeta de datos recupera su geometría compacta; ya no hereda la
   altura de la cola apagada. */
#tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
    min-height:0!important;
}

@media (max-width:1179px) and (min-width:901px){
  #tab-registrar .rg-top-grid.rg-queue-off{grid-template-columns:minmax(0,1fr) 330px!important}
  #tab-registrar .rg-queue-off-state{grid-template-columns:102px minmax(0,1fr)!important}
  #tab-registrar .rg-queue-off-mascot-wrap img{max-width:108px!important;height:108px!important}
}
@media (max-width:900px){
  #tab-registrar .rg-top-grid.rg-queue-off{grid-template-columns:1fr!important;align-items:start!important}
  #tab-registrar .rg-queue-case.is-off{height:auto!important;min-height:128px!important}
  #tab-registrar .rg-queue-off-state{height:auto!important;min-height:128px!important;grid-template-columns:128px minmax(0,1fr)!important;text-align:left!important}
  #tab-registrar .rg-queue-off-mascot-wrap{height:125px!important}
  #tab-registrar .rg-queue-off-mascot-wrap img{height:132px!important;max-height:132px!important}
  #tab-registrar .rg-queue-off-copy p{margin-inline:0!important}
  #tab-registrar .rg-queue-card.is-off .rg-queue-actions{justify-content:flex-start!important}
}
@media (max-width:560px){
  #tab-registrar .rg-queue-off-state{grid-template-columns:1fr!important;text-align:center!important;padding:8px 14px 10px!important}
  #tab-registrar .rg-queue-off-mascot-wrap{height:122px!important;align-items:center!important}
  #tab-registrar .rg-queue-off-copy p{margin-inline:auto!important}
  #tab-registrar .rg-queue-card.is-off .rg-queue-actions{justify-content:center!important}
}

/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.34 · Cola OFF compacta + recomendación restaurada
   La cola apagada permanece compacta a la derecha, mientras Datos de la
   gestión recupera la mascota/consejo y vuelve a empatar visualmente en
   altura con la card de Cola Inteligente.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width:901px){
  #tab-registrar .rg-top-grid.rg-queue-off{
    align-items:stretch!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
    align-self:stretch!important;
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(230px,.82fr)!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    column-gap:16px!important;
    row-gap:10px!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-card-kicker{
    grid-column:1/-1!important;
    grid-row:1!important;
    align-self:start!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields{
    display:contents!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields .rg-field{
    grid-row:2!important;
    align-self:center!important;
    width:100%!important;
    min-width:0!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields .rg-field:nth-child(1){grid-column:1!important}
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-fields .rg-field:nth-child(2){grid-column:2!important}

  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
    display:grid!important;
    opacity:1!important;
    visibility:visible!important;
    grid-column:3!important;
    grid-row:2!important;
    align-self:stretch!important;
    width:100%!important;
    height:100%!important;
    min-height:108px!important;
    max-height:none!important;
    margin:0!important;
    padding:10px 10px 8px 13px!important;
    grid-template-columns:minmax(0,1fr) 94px!important;
    align-items:center!important;
    transform:none!important;
    overflow:hidden!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint-copy{
    align-self:center!important;
    min-width:0!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint-kicker{
    font-size:.53rem!important;
    margin-bottom:4px!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint strong{
    font-size:.72rem!important;
    line-height:1.18!important;
    margin-bottom:4px!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint p{
    font-size:.59rem!important;
    line-height:1.38!important;
    max-width:235px!important;
  }

  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint img{
    display:block!important;
    width:108px!important;
    height:132px!important;
    max-width:none!important;
    object-fit:contain!important;
    object-position:center bottom!important;
    align-self:end!important;
    justify-self:end!important;
    transform:translate(5px,12px)!important;
  }
}

@media (max-width:1179px) and (min-width:901px){
  #tab-registrar .rg-top-grid.rg-queue-off .rg-data-card{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(200px,.78fr)!important;
    column-gap:12px!important;
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
    grid-template-columns:minmax(0,1fr) 76px!important;
    padding-left:10px!important;
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint img{
    width:90px!important;
    height:118px!important;
  }
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint p{
    font-size:.56rem!important;
  }
}

/* En móvil la recomendación vuelve a ser un bloque natural bajo los campos. */
@media (max-width:900px){
  #tab-registrar .rg-top-grid.rg-queue-off .rg-queue-hint{
    display:grid!important;
    opacity:1!important;
    visibility:visible!important;
    max-height:none!important;
    margin-top:10px!important;
    transform:none!important;
  }
}


/* BETA 1.2.3.5.37 · Correo corporativo autogestionable */
.rg-mail-bridge-modal{position:fixed;inset:0;z-index:1295;display:flex;align-items:center;justify-content:center;padding:20px}
.rg-mail-bridge-modal.hidden{display:none!important}
.rg-mail-bridge-backdrop{position:absolute;inset:0;background:rgba(7,20,39,.72);backdrop-filter:blur(8px)}
.rg-mail-bridge-card{position:relative;width:min(620px,calc(100vw - 28px));max-height:calc(100vh - 34px);overflow:auto;background:#fff;border:1px solid #d7e4f1;border-radius:22px;box-shadow:0 34px 110px rgba(8,34,65,.38);padding:23px}
.rg-mail-bridge-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding-bottom:16px;border-bottom:1px solid #e5edf6}
.rg-mail-bridge-head>div{min-width:0}.rg-mail-bridge-head span{display:block;font-size:.61rem;letter-spacing:.14em;font-weight:950;color:#0f6f9f;margin-bottom:4px}
.rg-mail-bridge-head h3{margin:0;color:#17375e;font-size:1.12rem}.rg-mail-bridge-head p{margin:6px 0 0;color:#6b7f96;font-size:.73rem;line-height:1.48}
.rg-mail-bridge-form{display:flex;flex-direction:column;gap:13px;padding-top:17px}.rg-mail-bridge-form>label{display:flex;flex-direction:column;gap:6px;color:#344e6d;font-size:.72rem;font-weight:850}
.rg-mail-bridge-form label small{font-size:.65rem;color:#7b8fa6;font-weight:600}.rg-mail-bridge-password-row{display:grid;grid-template-columns:1fr 42px;gap:8px}
.rg-mail-bridge-eye{border:1px solid #d8e4f0;background:#f5f8fb;color:#536d88;border-radius:11px;font-size:1rem;cursor:pointer}.rg-mail-bridge-eye:hover{background:#eaf2fa}
.rg-mail-bridge-security{display:flex;gap:11px;align-items:center;border:1px solid #d9e7f4;background:#f7fbff;border-radius:13px;padding:11px 13px}.rg-mail-bridge-security-icon{font-size:1.1rem}
.rg-mail-bridge-security>div{display:flex;flex-direction:column;gap:2px}.rg-mail-bridge-security strong{font-size:.72rem;color:#17375e}.rg-mail-bridge-security small{font-size:.65rem;color:#71859c;line-height:1.4}
.rg-mail-bridge-test-result{border-radius:12px;padding:10px 12px;font-size:.7rem;font-weight:750}.rg-mail-bridge-test-result.hidden{display:none!important}.rg-mail-bridge-test-result.info{background:#eef6ff;border:1px solid #cfe2fa;color:#23598c}.rg-mail-bridge-test-result.success{background:#effaf4;border:1px solid #bee8d0;color:#176e49}.rg-mail-bridge-test-result.error{background:#fff2f2;border:1px solid #efc5c5;color:#a33d3d}
.rg-mail-bridge-alt{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid #edf2f7;border-bottom:1px solid #edf2f7}.rg-mail-bridge-alt.hidden{display:none!important}.rg-mail-bridge-alt span{font-size:.68rem;color:#6c8097}
.rg-mail-bridge-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding-top:2px}.rg-mail-bridge-danger{border-color:#e9c1c1!important;color:#a53e3e!important}.rg-mail-bridge-danger:hover{background:#fff0f0!important}
html[data-theme="dark"] .rg-mail-bridge-card{background:#102039;border-color:#29435f;box-shadow:0 34px 110px rgba(0,0,0,.52)}
html[data-theme="dark"] .rg-mail-bridge-head{border-color:#29435f}html[data-theme="dark"] .rg-mail-bridge-head h3,html[data-theme="dark"] .rg-mail-bridge-security strong{color:#f3f7ff}
html[data-theme="dark"] .rg-mail-bridge-head p,html[data-theme="dark"] .rg-mail-bridge-form>label{color:#b5c7da}html[data-theme="dark"] .rg-mail-bridge-form label small{color:#8fa6bd}
html[data-theme="dark"] .rg-mail-bridge-eye{background:#162b46;border-color:#31506f;color:#d8e7f5}html[data-theme="dark"] .rg-mail-bridge-security{background:#132840;border-color:#294866}
html[data-theme="dark"] .rg-mail-bridge-security small,html[data-theme="dark"] .rg-mail-bridge-alt span{color:#98aec3}html[data-theme="dark"] .rg-mail-bridge-alt{border-color:#29435f}
@media(max-width:640px){.rg-mail-bridge-modal{padding:9px}.rg-mail-bridge-card{padding:18px;border-radius:18px}.rg-mail-bridge-alt{align-items:stretch;flex-direction:column}.rg-mail-bridge-actions{flex-direction:column}.rg-mail-bridge-actions button{width:100%}}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.39.2 · Resumen terminal centrado
   Número / resultado-tiempo / consumo final quedan centrados.
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-cell{
    justify-content:center!important;
    text-align:center!important;
    padding-left:18px!important;
    padding-right:18px!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy{
    width:100%!important;
    align-items:center!important;
    text-align:center!important;
    padding-left:0!important;
}
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy span,
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy strong,
#tab-registrar .rg-call-box:not(.calling) .rg-call-number-copy small{
    width:100%;
    text-align:center!important;
}
#tab-registrar .rg-call-box.call-connected .rg-call-connected-summary .rg-call-summary-stat,
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat{
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    padding-left:16px!important;
    padding-right:16px!important;
}
#tab-registrar .rg-call-box.call-connected .rg-call-connected-summary .rg-call-summary-stat span,
#tab-registrar .rg-call-box.call-connected .rg-call-connected-summary .rg-call-summary-stat strong,
#tab-registrar .rg-call-box.call-connected .rg-call-connected-summary .rg-call-summary-stat small,
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat span,
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat strong,
#tab-registrar .rg-call-box.call-unconnected .rg-call-unconnected-summary .rg-call-summary-stat small{
    width:100%;
    text-align:center!important;
}


/* ═══════════════════════════════════════════════════════════════════════
   BETA 1.2.3.5.39.3 · Reintento también después de llamada conectada
   La acción verde sustituye el visual pasivo de éxito para permitir volver
   a llamar sin abandonar al cliente. El intento conectado anterior se
   reemplaza desde JS/Backend antes de originar el nuevo marcado.
   ═══════════════════════════════════════════════════════════════════════ */
#tab-registrar .rg-call-box.call-connected .rg-call-success-visual{display:none!important}
#tab-registrar .rg-call-box.call-connected .rg-call-retry{
    display:block!important;
    width:96px!important;
    height:96px!important;
    flex:0 0 96px!important;
    max-width:none!important;
    animation:rg-r31-retry-pulse 1.7s ease-in-out infinite!important;
}
#tab-registrar .rg-call-box.call-connected .rg-call-retry-icon,
#tab-registrar .rg-call-box.call-connected .rg-call-retry-icon img{width:96px!important;height:96px!important}
#tab-registrar .rg-call-box.call-connected .rg-call-retry-gray{opacity:0!important;transform:scale(.90)!important}
#tab-registrar .rg-call-box.call-connected .rg-call-retry-green{opacity:1!important;transform:scale(1)!important}
#tab-registrar .rg-call-box.call-connected .rg-call-retry:hover,
#tab-registrar .rg-call-box.call-connected .rg-call-retry:focus-visible{animation-play-state:paused!important;transform:scale(1.06)!important}
@media(max-width:640px){
  #tab-registrar .rg-call-box.call-connected .rg-call-retry,
  #tab-registrar .rg-call-box.call-connected .rg-call-retry-icon,
  #tab-registrar .rg-call-box.call-connected .rg-call-retry-icon img{width:78px!important;height:78px!important;flex-basis:78px!important}
}

/* BETA 1.2.3.5.40.6 · Correo corporativo · Fluent-inspired UX */
.rg-email-modal{z-index:1325;padding:18px}
.rg-email-modal-backdrop{background:rgba(15,23,42,.5);backdrop-filter:blur(8px)}
.rg-email-modal-card.rg-email-fluent{width:min(920px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;overflow:auto;border:1px solid #d7e0ea;border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(24,38,59,.28);isolation:isolate}
.rg-email-fluent .rg-email-modal-head{position:sticky;top:0;z-index:6;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 26px 18px;border-bottom:1px solid #e8edf3;background:rgba(255,255,255,.97);backdrop-filter:blur(12px)}
.rg-email-title-block{display:flex;align-items:flex-start;gap:14px;min-width:0}.rg-email-title-icon{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:10px;background:#e8f3fc;color:#0f6cbd}.rg-email-fluent .rg-email-modal-kicker{color:#0f6cbd;font-size:.61rem;letter-spacing:.14em}.rg-email-fluent .rg-email-modal-head h3{font-size:1.24rem;color:#242424;font-weight:760}.rg-email-fluent .rg-email-modal-head p{max-width:680px;color:#616161;font-size:.75rem;line-height:1.5}
.rg-email-fluent .rg-email-close{width:36px;height:36px;border-radius:8px;background:transparent;color:#424242;transition:.15s}.rg-email-fluent .rg-email-close:hover{background:#f1f1f1;color:#111}
.rg-email-account--compact{margin:16px 26px 10px;padding:11px 12px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:11px;align-items:center;border:1px solid #e0e7ef;border-radius:12px;background:#f8fafc}.rg-email-account-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:#0f6cbd;color:#fff;font-weight:900;font-size:1rem}.rg-email-account-copy{display:flex;flex-direction:column;gap:1px;min-width:0}.rg-email-account-copy span{font-size:.55rem;color:#777;font-weight:800;letter-spacing:.1em}.rg-email-account-copy strong{font-size:.76rem;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rg-email-account-copy small{font-size:.66rem;color:#6f6f6f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rg-email-account-action{height:34px;padding:0 12px;border:1px solid #c8d3df;border-radius:8px;background:#fff;color:#0f6cbd;font-size:.68rem;font-weight:750;cursor:pointer}.rg-email-account-action:hover{background:#eff6fc;border-color:#98bddb}
.rg-email-fluent .rg-email-config-warning{margin:10px 26px;padding:11px 13px}
.rg-email-compose{gap:0;padding:4px 26px 22px}.rg-email-recipient-row,.rg-email-subject-row{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;min-height:48px;border-bottom:1px solid #e9edf2}.rg-email-recipient-label,.rg-email-subject-row>label{display:flex;align-items:center;gap:5px;color:#323130;font-size:.72rem;font-weight:720}.rg-email-recipient-label small{font-size:.58rem;color:#7a7a7a;font-weight:600}.rg-email-recipient-control{position:relative;display:flex;align-items:center;gap:8px;min-width:0}.rg-email-line-input{width:100%;min-width:0;height:42px;padding:0 6px;border:0!important;outline:0!important;background:transparent!important;color:#242424!important;font-family:inherit;font-size:.78rem;box-shadow:none!important}.rg-email-line-input::placeholder{color:#9a9a9a}.rg-email-line-input:focus{box-shadow:none!important}.rg-email-contacts-trigger{flex:0 0 auto;height:30px;padding:0 9px;border:0;border-radius:6px;background:transparent;color:#0f6cbd;font-size:.65rem;font-weight:720;cursor:pointer}.rg-email-contacts-trigger:hover{background:#eff6fc}.rg-email-contact-suggestions{position:absolute;left:0;right:84px;top:42px;z-index:20;padding:5px;border:1px solid #d9e2ec;border-radius:9px;background:#fff;box-shadow:0 12px 30px rgba(18,40,70,.16)}.rg-email-contact-suggestions.hidden{display:none!important}.rg-email-contact-suggestions button{display:flex;width:100%;flex-direction:column;gap:1px;padding:8px 10px;border:0;border-radius:6px;background:transparent;text-align:left;cursor:pointer}.rg-email-contact-suggestions button:hover{background:#f2f6fb}.rg-email-contact-suggestions strong{color:#242424;font-size:.69rem}.rg-email-contact-suggestions small{color:#6b7280;font-size:.62rem}
.rg-email-editor-wrap{margin-top:16px;border:1px solid #d4dde7;border-radius:12px;overflow:hidden;background:#fff;transition:.15s}.rg-email-editor-wrap:focus-within{border-color:#0f6cbd;box-shadow:0 0 0 2px rgba(15,108,189,.12)}.rg-email-editor-toolbar{display:flex;align-items:center;gap:6px;min-height:38px;padding:0 10px;border-bottom:1px solid #e8edf2;background:#fafafa;color:#4b4b4b}.rg-email-editor-toolbar>span{display:grid;place-items:center;min-width:25px;height:25px;border-radius:5px;font-size:.68rem;font-weight:700}.rg-email-editor-toolbar>span:hover{background:#ededed}.rg-email-editor-toolbar>i{width:1px;height:17px;background:#ddd}.rg-email-editor-toolbar em{font-family:serif;font-size:.8rem}.rg-email-editor-spacer{flex:1}.rg-email-editor-toolbar small{color:#7b7b7b;font-size:.6rem;font-weight:700}.rg-email-body{width:100%;min-height:235px;resize:vertical;padding:15px 16px;border:0!important;outline:0!important;background:#fff!important;color:#242424!important;font:400 .8rem/1.6 inherit;box-shadow:none!important}.rg-email-body::placeholder{color:#929292}.rg-email-fluent .rg-email-footnote{display:flex;align-items:flex-start;gap:8px;margin-top:12px;padding:10px 12px;border:0;border-radius:8px;background:#f5f9fd;color:#65717d}.rg-email-fluent .rg-email-footnote>span{color:#107c10;font-weight:900}.rg-email-fluent .rg-email-footnote p{margin:0;font-size:.64rem;line-height:1.45}.rg-email-fluent .rg-email-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid #e8edf2}.rg-email-cancel-btn,.rg-email-send-btn{height:38px;padding:0 16px;border-radius:8px;font-family:inherit;font-size:.7rem;font-weight:750;cursor:pointer}.rg-email-cancel-btn{border:1px solid #c7d1dc;background:#fff;color:#323130}.rg-email-cancel-btn:hover{background:#f4f4f4}.rg-email-send-btn{display:inline-flex;align-items:center;gap:8px;border:1px solid #0f6cbd;background:#0f6cbd;color:#fff}.rg-email-send-btn:hover{background:#115ea3;border-color:#115ea3}.rg-email-send-btn:disabled{opacity:.58;cursor:not-allowed}

.rg-email-contacts-panel{position:absolute;z-index:35;right:18px;top:106px;width:min(370px,calc(100% - 36px));max-height:calc(100% - 128px);display:flex;flex-direction:column;border:1px solid #d6e0ea;border-radius:14px;background:#fff;box-shadow:0 18px 54px rgba(18,38,65,.22);overflow:hidden}.rg-email-contacts-panel.hidden{display:none!important}.rg-email-contacts-head{display:flex;justify-content:space-between;gap:10px;padding:14px 15px;border-bottom:1px solid #e7ecf2;background:#fafbfd}.rg-email-contacts-head>div{display:flex;flex-direction:column;gap:2px}.rg-email-contacts-head span{font-size:.54rem;font-weight:850;letter-spacing:.12em;color:#0f6cbd}.rg-email-contacts-head strong{color:#242424;font-size:.82rem}.rg-email-contacts-head small{color:#767676;font-size:.6rem}.rg-email-contacts-head button{width:30px;height:30px;border:0;border-radius:7px;background:transparent;color:#555;font-size:1rem;cursor:pointer}.rg-email-contacts-head button:hover{background:#eee}.rg-email-contacts-search{display:flex;align-items:center;gap:7px;margin:11px 12px 7px;padding:0 10px;height:36px;border:1px solid #ced9e4;border-radius:8px;background:#fff}.rg-email-contacts-search span{color:#6b7280}.rg-email-contacts-search input{width:100%;border:0;outline:0;background:transparent;color:#242424;font-size:.69rem}.rg-email-contacts-list{min-height:90px;max-height:280px;overflow:auto;padding:4px 7px}.rg-email-contacts-empty{padding:24px 12px;text-align:center;color:#7b8794;font-size:.67rem}.rg-email-contact-item{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;border-radius:8px}.rg-email-contact-item:hover{background:#f4f7fa}.rg-email-contact-pick{display:flex;align-items:center;gap:9px;min-width:0;padding:8px;border:0;background:transparent;text-align:left;cursor:pointer}.rg-email-contact-avatar{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:50%;background:#dff0fc;color:#0f6cbd;font-size:.7rem;font-weight:850}.rg-email-contact-info{display:flex;flex-direction:column;gap:1px;min-width:0}.rg-email-contact-info strong,.rg-email-contact-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rg-email-contact-info strong{color:#242424;font-size:.68rem}.rg-email-contact-info small{color:#717171;font-size:.59rem}.rg-email-contact-delete{width:27px;height:27px;border:0;border-radius:6px;background:transparent;color:#8a8a8a;cursor:pointer}.rg-email-contact-delete:hover{background:#feecec;color:#c42b1c}.rg-email-contact-add{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:11px 12px 12px;border-top:1px solid #e6ebf1;background:#fafbfd}.rg-email-contact-add>span{grid-column:1/-1;color:#6f7780;font-size:.53rem;font-weight:850;letter-spacing:.1em}.rg-email-contact-add input{min-width:0;height:34px;padding:0 9px;border:1px solid #cfd9e4;border-radius:7px;background:#fff;color:#242424;font-size:.64rem;outline:0}.rg-email-contact-add input:focus{border-color:#0f6cbd}.rg-email-contact-add #rg-email-contact-email{grid-column:1/-1}.rg-email-contact-add button{grid-column:1/-1;height:34px;border:1px solid #0f6cbd;border-radius:7px;background:#fff;color:#0f6cbd;font-size:.64rem;font-weight:750;cursor:pointer}.rg-email-contact-add button:hover{background:#eff6fc}

/* envío animado: carta -> sobre -> salida / fallo */
.rg-email-send-animation{position:absolute;z-index:60;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);text-align:center}.rg-email-send-animation.hidden{display:none!important}.rg-email-send-animation>strong{margin-top:16px;color:#242424;font-size:.92rem}.rg-email-send-animation>small{margin-top:5px;max-width:410px;color:#69737e;font-size:.66rem;line-height:1.45}.rg-email-send-scene{position:relative;width:180px;height:120px}.rg-email-letter{position:absolute;z-index:2;left:61px;top:0;width:58px;height:70px;padding:12px 9px;border:1px solid #bed0e2;border-radius:5px;background:#fff;box-shadow:0 7px 18px rgba(15,60,100,.12);transform-origin:center}.rg-email-letter span{display:block;height:4px;margin-bottom:6px;border-radius:4px;background:#c8d9e9}.rg-email-letter span:nth-child(2){width:78%}.rg-email-letter span:nth-child(3){width:58%}.rg-email-envelope{position:absolute;z-index:3;left:42px;bottom:2px;width:96px;height:62px}.rg-email-envelope-back,.rg-email-envelope-front,.rg-email-envelope-flap{position:absolute;inset:0;border-radius:6px}.rg-email-envelope-back{border:2px solid #0f6cbd;background:#dff0fc}.rg-email-envelope-front{clip-path:polygon(0 35%,50% 72%,100% 35%,100% 100%,0 100%);background:#b7ddf7;border:2px solid #0f6cbd}.rg-email-envelope-flap{clip-path:polygon(0 0,100% 0,50% 58%);background:#edf7fd;border-top:2px solid #0f6cbd}.rg-email-send-trail{position:absolute;left:20px;top:70px;display:flex;gap:6px;opacity:0}.rg-email-send-trail i{display:block;width:15px;height:2px;border-radius:2px;background:#0f6cbd}.rg-email-break-mark{position:absolute;left:77px;top:63px;z-index:8;color:#c42b1c;font-size:2rem;font-weight:900;opacity:0}
.rg-email-send-scene.is-sending .rg-email-letter{animation:rgMailLetterIn 1.05s ease-in-out infinite}.rg-email-send-scene.is-sending .rg-email-envelope{animation:rgMailEnvelopePulse 1.05s ease-in-out infinite}.rg-email-send-scene.is-success .rg-email-letter{animation:rgMailLetterFinish .38s ease forwards}.rg-email-send-scene.is-success .rg-email-envelope{animation:rgMailEnvelopeFly .75s .22s cubic-bezier(.3,.75,.45,1) forwards}.rg-email-send-scene.is-success .rg-email-send-trail{animation:rgMailTrail .55s .35s ease forwards}.rg-email-send-scene.is-error .rg-email-envelope{animation:rgMailEnvelopeBreak .55s ease both}.rg-email-send-scene.is-error .rg-email-letter{animation:rgMailLetterError .5s ease both}.rg-email-send-scene.is-error .rg-email-break-mark{animation:rgMailBreakMark .5s .13s ease both}
@keyframes rgMailLetterIn{0%{transform:translateY(0) scale(1);opacity:1}55%{transform:translateY(42px) scale(.86);opacity:1}82%,100%{transform:translateY(44px) scale(.82);opacity:.22}}@keyframes rgMailEnvelopePulse{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes rgMailLetterFinish{to{transform:translateY(45px) scale(.8);opacity:0}}@keyframes rgMailEnvelopeFly{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(115px,-34px) rotate(-10deg);opacity:0}}@keyframes rgMailTrail{0%{opacity:0;transform:translateX(25px)}45%{opacity:1}100%{opacity:0;transform:translateX(70px)}}@keyframes rgMailEnvelopeBreak{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(-7px) rotate(-3deg)}50%{transform:translateX(8px) rotate(4deg)}75%{transform:translateX(-5px) rotate(-2deg)}}@keyframes rgMailLetterError{0%{transform:translateY(38px) scale(.84)}100%{transform:translate(-24px,-5px) rotate(-13deg);opacity:.72}}@keyframes rgMailBreakMark{0%{opacity:0;transform:scale(.5)}100%{opacity:1;transform:scale(1)}}

html[data-theme="dark"] .rg-email-modal-card.rg-email-fluent{background:#111c2d;border-color:#30435a;box-shadow:0 26px 75px rgba(0,0,0,.55)}html[data-theme="dark"] .rg-email-fluent .rg-email-modal-head{background:rgba(17,28,45,.97);border-color:#2c4058}html[data-theme="dark"] .rg-email-title-icon{background:#163c5c;color:#65b5ef}html[data-theme="dark"] .rg-email-fluent .rg-email-modal-head h3,html[data-theme="dark"] .rg-email-account-copy strong,html[data-theme="dark"] .rg-email-recipient-label,html[data-theme="dark"] .rg-email-subject-row>label{color:#f1f5f9}html[data-theme="dark"] .rg-email-fluent .rg-email-modal-head p,html[data-theme="dark"] .rg-email-account-copy small,html[data-theme="dark"] .rg-email-recipient-label small{color:#a9b7c8}html[data-theme="dark"] .rg-email-fluent .rg-email-close{color:#d8e2ee}html[data-theme="dark"] .rg-email-fluent .rg-email-close:hover{background:#20324a}html[data-theme="dark"] .rg-email-account--compact{background:#15243a;border-color:#304760}html[data-theme="dark"] .rg-email-account-avatar{background:#0f6cbd}html[data-theme="dark"] .rg-email-account-action{background:#15243a;border-color:#3b5774;color:#72b7ec}html[data-theme="dark"] .rg-email-account-action:hover{background:#1a304a}html[data-theme="dark"] .rg-email-recipient-row,html[data-theme="dark"] .rg-email-subject-row{border-color:#2b3f56}html[data-theme="dark"] .rg-email-line-input{color:#f2f6fb!important}html[data-theme="dark"] .rg-email-line-input::placeholder{color:#788ba1}html[data-theme="dark"] .rg-email-contacts-trigger{color:#71b7ed}html[data-theme="dark"] .rg-email-contacts-trigger:hover{background:#17324c}html[data-theme="dark"] .rg-email-contact-suggestions{background:#18283e;border-color:#36506b}html[data-theme="dark"] .rg-email-contact-suggestions button:hover{background:#203650}html[data-theme="dark"] .rg-email-contact-suggestions strong{color:#f0f5fb}html[data-theme="dark"] .rg-email-contact-suggestions small{color:#9fb0c3}html[data-theme="dark"] .rg-email-editor-wrap{background:#101a2a;border-color:#354b64}html[data-theme="dark"] .rg-email-editor-wrap:focus-within{border-color:#4c9bd6;box-shadow:0 0 0 2px rgba(76,155,214,.15)}html[data-theme="dark"] .rg-email-editor-toolbar{background:#17263b;border-color:#31465e;color:#c9d4df}html[data-theme="dark"] .rg-email-editor-toolbar>span:hover{background:#233750}html[data-theme="dark"] .rg-email-body{background:#101a2a!important;color:#edf3f9!important}html[data-theme="dark"] .rg-email-body::placeholder{color:#71849a}html[data-theme="dark"] .rg-email-fluent .rg-email-footnote{background:#14253a;color:#a5b6c8}html[data-theme="dark"] .rg-email-fluent .rg-email-actions{border-color:#2d4259}html[data-theme="dark"] .rg-email-cancel-btn{background:#15243a;border-color:#3b516a;color:#e3ebf4}html[data-theme="dark"] .rg-email-cancel-btn:hover{background:#1d3048}html[data-theme="dark"] .rg-email-contacts-panel{background:#142238;border-color:#354c65;box-shadow:0 20px 55px rgba(0,0,0,.5)}html[data-theme="dark"] .rg-email-contacts-head,html[data-theme="dark"] .rg-email-contact-add{background:#17283e;border-color:#30465e}html[data-theme="dark"] .rg-email-contacts-head strong,html[data-theme="dark"] .rg-email-contact-info strong{color:#f0f5fb}html[data-theme="dark"] .rg-email-contacts-head small,html[data-theme="dark"] .rg-email-contact-info small{color:#9db0c4}html[data-theme="dark"] .rg-email-contacts-search,html[data-theme="dark"] .rg-email-contact-add input{background:#101c2d;border-color:#38516c;color:#f2f6fb}html[data-theme="dark"] .rg-email-contacts-search input{color:#f2f6fb}html[data-theme="dark"] .rg-email-contact-item:hover{background:#1e324a}html[data-theme="dark"] .rg-email-contact-avatar{background:#173d5e;color:#71b7ed}html[data-theme="dark"] .rg-email-contact-add button{background:#142238;border-color:#4d91c5;color:#74bbed}html[data-theme="dark"] .rg-email-send-animation{background:rgba(17,28,45,.96)}html[data-theme="dark"] .rg-email-send-animation>strong{color:#f2f6fb}html[data-theme="dark"] .rg-email-send-animation>small{color:#a9b8c8}html[data-theme="dark"] .rg-email-letter{background:#edf4fa;border-color:#6c8ba8}html[data-theme="dark"] .rg-email-letter span{background:#a6c3da}

@media(max-width:720px){.rg-email-modal{padding:8px}.rg-email-modal-card.rg-email-fluent{border-radius:14px}.rg-email-fluent .rg-email-modal-head{padding:17px}.rg-email-title-icon{display:none}.rg-email-account--compact{margin:12px 17px;grid-template-columns:34px minmax(0,1fr)}.rg-email-account-action{grid-column:1/-1;width:100%}.rg-email-compose{padding:2px 17px 17px}.rg-email-recipient-row,.rg-email-subject-row{grid-template-columns:70px minmax(0,1fr)}.rg-email-contacts-trigger{display:none}.rg-email-contact-suggestions{right:0}.rg-email-editor-wrap{margin-top:12px}.rg-email-contacts-panel{right:8px;top:90px;width:calc(100% - 16px);max-height:calc(100% - 106px)}}

/* BETA 1.2.3.5.40.8 · editor de correo enriquecido */
.rg-email-editor-wrap .rg-email-editor-toolbar.mail-rich-toolbar{min-height:42px;padding:5px 7px;gap:3px;background:#fafafa;color:#323130}
.rg-email-editor-wrap .rg-email-editor-toolbar.mail-rich-toolbar>button,.rg-email-editor-wrap .rg-email-editor-toolbar.mail-rich-toolbar>select{display:inline-flex;align-items:center;justify-content:center}
.rg-email-editor-wrap .rg-email-body.mail-rich-editor{width:100%;min-height:235px;max-height:390px;resize:none;padding:15px 16px;border:0!important;outline:0!important;background:#fff!important;color:#242424!important;font:400 .8rem/1.6 "Segoe UI",Arial,sans-serif;box-shadow:none!important}
.rg-email-editor-wrap .rg-email-body.mail-rich-editor.is-disabled{opacity:.55;pointer-events:none}
html[data-theme="dark"] .rg-email-editor-wrap .rg-email-editor-toolbar.mail-rich-toolbar{background:#17263b;border-color:#31465e;color:#e4edf6}html[data-theme="dark"] .rg-email-editor-wrap .rg-email-body.mail-rich-editor{background:#101a2a!important;color:#edf3f9!important}

/* BETA 1.2.3.5.40.10 · animación de envío centrada en viewport */
.rg-email-send-animation{position:fixed!important;z-index:230000!important;inset:0!important;min-height:100dvh!important;padding:24px!important;background:rgba(255,255,255,.96)!important;backdrop-filter:blur(12px)!important;overflow:hidden!important}
.rg-email-send-animation .rg-email-send-scene{flex:none;transform:translateY(-10px)}
body.rg-email-sending-lock{overflow:hidden!important}
html[data-theme="dark"] .rg-email-send-animation{background:rgba(17,28,45,.97)!important}


/* ═══════════════════════════════════════════════════════════════════════
   R7 · CORREO CORPORATIVO · MICROSOFT + CAPAS PRIORITARIAS
   ═══════════════════════════════════════════════════════════════════════ */
.rg-microsoft-connect{
  min-height:46px!important;padding:0 17px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:10px!important;border:1px solid #c9d3df!important;border-radius:10px!important;background:#fff!important;color:#1f2937!important;
  font-size:.78rem!important;font-weight:760!important;letter-spacing:0!important;box-shadow:0 2px 8px rgba(15,42,76,.06)!important;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease,transform .16s ease!important;
}
.rg-microsoft-connect:hover{background:#f8fafc!important;border-color:#9eb0c4!important;box-shadow:0 7px 18px rgba(15,42,76,.10)!important;transform:translateY(-1px)}
.rg-microsoft-connect:focus-visible{outline:3px solid rgba(37,99,235,.18)!important;outline-offset:2px!important}
.rg-microsoft-mark{width:18px;height:18px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:2px;flex:0 0 18px}
.rg-microsoft-mark i{display:block;background:#252525;border-radius:1px}
html[data-theme="dark"] .rg-microsoft-connect,body.dark .rg-microsoft-connect{background:#15263b!important;border-color:#3a536f!important;color:#f3f7fb!important;box-shadow:0 7px 18px rgba(0,0,0,.18)!important}
html[data-theme="dark"] .rg-microsoft-connect:hover,body.dark .rg-microsoft-connect:hover{background:#1a3049!important;border-color:#5b7591!important}
html[data-theme="dark"] .rg-microsoft-mark i,body.dark .rg-microsoft-mark i{background:#f2f5f8}
/* Los avisos del módulo nunca pueden quedar sepultados bajo un modal. */
.rg-toast-container{z-index:300600!important}
@media(max-width:620px){
  .rg-mail-bridge-alt{align-items:stretch!important;flex-direction:column!important;gap:10px!important}
  .rg-microsoft-connect{width:100%!important}
}
