 /* --- Variables de colores --- */
        :root {
            --primary-dark: #1B2A5A;
            --primary-medium: #2A3D7A;
            --primary-light: #3A4D8A;
            --accent: #FFC145;
            --accent-light: #FFD27A;
            --text-light: #FFFFFF;
            --text-dark: #333333;
            --background: #1B2A5A;
            --chat-bg: #FFFFFF;
            --bot-bg: #F5F7FF;
            --user-bg: #FFC145;
            --border-light: #E0E0E0;
            --error-color: #ff6b6b;
            --success-color: #51cf66;
        }

        /* --- General --- */
        body {
            margin: 0;
            font-family: 'Orbitron', sans-serif;
            background: var(--background);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            padding: 20px;
            box-sizing: border-box;
        }

        /* --- Chat Container --- */
        .chat-container {
            width: 95%;
            max-width: 650px;
            height: 90vh;
            background: var(--chat-bg);
            border-radius: 25px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            overflow: hidden;
            position: relative;
        }

        /* --- Header --- */
        .header {
            background: linear-gradient(135deg, var(--primary-medium), var(--primary-dark));
            color: var(--text-light);
            padding: 15px 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 1.5em;
            letter-spacing: 1px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .header img {
            height: 80px;
            margin-right: 15px;
            border-radius: 5px;
        }

        /* --- Chat Box --- */
        .chat-box {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            scrollbar-width: thin;
            scrollbar-color: var(--accent) #E0E0E0;
            background: var(--chat-bg);
        }

        .chat-box::-webkit-scrollbar {
            width: 8px;
        }

        .chat-box::-webkit-scrollbar-thumb {
            background: var(--accent);
            border-radius: 10px;
        }

        .message {
            margin: 10px 0;
            padding: 15px 20px;
            border-radius: 20px;
            max-width: 80%;
            line-height: 1.6;
            word-wrap: break-word;
            font-size: 0.95em;
            animation: fadeIn 0.3s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        @keyframes fadeIn {
            from {opacity: 0; transform: translateY(10px);}
            to {opacity: 1; transform: translateY(0);}
        }

        /* --- Mensajes --- */
        .bot {
            background: var(--bot-bg);
            align-self: flex-start;
            color: var(--text-dark);
            white-space: pre-line;
            border-left: 4px solid var(--accent);
        }

        .user {
            background: var(--user-bg);
            align-self: flex-end;
            color: var(--primary-dark);
            border-right: 4px solid var(--primary-medium);
        }

        /* --- Opciones - MÁS PEQUEÑAS --- */
        .option-button {
            background: var(--accent);
            color: var(--primary-dark);
            padding: 8px 14px; /* Reducido */
            border-radius: 20px;
            margin: 4px 4px 0 0; /* Reducido */
            border: none;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
            box-shadow: 0 2px 5px rgba(255, 193, 69, 0.3);
            font-size: 0.85em; /* Texto más pequeño */
        }

        .option-button:hover {
            background: var(--accent-light);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(255, 193, 69, 0.4);
        }

        /* Botón Volver con color azul */
        .btn-volver {
            background: var(--primary-medium);
            color: white;
            padding: 8px 14px;
            border-radius: 20px;
            margin: 4px 4px 0 0;
            border: none;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
            box-shadow: 0 2px 5px rgba(43, 61, 122, 0.3);
            font-size: 0.85em;
        }

        .btn-volver:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(43, 61, 122, 0.4);
        }

        /* --- Input --- */
        .input-box {
            display: flex;
            padding: 15px;
            border-top: 1px solid var(--border-light);
            background: var(--chat-bg);
        }

        .input-box input {
            flex: 1;
            padding: 12px 15px;
            border: 1px solid var(--border-light);
            border-radius: 20px;
            background: var(--chat-bg);
            color: var(--text-dark);
            outline: none;
            transition: all 0.3s ease;
        }

        .input-box input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 2px rgba(255, 193, 69, 0.2);
        }

        .input-box input::placeholder {
            color: #888;
        }

        .input-box button {
            margin-left: 10px;
            padding: 12px 20px;
            border-radius: 20px;
            border: none;
            background: var(--accent);
            color: var(--primary-dark);
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 5px rgba(255, 193, 69, 0.3);
        }

        .input-box button:hover {
            background: var(--accent-light);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(255, 193, 69, 0.4);
        }

        .typing {
            font-style: italic;
            color: #888;
        }

        /* --- Modal --- */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: white;
            padding: 25px;
            border-radius: 15px;
            width: 90%;
            max-width: 800px;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--border-light);
            padding-bottom: 10px;
        }

        .modal-title {
            font-size: 1.3em;
            font-weight: bold;
            color: var(--primary-dark);
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 1.5em;
            cursor: pointer;
            color: var(--primary-dark);
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: var(--primary-dark);
        }

        .form-group input, .form-group select {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border-light);
            border-radius: 8px;
            font-family: inherit;
        }

        .btn-primary {
            background: var(--primary-dark);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            width: 100%;
            transition: all 0.3s;
        }

        .btn-primary:hover {
            background: var(--primary-medium);
        }

        .btn-secondary {
            background: var(--accent);
            color: var(--primary-dark);
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s;
            margin-top: 10px;
        }

        .btn-secondary:hover {
            background: var(--accent-light);
        }

        .modal-iframe {
            width: 100%;
            height: 500px;
            border: none;
            border-radius: 8px;
        }

        .modal-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        /* Ficha Catastral */
        .ficha-container {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border: 1px solid #ccc;
        }

        .ficha-header {
            text-align: center;
            margin-bottom: 20px;
            border-bottom: 2px solid #1B2A5A;
            padding-bottom: 10px;
        }

        .ficha-logo {
            max-width: 150px;
            margin-bottom: 10px;
        }

        .ficha-title {
            color: #1B2A5A;
            font-size: 1.2em;
            font-weight: bold;
        }

        .ficha-subtitle {
            color: #2A3D7A;
            font-size: 1em;
        }

        .ficha-certificacion {
            text-align: right;
            margin-bottom: 20px;
            font-weight: bold;
        }

        .ficha-destinatario {
            margin-bottom: 20px;
        }

        .ficha-datos {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }

        .ficha-datos td {
            padding: 8px;
            border: 1px solid #ddd;
            vertical-align: top;
        }

        .ficha-datos .label {
            background: #f5f5f5;
            font-weight: bold;
            width: 30%;
        }

        .ficha-avaluos {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }

        .ficha-avaluos th, .ficha-avaluos td {
            padding: 8px;
            border: 1px solid #ddd;
            text-align: center;
        }

        .ficha-avaluos th {
            background: #1B2A5A;
            color: white;
        }

        .ficha-firma {
            margin-top: 40px;
            text-align: center;
        }

        .ficha-firma-line {
            border-top: 1px solid #000;
            width: 300px;
            margin: 0 auto 10px;
            padding-top: 10px;
        }

        /* Responsive */
        @media (max-width: 600px) {
            .header {
                font-size: 1.2em;
                padding: 12px 15px;
            }
            
            .header img {
                height: 35px;
                margin-right: 10px;
            }
            
            .message {
                max-width: 90%;
                padding: 12px 15px;
            }
            
            .chat-box {
                padding: 15px;
            }
            
            .option-button, .btn-volver {
                padding: 6px 12px;
                font-size: 0.8em;
            }
            
            .modal-actions {
                flex-direction: column;
            }
        }

      
        /* Estilos para el agendamiento de citas */
        .cita-header {
            text-align: center;
            margin-bottom: 20px;
        }

        .cita-header h3 {
            color: #1B2A5A;
            margin-bottom: 5px;
        }

        .tramite-seleccionado {
            background: #e8f4fd;
            padding: 10px;
            border-radius: 8px;
            border-left: 4px solid #2196F3;
            font-weight: bold;
            margin: 10px 0;
        }

        .cedula-info {
            background: #fff3cd;
            padding: 8px;
            border-radius: 5px;
            border-left: 4px solid #ffc107;
            margin: 10px 0;
        }

        .cita-steps {
            display: flex;
            justify-content: space-between;
            margin: 20px 0;
            position: relative;
        }

        .cita-steps::before {
            content: '';
            position: absolute;
            top: 15px;
            left: 10%;
            right: 10%;
            height: 2px;
            background: #ddd;
            z-index: 1;
        }

        .step {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            z-index: 2;
            flex: 1;
        }

        .step-number {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: #ddd;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .step.active .step-number {
            background: #1B2A5A;
        }

        .step-text {
            font-size: 0.8em;
            text-align: center;
        }

        .cita-content {
            margin: 20px 0;
        }

        .calendar-section, .horarios-section {
            background: white;
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            margin-bottom: 15px;
        }

        .calendar-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 10px 0;
        }

        .nav-btn {
            background: #1B2A5A;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 5px;
            cursor: pointer;
        }

        .current-month {
            font-weight: bold;
            color: #1B2A5A;
        }

        .calendar {
            background: white;
            border-radius: 8px;
            padding: 10px;
        }

        .calendar-header {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            text-align: center;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .day-header {
            padding: 5px;
            color: #1B2A5A;
        }

        .calendar-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
        }

        .day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 5px;
            cursor: pointer;
            position: relative;
            flex-direction: column;
            font-size: 0.9em;
        }

        .day.available {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
        }

        .day.available:hover {
            background: #e9ecef;
        }

        .day.unavailable {
            background: #f8f9fa;
            color: #6c757d;
            cursor: not-allowed;
            opacity: 0.5;
        }

        .day.selected {
            background: #1B2A5A;
            color: white;
        }

        .day.today {
            border: 2px solid #007bff;
        }

        .today-indicator {
            font-size: 0.6em;
            background: #007bff;
            color: white;
            padding: 1px 4px;
            border-radius: 3px;
            margin-top: 2px;
        }

        .time-slots {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            max-height: 200px;
            overflow-y: auto;
        }

        .time-slot {
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            text-align: center;
            cursor: pointer;
            background: #f8f9fa;
            font-size: 0.9em;
        }

        .time-slot.available:hover {
            background: #e9ecef;
        }

        .time-slot.selected {
            background: #1B2A5A;
            color: white;
            border-color: #1B2A5A;
        }

        .time-slot.occupied {
            background: #f8d7da;
            color: #721c24;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .ocupado-label {
            font-size: 0.7em;
            display: block;
            margin-top: 2px;
        }

        .cita-actions {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
        }

        .datos-cita {
            background: white;
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            margin: 15px 0;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group input, .form-group textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            box-sizing: border-box;
        }

        .form-group textarea {
            height: 80px;
            resize: vertical;
        }

        .loading {
            text-align: center;
            padding: 20px;
            color: #666;
        }

        .confirmacion-cita {
            text-align: center;
        }

        .confirmation-icon {
            font-size: 3em;
            margin-bottom: 15px;
        }

        .cita-confirmada {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 10px;
            margin: 15px 0;
        }

        .confirmacion-item {
            display: flex;
            justify-content: space-between;
            margin: 10px 0;
            padding-bottom: 5px;
            border-bottom: 1px solid #eee;
        }

        .numero-cita {
            background: #1B2A5A;
            color: white;
            padding: 5px 10px;
            border-radius: 5px;
            font-weight: bold;
        }

        .instrucciones-cita {
            text-align: left;
            margin: 20px 0;
        }

        .instrucciones-cita ul {
            margin: 10px 0;
            padding-left: 20px;
        }

        .contacto-info {
            background: #e8f4fd;
            padding: 15px;
            border-radius: 8px;
            margin-top: 15px;
        }

        /* Modal de agendamiento */
        .modal-agendamiento .modal-content {
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
        }