        :root {
            /* Premium Palette: Adaptado exactamente al fondo del nuevo logo (#066777) */
            --bg-deep: #066777;
            --bg-panel: #0b4e5a;
            --bg-glass: rgba(6, 103, 119, 0.85);
            --gold-primary: #d4af37;
            --gold-light: #f3e5ab;
            --gold-dark: #aa8c2c;
            --gold-glow: rgba(212, 175, 55, 0.15);
            --text-main: #e0e0e0;
            --text-muted: #9e9e9e;
            --border-glass: rgba(212, 175, 55, 0.2);
            --border-glow: rgba(212, 175, 55, 0.4);
            --error-red: #cf6679;
            --success-green: #4caf50;
            --user-font-size: 16px;
        }

        body.large-text {
            --user-font-size: 20px;
        }

        body.light-mode {
            --bg-deep: #f4f6f8;
            --bg-panel: #ffffff;
            --bg-glass: rgba(255, 255, 255, 0.95);
            --gold-primary: #997300;
            --gold-light: #4a3b00;
            --gold-dark: #7a5c00;
            --gold-glow: rgba(153, 115, 0, 0.1);
            --text-main: #1e293b;
            --text-muted: #64748b;
            --border-glass: rgba(153, 115, 0, 0.25);
            --border-glow: rgba(153, 115, 0, 0.35);
            background-color: var(--bg-deep);
            background-image: none;
            color: var(--text-main);
        }

        /* --- HITO 19: ESTILOS DE VISTA PREVIA FREEMIUM --- */
        .freemium-preview {
            position: relative;
            overflow: hidden;
        }
        .freemium-preview .blur-text {
            filter: blur(4px);
            user-select: none;
            pointer-events: none;
        }
        .freemium-preview::after {
            content: "LEXSUMMA - BORRADOR FREEMIUM";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-25deg);
            font-size: 24px;
            color: rgba(212, 175, 55, 0.15);
            font-weight: 900;
            white-space: nowrap;
            letter-spacing: 5px;
            pointer-events: none;
            z-index: 5;
            text-shadow: 0 0 4px rgba(0,0,0,0.5);
            border: 2px dashed rgba(212, 175, 55, 0.15);
            padding: 10px 20px;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: 'Outfit', sans-serif;
            background-color: var(--bg-deep);
            background-image: 
                radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.03), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(212, 175, 55, 0.04), transparent 25%);
            color: var(--text-main);
            min-height: 100vh;
            padding: 75px 20px 40px 20px;
            line-height: 1.6;
        }

        /* CINTA ROJA HORIZONTAL PEGAJOSA SUPERIOR ANTES DEL HEADER */
        .ribbon-red {
            position: sticky;
            top: 0;
            left: 0;
            width: 100%;
            transform: none !important;
            background: linear-gradient(90deg, #b91c1c 0%, #ef4444 50%, #b91c1c 100%);
            color: #ffffff;
            font-family: 'Outfit', sans-serif;
            font-size: 13px;
            font-weight: 800;
            padding: 10px 15px;
            text-align: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            z-index: 999999;
            letter-spacing: 1px;
            text-transform: uppercase;
            border-bottom: 1px solid rgba(255, 255, 255, 0.25);
            margin-bottom: 0;
        }
        
        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-glass);
            border-radius: 24px;
            box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
            overflow: hidden;
            animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .header {
            padding: 50px 40px 30px;
            text-align: center;
            border-bottom: 1px solid var(--border-glass);
            position: relative;
            overflow: hidden;
        }

        .header::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; height: 1px;
            background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
            opacity: 0.5;
        }
        
        .header h1 {
            font-family: 'Playfair Display', serif;
            font-size: 42px;
            color: var(--gold-primary);
            margin-bottom: 15px;
            letter-spacing: -0.5px;
            text-shadow: 0 2px 10px var(--gold-glow);
        }
        
        /* CINTA ROJA DIAGONAL SUPERIOR */
        .ribbon-red {
            position: fixed;
            top: 25px;
            right: -45px;
            transform: rotate(45deg);
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: #ffffff;
            font-family: 'Outfit', sans-serif;
            font-size: 11px;
            font-weight: 700;
            padding: 7px 48px;
            box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
            z-index: 999999;
            letter-spacing: 0.6px;
            pointer-events: none;
            text-transform: uppercase;
            border: 1px solid rgba(255,255,255,0.2);
        }

        #headerLogo {
            max-width: 380px;
            width: 100%;
            height: auto;
            border-radius: 16px;
            border: 1px solid rgba(212, 175, 55, 0.35);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.15);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: block;
            margin-left: auto;
            margin-right: auto;
        }

        #headerLogo:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.25);
        }

        .header p {
            font-size: 16px;
            color: var(--text-muted);
            font-weight: 300;
            letter-spacing: 0.5px;
            text-transform: none;
        }
        
        .server-status-banner {
            padding: 12px 20px;
            font-size: 13px;
            text-align: center;
            font-weight: 500;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        
        .server-connected {
            background-color: rgba(76, 175, 80, 0.1);
            color: var(--success-green);
            border-bottom: 1px solid rgba(76, 175, 80, 0.2);
        }
        
        .server-disconnected {
            background-color: rgba(207, 102, 121, 0.1);
            color: var(--error-red);
            border-bottom: 1px solid rgba(207, 102, 121, 0.2);
        }

        .status {
            background: var(--bg-panel);
            border-left: 4px solid var(--gold-primary);
            padding: 12px 24px;
            margin: 10px 40px 14px 40px;
            border-radius: 8px;
            color: var(--text-muted);
            font-size: 15.5px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .status i {
            color: var(--gold-primary);
            font-size: 18px;
        }
        
        .tabs {
            display: flex;
            gap: 30px;
            padding: 0 40px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        
        .tab-btn {
            padding: 20px 10px;
            border: none;
            background: none;
            cursor: pointer;
            font-size: 15px;
            font-family: 'Outfit', sans-serif;
            font-weight: 500;
            color: var(--text-muted);
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
            position: relative;
        }
        
        .tab-btn:hover {
            color: var(--gold-light);
        }

        .tab-btn.active {
            color: var(--gold-primary);
            border-bottom-color: var(--gold-primary);
        }

        .tab-btn.active::after {
            content: '';
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 20px;
            background: linear-gradient(to top, var(--gold-glow), transparent);
            pointer-events: none;
        }
        
        .tab-content {
            display: none;
            padding: 40px;
            animation: fadeIn 0.4s ease;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .form-section {
            margin-bottom: 40px;
        }
        
        .form-section h2 {
            font-family: 'Playfair Display', serif;
            color: var(--gold-primary);
            font-size: 22px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .step-num {
            background: rgba(212, 175, 55, 0.1);
            color: var(--gold-primary);
            width: 28px; height: 28px;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-family: 'Outfit', sans-serif;
            font-size: 14px;
            border: 1px solid var(--border-glass);
        }
        
        .form-section p {
            color: var(--text-muted);
            margin-bottom: 20px;
            font-size: 14px;
            padding-left: 38px;
        }
        
        .form-group textarea {
            width: 100%;
            padding: 20px;
            background: var(--bg-panel);
            border: 1px solid var(--border-glass);
            border-radius: 12px;
            color: var(--text-main);
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            min-height: 180px;
            resize: vertical;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            line-height: 1.6;
        }
        
        .form-group textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 4px var(--gold-glow);
            background: #181818;
        }

        .form-group textarea::placeholder {
            color: #555;
        }
        
        .file-upload {
            background: var(--bg-panel);
            border: 1px dashed var(--border-glass);
            border-radius: 12px;
            padding: 16px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .file-upload:hover {
            border-color: var(--gold-primary);
            background: #181818;
        }
        
        .file-upload input {
            display: none;
        }

        .upload-icon {
            font-size: 22px;
            margin-bottom: 8px;
            display: block;
            opacity: 0.7;
        }
        
        .file-list {
            margin-top: 15px;
        }
        
        .file-item {
            background: rgba(212, 175, 55, 0.05);
            border: 1px solid var(--border-glass);
            padding: 12px 16px;
            border-radius: 8px;
            margin: 5px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            color: var(--gold-light);
        }
        
        .btn {
            padding: 16px 32px;
            border: none;
            border-radius: 12px;
            font-family: 'Outfit', sans-serif;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            letter-spacing: 0.5px;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
            color: #000;
            box-shadow: 0 8px 20px var(--gold-glow);
        }
        
        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 12px 25px rgba(212, 175, 55, 0.3);
            filter: brightness(1.1);
        }
        
        .btn-primary:disabled {
            background: #333;
            color: #666;
            box-shadow: none;
            cursor: not-allowed;
        }
        
        /* Premium Skeleton Loading & Progress Bar */
        .loading {
            display: none;
            margin-top: 40px;
        }

        .progress-container {
            width: 100%;
            background: #181818;
            height: 10px;
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 25px;
            border: 1px solid rgba(212, 175, 55, 0.1);
        }

        .progress-bar {
            width: 0%;
            height: 100%;
            background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
            box-shadow: 0 0 10px var(--gold-glow);
            transition: width 0.4s ease-out, background 0.4s ease;
        }

        .progress-status {
            color: var(--gold-light);
            font-size: 14px;
            font-weight: 500;
            text-align: center;
            margin-bottom: 15px;
            letter-spacing: 0.5px;
        }

        .skeleton-title {
            height: 24px;
            width: 40%;
            background: #222;
            border-radius: 4px;
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }

        .skeleton-text {
            height: 12px;
            background: #222;
            border-radius: 4px;
            margin-bottom: 12px;
            position: relative;
            overflow: hidden;
        }

        .skeleton-text.w-80 { width: 80%; }
        .skeleton-text.w-60 { width: 60%; }
        .skeleton-text.w-90 { width: 90%; }

        .skeleton-title::after, .skeleton-text::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
            transform: translateX(-100%);
            animation: shimmer 1.5s infinite;
        }

        @keyframes shimmer {
            100% { transform: translateX(100%); }
        }

        .loading-text {
            text-align: center;
            color: var(--gold-primary);
            font-size: 14px;
            margin-bottom: 30px;
            letter-spacing: 1px;
            animation: pulseText 2s infinite;
        }

        @keyframes pulseText {
            0% { opacity: 0.6; }
            50% { opacity: 1; }
            100% { opacity: 0.6; }
        }
        
        .resultado {
            background: var(--bg-panel);
            border: 1px solid var(--border-glass);
            padding: 35px;
            border-radius: 16px;
            margin-top: 40px;
            display: none;
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
            position: relative;
        }
        
        .resultado.show {
            display: block;
            animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .resultado h3 {
            font-family: 'Playfair Display', serif;
            color: var(--gold-primary);
            font-size: 24px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .badge-subtema {
            display: inline-block;
            background: rgba(212, 175, 55, 0.1);
            color: var(--gold-light);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            border: 1px solid var(--border-glass);
            margin-bottom: 25px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }
        
        .documento-box {
            background: #0a0a0a;
            border: 1px solid #333;
            padding: 25px;
            border-radius: 12px;
            margin: 25px 0;
            position: relative;
        }

        .documento-box::before {
            content: '';
            position: absolute;
            top: 0; left: 0; bottom: 0; width: 3px;
            background: var(--gold-primary);
            border-radius: 12px 0 0 12px;
        }
        
        .documento-title {
            color: var(--text-muted);
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 12px;
        }
        
        .relato-texto {
            font-size: 14px;
            line-height: 1.8;
            color: var(--text-main);
            font-family: 'Outfit', sans-serif;
            font-style: italic;
        }
        
        .btn-descargar {
            background: transparent;
            color: var(--gold-primary);
            padding: 14px 24px;
            border: 1px solid var(--gold-primary);
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-family: 'Outfit', sans-serif;
            font-weight: 500;
            width: 100%;
            margin-top: 15px;
            transition: all 0.3s ease;
        }
        
        .btn-descargar:hover {
            background: var(--gold-glow);
        }

        .btn-radicar {
            background: #1e1e1e;
            color: #fff;
            border: 1px solid #333;
        }

        .btn-radicar:hover {
            background: #2a2a2a;
            border-color: #555;
        }
        
        footer {
            margin-top: 40px;
            text-align: center;
            font-size: 12px;
            color: #555;
            letter-spacing: 1px;
        }

        .alert-box {
            background: rgba(207, 102, 121, 0.1);
            border: 1px solid rgba(207, 102, 121, 0.3);
            color: var(--error-red);
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            font-size: 13px;
        }

        .timeline-box {
            background: rgba(255,255,255,0.02);
            border: 1px solid #333;
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 25px;
        }

        .timeline-box h4 {
            color: var(--text-main);
            margin-bottom: 15px;
            font-size: 14px;
            font-weight: 500;
        }

        .timeline-item {
            position: relative;
            padding-left: 20px;
            margin-bottom: 10px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: 0; top: 6px;
            width: 6px; height: 6px;
            background: var(--gold-primary);
            border-radius: 50%;
        }

        /* --- AUTH MODAL CSS --- */
        .auth-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 1;
            transition: opacity 0.5s ease;
        }

        .auth-overlay.hidden {
            display: none !important;
            opacity: 0;
            pointer-events: none;
        }

        .auth-box {
            background: var(--bg-panel);
            border: 1px solid var(--border-glass);
            border-radius: 20px;
            padding: 40px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 25px 50px rgba(0,0,0,0.5);
            text-align: center;
        }

        .auth-box h2 {
            font-family: 'Playfair Display', serif;
            color: var(--gold-primary);
            font-size: 28px;
            margin-bottom: 25px;
        }

        .auth-box input {
            width: 100%;
            padding: 15px;
            margin-bottom: 15px;
            background: #111;
            border: 1px solid #333;
            border-radius: 8px;
            color: #fff;
            font-family: 'Outfit', sans-serif;
        }

        .auth-box input:focus {
            outline: none;
            border-color: var(--gold-primary);
        }

        .auth-toggle {
            margin-top: 20px;
            font-size: 13px;
            color: var(--text-muted);
            cursor: pointer;
        }

        .auth-toggle:hover {
            color: var(--gold-light);
            text-decoration: underline;
        }

        .user-menu {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin: 12px auto;
        }

        .user-email {
            font-size: 13px;
            color: var(--text-muted);
        }

        .btn-logout {
            background: transparent;
            border: 1px solid #555;
            color: #fff;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
        }

        .btn-logout:hover {
            border-color: var(--error-red);
            color: var(--error-red);
        }

        /* --- ESTILOS ADICIONALES PREMIUM --- */
        .template-btn-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
            padding-left: 38px;
        }

        .template-btn {
            background: rgba(212, 175, 55, 0.05);
            border: 1px solid var(--border-glass);
            color: var(--gold-light);
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Outfit', sans-serif;
        }

        .template-btn:hover {
            background: rgba(212, 175, 55, 0.15);
            border-color: var(--gold-primary);
            color: #fff;
            transform: translateY(-1px);
        }

        .timeline-steps {
            position: relative;
            margin: 20px 0;
            padding-left: 20px;
            border-left: 2px dashed var(--gold-primary);
        }

        .timeline-step {
            position: relative;
            margin-bottom: 20px;
        }

        .timeline-step::before {
            content: '';
            position: absolute;
            left: -26px;
            top: 5px;
            width: 10px;
            height: 10px;
            background: var(--gold-primary);
            border-radius: 50%;
            box-shadow: 0 0 8px var(--gold-primary);
        }

        .timeline-step strong {
            color: var(--gold-light);
            display: block;
            margin-bottom: 4px;
        }

        .preview-box {
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid var(--border-glass);
            border-radius: 12px;
            padding: 20px;
            margin: 25px 0;
        }

        .preview-header {
            color: var(--gold-primary);
            font-family: 'Playfair Display', serif;
            font-size: 16px;
            margin-bottom: 12px;
            border-bottom: 1px solid rgba(212, 175, 55, 0.2);
            padding-bottom: 6px;
        }

        .preview-item {
            margin-bottom: 8px;
            font-size: 13px;
        }

        .preview-item span {
            color: var(--text-muted);
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: rgba(25, 25, 25, 0.5);
            border: 1px solid var(--border-glass);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
        }

        .stat-val {
            font-family: 'Playfair Display', serif;
            color: var(--gold-primary);
            font-size: 32px;
            font-weight: 700;
            margin-top: 5px;
        }

        /* --- RESPONSIVIDAD PARA CELULARES Y TABLETS (ANDROID / IPHONE) --- */
        @media (max-width: 768px) {
            body {
                padding: 10px 5px;
            }
            .container {
                border-radius: 12px;
                margin: 0 auto;
            }
            .header {
                padding: 30px 15px 20px;
            }
            .header h1 {
                font-size: 28px;
            }
            .tabs {
                padding: 0 15px;
                gap: 15px;
                overflow-x: auto;
                white-space: nowrap;
                scrollbar-width: none;
            }
            .tabs::-webkit-scrollbar {
                display: none;
            }
            .tab-btn {
                padding: 15px 5px;
                font-size: 13px;
                flex-shrink: 0;
            }
            .tab-content {
                padding: 20px 15px;
            }
            .status {
                margin: 6px 15px 10px 15px;
                padding: 10px 12px;
                font-size: 13.5px;
            }
            .form-section p {
                padding-left: 0;
            }
            .form-section h2 {
                font-size: 18px;
            }
            .template-btn-container {
                flex-wrap: wrap;
                gap: 8px;
            }
            .template-btn {
                font-size: 11px;
                padding: 6px 10px;
            }
            #signatureCanvas {
                width: 100% !important;
                height: 150px !important;
            }
            .preview-box {
                padding: 15px 10px;
            }
        }

        @media (max-width: 480px) {
            .header h1 {
                font-size: 24px;
            }
            .tab-btn {
                font-size: 12px;
            }
            .btn {
                padding: 12px;
                font-size: 14px;
            }
            .btn-descargar {
                font-size: 12px;
                padding: 8px 10px;
            }
            .preview-header {
                font-size: 14px;
            }
        }

        /* Animación de advertencia para el disclaimer */
        @keyframes shakeGlow {
            0%, 100% { transform: translateX(0); box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
            20%, 60% { transform: translateX(-8px); box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); border-color: var(--gold-primary); }
            40%, 80% { transform: translateX(8px); box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); border-color: var(--gold-primary); }
        }
        .shake-glow-highlight {
            animation: shakeGlow 0.6s ease-in-out;
            background: rgba(212, 175, 55, 0.15) !important;
            border-color: var(--gold-primary) !important;
        }

        .btn-star {
            background: transparent;
            border: 1px solid #333;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            font-size: 13px;
            font-weight: 600;
            color: #9ca3af;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .btn-star:hover {
            border-color: var(--gold-primary);
            color: #fff;
            transform: scale(1.1);
        }

        /* Tooltip de viabilidad premium con despliegue hacia abajo */
        .viabilidad-tooltip {
            position: relative;
            display: inline-block;
            cursor: help;
        }

        .viabilidad-tooltip .tooltip-text {
            visibility: hidden;
            width: 300px;
            background-color: #161616;
            color: #f3f4f6;
            text-align: left;
            border: 1px solid var(--gold-primary);
            border-radius: 8px;
            padding: 12px;
            position: absolute;
            z-index: 99999;
            top: 130%; /* Despliega hacia abajo */
            left: 50%;
            transform: translateX(-50%) translateY(-5px);
            opacity: 0;
            transition: opacity 0.2s ease, transform 0.2s ease;
            font-size: 12px;
            font-weight: normal;
            line-height: 1.45;
            box-shadow: 0 8px 24px rgba(0,0,0,0.8);
            font-family: 'Outfit', sans-serif;
            pointer-events: none;
        }

        .viabilidad-tooltip .tooltip-text::after {
            content: "";
            position: absolute;
            bottom: 100%; /* Flechita arriba */
            left: 50%;
            margin-left: -6px;
            border-width: 6px;
            border-style: solid;
            border-color: transparent transparent var(--gold-primary) transparent;
        }

        .viabilidad-tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* --- CHATBOT DE SOPORTE FLOTANTE PREMIUM --- */
        .chatbot-float-btn {
            position: fixed;
            bottom: 25px;
            right: 25px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
            color: #000;
            box-shadow: 0 6px 20px rgba(212,175,55,0.4);
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            z-index: 10000;
            transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
        }

        .chatbot-float-btn:hover {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 8px 24px rgba(212,175,55,0.6);
        }

        .chatbot-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #ef4444;
            color: #fff;
            font-size: 9px;
            font-weight: bold;
            padding: 3px 6px;
            border-radius: 10px;
            font-family: 'Outfit', sans-serif;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.5);
            animation: chatbot-pulse 1.8s infinite;
        }

        .chatbot-window {
            position: fixed;
            bottom: 95px;
            right: 25px;
            width: 360px;
            height: 480px;
            background: #191e22;
            border: 1px solid rgba(212, 175, 55, 0.4);
            border-radius: 16px;
            box-shadow: 0 12px 36px rgba(0,0,0,0.85);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            z-index: 10000;
            transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            transform-origin: bottom right;
        }

        .chatbot-window.hidden {
            opacity: 0;
            transform: scale(0.8) translateY(40px);
            pointer-events: none;
        }

        .chatbot-header {
            background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
            padding: 14px 18px;
            color: #fff;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }

        .chatbot-header h4 {
            margin: 0;
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 600;
            letter-spacing: 0.3px;
        }

        .chatbot-body {
            flex-grow: 1;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: #13171a;
            scrollbar-width: thin;
        }

        .chatbot-msg {
            padding: 10px 14px;
            border-radius: 12px;
            max-width: 82%;
            line-height: 1.45;
            font-family: 'Outfit', sans-serif;
            font-size: 13px;
            word-wrap: break-word;
        }

        .chatbot-msg.bot {
            background: rgba(255,255,255,0.04);
            color: #e2e8f0;
            border: 1px solid rgba(255,255,255,0.03);
            border-bottom-left-radius: 2px;
            align-self: flex-start;
        }

        .chatbot-msg.user {
            background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
            color: #000;
            border-bottom-right-radius: 2px;
            align-self: flex-end;
            font-weight: 500;
            box-shadow: 0 2px 8px rgba(212,175,55,0.15);
        }

        .chatbot-options-container {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 5px;
            width: 100%;
        }

        .chatbot-option-btn {
            background: rgba(212,175,55,0.06);
            border: 1px solid rgba(212,175,55,0.2);
            color: var(--gold-light);
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            text-align: left;
            font-size: 12px;
            font-family: 'Outfit', sans-serif;
            transition: background 0.2s, border-color 0.2s, color 0.2s;
        }

        .chatbot-option-btn:hover {
            background: rgba(212,175,55,0.18);
            border-color: var(--gold-primary);
            color: #fff;
        }

        .chatbot-footer {
            padding: 10px;
            background: #191e22;
            border-top: 1px solid rgba(255,255,255,0.08);
            display: flex;
            gap: 8px;
        }

        .chatbot-input {
            flex-grow: 1;
            padding: 10px 12px;
            background: #0f1214;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #fff;
            font-size: 13px;
            font-family: 'Outfit', sans-serif;
            outline: none;
            transition: border-color 0.2s;
        }

        .chatbot-input:focus {
            border-color: var(--gold-primary);
        }

        .chatbot-send-btn {
            background: var(--gold-primary);
            color: #000;
            border: none;
            padding: 0 14px;
            border-radius: 8px;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
        }

        .chatbot-send-btn:hover {
            background: var(--gold-light);
        }

        .chatbot-send-btn:active {
            transform: scale(0.95);
        }

        @keyframes chatbot-pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); box-shadow: 0 0 10px rgba(239,68,68,0.7); }
            100% { transform: scale(1); }
        }

        /* Ajustes responsivos para celulares de chatbot */
        @media (max-width: 480px) {
            .chatbot-window {
                width: calc(100% - 30px);
                bottom: 85px;
                right: 15px;
                height: 420px;
            }
            .chatbot-float-btn {
                bottom: 15px;
                right: 15px;
                width: 55px;
                height: 55px;
            }
        }

