﻿/* =========================================================
   Chat PDF Web - modo claro
   Archivo dedicado: wwwroot/css/chatpdf-theme.css
   Mantener después de app.css y chatpdf.css
========================================================= */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-page {
    color: #0f172a !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mired-content {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 34%), linear-gradient(180deg, #f8fbff, #eaf2fb) !important;
}

/* ===== Hero ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-hero {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.15), transparent 42%), linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96)) !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-kicker {
    color: #0369a1 !important;
    background: rgba(224, 242, 254, 0.86) !important;
    border-color: rgba(14, 165, 233, 0.28) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-hero h1 {
    color: #0f172a !important;
    text-shadow: none !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-hero p {
    color: #475569 !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-status-card {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 42%), rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(14, 165, 233, 0.28) !important;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-status-card strong {
        color: #0f172a !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-status-card span {
        color: #1e3a8a !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-status-card small {
        color: #64748b !important;
    }

/* ===== Paneles ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-panel,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-chat-premium {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 42%), rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    box-shadow: 0 22px 64px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-section-title > span {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.20) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-section-title h2 {
    color: #0f172a !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-section-title p {
    color: #64748b !important;
}

/* ===== Carga PDF / documento ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-file-picker {
    color: #1e3a8a !important;
    background: rgba(219, 234, 254, 0.72) !important;
    border-color: rgba(37, 99, 235, 0.32) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-file-picker:hover {
        background: rgba(219, 234, 254, 0.96) !important;
        border-color: rgba(37, 99, 235, 0.52) !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-doc-card {
    background: rgba(220, 252, 231, 0.86) !important;
    border-color: rgba(34, 197, 94, 0.32) !important;
    color: #065f46 !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-doc-card span {
        color: #166534 !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-info {
    color: #075985 !important;
    background: rgba(224, 242, 254, 0.84) !important;
    border-color: rgba(14, 165, 233, 0.28) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-error {
    color: #991b1b !important;
    background: rgba(254, 226, 226, 0.86) !important;
    border-color: rgba(239, 68, 68, 0.32) !important;
}

/* ===== Campos ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-field span {
    color: #334155 !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-field input,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-field select,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-compose textarea,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-compose-box textarea {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-field input:focus,
    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-field select:focus,
    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-compose textarea:focus {
        border-color: rgba(37, 99, 235, 0.58) !important;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-compose-box textarea::placeholder {
        color: #94a3b8 !important;
    }

/* ===== Botones laterales ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-secondary {
    color: #1e3a8a !important;
    background: rgba(255, 255, 255, 0.84) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-secondary:hover:not(:disabled) {
        color: #0f172a !important;
        background: rgba(239, 246, 255, 0.96) !important;
        border-color: rgba(37, 99, 235, 0.42) !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-quick-grid button {
    color: #1e3a8a !important;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 42%), rgba(255, 255, 255, 0.84) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-quick-grid button:hover {
        color: #0f172a !important;
        background: rgba(239, 246, 255, 0.98) !important;
        border-color: rgba(37, 99, 235, 0.42) !important;
    }

/* ===== Área de conversación ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-messages,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-messages.premium {
    background: radial-gradient(circle at top left, rgba(219, 234, 254, 0.76), transparent 42%), linear-gradient(180deg, #fbfdff, #eef4fb) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 16px 42px rgba(15, 23, 42, 0.06) !important;
    scrollbar-color: rgba(37, 99, 235, 0.42) rgba(226, 232, 240, 0.70) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-messages.premium::-webkit-scrollbar-track {
        background: rgba(226, 232, 240, 0.70) !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-messages.premium::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, rgba(37, 99, 235, 0.60), rgba(14, 165, 233, 0.52)) !important;
        border-color: rgba(226, 232, 240, 0.90) !important;
    }

/* Empty conversation */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-empty,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .premium-empty {
    color: #64748b !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-empty h3,
    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .premium-empty h3 {
        color: #0f172a !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-empty p,
    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .premium-empty p {
        color: #64748b !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .premium-empty-icon {
    color: #2563eb !important;
    background: rgba(219, 234, 254, 0.84) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.12) !important;
}

/* Burbujas */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble.assistant,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble.assistant.premium {
    color: #1f2937 !important;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 42%), rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble.user,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble.user.premium {
    color: #ffffff !important;
    background: radial-gradient(circle at top right, rgba(125, 211, 252, 0.34), transparent 34%), linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    border-color: rgba(37, 99, 235, 0.28) !important;
    box-shadow: 0 18px 46px rgba(37, 99, 235, 0.22) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-role-pill {
    color: #1e3a8a !important;
    background: rgba(219, 234, 254, 0.82) !important;
    border-color: rgba(37, 99, 235, 0.22) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-time,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble header span {
    color: #64748b !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble.user .pdfchat-time,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble.user header span {
    color: rgba(255, 255, 255, 0.80) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-message-text {
    color: inherit !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-citation,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-citation.premium {
    color: #92400e !important;
    background: rgba(254, 243, 199, 0.88) !important;
    border-color: rgba(245, 158, 11, 0.30) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-quote,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-quote.premium,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-bubble blockquote {
    color: #334155 !important;
    background: rgba(239, 246, 255, 0.84) !important;
    border-left-color: rgba(37, 99, 235, 0.62) !important;
}

/* Avatares */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-avatar.assistant-avatar {
    color: #1e3a8a !important;
    background: radial-gradient(circle at 35% 25%, rgba(147, 197, 253, 0.90), transparent 28%), linear-gradient(135deg, #dbeafe, #eff6ff) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-avatar.system-avatar {
    color: #1e3a8a !important;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe) !important;
    border-color: rgba(37, 99, 235, 0.22) !important;
}

/* Copiar / acciones */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-copy,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-copy.premium,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-icon-action {
    color: #1e3a8a !important;
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-copy:hover,
    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-copy.premium:hover,
    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-icon-action:hover {
        color: #0f172a !important;
        background: rgba(239, 246, 255, 0.98) !important;
        border-color: rgba(37, 99, 235, 0.42) !important;
    }

/* ===== Caja para escribir ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-compose-box {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 42%), rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(37, 99, 235, 0.26) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-compose-box:focus-within {
        border-color: rgba(37, 99, 235, 0.58) !important;
        box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12), 0 0 0 4px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-compose-footer {
    border-top-color: rgba(148, 163, 184, 0.22) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-attach-button {
    color: #1e3a8a !important;
    background: rgba(219, 234, 254, 0.72) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-attach-button:hover {
        background: rgba(219, 234, 254, 0.96) !important;
        border-color: rgba(37, 99, 235, 0.42) !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-send-hint {
    color: #64748b !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-send-button {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    box-shadow: 0 15px 32px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

/* ===== Texto extraído ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-preview-box {
    color: #334155 !important;
    background: linear-gradient(180deg, #fffdf7, #f8f2e7) !important;
    border-color: rgba(180, 170, 150, 0.34) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 16px 42px rgba(80, 70, 55, 0.08) !important;
}

/* ===== Ayuda con API Key - modo claro ===== */

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-button {
    color: #92400e !important;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.20), transparent 44%), rgba(254, 243, 199, 0.86) !important;
    border-color: rgba(245, 158, 11, 0.38) !important;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.10) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-button:hover {
        color: #78350f !important;
        background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.26), transparent 44%), rgba(254, 243, 199, 0.98) !important;
        border-color: rgba(245, 158, 11, 0.58) !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-overlay {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 36%), rgba(226, 232, 240, 0.78) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-modal {
    color: #0f172a !important;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 36%), radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 34%), linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.99)) !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-header {
    border-bottom-color: rgba(148, 163, 184, 0.22) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-header span {
        color: #92400e !important;
        background: rgba(254, 243, 199, 0.86) !important;
        border-color: rgba(245, 158, 11, 0.30) !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-header h2 {
        color: #0f172a !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-header p {
        color: #475569 !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-header button {
        color: #334155 !important;
        background: rgba(255, 255, 255, 0.86) !important;
        border-color: rgba(148, 163, 184, 0.30) !important;
    }

        :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-header button:hover {
            color: #0f172a !important;
            border-color: rgba(37, 99, 235, 0.42) !important;
            background: rgba(239, 246, 255, 0.96) !important;
        }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-grid article {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 42%), rgba(255, 255, 255, 0.84) !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-grid article strong {
        color: #0f172a !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-grid article p {
        color: #475569 !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-warning {
    background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.10), transparent 42%), rgba(254, 226, 226, 0.82) !important;
    border-color: rgba(239, 68, 68, 0.28) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-warning strong {
        color: #991b1b !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-warning code {
        color: #7f1d1d !important;
        background: rgba(255, 255, 255, 0.72) !important;
        border-color: rgba(239, 68, 68, 0.22) !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .pdfchat-api-help-warning p {
        color: #991b1b !important;
    }


/* =========================================================
   Mi PDF Web - lista larga de páginas con scroll propio
========================================================= */

.mipdf-pages-panel {
    align-self: start !important;
    position: sticky !important;
    top: 92px !important;
    max-height: calc(100vh - 116px) !important;
    overflow: hidden !important;
}

    .mipdf-pages-panel .mipdf-section-title {
        flex: 0 0 auto !important;
    }

.mipdf-page-list {
    max-height: calc(100vh - 250px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 6px !important;
    scroll-behavior: auto !important;
    overscroll-behavior: contain !important;
}

    .mipdf-page-list::-webkit-scrollbar {
        width: 10px !important;
    }

    .mipdf-page-list::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.18) !important;
        border-radius: 999px !important;
    }

    .mipdf-page-list::-webkit-scrollbar-thumb {
        background: rgba(96, 165, 250, 0.46) !important;
        border-radius: 999px !important;
        border: 2px solid rgba(15, 23, 42, 0.18) !important;
    }

    .mipdf-page-list.drag-auto-scroll {
        scroll-behavior: auto !important;
    }

.mipdf-page-item.dragging {
    opacity: 0.62 !important;
    transform: scale(0.985) !important;
}

.mipdf-page-item.drag-target {
    border-color: rgba(56, 189, 248, 0.86) !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22), 0 18px 42px rgba(14, 165, 233, 0.16) !important;
}

.mipdf-drop-end.end-target {
    border-color: rgba(56, 189, 248, 0.86) !important;
    background: rgba(14, 165, 233, 0.16) !important;
    color: #e0f2fe !important;
}

/* Modo claro */
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-page-list::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.78) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-page-list::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.46) !important;
    border-color: rgba(226, 232, 240, 0.78) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-drop-end.end-target {
    background: rgba(219, 234, 254, 0.92) !important;
    color: #1e3a8a !important;
}

/* =========================================================
   Mi PDF Web - modal Desplazar páginas
========================================================= */

.mipdf-move-card {
    width: min(720px, 94vw) !important;
}

.mipdf-move-body {
    display: grid !important;
    gap: 16px !important;
    padding: 22px !important;
}

    .mipdf-move-body label {
        display: grid !important;
        gap: 8px !important;
        color: #dbeafe !important;
        font-weight: 950 !important;
    }

.mipdf-move-input {
    width: 100% !important;
    min-height: 46px !important;
    border-radius: 16px !important;
    padding: 0 14px !important;
    color: #e5edf8 !important;
    background: rgba(2, 6, 23, 0.72) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    font-weight: 800 !important;
}

    .mipdf-move-input:focus {
        outline: none !important;
        border-color: rgba(56, 189, 248, 0.66) !important;
        box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12) !important;
    }

.mipdf-move-helper,
.mipdf-move-status {
    padding: 14px 16px !important;
    border-radius: 18px !important;
    line-height: 1.5 !important;
}

.mipdf-move-helper {
    color: #bfdbfe !important;
    background: rgba(37, 99, 235, 0.12) !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
}

    .mipdf-move-helper strong,
    .mipdf-move-helper span {
        display: block !important;
    }

    .mipdf-move-helper span {
        margin-top: 4px !important;
        color: #94a3b8 !important;
        font-weight: 750 !important;
    }

.mipdf-move-status {
    color: #fecaca !important;
    background: rgba(127, 29, 29, 0.18) !important;
    border: 1px solid rgba(248, 113, 113, 0.28) !important;
    font-weight: 850 !important;
}

/* Modo claro */
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-move-body label {
    color: #1e3a8a !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-move-input {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-move-helper {
    color: #1e3a8a !important;
    background: rgba(219, 234, 254, 0.82) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-move-helper span {
        color: #475569 !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-move-status {
    color: #991b1b !important;
    background: rgba(254, 226, 226, 0.84) !important;
    border-color: rgba(239, 68, 68, 0.28) !important;
}

/* =========================================================
   Mi PDF Web - Buscar texto flotante
========================================================= */

.mipdf-search-floating {
    position: fixed !important;
    top: 92px !important;
    right: 28px !important;
    z-index: 99998 !important;
    width: min(430px, calc(100vw - 32px)) !important;
    padding: 16px !important;
    border-radius: 24px !important;
    color: #e5edf8 !important;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 42%), linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98)) !important;
    border: 1px solid rgba(96, 165, 250, 0.30) !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(18px) !important;
}

    .mipdf-search-floating header {
        display: flex !important;
        justify-content: space-between !important;
        gap: 14px !important;
        align-items: flex-start !important;
        margin-bottom: 12px !important;
    }

        .mipdf-search-floating header strong {
            display: block !important;
            color: #ffffff !important;
            font-size: 1.06rem !important;
            font-weight: 950 !important;
        }

        .mipdf-search-floating header span {
            display: block !important;
            margin-top: 3px !important;
            color: #94a3b8 !important;
            font-size: 0.86rem !important;
            line-height: 1.35 !important;
        }

        .mipdf-search-floating header button {
            width: 32px !important;
            height: 32px !important;
            display: grid !important;
            place-items: center !important;
            border-radius: 999px !important;
            border: 1px solid rgba(148, 163, 184, 0.28) !important;
            background: rgba(15, 23, 42, 0.76) !important;
            color: #cbd5e1 !important;
            cursor: pointer !important;
        }

.mipdf-search-input-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 9px !important;
}

.mipdf-search-input {
    min-height: 42px !important;
    border-radius: 15px !important;
    padding: 0 13px !important;
    color: #e5edf8 !important;
    background: rgba(2, 6, 23, 0.72) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    font-weight: 800 !important;
}

    .mipdf-search-input:focus {
        outline: none !important;
        border-color: rgba(56, 189, 248, 0.66) !important;
        box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12) !important;
    }

.mipdf-search-input-row button,
.mipdf-search-controls button {
    min-height: 42px !important;
    border-radius: 15px !important;
    padding: 0 13px !important;
    border: 1px solid rgba(96, 165, 250, 0.28) !important;
    background: rgba(30, 64, 175, 0.28) !important;
    color: #dbeafe !important;
    font-weight: 900 !important;
    cursor: pointer !important;
}

    .mipdf-search-input-row button:hover:not(:disabled),
    .mipdf-search-controls button:hover:not(:disabled) {
        background: rgba(37, 99, 235, 0.42) !important;
        border-color: rgba(96, 165, 250, 0.52) !important;
    }

    .mipdf-search-input-row button:disabled,
    .mipdf-search-controls button:disabled {
        opacity: 0.48 !important;
        cursor: not-allowed !important;
    }

.mipdf-search-controls {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
    margin-top: 10px !important;
}

    .mipdf-search-controls span {
        justify-self: end !important;
        color: #bfdbfe !important;
        font-size: 0.84rem !important;
        font-weight: 900 !important;
    }

.mipdf-search-message,
.mipdf-search-current {
    margin-top: 11px !important;
    padding: 12px 13px !important;
    border-radius: 16px !important;
    line-height: 1.45 !important;
}

.mipdf-search-message {
    color: #bfdbfe !important;
    background: rgba(37, 99, 235, 0.13) !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
    font-size: 0.86rem !important;
}

.mipdf-search-current {
    color: #e5edf8 !important;
    background: rgba(15, 23, 42, 0.56) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
}

    .mipdf-search-current strong {
        display: block !important;
        color: #ffffff !important;
        margin-bottom: 5px !important;
    }

    .mipdf-search-current p {
        margin: 0 !important;
        color: #b6c4d8 !important;
        font-size: 0.88rem !important;
    }

.mipdf-search-mark {
    display: inline-flex !important;
    width: fit-content !important;
    margin-top: 6px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    color: #fde68a !important;
    background: rgba(250, 204, 21, 0.12) !important;
    border: 1px solid rgba(250, 204, 21, 0.26) !important;
    font-size: 0.72rem !important;
    font-weight: 950 !important;
}

/* Modo claro */
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-floating {
    color: #0f172a !important;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 42%), linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.98)) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-floating header strong {
        color: #0f172a !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-floating header span {
        color: #64748b !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-floating header button {
        color: #334155 !important;
        background: rgba(255, 255, 255, 0.86) !important;
        border-color: rgba(148, 163, 184, 0.30) !important;
    }

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-input {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-input-row button,
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-controls button {
    color: #1e3a8a !important;
    background: rgba(219, 234, 254, 0.82) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-controls span {
    color: #1e3a8a !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-message {
    color: #1e3a8a !important;
    background: rgba(219, 234, 254, 0.82) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-current {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-current strong {
        color: #0f172a !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-current p {
        color: #475569 !important;
    }

@media (max-width: 760px) {
    .mipdf-search-floating {
        top: auto !important;
        right: 12px !important;
        left: 12px !important;
        bottom: 16px !important;
        width: auto !important;
    }

    .mipdf-search-controls {
        grid-template-columns: 1fr 1fr !important;
    }

        .mipdf-search-controls span {
            grid-column: 1 / -1 !important;
            justify-self: start !important;
        }
}

/* =========================================================
   Mi PDF Web - Subrayado asistido de búsqueda
========================================================= */

.mipdf-search-inline-mark {
    display: inline !important;
    padding: 0 2px !important;
    border-radius: 4px !important;
    color: #fef3c7 !important;
    background: rgba(250, 204, 21, 0.20) !important;
    box-shadow: inset 0 -2px 0 rgba(250, 204, 21, 0.88) !important;
    font-weight: 950 !important;
}

.mipdf-search-page-active {
    position: absolute !important;
    top: 18px !important;
    left: 50% !important;
    z-index: 18 !important;
    width: min(420px, calc(100% - 36px)) !important;
    transform: translateX(-50%) !important;
    display: grid !important;
    gap: 4px !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    color: #fef3c7 !important;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.18), transparent 42%), rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(250, 204, 21, 0.42) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(14px) !important;
    pointer-events: none !important;
    animation: mipdfSearchPulse 0.35s ease-out !important;
}

    .mipdf-search-page-active span {
        color: #fde68a !important;
        font-size: 0.72rem !important;
        font-weight: 950 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.10em !important;
    }

    .mipdf-search-page-active strong {
        color: #ffffff !important;
        font-size: 1rem !important;
        font-weight: 950 !important;
        overflow-wrap: anywhere !important;
    }

    .mipdf-search-page-active small {
        color: #fef3c7 !important;
        font-weight: 800 !important;
    }

.mipdf-search-page-underline {
    position: absolute !important;
    left: 14% !important;
    right: 14% !important;
    top: 50% !important;
    z-index: 17 !important;
    height: 6px !important;
    border-radius: 999px !important;
    background: linear-gradient( 90deg, transparent, rgba(250, 204, 21, 0.92), transparent ) !important;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.58), 0 0 42px rgba(250, 204, 21, 0.24) !important;
    pointer-events: none !important;
    animation: mipdfSearchUnderline 0.42s ease-out !important;
}

@keyframes mipdfSearchPulse {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes mipdfSearchUnderline {
    from {
        opacity: 0;
        transform: scaleX(0.45);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Modo claro */
:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-inline-mark {
    color: #78350f !important;
    background: rgba(254, 243, 199, 0.96) !important;
    box-shadow: inset 0 -2px 0 rgba(245, 158, 11, 0.88) !important;
}

:is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-page-active {
    color: #78350f !important;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.22), transparent 42%), rgba(255, 251, 235, 0.94) !important;
    border-color: rgba(245, 158, 11, 0.42) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-page-active span {
        color: #92400e !important;
     }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-page-active strong {
        color: #111827 !important;
    }

    :is(html.theme-light, html[data-theme="light"], body.theme-light, body[data-theme="light"], [data-bs-theme="light"]) .mipdf-search-page-active small {
        color: #92400e !important;
    }