.dr-soporte-modal-overlay,
.dr-soporte-modal-overlay *,
.dr-soporte-modal-overlay *::before,
.dr-soporte-modal-overlay *::after {
    box-sizing: border-box;
}

.dr-soporte-modal-overlay {
    /* Mismos tokens que kickoff.css/mensualidad.css y el hub consolidado. */
    --bg-dark: #f3f4f6;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.1);
    --accent-blue: var(--color-azul-digital, #2c3fcd);
    --accent-cyan: #00d2ff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --input-bg: #ffffff;
    --input-bg-hover: #f9fafb;
    --input-border: rgba(0, 0, 0, 0.15);

    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}
.dr-soporte-modal-overlay.dr-soporte-abierto {
    opacity: 1;
    pointer-events: auto;
}

.dr-soporte-modal {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 32px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dr-soporte-modal-overlay.dr-soporte-abierto .dr-soporte-modal {
    transform: translateY(0) scale(1);
}
/* --- FIX BOTÓN DE CERRAR MODAL --- */
button.dr-soporte-modal-close,
.dr-soporte-modal-close {
    -webkit-tap-highlight-color: transparent;
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 50% !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1 !important;
    z-index: 10;
}

/* Ícono o SVG dentro del botón */
.dr-soporte-modal-close svg,
.dr-soporte-modal-close i {
    width: 14px !important;
    height: 14px !important;
    font-size: 14px !important;
    color: #111827 !important; /* Forzado a oscuro contrastado */
    fill: #111827 !important;
    stroke: #111827 !important;
    display: block !important;
    margin: 0 auto !important;
    pointer-events: none;
}

/* Hover */
button.dr-soporte-modal-close:hover,
.dr-soporte-modal-close:hover {
    background: rgba(0, 0, 0, 0.12) !important;
    border-color: var(--accent-blue) !important;
    transform: scale(1.05);
}
.dr-soporte-modal-head { margin-bottom: 20px; padding-right: 32px; }
.dr-soporte-modal-head h3 { margin: 0; font-size: 20px; color: var(--text-main); font-weight: 800; }
.dr-soporte-modal-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }

/* Indicador de estado (conexión con n8n) — mismo pulso verde que el punto de
   "Sistemas operativos" del hub (portal-cliente.css), pero a escala del
   modal. Puramente informativo para el usuario, no depende de ningún dato
   real de disponibilidad del webhook (eso vive en la pantalla de Ajustes). */
.dr-soporte-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--text-muted);
}
.dr-soporte-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: dr-soporte-pulso 1.8s ease-in-out infinite;
}
@keyframes dr-soporte-pulso {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ---- Tabs ---- */
.dr-soporte-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 22px;
}
.dr-soporte-tab {
    -webkit-tap-highlight-color: transparent;
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dr-soporte-tab:hover { color: var(--text-light); }
.dr-soporte-tab.dr-soporte-tab-activo {
    background: linear-gradient(135deg, var(--accent-blue), #1a2ab5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(44, 63, 205, 0.35);
}

.dr-soporte-tab-panel[hidden] { display: none; }

/* ---- Formularios (CFDI / Accesos) ---- */

/* RFC + Código Postal Fiscal en la misma fila — ambos son campos cortos y es
   el emparejamiento natural en cualquier formulario fiscal mexicano. */
.dr-soporte-fila-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 380px) {
    .dr-soporte-fila-2col { grid-template-columns: 1fr; }
}

.dr-soporte-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.dr-soporte-field label { font-size: 12.5px; font-weight: 700; color: var(--text-main); }
.dr-soporte-field-nota { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: none; letter-spacing: normal; }
/* Dark glassmorphism homogéneo en TODOS los campos — igual que kickoff.css/mensualidad.css. */
.dr-soporte-field input,
.dr-soporte-field select,
.dr-soporte-field textarea {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--text-main) !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-family: inherit;
    font-weight: 500;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Select custom: appearance:none + chevron único vía background-image.
   Las 4 propiedades de background van con !important al MISMO nivel que
   el `background` shorthand `!important` de arriba — si solo background-image
   lleva !important y background-repeat no, un shorthand `background: ... !important`
   más específico (tema/Elementor) puede resetear repeat/position/size a sus
   valores iniciales (repeat / 0 0 / auto) sin tocar la imagen, y el resultado
   es exactamente el chevron mosaico duplicado que se veía en pantalla. */
.dr-soporte-field select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    cursor: pointer;
}
/* Cinturón y tirantes: en Firefox/Edge viejos appearance:none a veces no
   basta para quitar la flecha nativa en <select> con atributo `multiple`
   ausente; esto no aplica aquí pero -moz-appearance ya cubre Firefox. En IE11
   heredado (si aplica) sería ::-ms-expand { display:none }, no se agrega
   porque el sitio no soporta IE11. */
.dr-soporte-field select option { background: #ffffff; color: var(--text-main); }
.dr-soporte-field input::placeholder,
.dr-soporte-field textarea::placeholder { color: var(--text-muted); font-weight: 400; }
.dr-soporte-field input:hover,
.dr-soporte-field select:hover { border-color: rgba(0, 0, 0, 0.3) !important; background-color: var(--input-bg-hover) !important; }
.dr-soporte-field input:focus,
.dr-soporte-field select:focus,
.dr-soporte-field textarea:focus {
    outline: none;
    border-color: #00d2ff !important;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2) !important;
}
.dr-soporte-field input.dr-soporte-campo-valido,
.dr-soporte-field select.dr-soporte-campo-valido {
    border-color: #10b981 !important;
}
.dr-soporte-field textarea { resize: vertical; min-height: 70px; }
.dr-soporte-hint {
    margin: -2px 0 0;
    font-size: 11.5px;
    font-weight: 700;
    color: #ef4444;
    line-height: 1.4;
}

.dr-soporte-campo-invalido { border-color: #EF4444 !important; }

.dr-soporte-error {
    color: #ff8080;
    background: rgba(239, 68, 68, 0.14);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 700;
    margin: 0 0 14px;
}
.dr-soporte-exito {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.14);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 700;
    margin: 0 0 14px;
}

.dr-soporte-btn-primary {
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1a2ab5 100%);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(44, 63, 205, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.dr-soporte-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.08);
}
.dr-soporte-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* Spinner del botón — el <span class="dr-soporte-btn-spinner"> del PHP se
   muestra quitando el atributo `hidden` vía JS al enviar el formulario. */
.dr-soporte-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dr-soporte-girar 0.7s linear infinite;
}
@keyframes dr-soporte-girar {
    to { transform: rotate(360deg); }
}

/* ---- Pestaña VIP: link directo, sin formulario ---- */
.dr-soporte-hub-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s ease;
}
.dr-soporte-hub-option:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--accent-cyan);
    transform: translateX(4px);
}
.dr-soporte-hub-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(37, 211, 102, 0.12);
    color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
/* ELIMINAR SUBRAYADO Y LÍNEAS EN ENLACES DE LA PESTAÑA VIP */
a.dr-soporte-hub-option,
a.dr-soporte-hub-option *,
a.dr-soporte-hub-option:hover,
a.dr-soporte-hub-option:focus,
a.dr-soporte-hub-option:visited {
    text-decoration: none !important;
    text-decoration-line: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
}
.dr-soporte-hub-info { display: flex; flex-direction: column; gap: 2px; }
.dr-soporte-hub-info strong { font-size: 14.5px; }
.dr-soporte-hub-info span { font-size: 12px; color: var(--text-muted); }

@media (max-width: 480px) {
    .dr-soporte-modal { padding: 24px 20px; border-radius: 20px; }
}