/* ============================================================
   OPTIMIZACIÓN PROFUNDA PARA TELÉFONOS CELULARES (MOBILE-FIRST RESPONSIVE)
   Adaptación táctil y ergonomía para pacientes en EPS (320px - 768px)
   ============================================================ */
@media (max-width: 768px) {
    *, *::before, *::after {
        box-sizing: border-box !important;
    }
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        position: relative !important;
        -webkit-text-size-adjust: 100% !important;
    }
    body {
        padding: 8px 6px 24px 6px !important;
        margin: 0 !important;
        font-size: 14px !important;
    }
    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px 6px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }
    .header {
        padding: 12px 6px 10px 6px !important;
        text-align: center !important;
    }
    .header img#headerLogo {
        max-width: 220px !important;
        margin-bottom: 8px !important;
    }
    .header h1 {
        font-size: clamp(20px, 5.5vw, 25px) !important;
        line-height: 1.25 !important;
        margin: 0 0 8px 0 !important;
        word-break: break-word !important;
    }
    .header p {
        font-size: 13px !important;
        line-height: 1.4 !important;
        padding: 0 4px !important;
        margin: 0 auto 12px auto !important;
    }
    #liveDate {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }
    .btn-hero-start {
        padding: 11px 20px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        width: 100% !important;
        max-width: 320px !important;
        box-sizing: border-box !important;
        justify-content: center !important;
    }
    .top-nav-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        padding: 2px 0 6px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
    }
    .top-nav-actions button {
        font-size: 11px !important;
        padding: 6px 10px !important;
        min-height: 34px !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }
    #statusBanner {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
    #bannerVigilanciaProcesal {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 8px 10px !important;
        margin: 6px 0 10px 0 !important;
        border-radius: 8px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
    }
    .banner-vigilancia-text {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
    }
    #bannerVigilanciaProcesal button {
        width: 100% !important;
        font-size: 11.5px !important;
        padding: 7px 12px !important;
        min-height: 36px !important;
        justify-content: center !important;
    }
    .status {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 6px 8px !important;
        font-size: 11.5px !important;
        margin: 4px 0 8px 0 !important;
        line-height: 1.35 !important;
    }
    .tab-content {
        padding: 4px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .form-section {
        padding: 12px 10px !important;
        margin-bottom: 12px !important;
        border-radius: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .form-section h2 {
        font-size: 15px !important;
    }
    #contenedorChatGuiado,
    #chatVisualContainer {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    #chatBloquePaso1,
    #chatBloquePaso2,
    #chatBloquePaso3,
    #chatBloquePaso4,
    #chatBloquePaso5,
    #chatBloqueConfirmacion {
        padding: 10px 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    #chatPillsEps {
        display: flex;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin-bottom: 10px !important;
        width: 100% !important;
    }
    #chatPillsEps.eps-oculto,
    #chatPillsEps[style*="display: none"] {
        display: none !important;
    }
    #otraEpsInlineWrapper {
        width: 100% !important;
    }
    .chat-pill-btn {
        padding: 7px 11px !important;
        font-size: 12px !important;
        border-radius: 16px !important;
        min-height: 36px !important;
        box-sizing: border-box !important;
    }
    #chatGridNecesidades {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .chat-card-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px 8px !important;
        min-height: 52px !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .chat-card-btn span {
        white-space: normal !important;
        word-break: break-word !important;
    }
    .chat-pill-motivo {
        width: 100% !important;
        padding: 10px 12px !important;
        font-size: 12.5px !important;
        line-height: 1.35 !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
        word-break: break-word !important;
    }
    #chatPillsTiempo {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }
    .chat-pill-tiempo {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-height: 38px !important;
        box-sizing: border-box !important;
        flex: 1 1 45% !important;
        text-align: center !important;
    }
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important; /* Previene auto-zoom molesto de Safari iOS */
        min-height: 46px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    textarea#relato {
        min-height: 140px !important;
        padding: 10px !important;
    }
    .file-upload {
        padding: 14px 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .file-upload button {
        min-height: 44px !important;
        font-size: 13px !important;
        padding: 8px 18px !important;
    }
    #consentimientoContainer {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 10px !important;
        margin-bottom: 18px !important;
    }
    #consentimientoContainer label {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        font-size: 12px !important;
        line-height: 1.45 !important;
    }
    .btn-claim-cta {
        width: 100% !important;
        font-size: 15px !important;
        padding: 14px 12px !important;
        box-sizing: border-box !important;
        min-height: 52px !important;
        justify-content: center !important;
    }
    .btn, .btn-primary, button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    #btnAccesoAbogados {
        font-size: 12.5px !important;
        padding: 10px 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .paso-guia {
        padding-left: 10px !important;
    }
    .paso-guia h4 {
        font-size: 13px !important;
    }
    .auth-box {
        width: 94% !important;
        max-width: 94% !important;
        padding: 18px 14px !important;
        box-sizing: border-box !important;
    }
    section#miCaso.portal-caso {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 14px 10px !important;
        margin: 14px 0 !important;
    }
    .portal-caso form {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    footer#mainFooter, footer {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 14px 8px 84px 8px !important;
        font-size: 11px !important;
    }
    footer a, footer span {
        word-break: break-word !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 6px 4px 20px 4px !important;
    }
    .header h1 {
        font-size: 21px !important;
    }
    .form-section {
        padding: 10px 8px !important;
    }
    .chat-pill-tiempo {
        flex: 1 1 100% !important;
    }
}

