.citas-wrapper { max-width: 1200px; margin: 40px auto; padding: 0 20px 40px; }
        .citas-box { background: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); padding: 30px; border-top: 5px solid #004481; margin-bottom: 30px; }
        .citas-box h2 { margin: 0 0 15px 0; font-size: 1.7rem; color: #004481; }
        .filtros-container { background: #f8f9fa; border-radius: 8px; padding: 25px; margin-bottom: 25px; border-left: 4px solid #004481; }
        .filtros-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 20px; }
        .form-group { display: flex; flex-direction: column; position: relative; }
        .form-group label { 
            font-weight: 600; 
            color: #004481; 
            margin-bottom: 8px; 
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .form-group label::before {
            font-size: 1.2rem;
        }
        
        /* Iconos para cada label */
        .label-tipo::before { content: "🔍"; }
        .label-dni::before { content: "📄"; }
        .label-paterno::before { content: "👤"; }
        .label-materno::before { content: "👥"; }
        .label-fecha::before { content: "📅"; }
        
        .form-group input, .form-group select { 
            padding: 12px 15px 12px 45px; 
            border: 2px solid #e1e8ed; 
            border-radius: 6px; 
            font-size: 15px; 
            font-weight: 500;
            transition: all 0.3s ease; 
            background: #fff;
            font-family: 'Roboto', sans-serif;
        }
        
        .form-group select {
            padding-left: 45px;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23004481' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 15px center;
        }
        
        /* Iconos dentro de los inputs */
        .form-group::before {
            content: attr(data-icon);
            position: absolute;
            left: 15px;
            top: 42px;
            font-size: 1.2rem;
            pointer-events: none;
            z-index: 1;
        }
        
        .form-group input::placeholder {
            color: #95a5a6;
            font-style: italic;
            font-weight: 400;
        }
        
        .form-group input:focus, .form-group select:focus {
            border-color: #004481;
            box-shadow: 0 0 0 4px rgba(0,68,129,0.15);
            outline: none;
            transform: translateY(-2px);
        }
        
        .form-group input:valid:not(:placeholder-shown) {
            border-color: #27ae60;
            background-color: #f0fdf4;
        }
        
        /*.form-group input:valid:not(:placeholder-shown)::after {
            content: "✓";
            color: #27ae60;
        }*/
        
        .form-group select:focus {
            background-color: #f8fcff;
        }
        .btn-buscar { 
            background: linear-gradient(135deg, #004481 0%, #0066cc 100%);
            color: white; 
            padding: 14px 35px; 
            border: none; 
            border-radius: 8px; 
            font-weight: 700; 
            font-size: 16px; 
            cursor: pointer; 
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,68,129,0.3);
            text-transform: uppercase;
            letter-spacing: 1px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }
        
        .btn-buscar::before {
            content: "🔎";
            font-size: 1.2rem;
        }
        
        .btn-limpiar { 
            background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
            color: white; 
            padding: 14px 30px; 
            border: none; 
            border-radius: 8px; 
            font-weight: 700; 
            font-size: 16px;
            margin-left: 15px; 
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(108,117,125,0.3);
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }
        
        .btn-limpiar::before {
            content: "🗑️";
            font-size: 1.2rem;
        }
        .citas-table-wrapper { margin-top: 20px; overflow-x: auto; }
        .citas-table { width: 100%; border-collapse: collapse; background: #ffffff; border-radius: 8px; overflow: hidden; font-size: 14px; }
        .citas-table th { background-color: #004481; color: #ffffff; text-align: left; padding: 14px 15px; font-size: 12px; font-weight: 700; }
        .citas-table td { padding: 12px 15px; border-bottom: 1px solid #eeeeee; color: #444444; }
        .campo-dni, .campos-apellidos { display: none; }
        .mostrar { display: block !important; animation: fadeIn 0.3s ease; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        
        /* NUEVOS ESTILOS PARA INFO DEL PACIENTE */
        .info-paciente-box {
            background: linear-gradient(135deg, #004481 0%, #0066cc 100%);
            color: white;
            padding: 25px;
            border-radius: 8px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0,68,129,0.2);
            animation: slideInDown 0.6s ease-out;
        }
        
        @keyframes slideInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .paciente-nombre {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(255,255,255,0.3);
        }
        
        .paciente-nombre i {
            margin-right: 10px;
            color: #ffd700;
        }
        
        .instrucciones-importantes {
            background: rgba(255,255,255,0.1);
            border-left: 4px solid #ffd700;
            padding: 15px;
            border-radius: 4px;
            margin-top: 15px;
            animation: fadeIn 0.8s ease-out 0.3s backwards;
        }
        
        .instrucciones-importantes h4 {
            margin: 0 0 10px 0;
            font-size: 1.1rem;
            color: #ffd700;
            animation: pulseGlow 2s ease-in-out infinite;
        }
        
        @keyframes pulseGlow {
            0%, 100% {
                text-shadow: 0 0 5px rgba(255,215,0,0.5);
            }
            50% {
                text-shadow: 0 0 15px rgba(255,215,0,0.8);
            }
        }
        
        .instrucciones-importantes ul {
            margin: 0;
            padding-left: 20px;
            list-style: none;
        }
        
        .instrucciones-importantes li {
            margin-bottom: 8px;
            position: relative;
            padding-left: 25px;
        }
        
        .instrucciones-importantes li:before {
            content: "⚕";
            position: absolute;
            left: 0;
            color: #ffd700;
            font-size: 1.2rem;
        }
        
        /* ANIMACIÓN PARA LA TABLA DE RESULTADOS */
        .tabla-resultados-animada {
            animation: slideInUp 0.6s ease-out;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 8px 20px rgba(0,68,129,0.15);
            border: 1px solid #e1e8ed;
            margin-top: 25px;
        }
        
        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .tabla-header-animated {
            background: linear-gradient(135deg, #004481 0%, #0066cc 100%);
            padding: 20px;
            border-radius: 8px 8px 0 0;
            margin: -25px -25px 20px -25px;
            box-shadow: 0 4px 10px rgba(0,68,129,0.2);
        }
        
        .tabla-header-animated h3 {
            margin: 0;
            color: white;
            font-size: 1.3rem;
            font-weight: 700;
        }
        
        .tabla-header-animated h3 i {
            margin-right: 10px;
            color: #ffd700;
        }
        
        .citas-table-wrapper {
            margin-top: 0;
            overflow-x: auto;
            border-radius: 8px;
        }
        
        .citas-table {
            animation: fadeIn 0.8s ease-out 0.3s backwards;
            font-family: 'Roboto', sans-serif;
        }
        
        .citas-table thead tr {
            background: linear-gradient(135deg, #003366 0%, #004481 100%);
        }
        
        .citas-table th {
            background-color: transparent !important;
            color: #ffffff;
            text-align: left;
            padding: 16px 15px;
            font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 3px solid #ffd700;
        }
        
        .citas-table th::before {
            margin-right: 8px;
            font-size: 1.1rem;
        }
        
        /* Iconos para headers */
        .th-fecha::before { content: "📅"; }
        .th-hora::before { content: "⏰"; }
        .th-medico::before { content: "👨‍⚕️"; }
        .th-servicio::before { content: "🏥"; }
        .th-plan::before { content: "💳"; }
        .th-referencia::before { content: "📋"; }
        .th-prefactura::before { content: "🧾"; }
        
        .citas-table td {
            padding: 14px 15px;
            border-bottom: 1px solid #eeeeee;
            color: #2c3e50;
            font-size: 14px;
            font-weight: 400;
            vertical-align: middle;
        }
        
        .citas-table tbody tr:nth-child(odd) {
            background-color: #f8f9fa;
        }
        
        .citas-table tbody tr:nth-child(even) {
            background-color: #ffffff;
        }
        
        .citas-table tbody tr {
            animation: fadeInRow 0.5s ease-out backwards;
        }
        
        .citas-table tbody tr:nth-child(1) { animation-delay: 0.4s; }
        .citas-table tbody tr:nth-child(2) { animation-delay: 0.5s; }
        .citas-table tbody tr:nth-child(3) { animation-delay: 0.6s; }
        .citas-table tbody tr:nth-child(4) { animation-delay: 0.7s; }
        .citas-table tbody tr:nth-child(5) { animation-delay: 0.8s; }
        
        @keyframes fadeInRow {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        .citas-table tr:hover {
            background-color: #e3f2fd !important;
            transform: scale(1.01);
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0,68,129,0.1);
        }
        
        .btn-buscar:hover {
            background: linear-gradient(135deg, #0066cc 0%, #0080ff 100%);
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0,68,129,0.4);
        }
        
        .btn-buscar:active {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(0,68,129,0.3);
        }
        
        .btn-limpiar:hover {
            background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(108,117,125,0.4);
        }
        
        .btn-limpiar:active {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(108,117,125,0.3);
        }
        
        /* MENSAJE INICIAL */
        .mensaje-inicial {
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            border: 2px dashed #2196f3;
            padding: 40px;
            border-radius: 12px;
            text-align: center;
            animation: fadeIn 0.8s ease-out;
        }
        
        .mensaje-inicial i {
            font-size: 4rem;
            color: #2196f3;
            display: block;
            margin-bottom: 20px;
            animation: bounce 2s ease-in-out infinite;
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        .mensaje-inicial h3 {
            color: #1565c0;
            margin: 0 0 10px 0;
            font-size: 1.5rem;
        }
        
        .mensaje-inicial p {
            color: #424242;
            margin: 0;
            font-size: 1.1rem;
        }
        
        /* SPINNER DE CARGA */
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .loading-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 3px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-right: 8px;
            vertical-align: middle;
        }
        
        /* Tooltip informativo */
        .form-group [title] {
            cursor: help;
        }
        
        /* Animación suave al cambiar entre tipos de búsqueda */
        .campo-dni, .campos-apellidos {
            transition: opacity 0.3s ease, max-height 0.3s ease;
            max-height: 0;
            opacity: 0;
            overflow: hidden;
        }
        
        .campo-dni.mostrar, .campos-apellidos.mostrar {
            max-height: 500px;
            opacity: 1;
        }
        
        /* Efecto de pulsación en el título */
        .citas-box h2 {
            animation: titlePulse 3s ease-in-out infinite;
        }
        
        @keyframes titlePulse {
            0%, 100% { 
                transform: scale(1);
                color: #004481;
            }
            50% { 
                transform: scale(1.02);
                color: #0066cc;
            }
        }