/* ==========================================================================
   REGLAS DEFINITIVAS DE ALTO CONTRASTE / MODO CLARO (WCAG AAA)
   ========================================================================== */
body.light-mode {
    background-color: #f1f5f9 !important;
    background-image: none !important;
    color: #0f172a !important;
}

body.light-mode .container {
    background: #ffffff !important;
    border: 2px solid #0f172a !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    color: #0f172a !important;
}

body.light-mode .header {
    border-bottom: 2px solid #cbd5e1 !important;
    background: #f8fafc !important;
}

body.light-mode .header h1,
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4 {
    color: #0f172a !important;
    text-shadow: none !important;
}

body.light-mode .header p,
body.light-mode .form-section p,
body.light-mode p,
body.light-mode label,
body.light-mode span:not(.badge):not(.step-num) {
    color: #1e293b !important;
}

body.light-mode .status {
    background: #e2e8f0 !important;
    border-left: 5px solid #0284c7 !important;
    color: #0f172a !important;
    font-weight: 500 !important;
}

body.light-mode .form-section {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-mode .form-section h2 {
    color: #0f172a !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

body.light-mode .step-num {
    background: #0284c7 !important;
    color: #ffffff !important;
}

body.light-mode textarea,
body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode input[type="password"],
body.light-mode select {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #64748b !important;
    box-shadow: none !important;
}

body.light-mode textarea:focus,
body.light-mode input:focus {
    border-color: #0284c7 !important;
    outline: 2px solid #0284c7 !important;
}

body.light-mode .file-upload {
    background: #f8fafc !important;
    border: 2px dashed #64748b !important;
    color: #0f172a !important;
}

body.light-mode .file-upload span,
body.light-mode #dropZoneText {
    color: #0f172a !important;
}

body.light-mode .template-btn {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
    font-weight: 600 !important;
}

body.light-mode .template-btn:hover {
    background: #cbd5e1 !important;
    color: #000000 !important;
}

body.light-mode .btn-primary,
body.light-mode #btnAnalizar {
    background: #0284c7 !important;
    color: #ffffff !important;
    border: 2px solid #0369a1 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3) !important;
}

body.light-mode .btn-descargar {
    background: #ffffff !important;
    color: #0284c7 !important;
    border: 2px solid #0284c7 !important;
    font-weight: 700 !important;
}

body.light-mode #consentimientoContainer {
    background: #f1f5f9 !important;
    border: 2px solid #cbd5e1 !important;
}

body.light-mode #consentimientoContainer label {
    color: #0f172a !important;
    font-weight: 600 !important;
}

body.light-mode .documento-box {
    background: #f8fafc !important;
    border: 2px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-mode footer {
    background: #f8fafc !important;
    border-top: 2px solid #cbd5e1 !important;
}

body.light-mode footer div,
body.light-mode footer a {
    color: #1e293b !important;
}

body.light-mode #btnToggleContraste {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 2px solid #0f172a !important;
    font-weight: 700 !important;
}



/* ========== ANIMACIONES AUTO-INICIO (agregado 2026-08-28) ========== */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.02); }
}

/* ========== ANIMACIONES PAYWALL (agregado 2026-08-27) ========== */
@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.4); }
    50% { box-shadow: 0 0 20px 4px rgba(212,175,55,0.2); }
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 1024px) {
            .container { max-width: 1120px; }
            .form-section { padding: 28px 34px; }
        }

/* Portal de continuidad: legible también en móvil y sin UUID desbordado. */
.portal-caso {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid var(--gold-primary);
    border-radius: 14px;
    overflow-wrap: anywhere;
}
.portal-caso form { display: grid; gap: 12px; }
.portal-caso label { color: var(--gold-light); }
.portal-caso input, .portal-caso select, .portal-caso textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #64748b;
    border-radius: 8px;
    color: var(--text-primary, #fff);
    background: var(--bg-card, #1a1a1a);
}
.portal-caso input[type="checkbox"] { width: 24px; height: 24px; }
.portal-caso textarea { min-height: 110px; }
.portal-caso p { line-height: 1.6; white-space: pre-line; }
.portal-caso a { color: var(--gold-light); }
.portal-caso button {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px var(--gold-glow);
    transition: transform 0.2s ease, filter 0.2s ease;
}
.portal-caso button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.06);
}
.portal-caso button + button { margin-top: 8px; }
.portal-caso button:disabled { opacity: 0.6; cursor: wait; }

/* B5-Mejora 3: Texto grande — sobreescribe todos los font-size inline */
body.large-text *, body.large-text *::before, body.large-text *::after {
    font-size: var(--user-font-size) !important;
    line-height: calc(var(--user-font-size) * 1.6) !important;
}

/* --- HERO MEJORADO LEXSUMMA --- */
.btn-hero-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid rgba(243, 229, 171, 0.4);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}
.btn-hero-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    filter: brightness(1.02);
}
.btn-hero-start:active {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(212, 175, 55, 0.22);
}
/* --- BARRA DE PROGRESO --- */
.claim-flow-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 26px 0;
    padding: 14px 18px;
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.08), transparent 70%), var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow-x: auto;
}
.flow-step {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    position: relative;
}
.flow-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--text-muted);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12), transparent 70%);
    transition: all 0.3s ease;
}
.flow-step-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.flow-step-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
}
.flow-step-sub {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}
.flow-step.active .flow-step-circle {
    color: #000;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.08);
    border-color: rgba(243, 229, 171, 0.6);
}
.flow-step.active .flow-step-title {
    color: var(--gold-light);
}
.flow-step.active .flow-step-sub {
    color: var(--text-main);
    opacity: 0.8;
}
.flow-step-connector {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    min-width: 40px;
}
.btn-claim-cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.2px;
    color: #000;
    background: radial-gradient(circle at top, #f5d98c 0%, var(--gold-primary) 55%, var(--gold-dark) 100%);
    box-shadow: 0 18px 40px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.btn-claim-cta::after {
    content: '';
    position: absolute;
    top: -120%;
    left: -60%;
    width: 40%;
    height: 340%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
    transform: rotate(25deg);
    transition: all 0.6s ease;
}
.btn-claim-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(212, 175, 55, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-claim-cta:hover::after {
    left: 120%;
}
.btn-claim-cta:active {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(212, 175, 55, 0.26);
}
.btn-claim-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.4));
}
.btn-claim-cta-arrow {
    transition: transform 0.25s ease;
}
.btn-claim-cta:hover .btn-claim-cta-arrow {
    transform: translateX(4px);
}
        @media (max-width: 768px) {
            body {
                padding: 58px 10px 30px 10px;
            }
            .container {
                border-radius: 16px;
            }
            .header {
                padding: 36px 18px 24px;
            }
            .header h1 {
                font-size: clamp(24px, 7vw, 32px);
            }
            .claim-flow-progress {
                padding: 10px 12px;
                border-radius: 12px;
                gap: 8px;
            }
            .flow-step {
                min-width: 150px;
                gap: 10px;
            }
            .flow-step-circle {
                width: 32px;
                height: 32px;
                font-size: 12px;
            }
            .flow-step-title {
                font-size: 12px;
            }
            .flow-step-sub {
                font-size: 9px;
            }
            .form-section {
                padding: 18px 16px;
            }
            .form-section h2 {
                font-size: 18px;
            }
            .btn-claim-cta {
                font-size: 14px;
                padding: 12px 16px;
            }
            .btn-hero-start {
                font-size: 13px;
                padding: 9px 18px;
            }
            #headerLogo {
                max-width: 280px;
            }
            .chatbot-float-btn {
                bottom: 16px;
                right: 16px;
                width: 44px;
                height: 44px;
            }
        }

        @media (min-width: 1024px) {
            .container {
                max-width: 1100px;
            }
            .form-section {
                padding: 28px 32px;
            }
        }

        .eps-oculto {
            display: none !important;
        }

        /* --- TARJETA DE FECHAS CLAVE Y PLAZOS LEGALES (ITEM 12 OPCION 1) --- */
        .plazos-legal-box {
            border-left: 4px solid var(--gold-primary);
            background: rgba(255, 255, 255, 0.03);
        }

        .plazos-subtitulo {
            font-size: 13px;
            font-weight: 700;
            color: var(--gold-light);
            margin: 10px 0 8px 0;
        }

        .plazos-lista {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 10px;
        }

        .plazos-hito {
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 11px 13px;
        }

        .plazos-hito-encabezado {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }

        .plazos-badge {
            display: inline-block;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 999px;
            letter-spacing: 0.2px;
        }

        .plazos-badge-hoy {
            background: rgba(34, 197, 94, 0.18);
            color: #4ade80;
            border: 1px solid rgba(74, 222, 128, 0.45);
        }

        .plazos-badge-legal {
            background: rgba(212, 175, 55, 0.16);
            color: var(--gold-light);
            border: 1px solid rgba(212, 175, 55, 0.45);
        }

        .plazos-badge-urgente {
            background: rgba(239, 68, 68, 0.2);
            color: #fca5a5;
            border: 1px solid rgba(248, 113, 113, 0.55);
        }

        .plazos-nota {
            font-size: 12px;
            color: var(--text-muted);
            margin: 8px 0 12px 0;
            line-height: 1.45;
        }

        .plazos-acciones {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }

        .btn-plazo-primario {
            background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
            color: #000;
            border: none;
            border-radius: 8px;
            padding: 9px 14px;
            font-size: 12.5px;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .btn-plazo-secundario {
            background: rgba(255, 255, 255, 0.06);
            color: var(--text-main);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        @media (max-width: 768px) {
            .plazos-acciones {
                flex-direction: column;
                align-items: stretch;
            }
            .btn-plazo-primario,
            .btn-plazo-secundario {
                justify-content: center;
                text-align: center;
            }
        }

        /* Ocultación temporal para ensayo UX (fácil de revertir) */
        #chatBloqueConfirmacion,
        #seccionAnalisisGratis,
        #feedbackModal,
        #feedbackFormContainer,
        #pildoraFeedbackFlotante {
            display: none !important;
        }

        /* Accesibilidad táctil y lectura clara en celular y adultos mayores */
        .chat-pill-eps,
        .chat-pill-btn:not(#btnEps_otra),
        .chat-card-btn,
        .chat-pill-motivo,
        .chat-pill-tiempo {
            min-height: 46px !important;
            font-size: 14.5px !important;
            line-height: 1.35 !important;
        }
        .wizard-btn-continuar,
        .wizard-btn-anterior {
            min-height: 44px;
            font-size: 14px;
        }
        @media (max-width: 768px) {
            #chatGridNecesidades {
                grid-template-columns: 1fr !important;
            }
        }
